Skip to content

[ORT GPU][WebNN] Fail to run two WebNN batchNormalization tests due to tolerance issues #26532

@BruceDai

Description

@BruceDai

Describe the issue

Fail to run below two WebNN batchNormalization tests due to tolerance issues by ORT default GPU EP.

Test Error message
batchNormalization float32 2D constant tensors default options assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float32 actual 1.8526287078857422 should be close enough to expected 1.8526301383972168 by ULP distance: expected a number less than or equal to 6n but got 12n
batchNormalization options.axis=0 + gelu assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization gelu float32 actual -0.035951320081949234 should be close enough to expected -0.03595117852091789 by ULP distance: expected a number less than or equal to 24n but got 38n

/cc @fdwr PTAL, thanks!

To reproduce

  1. Install Windows App SDK Stable 1.8.2 (1.8.251003001)
  2. Install lates Edge Canary browser
  3. Launch Edge Canary browser, navigate to about://flags enabled "Enables WebNN API" and "ONNX Runtime backend for WebNN" flags, then relaunch browser
  4. Run each failure test using below test url
Test Test URL
batchNormalization float32 2D constant tensors default options https://wpt.live/webnn/conformance_tests/batch_normalization.https.any.html?device=gpu&tc=batchNormalization%20float32%202D%20constant%20tensors%20default%20options
batchNormalization options.axis=0 + gelu https://wpt.live/webnn/conformance_tests/subgraph.https.any.html?device=gpu&tc=batchNormalization%20options.axis=0%20%2B%20gelu

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 GPU EP

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:WebNNWebNN execution providerplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions