Skip to content

Commit 55c1a3b

Browse files
authoredApr 5, 2025
Fix 'minimal_power' to 'minimum_power' for DirectML performance selection (perf test) (#24303)
In Perf Test for DirectML EP, for the "performance_preference" runtime key we could not select the "minimum_power" value option due to a small bug. This PR fixes it so that "minimum_power" can be used and ran. I will also link the respective issue to this PR I made the change, built onnxruntime, and tested the perf_test.exe + DLLs on a system with Intel Integrated Graphics + Nvidia dGPU. Switching between 'minimum_power' and 'high_performance', I can see the options respectively choose Intel Integrated and Nvidia dGPU as device runtimes respectively (I checked task manager utilization for both devices). Both inferences complete with no problems. I am attaching a reproducer here with the built perf_test and the commands I tried to test it: [DLL_Build_DML_Reproducer.zip](https://github.com/user-attachments/files/19596463/DLL_Build_DML_Reproducer.zip) Issue #24182 @fdwr Hi, I fixed the issue, if you could please review, thank you
1 parent a7e62d6 commit 55c1a3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎onnxruntime/test/perftest/ort_test_session.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,12 @@ select from 'TF8', 'TF16', 'UINT8', 'FLOAT', 'ITENSOR'. \n)");
421421
"Select from 'gpu', or 'npu' \n");
422422
}
423423
} else if (key == "performance_preference") {
424-
std::set<std::string> ov_supported_values = {"default", "high_performance", "minimal_power"};
424+
std::set<std::string> ov_supported_values = {"default", "high_performance", "minimum_power"};
425425
if (ov_supported_values.find(value) != ov_supported_values.end()) {
426426
} else {
427427
ORT_THROW(
428428
"[ERROR] [DML] You have selected a wrong configuration value for the key 'performance_preference'. "
429-
"Select from 'default', 'high_performance' or 'minimal_power' \n");
429+
"Select from 'default', 'high_performance' or 'minimum_power' \n");
430430
}
431431
} else if (key == "disable_metacommands") {
432432
std::set<std::string> ov_supported_values = {"true", "True", "false", "False"};

0 commit comments

Comments
 (0)