Remove ov::hint::PerformanceMode::UNDEFINED (#21592)
* Remove ov::hint::PerformanceMode::UNDEFINED * Update for reviewer comments and build issue * Fix build error - may be used uninitialized * Update --------- Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
@@ -106,7 +106,7 @@ def main():
|
||||
next_step()
|
||||
|
||||
def set_performance_hint(device):
|
||||
perf_hint = properties.hint.PerformanceMode.UNDEFINED
|
||||
perf_hint = properties.hint.PerformanceMode.THROUGHPUT
|
||||
supported_properties = benchmark.core.get_property(device, properties.supported_properties())
|
||||
if properties.hint.performance_mode() in supported_properties:
|
||||
if is_flag_set_in_command_line('hint'):
|
||||
@@ -117,16 +117,16 @@ def main():
|
||||
elif args.perf_hint == "cumulative_throughput" or args.perf_hint == "ctput":
|
||||
perf_hint = properties.hint.PerformanceMode.CUMULATIVE_THROUGHPUT
|
||||
elif args.perf_hint=='none':
|
||||
perf_hint = properties.hint.PerformanceMode.UNDEFINED
|
||||
# Not set PerformanceMode, and plugin will apply its internal default PerformanceMode
|
||||
return
|
||||
else:
|
||||
raise RuntimeError("Incorrect performance hint. Please set -hint option to"
|
||||
"`throughput`(tput), `latency', 'cumulative_throughput'(ctput) value or 'none'.")
|
||||
else:
|
||||
perf_hint = properties.hint.PerformanceMode.THROUGHPUT if benchmark.api_type == "async" else properties.hint.PerformanceMode.LATENCY
|
||||
perf_hint = properties.hint.PerformanceMode.LATENCY if benchmark.api_type == "sync" else properties.hint.PerformanceMode.THROUGHPUT
|
||||
logger.warning(f"Performance hint was not explicitly specified in command line. " +
|
||||
f"Device({device}) performance hint will be set to {perf_hint}.")
|
||||
if perf_hint != properties.hint.PerformanceMode.UNDEFINED:
|
||||
config[device][properties.hint.performance_mode()] = perf_hint
|
||||
config[device][properties.hint.performance_mode()] = perf_hint
|
||||
else:
|
||||
logger.warning(f"Device {device} does not support performance hint property(-hint).")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user