Python ONNXRuntime-Directml is using my CPU but I want it to use my AMD GPU

289 Views Asked by At

I am trying to create AI workflows using my Radeon RX 6700 XT on my Windows 10 device.

As of this writing (1/1/24), AMD ROCM framework is not supported on Windows, so I am trying to get Microsoft's DirectML to work instead.

I have installed onnxruntime-directml using pip, but when I print the device used to console, I see it is using "CPU-DML".

How do I force the onnx directml to use my gpu?

Code:

import onnxruntime as ort

print(ort.get_device())
0

There are 0 best solutions below