Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /webnn/validation_tests/elementwise-logical.https.any.html?op=equal&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=equal&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=equal&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greater&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greater&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greater&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greaterOrEqual&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greaterOrEqual&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=greaterOrEqual&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isInfinite&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isInfinite&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isInfinite&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isNaN&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isNaN&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=isNaN&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesser&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesser&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesser&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesserOrEqual&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesserOrEqual&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=lesserOrEqual&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalAnd&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalAnd&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalAnd&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalNot&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalNot&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalNot&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalOr&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalOr&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalOr&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalXor&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalXor&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=logicalXor&device=npu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=notEqual&device=cpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=notEqual&device=gpu - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/elementwise-logical.https.any.html?op=notEqual&device=npu - WPT Dashboard Interop Dashboard
// META: title=validation tests for WebNN API element-wise logical operations
// META: global=window
// META: variant=?op=equal&device=cpu
// META: variant=?op=equal&device=gpu
// META: variant=?op=equal&device=npu
// META: variant=?op=greater&device=cpu
// META: variant=?op=greater&device=gpu
// META: variant=?op=greater&device=npu
// META: variant=?op=greaterOrEqual&device=cpu
// META: variant=?op=greaterOrEqual&device=gpu
// META: variant=?op=greaterOrEqual&device=npu
// META: variant=?op=lesser&device=cpu
// META: variant=?op=lesser&device=gpu
// META: variant=?op=lesser&device=npu
// META: variant=?op=lesserOrEqual&device=cpu
// META: variant=?op=lesserOrEqual&device=gpu
// META: variant=?op=lesserOrEqual&device=npu
// META: variant=?op=notEqual&device=cpu
// META: variant=?op=notEqual&device=gpu
// META: variant=?op=notEqual&device=npu
// META: variant=?op=logicalAnd&device=cpu
// META: variant=?op=logicalAnd&device=gpu
// META: variant=?op=logicalAnd&device=npu
// META: variant=?op=logicalOr&device=cpu
// META: variant=?op=logicalOr&device=gpu
// META: variant=?op=logicalOr&device=npu
// META: variant=?op=logicalXor&device=cpu
// META: variant=?op=logicalXor&device=gpu
// META: variant=?op=logicalXor&device=npu
// META: variant=?op=logicalNot&device=cpu
// META: variant=?op=logicalNot&device=gpu
// META: variant=?op=logicalNot&device=npu
// META: variant=?op=isNaN&device=cpu
// META: variant=?op=isNaN&device=gpu
// META: variant=?op=isNaN&device=npu
// META: variant=?op=isInfinite&device=cpu
// META: variant=?op=isInfinite&device=gpu
// META: variant=?op=isInfinite&device=npu
// META: script=../resources/utils_validation.js
'use strict';
const queryParams = new URLSearchParams(window.location.search);
const operatorName = queryParams.get('op');
if (operatorName === 'logicalNot' ||
operatorName === 'isNaN' ||
operatorName === 'isInfinite') {
// The `logicalNot`, `isNaN` and `isInfinite` operators are unary.
validateInputFromAnotherBuilder(operatorName);
} else {
const label = 'elementwise_logic_op';
validateTwoInputsOfSameDataType(operatorName, label);
validateTwoInputsFromMultipleBuilders(operatorName);
validateTwoInputsBroadcastable(operatorName, label);
}