From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../conformance_tests/arg_min_max.https.any.js | 10 +++++++++ .../batch_normalization.https.any.js | 10 +++++++++ .../webnn/conformance_tests/buffer.https.any.js | 12 +++++++++++ .../webnn/conformance_tests/cast.https.any.js | 10 +++++++++ .../webnn/conformance_tests/clamp.https.any.js | 10 +++++++++ .../webnn/conformance_tests/concat.https.any.js | 10 +++++++++ .../webnn/conformance_tests/constant.https.any.js | 10 +++++++++ .../webnn/conformance_tests/conv2d.https.any.js | 10 +++++++++ .../conv_transpose2d.https.any.js | 10 +++++++++ .../elementwise_binary.https.any.js | 10 +++++++++ .../elementwise_logical.https.any.js | 20 ++++++++++++++++++ .../elementwise_unary.https.any.js | 13 ++++++++++++ .../tests/webnn/conformance_tests/elu.https.any.js | 10 +++++++++ .../webnn/conformance_tests/expand.https.any.js | 11 ++++++++++ .../webnn/conformance_tests/gather.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gemm.https.any.js | 10 +++++++++ .../conformance_tests/gpu/arg_min_max.https.any.js | 10 +++++++++ .../gpu/batch_normalization.https.any.js | 10 +++++++++ .../conformance_tests/gpu/buffer.https.any.js | 12 +++++++++++ .../webnn/conformance_tests/gpu/cast.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/clamp.https.any.js | 10 +++++++++ .../conformance_tests/gpu/concat.https.any.js | 10 +++++++++ .../conformance_tests/gpu/constant.https.any.js | 10 +++++++++ .../conformance_tests/gpu/conv2d.https.any.js | 10 +++++++++ .../gpu/conv_transpose2d.https.any.js | 10 +++++++++ .../gpu/elementwise_binary.https.any.js | 10 +++++++++ .../gpu/elementwise_logical.https.any.js | 20 ++++++++++++++++++ .../gpu/elementwise_unary.https.any.js | 13 ++++++++++++ .../webnn/conformance_tests/gpu/elu.https.any.js | 10 +++++++++ .../conformance_tests/gpu/expand.https.any.js | 11 ++++++++++ .../conformance_tests/gpu/gather.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/gemm.https.any.js | 10 +++++++++ .../gpu/hard_sigmoid.https.any.js | 10 +++++++++ .../conformance_tests/gpu/hard_swish.https.any.js | 10 +++++++++ .../gpu/instance_normalization.https.any.js | 10 +++++++++ .../gpu/layer_normalization.https.any.js | 10 +++++++++ .../conformance_tests/gpu/leaky_relu.https.any.js | 10 +++++++++ .../conformance_tests/gpu/linear.https.any.js | 10 +++++++++ .../conformance_tests/gpu/matmul.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/pad.https.any.js | 10 +++++++++ .../conformance_tests/gpu/pooling.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/prelu.https.any.js | 10 +++++++++ .../conformance_tests/gpu/reduction.https.any.js | 24 ++++++++++++++++++++++ .../webnn/conformance_tests/gpu/relu.https.any.js | 10 +++++++++ .../conformance_tests/gpu/resample2d.https.any.js | 10 +++++++++ .../conformance_tests/gpu/reshape.https.any.js | 11 ++++++++++ .../conformance_tests/gpu/sigmoid.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/slice.https.any.js | 10 +++++++++ .../conformance_tests/gpu/softmax.https.any.js | 10 +++++++++ .../conformance_tests/gpu/softplus.https.any.js | 10 +++++++++ .../conformance_tests/gpu/softsign.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/split.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/tanh.https.any.js | 10 +++++++++ .../conformance_tests/gpu/transpose.https.any.js | 10 +++++++++ .../conformance_tests/gpu/triangular.https.any.js | 10 +++++++++ .../webnn/conformance_tests/gpu/where.https.any.js | 10 +++++++++ .../conformance_tests/hard_sigmoid.https.any.js | 10 +++++++++ .../conformance_tests/hard_swish.https.any.js | 10 +++++++++ .../instance_normalization.https.any.js | 10 +++++++++ .../layer_normalization.https.any.js | 10 +++++++++ .../conformance_tests/leaky_relu.https.any.js | 10 +++++++++ .../webnn/conformance_tests/linear.https.any.js | 10 +++++++++ .../webnn/conformance_tests/matmul.https.any.js | 10 +++++++++ .../tests/webnn/conformance_tests/pad.https.any.js | 10 +++++++++ .../webnn/conformance_tests/pooling.https.any.js | 10 +++++++++ .../webnn/conformance_tests/prelu.https.any.js | 10 +++++++++ .../webnn/conformance_tests/reduction.https.any.js | 24 ++++++++++++++++++++++ .../webnn/conformance_tests/relu.https.any.js | 10 +++++++++ .../conformance_tests/resample2d.https.any.js | 10 +++++++++ .../webnn/conformance_tests/reshape.https.any.js | 11 ++++++++++ .../webnn/conformance_tests/sigmoid.https.any.js | 10 +++++++++ .../webnn/conformance_tests/slice.https.any.js | 10 +++++++++ .../webnn/conformance_tests/softmax.https.any.js | 10 +++++++++ .../webnn/conformance_tests/softplus.https.any.js | 10 +++++++++ .../webnn/conformance_tests/softsign.https.any.js | 10 +++++++++ .../webnn/conformance_tests/split.https.any.js | 10 +++++++++ .../webnn/conformance_tests/tanh.https.any.js | 10 +++++++++ .../webnn/conformance_tests/transpose.https.any.js | 10 +++++++++ .../conformance_tests/triangular.https.any.js | 10 +++++++++ .../webnn/conformance_tests/where.https.any.js | 10 +++++++++ 80 files changed, 862 insertions(+) create mode 100644 testing/web-platform/tests/webnn/conformance_tests/arg_min_max.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/batch_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/cast.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/clamp.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/concat.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/constant.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/conv2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/conv_transpose2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/elementwise_binary.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/elementwise_unary.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/elu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/expand.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gather.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gemm.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/arg_min_max.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/batch_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/buffer.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/cast.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/clamp.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/concat.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/constant.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/conv2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/conv_transpose2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_binary.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_logical.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_unary.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/elu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/expand.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/gather.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/gemm.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/hard_sigmoid.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/hard_swish.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/instance_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/layer_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/leaky_relu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/linear.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/matmul.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/pad.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/pooling.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/prelu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/reduction.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/relu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/resample2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/reshape.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/sigmoid.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/slice.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/softmax.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/softplus.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/softsign.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/split.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/tanh.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/transpose.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/triangular.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/gpu/where.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/hard_sigmoid.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/hard_swish.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/instance_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/leaky_relu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/linear.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/matmul.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/pad.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/pooling.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/prelu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/reduction.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/relu.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/resample2d.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/reshape.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/sigmoid.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/slice.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/softplus.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/softsign.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/split.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/tanh.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/transpose.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/triangular.https.any.js create mode 100644 testing/web-platform/tests/webnn/conformance_tests/where.https.any.js (limited to 'testing/web-platform/tests/webnn/conformance_tests') diff --git a/testing/web-platform/tests/webnn/conformance_tests/arg_min_max.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/arg_min_max.https.any.js new file mode 100644 index 0000000000..123c8b1048 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/arg_min_max.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API argMin/Max operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-argminmax + +testWebNNOperation(['argMin', 'argMax'], buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/batch_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/batch_normalization.https.any.js new file mode 100644 index 0000000000..9a1c85db19 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/batch_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API batchNormalization operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-batchnorm + +testWebNNOperation('batchNormalization', buildBatchNorm); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js new file mode 100644 index 0000000000..5b0f46dae0 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js @@ -0,0 +1,12 @@ +// META: title=test WebNN API buffer operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlbuffer + +testCreateWebNNBuffer("create", 4); + +testDestroyWebNNBuffer("destroyTwice"); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/cast.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/cast.https.any.js new file mode 100644 index 0000000000..bde2b9a4ce --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/cast.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API cast operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-cast + +testWebNNOperation('cast', buildCast); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/clamp.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/clamp.https.any.js new file mode 100644 index 0000000000..7b60c41f2c --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/clamp.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API clamp operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-clamp + +testWebNNOperation('clamp', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/concat.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/concat.https.any.js new file mode 100644 index 0000000000..254e0b657b --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/concat.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API concat operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-concat + +testWebNNOperation('concat', buildConcat); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/constant.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/constant.https.any.js new file mode 100644 index 0000000000..4814734886 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/constant.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API constant +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-constant-range + +testWebNNOperation('constant', buildConstantRange); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/conv2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/conv2d.https.any.js new file mode 100644 index 0000000000..0d9a621356 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/conv2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API conv2d operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-conv2d + +testWebNNOperation('conv2d', buildConv2d); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/conv_transpose2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/conv_transpose2d.https.any.js new file mode 100644 index 0000000000..ee5d28c72a --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/conv_transpose2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API convTranspose2d operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-convtranspose2d + +testWebNNOperation('convTranspose2d', buildConvTranspose2d); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/elementwise_binary.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/elementwise_binary.https.any.js new file mode 100644 index 0000000000..5db14a43a1 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/elementwise_binary.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API element-wise binary operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-binary + +testWebNNOperation(['add', 'sub', 'mul', 'div', 'max', 'min', 'pow'], buildOperationWithTwoInputs); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js new file mode 100644 index 0000000000..a60c199447 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js @@ -0,0 +1,20 @@ +// META: title=test WebNN API element-wise logical operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-logical + +testWebNNOperation( + [ + 'equal', + 'greater', + 'greaterOrEqual', + 'lesser', + 'lesserOrEqual', + ], + buildOperationWithTwoInputs +); +testWebNNOperation('logicalNot', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/elementwise_unary.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/elementwise_unary.https.any.js new file mode 100644 index 0000000000..8029539eda --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/elementwise_unary.https.any.js @@ -0,0 +1,13 @@ +// META: title=test WebNN API element-wise unary operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary + +testWebNNOperation( + ['abs', 'ceil', 'cos', 'erf', 'exp', 'floor', 'identity', 'log', 'neg', 'reciprocal', 'sin', 'sqrt', 'tan'], + buildOperationWithSingleInput +); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/elu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/elu.https.any.js new file mode 100644 index 0000000000..382faa97fd --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/elu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API elu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-elu + +testWebNNOperation('elu', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/expand.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/expand.https.any.js new file mode 100644 index 0000000000..b1be129eac --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/expand.https.any.js @@ -0,0 +1,11 @@ +// META: title=test WebNN API expand operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-expand + +// reuse buildReshape method +testWebNNOperation('expand', buildReshape); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gather.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gather.https.any.js new file mode 100644 index 0000000000..39b1970563 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gather.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API gather operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gather + +testWebNNOperation('gather', buildOperationWithTwoInputs); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gemm.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gemm.https.any.js new file mode 100644 index 0000000000..61fd7c9b39 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gemm.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API gemm operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gemm + +testWebNNOperation('gemm', buildGemm); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/arg_min_max.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/arg_min_max.https.any.js new file mode 100644 index 0000000000..c700ee5cad --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/arg_min_max.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API argMin/Max operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-argminmax + +testWebNNOperation(['argMin', 'argMax'], buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/batch_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/batch_normalization.https.any.js new file mode 100644 index 0000000000..534cdf6365 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/batch_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API batchNormalization operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-batchnorm + +testWebNNOperation('batchNormalization', buildBatchNorm, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/buffer.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/buffer.https.any.js new file mode 100644 index 0000000000..66bba9ef4a --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/buffer.https.any.js @@ -0,0 +1,12 @@ +// META: title=test WebNN API buffer operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlbuffer + +testCreateWebNNBuffer("create", 4, 'gpu'); + +testDestroyWebNNBuffer("destroyTwice", 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/cast.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/cast.https.any.js new file mode 100644 index 0000000000..e4309ffd8e --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/cast.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API cast operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-cast + +testWebNNOperation('cast', buildCast, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/clamp.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/clamp.https.any.js new file mode 100644 index 0000000000..9b3f93ecc7 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/clamp.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API clamp operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-clamp + +testWebNNOperation('clamp', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/concat.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/concat.https.any.js new file mode 100644 index 0000000000..c0cfb8626b --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/concat.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API concat operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-concat + +testWebNNOperation('concat', buildConcat, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/constant.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/constant.https.any.js new file mode 100644 index 0000000000..77b4d889a2 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/constant.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API constant +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-constant-range + +testWebNNOperation('constant', buildConstantRange, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/conv2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/conv2d.https.any.js new file mode 100644 index 0000000000..770540abd8 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/conv2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API conv2d operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-conv2d + +testWebNNOperation('conv2d', buildConv2d, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/conv_transpose2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/conv_transpose2d.https.any.js new file mode 100644 index 0000000000..08c441b5b4 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/conv_transpose2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API convTranspose2d operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-convtranspose2d + +testWebNNOperation('convTranspose2d', buildConvTranspose2d, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_binary.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_binary.https.any.js new file mode 100644 index 0000000000..8b9fa486f8 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_binary.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API element-wise binary operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-binary + +testWebNNOperation(['add', 'sub', 'mul', 'div', 'max', 'min', 'pow'], buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_logical.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_logical.https.any.js new file mode 100644 index 0000000000..70a887a147 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_logical.https.any.js @@ -0,0 +1,20 @@ +// META: title=test WebNN API element-wise logical operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-logical + +testWebNNOperation( + [ + 'equal', + 'greater', + 'greaterOrEqual', + 'lesser', + 'lesserOrEqual', + ], + buildOperationWithTwoInputs, 'gpu' +); +testWebNNOperation('logicalNot', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_unary.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_unary.https.any.js new file mode 100644 index 0000000000..8871129311 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/elementwise_unary.https.any.js @@ -0,0 +1,13 @@ +// META: title=test WebNN API element-wise unary operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary + +testWebNNOperation( + ['abs', 'ceil', 'cos', 'erf', 'exp', 'floor', 'identity', 'log', 'neg', 'reciprocal', 'sin', 'sqrt', 'tan'], + buildOperationWithSingleInput, 'gpu' +); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/elu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/elu.https.any.js new file mode 100644 index 0000000000..db14442641 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/elu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API elu operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-elu + +testWebNNOperation('elu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/expand.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/expand.https.any.js new file mode 100644 index 0000000000..f46f463781 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/expand.https.any.js @@ -0,0 +1,11 @@ +// META: title=test WebNN API expand operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-expand + +// reuse buildReshape method +testWebNNOperation('expand', buildReshape, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/gather.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/gather.https.any.js new file mode 100644 index 0000000000..8e457192d8 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/gather.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API gather operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gather + +testWebNNOperation('gather', buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/gemm.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/gemm.https.any.js new file mode 100644 index 0000000000..f288c31bed --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/gemm.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API gemm operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gemm + +testWebNNOperation('gemm', buildGemm, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_sigmoid.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_sigmoid.https.any.js new file mode 100644 index 0000000000..d40e42a211 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_sigmoid.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API hardSigmoid operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-sigmoid + +testWebNNOperation('hardSigmoid', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_swish.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_swish.https.any.js new file mode 100644 index 0000000000..031e65ee16 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/hard_swish.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-swish + +testWebNNOperation('hardSwish', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/instance_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/instance_normalization.https.any.js new file mode 100644 index 0000000000..ecfaac71ee --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/instance_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API instanceNormalization operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-instancenorm + +testWebNNOperation('instanceNormalization', buildLayerNorm, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/layer_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/layer_normalization.https.any.js new file mode 100644 index 0000000000..0e4f6caebf --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/layer_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API layerNormalization operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-layernorm + +testWebNNOperation('layerNormalization', buildLayerNorm, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/leaky_relu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/leaky_relu.https.any.js new file mode 100644 index 0000000000..9fab2353b9 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/leaky_relu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API leakyRelu operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-leakyrelu + +testWebNNOperation('leakyRelu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/linear.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/linear.https.any.js new file mode 100644 index 0000000000..ccec2c3eac --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/linear.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API linear operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-linear + +testWebNNOperation('linear', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/matmul.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/matmul.https.any.js new file mode 100644 index 0000000000..635ce84ac6 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/matmul.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API matmul operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-matmul + +testWebNNOperation('matmul', buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/pad.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/pad.https.any.js new file mode 100644 index 0000000000..f313e2c9f9 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/pad.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API pad operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pad + +testWebNNOperation('pad', buildPad, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/pooling.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/pooling.https.any.js new file mode 100644 index 0000000000..837bca2c71 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/pooling.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API pooling operations +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pool2d + +testWebNNOperation(['averagePool2d', 'l2Pool2d', 'maxPool2d'], buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/prelu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/prelu.https.any.js new file mode 100644 index 0000000000..475cd9e5ce --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/prelu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API prelu operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-prelu + +testWebNNOperation('prelu', buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/reduction.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/reduction.https.any.js new file mode 100644 index 0000000000..0f3cefa02e --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/reduction.https.any.js @@ -0,0 +1,24 @@ +// META: title=test WebNN API reduction operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reduce + +testWebNNOperation( + [ + 'reduceL1', + 'reduceL2', + 'reduceLogSum', + 'reduceLogSumExp', + 'reduceMax', + 'reduceMean', + 'reduceMin', + 'reduceProduct', + 'reduceSum', + 'reduceSumSquare', + ], + buildOperationWithSingleInput, 'gpu' +); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/relu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/relu.https.any.js new file mode 100644 index 0000000000..d1a35367df --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/relu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API relu operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-relu + +testWebNNOperation('relu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/resample2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/resample2d.https.any.js new file mode 100644 index 0000000000..dd8e441946 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/resample2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API resample2d operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-resample2d-method + +testWebNNOperation('resample2d', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/reshape.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/reshape.https.any.js new file mode 100644 index 0000000000..b0217d2e67 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/reshape.https.any.js @@ -0,0 +1,11 @@ +// META: title=test WebNN API reshape operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reshape + +testWebNNOperation('reshape', buildReshape, 'gpu'); + diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/sigmoid.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/sigmoid.https.any.js new file mode 100644 index 0000000000..26116c0ff9 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/sigmoid.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API sigmoid operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-sigmoid + +testWebNNOperation('sigmoid', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/slice.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/slice.https.any.js new file mode 100644 index 0000000000..1710c79a9c --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/slice.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API slice operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-slice + +testWebNNOperation('slice', buildSlice, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/softmax.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/softmax.https.any.js new file mode 100644 index 0000000000..9eaffe2beb --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/softmax.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softmax operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softmax + +testWebNNOperation('softmax', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/softplus.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/softplus.https.any.js new file mode 100644 index 0000000000..5f06846113 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/softplus.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softplus operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softplus + +testWebNNOperation('softplus', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/softsign.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/softsign.https.any.js new file mode 100644 index 0000000000..eac0b7ec40 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/softsign.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softsign operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softsign + +testWebNNOperation('softsign', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/split.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/split.https.any.js new file mode 100644 index 0000000000..3b0aafd787 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/split.https.any.js @@ -0,0 +1,10 @@ +// 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 + +testWebNNOperation('split', buildSplit, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/tanh.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/tanh.https.any.js new file mode 100644 index 0000000000..3029f4865a --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/tanh.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-tanh + +testWebNNOperation('tanh', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/transpose.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/transpose.https.any.js new file mode 100644 index 0000000000..295ef43ec1 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/transpose.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API transpose operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-transpose + +testWebNNOperation('transpose', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/triangular.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/triangular.https.any.js new file mode 100644 index 0000000000..3e1b0d5ab1 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/triangular.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API triangular operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-triangular + +testWebNNOperation('triangular', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/gpu/where.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/gpu/where.https.any.js new file mode 100644 index 0000000000..49c6cbd4e3 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/gpu/where.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API where operation +// META: global=window,dedicatedworker +// META: script=../../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-where + +testWebNNOperation('where', buildWhere, 'gpu'); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/hard_sigmoid.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/hard_sigmoid.https.any.js new file mode 100644 index 0000000000..8161a24538 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/hard_sigmoid.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API hardSigmoid operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-sigmoid + +testWebNNOperation('hardSigmoid', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/hard_swish.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/hard_swish.https.any.js new file mode 100644 index 0000000000..b4a7c53d8d --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/hard_swish.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-swish + +testWebNNOperation('hardSwish', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/instance_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/instance_normalization.https.any.js new file mode 100644 index 0000000000..fce879172e --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/instance_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API instanceNormalization operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-instancenorm + +testWebNNOperation('instanceNormalization', buildLayerNorm); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js new file mode 100644 index 0000000000..ab8a50cc03 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/layer_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API layerNormalization operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-layernorm + +testWebNNOperation('layerNormalization', buildLayerNorm); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/leaky_relu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/leaky_relu.https.any.js new file mode 100644 index 0000000000..2b6f17e95d --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/leaky_relu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API leakyRelu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-leakyrelu + +testWebNNOperation('leakyRelu', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/linear.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/linear.https.any.js new file mode 100644 index 0000000000..465b697f29 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/linear.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API linear operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-linear + +testWebNNOperation('linear', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/matmul.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/matmul.https.any.js new file mode 100644 index 0000000000..64eeb37f08 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/matmul.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API matmul operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-matmul + +testWebNNOperation('matmul', buildOperationWithTwoInputs); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/pad.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/pad.https.any.js new file mode 100644 index 0000000000..f1a2400d1c --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/pad.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API pad operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pad + +testWebNNOperation('pad', buildPad); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/pooling.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/pooling.https.any.js new file mode 100644 index 0000000000..400d5ed37d --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/pooling.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API pooling operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pool2d + +testWebNNOperation(['averagePool2d', 'l2Pool2d', 'maxPool2d'], buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/prelu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/prelu.https.any.js new file mode 100644 index 0000000000..83cc9db4b4 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/prelu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API prelu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-prelu + +testWebNNOperation('prelu', buildOperationWithTwoInputs); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/reduction.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/reduction.https.any.js new file mode 100644 index 0000000000..30bfb4ba7a --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/reduction.https.any.js @@ -0,0 +1,24 @@ +// META: title=test WebNN API reduction operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reduce + +testWebNNOperation( + [ + 'reduceL1', + 'reduceL2', + 'reduceLogSum', + 'reduceLogSumExp', + 'reduceMax', + 'reduceMean', + 'reduceMin', + 'reduceProduct', + 'reduceSum', + 'reduceSumSquare', + ], + buildOperationWithSingleInput +); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/relu.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/relu.https.any.js new file mode 100644 index 0000000000..51e427898f --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/relu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API relu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-relu + +testWebNNOperation('relu', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/resample2d.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/resample2d.https.any.js new file mode 100644 index 0000000000..0b5b3e0032 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/resample2d.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API resample2d operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-resample2d-method + +testWebNNOperation('resample2d', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/reshape.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/reshape.https.any.js new file mode 100644 index 0000000000..c0dafb176c --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/reshape.https.any.js @@ -0,0 +1,11 @@ +// META: title=test WebNN API reshape operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reshape + +testWebNNOperation('reshape', buildReshape); + diff --git a/testing/web-platform/tests/webnn/conformance_tests/sigmoid.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/sigmoid.https.any.js new file mode 100644 index 0000000000..186f468918 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/sigmoid.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API sigmoid operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-sigmoid + +testWebNNOperation('sigmoid', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/slice.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/slice.https.any.js new file mode 100644 index 0000000000..6441204517 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/slice.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API slice operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-slice + +testWebNNOperation('slice', buildSlice); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js new file mode 100644 index 0000000000..143b7d969f --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/softmax.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softmax operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softmax + +testWebNNOperation('softmax', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/softplus.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/softplus.https.any.js new file mode 100644 index 0000000000..fcd6410bdb --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/softplus.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softplus operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softplus + +testWebNNOperation('softplus', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/softsign.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/softsign.https.any.js new file mode 100644 index 0000000000..6e26afdade --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/softsign.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softsign operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softsign + +testWebNNOperation('softsign', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/split.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/split.https.any.js new file mode 100644 index 0000000000..0de6cb4d8d --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/split.https.any.js @@ -0,0 +1,10 @@ +// 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 + +testWebNNOperation('split', buildSplit); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/tanh.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/tanh.https.any.js new file mode 100644 index 0000000000..c5d1f86ab1 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/tanh.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-tanh + +testWebNNOperation('tanh', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/transpose.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/transpose.https.any.js new file mode 100644 index 0000000000..746e53d512 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/transpose.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API transpose operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-transpose + +testWebNNOperation('transpose', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/triangular.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/triangular.https.any.js new file mode 100644 index 0000000000..503f310620 --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/triangular.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API triangular operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-triangular + +testWebNNOperation('triangular', buildOperationWithSingleInput); \ No newline at end of file diff --git a/testing/web-platform/tests/webnn/conformance_tests/where.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/where.https.any.js new file mode 100644 index 0000000000..7926221d3a --- /dev/null +++ b/testing/web-platform/tests/webnn/conformance_tests/where.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API where operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-where + +testWebNNOperation('where', buildWhere); \ No newline at end of file -- cgit v1.2.3