From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../web-platform/tests/webnn/split.https.any.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 testing/web-platform/tests/webnn/split.https.any.js (limited to 'testing/web-platform/tests/webnn/split.https.any.js') diff --git a/testing/web-platform/tests/webnn/split.https.any.js b/testing/web-platform/tests/webnn/split.https.any.js new file mode 100644 index 0000000000..bb1c995658 --- /dev/null +++ b/testing/web-platform/tests/webnn/split.https.any.js @@ -0,0 +1,24 @@ +// META: title=test WebNN API split operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-split + +const buildSplit = (operationName, builder, resources) => { + // sequence split(MLOperand input, + // (unsigned long or sequence) splits, + // optional MLSplitOptions options = {}); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + // invoke builder.split() + const outputOperands = builder[operationName](inputOperand, resources.splits, resources.options); + resources.expected.forEach((resourceDict, index) => { + namedOutputOperand[resourceDict.name] = outputOperands[index]; + }); + return namedOutputOperand; +}; + +testWebNNOperation('split', buildSplit); \ No newline at end of file -- cgit v1.2.3