Closed Bug 2069307 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62412 - WebNN: Mark GATHER as float16-capable on LiteRT GPU delegate

Categories

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

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Ningxin Hu <ningxin.hu@intel.com> wrote:

WebNN: Mark GATHER as float16-capable on LiteRT GPU delegate

GATHER was serialized as not supporting float16, so a float16 input
got a DEQUANTIZE inserted in front of it. The ML Drift delegate folds
that DEQUANTIZE away, which leaves GATHER reading a float16 input into
the float32 destination the graph declared. Its model builder rejects
that with "Input / output dtype mismatch", so the node and its
DEQUANTIZE drop to CPU and the delegated partition is split.

GATHER in ML Drift is a pure lookup 1: it copies input elements
through unchanged, so it can carry float16 the way reshape already
does. Marking it float16-capable leaves the conversion on the output,
where the delegate fuses it into the gather kernel instead of
materializing a float32 copy of the whole input.

Adds a "conv2d default + gather / float16" WPT case. Conv2d is not
float16-capable, so its float16 output is serialized as float32;
gather then reads a float32 input while its own output operand is
float16 and is the graph output, which is the case the output type
override covers.

Bug: 534847488
Change-Id: I2758cb3e305e02edb568ba3a302adb5409cfafc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8345429
Commit-Queue: Hu, Ningxin \<ningxin.hu@intel.com>
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1691345}

Attached file Notable wpt changes —

CI Results

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

Total 327 tests

Status Summary

Firefox

OK : 3
FAIL: 3

Chrome

OK : 3
PASS: 156

Safari

OK : 3
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0999b6dd7eb7 https://hg.mozilla.org/integration/autoland/rev/83abe78f342d [wpt PR 62412] - WebNN: Mark GATHER as float16-capable on LiteRT GPU delegate, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: