Set Latency performance mode in case of sync mode. (#10516)
This commit is contained in:
@@ -124,10 +124,12 @@ ov::hint::PerformanceMode get_performance_hint(const std::string& device, const
|
|||||||
ov_perf_hint = ov::hint::PerformanceMode::UNDEFINED;
|
ov_perf_hint = ov::hint::PerformanceMode::UNDEFINED;
|
||||||
}
|
}
|
||||||
} else {
|
} 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("
|
||||||
<< device << ") performance hint will be set to THROUGHPUT." << slog::endl;
|
<< device << ") performance hint will be set to " << ov_perf_hint << "." << slog::endl;
|
||||||
ov_perf_hint = ov::hint::PerformanceMode::THROUGHPUT;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (FLAGS_hint != "") {
|
if (FLAGS_hint != "") {
|
||||||
@@ -390,10 +392,10 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
if ((device_name.find("MULTI") != std::string::npos) &&
|
if ((device_name.find("MULTI") != std::string::npos) &&
|
||||||
(device_name.find("CPU") != 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, "
|
"the CPU + GPU performs best with GPU throttling hint, "
|
||||||
<< "which releases another CPU thread (that is otherwise "
|
<< "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;
|
<< slog::endl;
|
||||||
device_config[GPU_CONFIG_KEY(PLUGIN_THROTTLE)] = "1";
|
device_config[GPU_CONFIG_KEY(PLUGIN_THROTTLE)] = "1";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user