Skip to content

Commit

Permalink
Bug 1895167 [wpt PR 46075] - webnn: Enforce data type constraints for…
Browse files Browse the repository at this point in the history
… 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 webmachinelearning/webnn#646

Bug: 328567884
Change-Id: Id377fcf423f72e2dd6d7851fa979fdfa8caeefdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517439
Commit-Queue: Shiyi Zou <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1297321}

--

wpt-commits: 602dae0eda79af364575e1f99ad39967bdd7fbc9
wpt-pr: 46075
  • Loading branch information
shiyi9801 authored and moz-wptsync-bot committed May 14, 2024
1 parent cc30587 commit 2a65c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
validateInputFromAnotherBuilder('relu');

validateUnaryOperation(
'relu', allWebNNOperandDataTypes, /*alsoBuildActivation=*/ true);
'relu', [...floatingPointTypes, 'int32', 'int8'], /*alsoBuildActivation=*/ true);

0 comments on commit 2a65c50

Please sign in to comment.