Skip to content

Commit

Permalink
Bug 1825052 [wpt PR 39246] - [webnn] Add float32 tests for WebNN pad …
Browse files Browse the repository at this point in the history
…op, a=testonly

Automatic update from web-platform-tests
[webnn] Add float32 tests for WebNN pad op (#39246)

--

wpt-commits: 40fa979f0737fa03ccab321e059cd43cd0d198e9
wpt-pr: 39246
  • Loading branch information
BruceDai authored and moz-wptsync-bot committed Apr 14, 2023
1 parent 7c4bd44 commit 47f7658
Show file tree
Hide file tree
Showing 3 changed files with 777 additions and 0 deletions.
19 changes: 19 additions & 0 deletions testing/web-platform/tests/webnn/pad.https.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 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

const buildPad = (operationName, builder, resources) => {
// MLOperand pad(MLOperand input, sequence<unsigned long> beginningPadding, sequence<unsigned long> endingPadding, optional MLPadOptions options = {});
const namedOutputOperand = {};
const inputOperand = createSingleInputOperand(builder, resources);
// invoke builder.pad()
namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.beginningPadding, resources.endingPadding, resources.options);
return namedOutputOperand;
};

testWebNNOperation('pad', buildPad);
Loading

0 comments on commit 47f7658

Please sign in to comment.