From 2a65c5016db96995561086ef8c9b86b012840428 Mon Sep 17 00:00:00 2001 From: Shiyi Zou Date: Wed, 8 May 2024 16:30:02 +0000 Subject: [PATCH] Bug 1895167 [wpt PR 46075] - webnn: Enforce data type constraints for abs, neg and relu, a=testonly Automatic update from web-platform-tests webnn: Enforce data type constraints for abs, neg and relu As specified in https://github.com/webmachinelearning/webnn/pull/646 Bug: 328567884 Change-Id: Id377fcf423f72e2dd6d7851fa979fdfa8caeefdc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517439 Commit-Queue: Shiyi Zou Reviewed-by: Austin Sullivan Reviewed-by: ningxin hu Cr-Commit-Position: refs/heads/main@{#1297321} -- wpt-commits: 602dae0eda79af364575e1f99ad39967bdd7fbc9 wpt-pr: 46075 --- .../webnn/validation_tests/elementwise-unary.https.any.js | 4 ++-- .../tests/webnn/validation_tests/relu.https.any.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/web-platform/tests/webnn/validation_tests/elementwise-unary.https.any.js b/testing/web-platform/tests/webnn/validation_tests/elementwise-unary.https.any.js index f87c61b4e45689..c735183aab1d14 100644 --- a/testing/web-platform/tests/webnn/validation_tests/elementwise-unary.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/elementwise-unary.https.any.js @@ -16,14 +16,14 @@ kElementwiseUnaryOperators.forEach((operatorName) => { const kElementwiseUnaryOperations = [ { name: 'abs', - supportedDataTypes: [...floatingPointTypes, ...signedIntegerTypes] + supportedDataTypes: [...floatingPointTypes, 'int32', 'int8'] }, {name: 'ceil', supportedDataTypes: floatingPointTypes}, {name: 'exp', supportedDataTypes: floatingPointTypes}, {name: 'floor', supportedDataTypes: floatingPointTypes}, {name: 'log', supportedDataTypes: floatingPointTypes}, { name: 'neg', - supportedDataTypes: [...floatingPointTypes, ...signedIntegerTypes] + supportedDataTypes: [...floatingPointTypes, 'int32', 'int8'] }, {name: 'sin', supportedDataTypes: floatingPointTypes}, {name: 'tan', supportedDataTypes: floatingPointTypes}, diff --git a/testing/web-platform/tests/webnn/validation_tests/relu.https.any.js b/testing/web-platform/tests/webnn/validation_tests/relu.https.any.js index 237c1c3eda3a49..61b0d1938fe536 100644 --- a/testing/web-platform/tests/webnn/validation_tests/relu.https.any.js +++ b/testing/web-platform/tests/webnn/validation_tests/relu.https.any.js @@ -7,4 +7,4 @@ validateInputFromAnotherBuilder('relu'); validateUnaryOperation( - 'relu', allWebNNOperandDataTypes, /*alsoBuildActivation=*/ true); + 'relu', [...floatingPointTypes, 'int32', 'int8'], /*alsoBuildActivation=*/ true);