blob: a45ecd3fcb538f94c6e845f5e21a54f7e62e9b33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// META: title=validation tests for WebNN API slice operation
// META: global=window,dedicatedworker
// META: script=../resources/utils_validation.js
'use strict';
multi_builder_test(async (t, builder, otherBuilder) => {
const inputFromOtherBuilder =
otherBuilder.input('input', {dataType: 'float32', dimensions: [2, 2]});
const starts = [1, 1];
const sizes = [1, 1];
assert_throws_js(
TypeError, () => builder.slice(inputFromOtherBuilder, starts, sizes));
}, '[slice] throw if input is from another builder');
|