Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the operand data type constraints of operations #646

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

inexorabletash
Copy link
Member

@inexorabletash inexorabletash commented Apr 18, 2024

Introduce constraints for input operands, either directly (e.g. input's dataType can only be "float32" or "float16") or indirectly (e.g. weight's dataType must be the same as input's).

Fixes #283


Preview | Diff

Introduce constraints for input operands, either directly (e.g.
input's dataType can only be "float32" or "float16") or indirectly
(e.g. weight's dataType must be the same as input's).

Fixes webmachinelearning#283
Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nit, thanks much!

index.bs Outdated Show resolved Hide resolved
@huningxin huningxin requested a review from fdwr April 19, 2024 07:37
Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

index.bs Outdated Show resolved Hide resolved
Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@inexorabletash
Copy link
Member Author

Conflict resolved. @fdwr, good to merge?

@inexorabletash
Copy link
Member Author

I'd missed reduceMean() somehow. Addressed in bd9b0cf

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks JB. Tedious work there! I update GEMM C's data type check (please review). The rest LGTM, and my ideas can wait.

index.bs Show resolved Hide resolved
@@ -4923,21 +4971,21 @@ partial interface MLGraphBuilder {

<div algorithm>
The <dfn method for=MLGraphBuilder>reduceProduct(|input|, |options|)</dfn> method steps are:
1. Let |output| be the result of running the [=MLGraphBuilder/reduce-op | create reduce operation=] given "reduceProduct", |input| and |options|.
1. Let |output| be the result of running the [=MLGraphBuilder/reduce-op | create reduce operation=] given "reduceProduct", |input|, |options|, and « {{MLOperandDataType/"float32"}}, {{MLOperandDataType/"float16"}}, {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"uint32"}} ».
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how you define them as type lists here, e.g. {{MLOperandDataType/"float32"}}, {{MLOperandDataType/"float16"}}, {{MLOperandDataType/"int32"}}, {{MLOperandDataType/"int8"}}. Other specs I've seen that list supported data types (some don't and just leave it to you as the user to try it and find out! 🎲🤞) declare them as lists, rather than explicit prose (e.g. [=MLOperand/dataType=] is not {{MLOperandDataType/"float32"}} or {{MLOperandDataType/"float16"}}). I'm not suggesting you change those above right now, but if we start adding more type lists to more places, it will be nice to have them consistent.

Copy link
Member Author

@inexorabletash inexorabletash Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I raised this over in #643 (comment) - i.e. using the list style everywhere. I'm a fan and happy to change things to this form everywhere:

  • If input’s dataType is not in « "float32", "float16" », then ...
  • If input’s dataType is not in « "float32", "float16", "int32", "int8" », then ...

... with the question of which formulation to use if there's a single type:

  • If input’s dataType is not "uint8", then ...
  • If input’s dataType is not in « "uint8" », then ...

Thoughts? (Depends on later conversation, though.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess a type list of 1 type is still a type list. So for consistency imo, If input’s dataType is not « "uint8" », then ....

index.bs Show resolved Hide resolved
index.bs Show resolved Hide resolved
@@ -4385,6 +4428,8 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder>matmul(|a|, |b|)</dfn> method steps are:
</summary>
1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |a| and |b| returns false, then [=exception/throw=] a {{TypeError}}.
1. If |a|'s [=MLOperand/dataType=] is not {{MLOperandDataType/"float32"}} or {{MLOperandDataType/"float16"}}, then [=exception/throw=] a {{TypeError}}.
1. If |b|'s [=MLOperand/dataType=] is not equal to |a|'s [=MLOperand/dataType=], then [=exception/throw=] a {{TypeError}}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah, increasingly the more I read this, more I think we should just add a new section of "data types at a glance", rather than burying them inside the algorithm steps. The steps can still say "if data type is not one of the blessed types", but it would be easier to see what's what. e.g.

Compute the matrix product of two input tensors.

partial interface MLGraphBuilder {
  MLOperand matmul(MLOperand a, MLOperand b);
};

Arguments:

  • a: an MLOperand. The first input tensor which is at least 2D.‌
  • b: an MLOperand. The second input tensor which is at least 2D.

Returns: an MLOperand. The output tensor that contains the matrix product of two input tensors.

Types:

  • a: float16, float32
  • b: same as a

Computes the matrix product of two input tensors as follows...

Whatcha think? Later CR? This CR? Alternate idea instead?

Copy link
Member Author

@inexorabletash inexorabletash Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try a parallel PR to this one that tries this. I have a love/hate relationship with the Arguments/Returns preamble; since it's not really rigorous I think of it as non-normative. Listing types out-of-band will need some formal structure, and e.g. "same as a" needs to be precisely defined (i.e. the actual data type needs to match)

Copy link
Member Author

@inexorabletash inexorabletash Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, @fdwr I put up #657 as an experiment, updating only batchNormalization and adding a definition, and including two variations (list and table), which I think captures what you were going for. It's a clone of this PR with one additional commit if you want to look at the diff.

The use of "allowed data types" links in the steps means the reader/developer needs to understand that there's a nearby table giving the constraint details - I didn't want to add explicit dfns/links for each table entry, but maybe we should. I didn't find exact precedent but this is vaguely similar to CSS property definitions.

The bikeshed for linking the argument is unfortunately very verbose. I figured out a shorter syntax!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gotten some feedback from @a-sully and @reillyeon about the approaches, and what this could enable (e.g. merge w/ Arguments, make it define shape as well, ...).

I might suggest that we merge this PR, either as-is or with the everything is a list change suggested above, and then iterate on table approach. Having this PR together has already identified some implementation gaps so start with this then iterate?

Copy link
Collaborator

@fdwr fdwr Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might suggest that we merge this PR, either as-is

Yep yep. I'll do that now.

make it define shape as well

That would be interesting. Some other specs I've read were hand-wavy about how the output shape calculations occur, leaving a lot of room for bugs interpretation in implementations. So, seeing that clearly conveyed, without needing to refer to some separate Javascript codebase, would be nice (but having the WPT reference implementation is also very valuable).

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 26, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I620653f574303e6f5b18d3b540b647f07e0cf64c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 26, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I620653f574303e6f5b18d3b540b647f07e0cf64c
@fdwr fdwr merged commit b5677b6 into webmachinelearning:main Apr 26, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Apr 26, 2024
SHA: b5677b6
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 27, 2024
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}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 27, 2024
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}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 27, 2024
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}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 28, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: Ia55a214e7ad281ec3c8911e9116f388fac209d05
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 9, 2024
This reverts commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b.

Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5728899092709376

