-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use Microsoft.AI.MachineLearning(WinML) interfaces to enable OnnxRuntime-QNN-EP(Qualcomm NPU) or other no-DirectX EP ? #19361
Comments
Can you help me? Thank you. |
@smk2007 @PatriceVignola @justinchuby @snnn @HectorSVC |
could you please take a look this issue? |
@caofx0418 Nope, WinML only supports CPU and DirectX (DML) backends. onnxruntime/winml/lib/Api/LearningModelDevice.cpp Lines 27 to 35 in 61e07a4
|
Thank you for your reply! Do WinML have plan to support other Backends in future ? |
I defer to Sheil @smk2007 for any future WinML plans, but my wager is that WinML will only target Windows API's like DirectML rather than using lower-level device-specific driver interfaces. WinML is a thin layer over ORT though - can you call ORT directly? |
Thank you for your reply! I can call ORT C++ interface directly. |
Hi @caofx0418 Qualcomm NPU (QNN-EP) with ONNX Runtime should be feasible. However, WinML currently only supports CPU and DirectX (DML) backends. If you need to use the QNN-EP, you might consider calling the ONNX Runtime (ORT) directly instead of through WinML. For those looking to integrate QNN-EP, ensure that your ONNX Runtime build includes the necessary QNN libraries and that your environment paths are correctly set. This setup has been effective for other models available from the Qualcomm AI Hub. Thank you. |
Describe the feature request
Can I use Microsoft.AI.MachineLearning(WinML) interfaces to enable OnnxRuntime-QNN-EP(Qualcomm NPU) or other no-DirectX EP ?
From "windows-ml/get-started", we can see 2 solutions: In-box vs NuGet
https://learn.microsoft.com/en-us/windows/ai/windows-ml/get-started
In-box: OnnxRuntime as a part of Windows, we can't change. so it's no chance to use myself built OnnxRuntime with QNN-EP.
NuGet: Microsoft.ai.machinelearning.dll does not contain an embedded ONNX runtime, instead the ONNX runtime is built into a file: onnxruntime.dll.
and maybe we can replace the onnxruntime.dll to myself built OnnxRuntime with QNN-EP.
but the WinML interface: public enum LearningModelDeviceKind, only support 4 kinds: 0 Default, 1 Cpu, 2 DirectX, 3 DirectXHighPerformance, 4 DirectXMinPower.
But there is no option for QNN-EP or other EP in the LearningModelDeviceKind enumeration.
So can I use Microsoft.AI.MachineLearning(WinML) interfaces to enable OnnxRuntime-QNN-EP(Qualcomm NPU) or other no-DirectX EP?
Describe scenario use case
Windows: Microsoft.AI.MachineLearning(WinML) interfaces to enable OnnxRuntime-QNN-EP(Qualcomm NPU) or other no-DirectX EP
The text was updated successfully, but these errors were encountered: