Closed Bug 2045976 Opened 3 days ago Closed 19 hours ago

[wpt-sync] Sync PR 60487 - Revert "WebNN: Fix Pool2d ceil_mode to check both spatial dimensions"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox153 fixed)

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 60487 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/60487
Details from upstream follow.

Takashi Nakayama <tnak@chromium.org> wrote:

Revert "WebNN: Fix Pool2d ceil_mode to check both spatial dimensions"

This reverts commit 6c3c7a1a61db01bcf82d2658a30b3632619c3b92.

Reason for revert: Tests are failing. See crbug.com/521419439

Original change's description:

WebNN: Fix Pool2d ceil_mode to check both spatial dimensions

The previous code only compared the height dimension's floor output
size against the WebNN output height to determine ceil_mode. When
only the width dimension required ceiling rounding (e.g., input
[1,1,5,5], window [3,2], strides [2,2], roundingType:"ceil"), the
height check passed with floor, so ceil_mode=0 was emitted.

This caused a shape mismatch between Chromium's WebNN operand
descriptors (e.g., [1,1,2,3]) and ORT's actual execution shape
(e.g., [1,1,2,2]). The mismatch invalidated gather/scatter index
sanitization: indices valid for the WebNN shape could be out of
bounds for ORT's smaller tensor, enabling OOB read/write on
execution providers that do not validate indices at dispatch time.

Fix: compute CalculateConv2dOutputSize for both height and width,
and set ceil_mode=1 when either dimension needs ceiling rounding.
ONNX Pool's ceil_mode is a single global attribute, so setting it
when any dimension requires ceiling is both correct and safe (ceiling
of an integer is itself).

This CL also added some conformance tests for this scenario.

Bug: 519241091
Change-Id: I9dc92f5f81687286eaf6aca8468032fe152360d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7901552
Reviewed-by: Hu, Ningxin \<ningxin.hu@intel.com>
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Commit-Queue: Xu, Mingming1 \<mingming1.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1643553}

Bug: 519241091, 521419439
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 519241091
Change-Id: I9c7d3dbfac45956d6de09b40dc3d3e1190c4c610
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7911562
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com \<rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Takashi Nakayama \<tnak@chromium.org>
Owners-Override: Takashi Nakayama \<tnak@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com \<rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1643683}

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 9 tests and 29 subtests

Status Summary

Firefox

OK : 9
FAIL: 9

Chrome

OK : 9
PASS: 204
FAIL: 84

Safari

OK : 9
FAIL: 9

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0b199cfa41fa https://hg.mozilla.org/integration/autoland/rev/44cee03b2f70 [wpt PR 60487] - Revert "WebNN: Fix Pool2d ceil_mode to check both spatial dimensions", a=testonly
Status: NEW → RESOLVED
Closed: 19 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.