Sample build with failed test: https://ci.chromium.org/b/8748452022241283393
Affected test(s):
[ninja://services:services_unittests/WebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fservices:services_unittests%2FWebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather?q=VHash%3A3db3852ce13cc70a)

If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5728899092709376&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F5520313&type=BUG

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}
>

Bug: 328567884
Change-Id: Iab874e915f5603861929cdf07ba4c09698b76503
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528819
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: Phillis Tang <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1298718}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 10, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 11, 2024
This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 14, 2024
… 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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 14, 2024
…ts for resample2d, a=testonly

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

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: b5ab7ede813bbbcdb0506ab2468e0e5e44c89ee5
wpt-pr: 45946
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 14, 2024
…ts for prelu, a=testonly

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

As specified in webmachinelearning/webnn#646.

Besides, this CL also fixes the throwing TypeError and migrates the unit
tests to WPT for prelu.

Bug: 328567884, 327337526, 328026885
Change-Id: I2c6c0097b8d4fdc8c92bd66d21abd2cbda91e030
Cq-Include-Trybots: luci.chromium.try​:win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5495874
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1297344}

--

wpt-commits: f409c99393325cfd014ff2002d84b6bb8f5afcbb
wpt-pr: 45947
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 14, 2024
… averagePool2d and l2Pool2d, a=testonly

