-
Notifications
You must be signed in to change notification settings - Fork 301
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
DirectMLNpuInference fails to run on the ARM64 NPU #640
Comments
And Could you add some build script(such as CMakeLists.txt) in to sample project? |
Base on this blog. The DirectML version need 1.15.2, and onnxruntime need 1.18. The native demo use 1.17 onnxruntime.... https://github.com/microsoft/DirectML/blob/master/Samples/DirectMLNpuInference/packages.config <?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AI.DirectML" version="1.15.2" targetFramework="native" />
<package id="Microsoft.AI.MachineLearning" version="1.17.0" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages> |
Seeing similar issue on ASUS X Elite. Updated drivers based on the blog. WebNN gives driver not installed. |
It compiles and runs now ok! (I can compile and run this sample on a Snapdragon Dev Kit. But it only uses the GPU and not the NPU. What's wrong?) |
Hi @xiaoweiChen Snapdragon X Elite NPU should be supported. However, it seems there might be an issue with the DirectML setup on ARM64 platforms. Ensuring that you have the correct drivers and that your environment paths are correctly set is crucial. For experiencing issues with the NPU not being detected, please ensure that all necessary libraries, such as libQnnHtp.so, libQnnHtpV73Stub.so, libQnnHtpV73Skel.so, and others, are correctly placed in the appropriate directories. Additionally, updating to the latest versions of DirectML and ONNX Runtime as specified in the documentation might resolve some compatibility issues. Thankyou |
Thanks for your reply! My NPU driver version: 30.0.31.50, update at 2024/5/20. Before see your words, I think if windows for arm with Qualcomm chip drived well (e.g. see the GPU and NPU in Windows Task Manager), the necessary libraries(whatever static or shared libraries) would install well for develper or user. Well, I read the onnxruntime-qnn page, and download Qualcomm® AI Engine Direct SDK from https://qpm.qualcomm.com/#/main/tools/details/qualcomm_ai_engine_direct. After install, I see the libraries which you mentioned. En, the question come, where is the "correctly placed in the appropriate directories"? Could you give me a sample for this, or the doc address for this? Let me or us know which version for DirectML and ONNXRuntime would be worked well with Snapdragon NPU. |
Hi @xiaoweiChen Thank you for providing the detailed information. Here are a few steps to help troubleshoot and potentially resolve the issue:
|
Without doing all the steps above this DirectML sample runs ok on the Snapdragon Dev Kit. See image below. Please can you investigate the issue with the other sample: DirectML_ESRGAN? |
Hi @fobrs , Could you share the NPU driver, DirectML and ONNXRuntime version for us? I want to make program find NPU and the NPU usage is not 0% in Windows Task Manager. |
Hi @ashumish-QCOM , Thank you for the steps. I will try them in my side. If there have any progress, I will update here. |
Qualcomm(R) Hexagon(TM) NPU Version 30.0.31.8 These modules are loaded into the process: Microsoft.AI.DirectML 1.15.4 |
Base on
DirectMLNpuInference
sample and #625(update SDK to Windows 11 SDK(10.0.26100.0)).I make DirectML NPU work well on Intel Lunar Lake Client Platform, I see the NPU usage not 0 when running program on Windows Task Manager.
While, I try this sample on My Windows ARM64 machine, the program would tell me "No NPU device found"...
Anyone know the reason?
Is DirectML NPU not support ARM64 platform?
My device info:
CPU: Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz
GPU: Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Adreno(TM) GPU
NPU: Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Hexagon(TM) NPU
My test code:
The text was updated successfully, but these errors were encountered: