Skip to content

Commit

Permalink
Bug 1893558 [wpt PR 45922] - webnn: Enforce input data type constrain…
Browse files Browse the repository at this point in the history
…ts for conv2d, a=testonly

Automatic update from web-platform-tests
webnn: Enforce input data type constraints for conv2d

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: 839bdcfea290fd869732772d922ed910efbf052c
wpt-pr: 45922
  • Loading branch information
a-sully authored and moz-wptsync-bot committed Apr 30, 2024
1 parent 10c25ab commit 3061a36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ const tests = [
input: {dataType: 'float32', dimensions: [1, 5, 5]},
filter: {dataType: 'float32', dimensions: [1, 2, 2, 1]},
},
{
name: '[conv2d] Throw if the input data type is not floating point.',
input: {dataType: 'int32', dimensions: [1, 1, 5, 5]},
filter: {dataType: 'int32', dimensions: [1, 1, 2, 2]},
},
{
name: '[conv2d] Throw if the filter is not a 4-D tensor.',
input: {dataType: 'float32', dimensions: [1, 1, 5, 5]},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ const tests = [
input: {dataType: 'float32', dimensions: [1, 5, 5]},
filter: {dataType: 'float32', dimensions: [1, 1, 2, 2]},
},
{
name:
'[convTranspose2d] Throw if the input data type is not floating point.',
input: {dataType: 'int32', dimensions: [1, 1, 5, 5]},
filter: {dataType: 'int32', dimensions: [1, 1, 2, 2]},
},
{
name: '[convTranspose2d] Throw if the filter is not a 4-D tensor.',
input: {dataType: 'float32', dimensions: [1, 1, 5, 5]},
Expand Down

0 comments on commit 3061a36

Please sign in to comment.