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.
[1]: https://github.com/google-ai-edge/LiteRT/pull/9682
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} N
Ningxin Hu committed
c4781704fb6f7829bab44c1dbbad3cca8cc7140e
Parent: ddfa5ac
Committed by Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
on 9/3/2026, 5:36:13 PM