From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../webnn/validation_tests/gather.https.any.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'testing/web-platform/tests/webnn/validation_tests/gather.https.any.js') diff --git a/testing/web-platform/tests/webnn/validation_tests/gather.https.any.js b/testing/web-platform/tests/webnn/validation_tests/gather.https.any.js index 67ac7d7be3..184e8033e6 100644 --- a/testing/web-platform/tests/webnn/validation_tests/gather.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/gather.https.any.js @@ -1,7 +1,6 @@ // META: title=validation tests for WebNN API gather operation // META: global=window,dedicatedworker // META: script=../resources/utils_validation.js -// META: timeout=long 'use strict'; @@ -60,3 +59,23 @@ tests.forEach( TypeError, () => builder.gather(input, indices, options)); } }, test.name)); + +multi_builder_test(async (t, builder, otherBuilder) => { + const inputFromOtherBuilder = + otherBuilder.input('input', {dataType: 'float32', dimensions: [2, 2]}); + + const indices = + builder.input('indices', {dataType: 'int64', dimensions: [2, 2]}); + assert_throws_js( + TypeError, () => builder.gather(inputFromOtherBuilder, indices)); +}, '[gather] throw if input is from another builder'); + +multi_builder_test(async (t, builder, otherBuilder) => { + const indicesFromOtherBuilder = + otherBuilder.input('indices', {dataType: 'int64', dimensions: [2, 2]}); + + const input = + builder.input('input', {dataType: 'float32', dimensions: [2, 2]}); + assert_throws_js( + TypeError, () => builder.gather(input, indicesFromOtherBuilder)); +}, '[gather] throw if indices is from another builder'); -- cgit v1.2.3