Set Latency performance mode in case of sync mode. (#10516)

This commit is contained in:
Fedor Zharinov
2022-02-21 18:08:05 +03:00
committed by GitHub
parent 09379dca86
commit 4decf16927

View File

@@ -124,10 +124,12 @@ ov::hint::PerformanceMode get_performance_hint(const std::string& device, const
ov_perf_hint = ov::hint::PerformanceMode::UNDEFINED;
}
} else {
slog::warn << "PerformanceMode was not explicitly specified in command line. "
ov_perf_hint =
FLAGS_api == "sync" ? ov::hint::PerformanceMode::LATENCY : ov::hint::PerformanceMode::THROUGHPUT;
slog::warn << "Performance hint was not explicitly specified in command line. "
"Device("
<< device << ") performance hint will be set to THROUGHPUT." << slog::endl;
ov_perf_hint = ov::hint::PerformanceMode::THROUGHPUT;
<< device << ") performance hint will be set to " << ov_perf_hint << "." << slog::endl;
}
} else {
if (FLAGS_hint != "") {
@@ -390,10 +392,10 @@ int main(int argc, char* argv[]) {
if ((device_name.find("MULTI") != std::string::npos) &&
(device_name.find("CPU") != std::string::npos)) {
slog::warn << "Turn on GPU throttling. Multi-device execution with "
slog::warn << "GPU throttling is turned on. Multi-device execution with "
"the CPU + GPU performs best with GPU throttling hint, "
<< "which releases another CPU thread (that is otherwise "
"used by the GPU driver for active polling)"
"used by the GPU driver for active polling)."
<< slog::endl;
device_config[GPU_CONFIG_KEY(PLUGIN_THROTTLE)] = "1";
}