commit a642e075072fd3369ca861260dcbfd3f987a2388
parent 1f6242daf9681258c8aef13e038af909016d5661
Author: junwei <junwei.fu@intel.com>
Date: Tue, 21 Oct 2025 10:36:57 +0000
Bug 1994798 [wpt PR 55482] - Reland "Reland "webnn: Enable kokoro_82m_v1_fp16 model on TFLite backend"", a=testonly
Automatic update from web-platform-tests
Reland "Reland "webnn: Enable kokoro_82m_v1_fp16 model on TFLite backend""
This is a reland of commit 16da64d9f49ce6fb66699377c37c2ed47a4440da
This reland updates baseline expected file on mac14 not mac15 for failed
test: https://ci.chromium.org/b/8701302412868775361.
Original change's description:
> Reland "webnn: Enable kokoro_82m_v1_fp16 model on TFLite backend"
>
> This is a reland of commit I33eae7f3e81e8f2efac0cbe49627acabf58bed97
>
> This reland updates baseline on mac platform for failed test
> https://ci.chromium.org/b/8701302412868775361.
>
> Original change's description:
> > webnn: Enable kokoro_82m_v1_fp16 model on TFLite backend
> >
> > The squeeze[1] will output {640} shape tensor if batchSize is 1, the
> > output tensor will matmul tensor {640, 256}, but the a and b operand
> > of WebNN matmul[2] are at least 2-D, so remove specific size 1
> > dimensions at 0 axis with squeeze_dims option.
> >
> > [1] https://source.chromium.org/chromium/chromium/src/+/main:services/webnn/tflite/graph_builder_tflite.cc;l=5699?q=SerializeSubGraphSliceSqueeze&ss=chromium%2Fchromium%2Fsrc
> > [2] https://www.w3.org/TR/webnn/#api-mlgraphbuilder-matmul
> >
> > Bug: 446545294
> > Change-Id: I33eae7f3e81e8f2efac0cbe49627acabf58bed97
> > Reviewed-on: https://chromium-> review.googlesource.com/c/chromium/src/+/6993849
> > Reviewed-by: ningxin hu <ningxin.hu@intel.com>
> > Commit-Queue: Junwei Fu <junwei.fu@intel.com>
> > Reviewed-by: Reilly Grant <reillyg@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1528547}
>
> Bug: 446545294
> Change-Id: I161d2dad26fb6c9671ca08ab0b3614e5128664c2
> Include-Ci-Only-Tests: chromium.mac:mac14-arm64-rel-tests|blink_wpt_tests
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7034401
> Commit-Queue: Phillis Tang <phillis@chromium.org>
> Reviewed-by: ningxin hu <ningxin.hu@intel.com>
> Reviewed-by: Phillis Tang <phillis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1530443}
Bug: 446545294
Change-Id: I5f83b7b7c40f3cfdbd9ed26f3c0941832b48f3b8
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, mac14.arm64-blink-rel, mac14-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7047479
Reviewed-by: Phillis Tang <phillis@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1531952}
--
wpt-commits: 4f6743e0386708682289c48251975c36f43863f4
wpt-pr: 55482
Diffstat:
1 file changed, 65 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/webnn/conformance_tests/lstm.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/lstm.https.any.js
@@ -776,6 +776,71 @@ const lstmTests = [
}
},
{
+ 'name':
+ "lstm float32 tensors steps=2, batchSize=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.direction='backward'",
+ 'graph': {
+ 'inputs': {
+ 'lstmInput': {
+ 'data': [1, 2, 2, 1],
+ 'descriptor': {shape: [2, 1, 2], dataType: 'float32'}
+ },
+ 'lstmWeight': {
+ 'data': [1, -1, 2, -2, 1, -1, 2, -2, 1, -1, 2, -2, 1, -1, 2, -2],
+ 'descriptor': {shape: [1, 8, 2], dataType: 'float32'},
+ 'constant': true
+ },
+ 'lstmRecurrentWeight': {
+ 'data': [
+ 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
+ 0.1, 0.1, 0.1
+ ],
+ 'descriptor': {shape: [1, 8, 2], dataType: 'float32'},
+ 'constant': true
+ },
+ 'lstmBias': {
+ 'data': [1, 2, 1, 2, 1, 2, 1, 2],
+ 'descriptor': {shape: [1, 8], dataType: 'float32'},
+ 'constant': true
+ },
+ 'lstmRecurrentBias': {
+ 'data': [1, 2, 1, 2, 1, 2, 1, 2],
+ 'descriptor': {shape: [1, 8], dataType: 'float32'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'lstm',
+ 'arguments': [
+ {'input': 'lstmInput'}, {'weight': 'lstmWeight'},
+ {'recurrentWeight': 'lstmRecurrentWeight'}, {'steps': 2},
+ {'hiddenSize': 2}, {
+ 'options': {
+ 'bias': 'lstmBias',
+ 'recurrentBias': 'lstmRecurrentBias',
+ 'direction': 'backward',
+ 'activations': ['relu', 'relu', 'relu']
+ }
+ }
+ ],
+ 'outputs': ['lstmOutput1', 'lstmOutput2']
+ }],
+ 'expectedOutputs': {
+ 'lstmOutput1': {
+ 'data': [
+ 21955.08984375, 43092.29296875
+ ],
+ 'descriptor': {shape: [1, 1, 2], dataType: 'float32'}
+ },
+ 'lstmOutput2': {
+ 'data': [
+ 867.7901000976562, 1638.4901123046875
+ ],
+ 'descriptor': {shape: [1, 1, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
'name': 'lstm float32 tensors steps=2 with all options',
'graph': {
'inputs': {