Automatic update from web-platform-tests
webnn: Enforce data type constraints for averagePool2d and l2Pool2d

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: 8420f5224b6c558c67a32052f1148eca46245003
wpt-pr: 45974
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request May 15, 2024
… 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
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request May 15, 2024
…ts for resample2d, a=testonly

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

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: b5ab7ede813bbbcdb0506ab2468e0e5e44c89ee5
wpt-pr: 45946
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request May 15, 2024
…ts for prelu, a=testonly

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

As specified in webmachinelearning/webnn#646.

Besides, this CL also fixes the throwing TypeError and migrates the unit
tests to WPT for prelu.

Bug: 328567884, 327337526, 328026885
Change-Id: I2c6c0097b8d4fdc8c92bd66d21abd2cbda91e030
Cq-Include-Trybots: luci.chromium.try​:win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5495874
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1297344}

--

wpt-commits: f409c99393325cfd014ff2002d84b6bb8f5afcbb
wpt-pr: 45947
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request May 15, 2024
… averagePool2d and l2Pool2d, a=testonly

Automatic update from web-platform-tests
webnn: Enforce data type constraints for averagePool2d and l2Pool2d

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: 8420f5224b6c558c67a32052f1148eca46245003
wpt-pr: 45974
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 21, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 21, 2024
This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 21, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517811
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1303757}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 21, 2024
As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517811
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1303757}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 21, 2024
…ts for gather indices, a=testonly

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

As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
Reviewed-by: Austin Sullivan <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1298443}

--

wpt-commits: d32b68ce2a00a378db571901573b2ded4d8ab349
wpt-pr: 46129
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 21, 2024
…onstraints for gather indices", a=testonly

Automatic update from web-platform-tests
Revert "webnn: Enforce input data type constraints for gather indices"

This reverts commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b.

Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5728899092709376

Sample build with failed test: https://ci.chromium.org/b/8748452022241283393
Affected test(s):
[ninja://services:services_unittests/WebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fservices:services_unittests%2FWebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather?q=VHash%3A3db3852ce13cc70a)

If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5728899092709376&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F5520313&type=BUG

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}
>

Bug: 328567884
Change-Id: Iab874e915f5603861929cdf07ba4c09698b76503
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528819
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: Phillis Tang <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1298718}

--

wpt-commits: 61d40184e4b3d7aa0cca8c16cf3488e248c3ff04
wpt-pr: 46183
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 23, 2024
This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

The failure of services_unittests/WebNNGraphImplBackendTest.
BuildAndComputeSingleOperatorGather has been fixed by another CL: https://chromium-review.googlesource.com/c/chromium/src/+/5544945.

This CL adds int32 dataType support check besides uint32 and int64 for
gather indices compared with original CL.

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel,gpu-fyi-try-win11-qualcomm-rel-64
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 23, 2024
This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

The failure of services_unittests/WebNNGraphImplBackendTest.
BuildAndComputeSingleOperatorGather has been fixed by another CL: https://chromium-review.googlesource.com/c/chromium/src/+/5544945.

This CL adds int32 dataType support check besides uint32 and int64 for
gather indices compared with original CL.

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel,gpu-fyi-try-win11-qualcomm-rel-64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532907
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1304870}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 23, 2024
This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

The failure of services_unittests/WebNNGraphImplBackendTest.
BuildAndComputeSingleOperatorGather has been fixed by another CL: https://chromium-review.googlesource.com/c/chromium/src/+/5544945.

This CL adds int32 dataType support check besides uint32 and int64 for
gather indices compared with original CL.

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,mac14.arm64-blink-rel,gpu-fyi-try-win11-qualcomm-rel-64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532907
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1304870}
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 23, 2024
…ts for gather indices, a=testonly

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

As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
Reviewed-by: Austin Sullivan <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1298443}

--

wpt-commits: d32b68ce2a00a378db571901573b2ded4d8ab349
wpt-pr: 46129
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 23, 2024
…onstraints for gather indices", a=testonly

Automatic update from web-platform-tests
Revert "webnn: Enforce input data type constraints for gather indices"

This reverts commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b.

Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5728899092709376

