Skip to content

Commit ff1fa5a

Browse files
authored
upd way to set number of streams (#3224)
1 parent 4ada8bd commit ff1fa5a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

demos/common/cpp/utils/src/config_factory.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ ModelConfig ConfigFactory::getUserConfig(const std::string& flags_d,
4646
config.compiledModelConfig.emplace(ov::affinity.name(), ov::Affinity::NONE);
4747
}
4848
else if (device == "GPU") {
49-
config.compiledModelConfig.emplace(ov::num_streams.name(),
50-
(deviceNstreams.count(device) > 0 ? ov::Any(deviceNstreams.at(device))
51-
: ov::Any(ov::NumStreams::AUTO)));
52-
49+
config.compiledModelConfig.emplace(ov::num_streams(deviceNstreams.count(device) > 0
50+
? (int)deviceNstreams.at(device)
51+
: ov::NumStreams::AUTO));
5352
if (flags_d.find("MULTI") != std::string::npos
5453
&& config.getDevices().find("CPU") != config.getDevices().end()) {
5554
// multi-device execution with the CPU + GPU performs best with GPU throttling hint,

0 commit comments

Comments
 (0)