disabling auto-batching when batch<4 (as batch1 kernels are heavily optimized) (#10188)

This commit is contained in:
Maxim Shevtsov 2022-02-09 12:02:30 +03:00 committed by GitHub
parent 04194b292d
commit 320c64de24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -746,7 +746,8 @@ InferenceEngine::IExecutableNetworkInternal::Ptr AutoBatchInferencePlugin::LoadN
requests = static_cast<unsigned int>(PerfHintsConfig::CheckPerformanceHintRequestValue(reqs->second));
if (requests)
optBatchSize = std::max(1u, std::min(requests, optimalBatchSize));
metaDevice.batchForDevice = optBatchSize;
if (optBatchSize > 2) // batching is usually in-efficient for batch<4 (as batch1 kernels are heavily optimized)
metaDevice.batchForDevice = optBatchSize;
}
const auto perfConfig = fullConfig.find(PluginConfigParams::KEY_PERF_COUNT);