Skip to content

Commit

Permalink
Bug 1864594 [wpt PR 43140] - WebNN: Support 0-D scalars, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
WebNN: Support 0-D scalars

This CL fixes the WebNN spec and implementation issue [1] and allows to
present a 0-D scalar operand by empty dimensions.

This CL also adds test cases for MLGraphBuilder, XNNPACK backend, WebNN
service and DirectML backend for 0-D scalar operand.

[1]: webmachinelearning/webnn#390

Bug: 1498803, 1273291
Change-Id: Ic30602d6a1cdbe38ca3d384ffb7d8fe053b0a5a7
Cq-Include-Trybots: luci.chromium.try​:win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5029273
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: ningxin hu <ningxin.hu@intel.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1225264}

--

wpt-commits: 9a15f9f5814ac064c27ec9089acda4028b2518f8
wpt-pr: 43140
  • Loading branch information
huningxin authored and moz-wptsync-bot committed Nov 22, 2023
1 parent d6f9b5a commit d6cb3a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/web-platform/tests/webnn/resources/test_data/pow.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
}
},
{
"name": "pow (square) float32 4D base tensor and broadcastable 1D integer exponent tensor",
"name": "pow (square) float32 4D base tensor and broadcastable 0D integer exponent scalar",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
Expand Down Expand Up @@ -514,7 +514,7 @@
"type": "float32"
},
"b": {
"shape": [1],
"shape": [],
"data": [2], // square
"type": "float32",
"constant": true
Expand Down Expand Up @@ -553,7 +553,7 @@
}
},
{
"name": "pow (sqrt) float32 4D positive base tensor and broadcastable 1D integer exponent tensor",
"name": "pow (sqrt) float32 4D positive base tensor and broadcastable 0D integer exponent scalar",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
Expand Down Expand Up @@ -586,7 +586,7 @@
"type": "float32"
},
"b": {
"shape": [1],
"shape": [],
"data": [0.5], // sqrt
"type": "float32",
"constant": true
Expand Down

0 comments on commit d6cb3a9

Please sign in to comment.