Sample build with failed test: https://ci.chromium.org/b/8748452022241283393
Affected test(s):
[ninja://services:services_unittests/WebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fservices:services_unittests%2FWebNNGraphImplBackendTest.BuildAndComputeSingleOperatorGather?q=VHash%3A3db3852ce13cc70a)

If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5728899092709376&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F5520313&type=BUG

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}
>

Bug: 328567884
Change-Id: Iab874e915f5603861929cdf07ba4c09698b76503
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528819
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: Phillis Tang <[email protected]>
Commit-Queue: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1298718}

--

wpt-commits: 61d40184e4b3d7aa0cca8c16cf3488e248c3ff04
wpt-pr: 46183
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 23, 2024
…ts for some reduce operators, a=testonly

Automatic update from web-platform-tests
webnn: Enforce input data type constraints for some reduce operators

As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517811
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1303757}

--

wpt-commits: 0fa5e3bc5d097d84c074bc138271d8999277a50c
wpt-pr: 46180
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 24, 2024
…ts for some reduce operators, a=testonly

Automatic update from web-platform-tests
webnn: Enforce input data type constraints for some reduce operators

As specified in webmachinelearning/webnn#646

Bug: 328567884
Change-Id: I5e600bdc791ecd4530408b65c15dd20611c211a3
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517811
Reviewed-by: Austin Sullivan <[email protected]>
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1303757}

--

wpt-commits: 0fa5e3bc5d097d84c074bc138271d8999277a50c
wpt-pr: 46180
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 30, 2024
…onstraints for gather indices", a=testonly

Automatic update from web-platform-tests
Reland "webnn: Enforce input data type constraints for gather indices"

This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

The failure of services_unittests/WebNNGraphImplBackendTest.
BuildAndComputeSingleOperatorGather has been fixed by another CL: https://chromium-review.googlesource.com/c/chromium/src/+/5544945.

This CL adds int32 dataType support check besides uint32 and int64 for
gather indices compared with original CL.

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel,gpu-fyi-try-win11-qualcomm-rel-64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532907
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1304870}

--

wpt-commits: dde81ead14885761dbf9b0671bcd24a483b12b24
wpt-pr: 46217
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 31, 2024
…onstraints for gather indices", a=testonly

Automatic update from web-platform-tests
Reland "webnn: Enforce input data type constraints for gather indices"

This is a reland of commit ef29e11bfb1f1f4eae0935fb58f0e4129620837b

The failure of services_unittests/WebNNGraphImplBackendTest.
BuildAndComputeSingleOperatorGather has been fixed by another CL: https://chromium-review.googlesource.com/c/chromium/src/+/5544945.

This CL adds int32 dataType support check besides uint32 and int64 for
gather indices compared with original CL.

Original change's description:
> webnn: Enforce input data type constraints for gather indices
>
> As specified in webmachinelearning/webnn#646
>
> Bug: 328567884
> Change-Id: I33eba7e1def430b1cb94e3e7a4868e82c5bbd9a3
> Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5520313
> Reviewed-by: Austin Sullivan <[email protected]>
> Commit-Queue: Lisha Guo <[email protected]>
> Reviewed-by: ningxin hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1298443}

Bug: 328567884
Change-Id: Ide6a0e1bc6d3ebea7dce6bf37da4318e7b6e1bd1
Cq-Include-Trybots: luci.chromium.try​:mac14-blink-rel,mac14.arm64-blink-rel,gpu-fyi-try-win11-qualcomm-rel-64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532907
Reviewed-by: ningxin hu <[email protected]>
Commit-Queue: Lisha Guo <[email protected]>
Reviewed-by: Austin Sullivan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1304870}

--

wpt-commits: dde81ead14885761dbf9b0671bcd24a483b12b24
wpt-pr: 46217
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 1, 2024
…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
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 1, 2024
…ts for gemm and matmul, a=testonly

Automatic update from web-platform-tests
webnn: Enforce input data type constraints for gemm and matmul

As specified in webmachinelearning/webnn#646

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

--

wpt-commits: 0664d8153b085b9b3a94ecc52bc5b04d37e7d6fa
wpt-pr: 45945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify the operand data type constraints of operation
3 participants