summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js')
-rw-r--r--testing/web-platform/tests/webnn/conformance_tests/elementwise_logical.https.any.js27
1 files changed, 16 insertions, 11 deletions
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
index a60c199447..3d3a825f9c 100644
--- 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
@@ -1,5 +1,7 @@
// META: title=test WebNN API element-wise logical operations
// META: global=window,dedicatedworker
+// META: variant=?cpu
+// META: variant=?gpu
// META: script=../resources/utils.js
// META: timeout=long
@@ -7,14 +9,17 @@
// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-logical
-testWebNNOperation(
- [
- 'equal',
- 'greater',
- 'greaterOrEqual',
- 'lesser',
- 'lesserOrEqual',
- ],
- buildOperationWithTwoInputs
-);
-testWebNNOperation('logicalNot', buildOperationWithSingleInput); \ No newline at end of file
+if (navigator.ml) {
+ testWebNNOperation(
+ [
+ 'equal',
+ 'greater',
+ 'greaterOrEqual',
+ 'lesser',
+ 'lesserOrEqual',
+ ],
+ buildOperationWithTwoInputs);
+ testWebNNOperation('logicalNot', buildOperationWithSingleInput);
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}