Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webnn/batch_normalization.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ const buildBatchNorm = (operationName, builder, resources) => {
return namedOutputOperand;
};

testWebNNOperation('batchNormalization', '/webnn/resources/test_data/batch_normalization.json', buildBatchNorm);
testWebNNOperation('batchNormalization', buildBatchNorm);
2 changes: 1 addition & 1 deletion webnn/clamp.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-clamp

testWebNNOperation('clamp', '/webnn/resources/test_data/clamp.json', buildOperationWithSingleInput);
testWebNNOperation('clamp', buildOperationWithSingleInput);
2 changes: 1 addition & 1 deletion webnn/concat.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const buildConcat = (operationName, builder, resources) => {
return namedOutputOperand;
};

testWebNNOperation('concat', '/webnn/resources/test_data/concat.json', buildConcat);
testWebNNOperation('concat', buildConcat);
2 changes: 1 addition & 1 deletion webnn/conv2d.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ const buildConv2d= (operationName, builder, resources) => {
return namedOutputOperand;
};

testWebNNOperation('conv2d', '/webnn/resources/test_data/conv2d.json', buildConv2d);
testWebNNOperation('conv2d', buildConv2d);
10 changes: 10 additions & 0 deletions webnn/elementwise_binary.https.any.js
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion webnn/gemm.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ const buildGemm= (operationName, builder, resources) => {
return namedOutputOperand;
};

testWebNNOperation('gemm', '/webnn/resources/test_data/gemm.json', buildGemm);
testWebNNOperation('gemm', buildGemm);
2 changes: 1 addition & 1 deletion webnn/leaky_relu.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-leakyrelu

testWebNNOperation('leakyRelu', '/webnn/resources/test_data/leaky_relu.json', buildOperationWithSingleInput);
testWebNNOperation('leakyRelu', buildOperationWithSingleInput);
10 changes: 1 addition & 9 deletions webnn/matmul.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,4 @@

// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-matmul

const buildMatmul= (operationName, builder, resources) => {
// MLOperand matmul(MLOperand a, MLOperand b);
const namedOutputOperand = {};
const [inputOperandA, inputOperandB] = createMultiInputOperands(builder, resources);
namedOutputOperand[resources.expected.name] = builder[operationName](inputOperandA, inputOperandB);
return namedOutputOperand;
};

testWebNNOperation('matmul', '/webnn/resources/test_data/matmul.json', buildMatmul);
testWebNNOperation('matmul', buildOperationWithTwoInputs);
2 changes: 1 addition & 1 deletion webnn/relu.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-relu

testWebNNOperation('relu', '/webnn/resources/test_data/relu.json', buildOperationWithSingleInput);
testWebNNOperation('relu', buildOperationWithSingleInput);
2 changes: 1 addition & 1 deletion webnn/reshape.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ const buildReshape = (operationName, builder, resources) => {
return namedOutputOperand;
};

testWebNNOperation('reshape', '/webnn/resources/test_data/reshape.json', buildReshape);
testWebNNOperation('reshape', buildReshape);

Loading