microsoft / microsoft/WindowsAppSDK-Samples
Results are not correct while enabling NPU mode for windowsML sample code
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1k
- Forks
- 335
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 8
Description
Dear all,
I would like to ask, is there any document describing the case of using NPU?
I've faced an issue that the result is not correct whenever assigning ep_policy as NPU for squeezenet.onnx.
For NPU case, I feed the original FP32 onnx model and it seems to do quantization but takes around 15 sec.
The sample code is under https://github.com/microsoft/WindowsAppSDK-Samples/tree/release/experimental/Samples/WindowsML/cpp/CppConsoleDesktop
Command: CppConsoleDesktop.exe --ep_policy NPU
Results: tench 0.1% goldfish 0.1% (CPU:boxer 28.5% Saint Bernard 28.5% ...)
Platform: AMD Ryzen AI 9 HX370 w/ Radeon 890M
Could you please help verify why it happens or is there any other steps I need to modify to enable NPU mode?
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WindowsML C++ sample at experimental/Samples/WindowsML/cpp/CppConsoleDesktop and run CppConsoleDesktop.exe --ep_policy NPU with squeezenet.onnx. Compare the NPU results with the reported CPU results and investigate the NPU execution path and quantization behavior. Done means identifying the cause of the incorrect classification or documenting the required steps to obtain correct NPU results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100