fixed possible situation when auto-batching returns zero requests (#10388)

This commit is contained in:
Maxim Shevtsov
2022-02-15 18:13:25 +03:00
committed by GitHub
parent d5e8e0fb88
commit 317b956d2e

View File

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