Skip to content

Commit

Permalink
Bug 1917957 [wpt PR 48086] - webnn: Add MLOperandDescriptor.shape and…
Browse files Browse the repository at this point in the history
… discourage use of dimensions, a=testonly

Automatic update from web-platform-tests
webnn: Add MLOperandDescriptor.shape and discourage use of dimensions

Renaming MLOperandDescriptor.dimensions to MLOperandDescriptor.shape
is proposed in this spec PR:
webmachinelearning/webnn#676

To avoid breaking all uses of WebNN, this CL adds support for specifying
'shape' without removing support for 'dimensions'. Callers which pass
'dimensions' will see a console warning suggesting they update their
code to use 'shape'.

This CL was created primarily using targeted find-and-replaces,
followed by running git cl format. This CL has no behavioral changes,
other than the aforementioned logging.

Bug: 365813262
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel,win11-blink-rel
Change-Id: I6b37ebc505a37686709f006b3ecafcefd3e2016d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5502631
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1356886}

--

wpt-commits: 1aa1ed11f44b7d560d3debc4c16ba691da0aa594
wpt-pr: 48086
  • Loading branch information
a-sully authored and moz-wptsync-bot committed Sep 25, 2024
1 parent 7667bcc commit bc114cc
Show file tree
Hide file tree
Showing 138 changed files with 4,478 additions and 4,868 deletions.
32 changes: 16 additions & 16 deletions testing/web-platform/tests/webnn/conformance_tests/abs.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const absTests = [
'inputs': {
'absInput': {
'data': [49.837242126464844],
'descriptor': {'dimensions': [], 'dataType': 'float32'}
'descriptor': {shape: [], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -40,7 +40,7 @@ const absTests = [
'expectedOutputs': {
'absOutput': {
'data': [49.837242126464844],
'descriptor': {'dimensions': [], 'dataType': 'float32'}
'descriptor': {shape: [], dataType: 'float32'}
}
}
}
Expand All @@ -51,7 +51,7 @@ const absTests = [
'inputs': {
'absInput': {
'data': [-91.03521728515625],
'descriptor': {'dimensions': [], 'dataType': 'float32'}
'descriptor': {shape: [], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -62,7 +62,7 @@ const absTests = [
'expectedOutputs': {
'absOutput': {
'data': [91.03521728515625],
'descriptor': {'dimensions': [], 'dataType': 'float32'}
'descriptor': {shape: [], dataType: 'float32'}
}
}
}
Expand All @@ -82,7 +82,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [24], 'dataType': 'float32'},
'descriptor': {shape: [24], dataType: 'float32'},
'constant': true
}
},
Expand All @@ -103,7 +103,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [24], 'dataType': 'float32'}
'descriptor': {shape: [24], dataType: 'float32'}
}
}
}
Expand All @@ -123,7 +123,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [24], 'dataType': 'float32'}
'descriptor': {shape: [24], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -143,7 +143,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [24], 'dataType': 'float32'}
'descriptor': {shape: [24], dataType: 'float32'}
}
}
}
Expand All @@ -163,7 +163,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [4, 6], 'dataType': 'float32'}
'descriptor': {shape: [4, 6], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -183,7 +183,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [4, 6], 'dataType': 'float32'}
'descriptor': {shape: [4, 6], dataType: 'float32'}
}
}
}
Expand All @@ -203,7 +203,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [2, 3, 4], 'dataType': 'float32'}
'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -223,7 +223,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [2, 3, 4], 'dataType': 'float32'}
'descriptor': {shape: [2, 3, 4], dataType: 'float32'}
}
}
}
Expand All @@ -243,7 +243,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [2, 2, 2, 3], 'dataType': 'float32'}
'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -263,7 +263,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [2, 2, 2, 3], 'dataType': 'float32'}
'descriptor': {shape: [2, 2, 2, 3], dataType: 'float32'}
}
}
}
Expand All @@ -283,7 +283,7 @@ const absTests = [
30.097660064697266, -74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, -53.206058502197266
],
'descriptor': {'dimensions': [2, 1, 4, 1, 3], 'dataType': 'float32'}
'descriptor': {shape: [2, 1, 4, 1, 3], dataType: 'float32'}
}
},
'operators': [{
Expand All @@ -303,7 +303,7 @@ const absTests = [
30.097660064697266, 74.21503448486328, 95.60974884033203,
6.614287376403809, 31.2832088470459, 53.206058502197266
],
'descriptor': {'dimensions': [2, 1, 4, 1, 3], 'dataType': 'float32'}
'descriptor': {shape: [2, 1, 4, 1, 3], dataType: 'float32'}
}
}
}
Expand Down
Loading

0 comments on commit bc114cc

Please sign in to comment.