microsoft / microsoft/onnxruntime
[ORT CPU][ORT GPU (DML)][WebNN] Wrong results to run some WebNN dequantizeLinear tests
Open
@hariharans29 is already working on this.
Since Nov 12, 2025.
ep:DML
ep:WebNN
quantization
WebNN
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
Describe the issue
Wrong results to run some WebNN dequantizeLinear tests by both ORT default CPU EP and ORT default GPU DML EP.
| Test | Error message |
|---|---|
| dequantizeLinear int32 1D tensor with float32 1D scale | assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual 0 should be close enough to expected -22405.495643615723 by ULP distance: expected a number less than or equal to 1n but got 1185876734n |
| dequantizeLinear with float32 3D scale as an intermediate node | assert_less_than_equal: assert_array_approx_equals_ulp: test transpose reshape dequantizeLinear float32 actual 0 should be close enough to expected -1.1202747821807861 by ULP distance: expected a number less than or equal to 1n but got 1066362154n |
| dequantizeLinear int32 1D tensor with float16 1D scale | assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float16 actual 0 should be close enough to expected -22400 by ULP distance: expected a number less than or equal to 1 but got 62840 |
| dequantizeLinear with float16 3D scale as an intermediate node | assert_less_than_equal: assert_array_approx_equals_ulp: test transpose reshape dequantizeLinear float16 actual 0 should be close enough to expected -1.1201171875 by ULP distance: expected a number less than or equal to 1 but got 48251 |
/cc @fdwr PTAL, thanks!
To reproduce
- Install Windows App SDK Stable 1.8.2 (1.8.251003001)
- Install lates Edge Canary browser
- Launch Edge Canary browser, navigate to
about://flagsenabled "Enables WebNN API" and "ONNX Runtime backend for WebNN" flags, then relaunch browser - Navigate to below test url, get above issue with wrong results
| Test | Test URL |
|---|---|
| dequantizeLinear int32 1D tensor with float32 1D scale | https://wpt.live/webnn/conformance_tests/dequantizeLinear.https.any.html?device=cpu&tc=dequantizeLinear%20int32%201D%20tensor%20with%20float32%201D%20scale |
| dequantizeLinear with float32 3D scale as an intermediate node | https://wpt.live/webnn/conformance_tests/dequantizeLinear.https.any.html?device=cpu&tc=dequantizeLinear%20with%20float32%203D%20scale%20as%20an%20intermediate%20node |
| dequantizeLinear int32 1D tensor with float16 1D scale | https://wpt.live/webnn/conformance_tests/dequantizeLinear.https.any.html?device=cpu&tc=dequantizeLinear%20int32%201D%20tensor%20with%20float16%201D%20scale |
| dequantizeLinear with float16 3D scale as an intermediate node | https://wpt.live/webnn/conformance_tests/dequantizeLinear.https.any.html?device=cpu&tc=dequantizeLinear%20with%20float16%203D%20scale%20as%20an%20intermediate%20node |
Note: Please replace cpu with gpu for device parameter in Test URL to test by ORT default GPU EP.
Urgency
No response
ONNX Runtime Installation
Released Package Windows App SDK Stable 1.8.2 (1.8.251003001)
ONNX Runtime Version or Commit ID
1.23.25.928
Execution Provider
ORT default CPU EP
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.
Assessment
This issue has not been assessed yet.