diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/idlharness.https.any.js')
-rw-r--r-- | testing/web-platform/tests/webnn/idlharness.https.any.js | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/testing/web-platform/tests/webnn/idlharness.https.any.js b/testing/web-platform/tests/webnn/idlharness.https.any.js index 65e21d5a1d..93e88294ef 100644 --- a/testing/web-platform/tests/webnn/idlharness.https.any.js +++ b/testing/web-platform/tests/webnn/idlharness.https.any.js @@ -28,29 +28,18 @@ idl_test( MLGraph: ['graph'] }); - for (const executionType of ExecutionArray) { - const isSync = executionType === 'sync'; - if (self.GLOBAL.isWindow() && isSync) { - continue; - } - - if (isSync) { - self.context = navigator.ml.createContextSync(); - } else { - self.context = await navigator.ml.createContext(); - } - - self.builder = new MLGraphBuilder(self.context); - self.input = builder.input('input', {dataType: 'float32', dimensions: [1, 1, 5, 5]}); - self.filter = builder.constant({dataType: 'float32', dimensions: [1, 1, 3, 3]}, new Float32Array(9).fill(1)); - self.relu = builder.relu(); - self.output = builder.conv2d(input, filter, {activation: relu, inputLayout: "nchw"}); - - if (isSync) { - self.graph = builder.buildSync({output}); - } else { - self.graph = await builder.build({output}); - } - } + self.context = await navigator.ml.createContext(); + + self.builder = new MLGraphBuilder(self.context); + self.input = + builder.input('input', {dataType: 'float32', dimensions: [1, 1, 5, 5]}); + self.filter = builder.constant( + {dataType: 'float32', dimensions: [1, 1, 3, 3]}, + new Float32Array(9).fill(1)); + self.relu = builder.relu(); + self.output = + builder.conv2d(input, filter, {activation: relu, inputLayout: "nchw"}); + + self.graph = await builder.build({output}); } ); |