mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-26 22:35:43 +00:00
Add DML support to the transformers benchmark.py script (#13776)
### Description Add DML support to the transformers benchmark.py script ### Motivation and Context Before this change, running the `benchmark.py` script when the `onnxruntime-directml` package is installed resulted in an error because it expects a CUDA or ROCM framework.
This commit is contained in:
parent
29ed8811e5
commit
08ed09d20b
1 changed files with 2 additions and 1 deletions
|
|
@ -118,9 +118,10 @@ def run_onnxruntime(
|
|||
use_gpu
|
||||
and ("CUDAExecutionProvider" not in onnxruntime.get_available_providers())
|
||||
and ("ROCMExecutionProvider" not in onnxruntime.get_available_providers())
|
||||
and ("DmlExecutionProvider" not in onnxruntime.get_available_providers())
|
||||
):
|
||||
logger.error(
|
||||
"Please install onnxruntime-gpu package instead of onnxruntime, and use a machine with GPU for testing gpu performance."
|
||||
"Please install onnxruntime-gpu or onnxruntime-directml package instead of onnxruntime, and use a machine with GPU for testing gpu performance."
|
||||
)
|
||||
return results
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue