[CPU] Set lower bound for nstreams to 1 (#8747)
This commit is contained in:
parent
c2ddfdc940
commit
251883001c
@ -533,13 +533,15 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std
|
||||
// network is below general threshold
|
||||
num_streams = std::max(default_num_streams, num_streams_less_aggressive);
|
||||
}
|
||||
|
||||
int ovPerfHintNumRequests = engConfig.perfHintsConfig.ovPerfHintNumRequests; // set thru SetConfig to the plugin
|
||||
auto num_requests = config.find(PluginConfigParams::KEY_PERFORMANCE_HINT_NUM_REQUESTS);
|
||||
if (engConfig.perfHintsConfig.ovPerfHintNumRequests) // set thru SetConfig to the plugin
|
||||
num_streams = std::min(engConfig.perfHintsConfig.ovPerfHintNumRequests,
|
||||
engConfig.perfHintsConfig.ovPerfHintNumRequests);
|
||||
if (num_requests != config.end()) // arrived with config to the LoadNetwork (and thus higher pri)
|
||||
num_streams = std::min(num_streams,
|
||||
PerfHintsConfig::CheckPerformanceHintRequestValue(num_requests->second));
|
||||
if (num_requests != config.end()) {
|
||||
// arrived with config to the LoadNetwork (and thus higher pri)
|
||||
ovPerfHintNumRequests = PerfHintsConfig::CheckPerformanceHintRequestValue(num_requests->second);
|
||||
}
|
||||
num_streams = std::min(num_streams, std::max(ovPerfHintNumRequests, 1));
|
||||
|
||||
config[PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS] = std::to_string(num_streams);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user