Skip to content

Rename pool2d MLRoundingType - Simplify the operand layout support of conv2d and pooling 2d operations - #770

Merged
fdwr merged 23 commits into
webmachinelearning:mainfrom
fdwr:pool2dNoMLRoundingType
Sep 23, 2025
Merged

Rename pool2d MLRoundingType - Simplify the operand layout support of conv2d and pooling 2d operations#770
fdwr merged 23 commits into
webmachinelearning:mainfrom
fdwr:pool2dNoMLRoundingType

Conversation

@fdwr

@fdwr fdwr commented Oct 23, 2024

Copy link
Copy Markdown
Collaborator

Fixes #324

Rather than having two output shape parameters, an explicit output size and an output rounding mode, be more explicit in WebNN such that the caller passes the explicit output shape, resolving any higher-level policy beforehand (like with convTranspose2d):

dictionary MLPool2dOptions : MLOperatorOptions {
  sequence<[EnforceRange] unsigned long> windowDimensions;
  sequence<[EnforceRange] unsigned long> padding;
  sequence<[EnforceRange] unsigned long> strides;
  sequence<[EnforceRange] unsigned long> dilations;
  MLInputOperandLayout layout = "nchw";
- MLRoundingType roundingType = "floor";
  sequence<[EnforceRange] unsigned long> outputSizes;
};

Additional changes:

  • Added spec:infra; type:dfn; text:string due to new build failures unrelated to my change (thanks Dominique).
  • Rewrapped instanceNormalization for linter error.
  • Update linter to display line numbers (save valuable time diagnosing errors) and display success message (rather than confusing silence).

Preview | Diff

Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
@fdwr
fdwr requested a review from huningxin November 15, 2024 23:31
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
1. If any value in |options|.{{MLPool2dOptions/dilations}} is not greater than 0, then [=exception/throw=] a {{TypeError}}.
1. Let |desc| be a copy of |input|.{{MLOperand/[[descriptor]]}}.
1. Let |outputShape| be the result of [=MLGraphBuilder/calculating pool2d output sizes=] given |options|.{{MLPool2dOptions/layout}}, |input|'s [=MLOperand/shape=], |options|.{{MLPool2dOptions/roundingType}}, |options|.{{MLPool2dOptions/windowDimensions}}, |options|.{{MLPool2dOptions/padding}}, |options|.{{MLPool2dOptions/strides}}, |options|.{{MLPool2dOptions/dilations}}, and |options|.{{MLPool2dOptions/outputSizes}} (if it [=map/exists=]).
1. Let |outputShape| be the result of [=MLGraphBuilder/calculating pool2d output sizes=] given |options|.{{MLPool2dOptions/layout}}, |input|'s [=MLOperand/shape=], |options|.{{MLPool2dOptions/windowDimensions}}, |options|.{{MLPool2dOptions/padding}}, |options|.{{MLPool2dOptions/strides}}, |options|.{{MLPool2dOptions/dilations}}, and |options|.{{MLPool2dOptions/outputSizes}} (if it [=map/exists=]).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The outputSizes validation above in 13.2 doesn't appear to be correct--shouldn't it be similar to this logic?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this is now resolved by Joshua?

@inexorabletash

Copy link
Copy Markdown
Contributor

This implicitly resolves #374 as well, doesn't it?

@inexorabletash

inexorabletash commented Feb 25, 2025

Copy link
Copy Markdown
Contributor

This PR needs a redo since there's been a lot of spec churn since Nov 2024. But one thing I noticed in the current spec text:

If options.outputSizes exists, or if options.padding does not exist, set options.padding to the list « 0, 0, 0, 0 ».

That implies that if outputSizes becomes a required option, then any passed padding will always be ignored. Flaw in the current text? I think the first clause "if options.outputSizes exists" is bogus today, and should be removed.

@fdwr

fdwr commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator Author

I'm confused by the build errors, as I didn't touch any of those lines, and [=string=] seems unrelated 🙃:

      LINE 1713:36: Multiple possible 'string' dfn refs.
      Arbitrarily chose https://infra.spec.whatwg.org/#string
      To auto-select one of the following refs, insert one of these lines into a <pre class=link-defaults> block:
      spec:infra; type:dfn; text:string
      spec:rdf12-concepts; type:dfn; text:string
      [=string=]

@dontcallmedom

Copy link
Copy Markdown
Contributor

the build error is indeed unrelated to the particular change, but linked to the definition set bikeshed uses for auto-linking.

the simplest short term solution is to add spec:infra; type:dfn; text:string in the existing <pre class="link-defaults"> on L50.

@anssiko anssiko changed the title Remove pool2d MLRoundingType - Simplify the operand layout support of conv2d and pooling 2d operations Rename pool2d MLRoundingType - Simplify the operand layout support of conv2d and pooling 2d operations Sep 4, 2025
@fdwr

fdwr commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator Author

MLPool2dOptions::outputShapeRounding.

SGTM

@huningxin: Any changes desired?

Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
1. If |options|.{{MLPool2dOptions/outputSizes}} [=map/exists=], then:
1. Let « |outputHeight|, |outputWidth| » be |options|.{{MLPool2dOptions/outputSizes}}.
1. Let « |outputHeight|, |outputWidth| » be |options|.{{MLPool2dOptions/outputSizes}}.
1. If neither |outputHeight| equals floor( |calculatedOutputHeight| ) and |outputWidth| equals floor( |calculatedOutputWidth| ), nor |outputHeight| equals ceil( |calculatedOutputHeight| ) and |outputWidth| equals ceil( |calculatedOutputWidth| ), then [=exception/throw=] a {{TypeError}}.

@huningxin huningxin Sep 23, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And this line should also indent.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

True. I was thinking it would just fall through safely, but it's unnecessary to check this condition because we already know that calculating conv2d output sizes computing legal sizes.

@huningxin huningxin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks @fdwr !

@fdwr
fdwr merged commit a3e8163 into webmachinelearning:main Sep 23, 2025
2 checks passed
github-actions Bot added a commit that referenced this pull request Sep 23, 2025
… conv2d and pooling 2d operations (#770)

SHA: a3e8163
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 13, 2026
This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 20, 2026
This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
beckysiegel pushed a commit to chromium/chromium that referenced this pull request Apr 21, 2026
This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Dai, Feng <feng.dai@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Cr-Commit-Position: refs/heads/main@{#1618021}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 21, 2026
This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Dai, Feng <feng.dai@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Cr-Commit-Position: refs/heads/main@{#1618021}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 21, 2026
This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Dai, Feng <feng.dai@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Cr-Commit-Position: refs/heads/main@{#1618021}
beckysiegel pushed a commit to chromium/chromium that referenced this pull request Apr 22, 2026
…ops"

This reverts commit e581146.

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/6349833846652928

Sample build with failed test: https://ci.chromium.org/b/8683829578450763649
Affected test(s):
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#averagePool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23averagePool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#maxPool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23maxPool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)

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%2F6349833846652928&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F7717139&type=BUG

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}
>

Bug: 498118207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I492d6269e88cfb4b65a22f495a2b73a1168c7747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7783895
Reviewed-by: Alex Gough <ajgo@chromium.org>
Owners-Override: Adem Derinel <derinel@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adem Derinel <derinel@google.com>
Reviewed-by: Adem Derinel <derinel@google.com>
Cr-Commit-Position: refs/heads/main@{#1618876}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 22, 2026
…ops"

This reverts commit e5811467122a07253805711cf7331c2de1741f1d.

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/6349833846652928

Sample build with failed test: https://ci.chromium.org/b/8683829578450763649
Affected test(s):
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#averagePool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23averagePool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#maxPool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23maxPool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)

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%2F6349833846652928&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F7717139&type=BUG

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}
>

Bug: 498118207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I492d6269e88cfb4b65a22f495a2b73a1168c7747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7783895
Reviewed-by: Alex Gough <ajgo@chromium.org>
Owners-Override: Adem Derinel <derinel@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adem Derinel <derinel@google.com>
Reviewed-by: Adem Derinel <derinel@google.com>
Cr-Commit-Position: refs/heads/main@{#1618876}
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Apr 28, 2026
…eRounding for pool2d ops, a=testonly

Automatic update from web-platform-tests
webnn: rename roundingType to outputShapeRounding for pool2d ops

This CL renames MLPool2dOptions::roundingType to
MLPool2dOptions::outputShapeRounding in test files and implementations
according to Spec change [1].

[1] webmachinelearning/webnn#770

Bug: 498118207
Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
Cq-Include-Trybots: luci.chromium.try​:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Dai, Feng <feng.dai@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Cr-Commit-Position: refs/heads/main@{#1618021}

--

wpt-commits: 1654471ad9b5ff35861d80d3d40cce113c6acb9d
wpt-pr: 59145
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Apr 28, 2026
…tputShapeRounding for pool2d ops", a=testonly

Automatic update from web-platform-tests
Revert "webnn: rename roundingType to outputShapeRounding for pool2d ops"

This reverts commit e5811467122a07253805711cf7331c2de1741f1d.

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/6349833846652928

Sample build with failed test: https://ci.chromium.org/b/8683829578450763649
Affected test(s):
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#averagePool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23averagePool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)
[://\:blink_wpt_tests!webtest::virtual/webnn-service-on-cpu/external/wpt/webnn/conformance_tests#maxPool2d.https.any.html?cpu](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::virtual%2Fwebnn-service-on-cpu%2Fexternal%2Fwpt%2Fwebnn%2Fconformance_tests%23maxPool2d.https.any.html%3Fcpu?q=VHash%3A2dc5f607fec8a763)

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%2F6349833846652928&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F7717139&type=BUG

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try​:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}
>

Bug: 498118207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I492d6269e88cfb4b65a22f495a2b73a1168c7747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7783895
Reviewed-by: Alex Gough <ajgo@chromium.org>
Owners-Override: Adem Derinel <derinel@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adem Derinel <derinel@google.com>
Reviewed-by: Adem Derinel <derinel@google.com>
Cr-Commit-Position: refs/heads/main@{#1618876}

--

wpt-commits: b7feb889720d87f1239591a959703cfa2d15f226
wpt-pr: 59407
guschmue pushed a commit to microsoft/onnxruntime that referenced this pull request Apr 29, 2026
…8172)

Keep original roundingType name for a period of time to ensure backward
compatibility.

Spec change: webmachinelearning/webnn#770

---------

Co-authored-by: Dwayne Robinson <fdwr@hotmail.com>
brave-builds pushed a commit to brave/chromium that referenced this pull request Jun 2, 2026
…ops"

This is a reland of commit e581146.

The original CL was reverted because two newly-added baseline files
under platform/win11-arm64/virtual/webnn-service-on-cpu/... still
referenced the old "roundingType" test names, which no longer matched
the renamed WPT cases ("outputShapeRounding"). Those baselines are
updated in this reland.

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}

Bug: 498118207
Change-Id: I4df2860081223af43493a0447ca5e69e104950df
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, win11-arm64-blink-rel, mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7882018
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Reviewed-by: Elias Klim <elklm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1639919}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 2, 2026
…ops"

This is a reland of commit e5811467122a07253805711cf7331c2de1741f1d.

The original CL was reverted because two newly-added baseline files
under platform/win11-arm64/virtual/webnn-service-on-cpu/... still
referenced the old "roundingType" test names, which no longer matched
the renamed WPT cases ("outputShapeRounding"). Those baselines are
updated in this reland.

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}

Bug: 498118207
Change-Id: I4df2860081223af43493a0447ca5e69e104950df
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, win11-arm64-blink-rel, mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7882018
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Reviewed-by: Elias Klim <elklm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1639919}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 2, 2026
…ops"

This is a reland of commit e5811467122a07253805711cf7331c2de1741f1d.

The original CL was reverted because two newly-added baseline files
under platform/win11-arm64/virtual/webnn-service-on-cpu/... still
referenced the old "roundingType" test names, which no longer matched
the renamed WPT cases ("outputShapeRounding"). Those baselines are
updated in this reland.

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}

Bug: 498118207
Change-Id: I4df2860081223af43493a0447ca5e69e104950df
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, win11-arm64-blink-rel, mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7882018
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Reviewed-by: Elias Klim <elklm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1639919}
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jun 4, 2026
…tputShapeRounding for pool2d ops", a=testonly

Automatic update from web-platform-tests
Reland "webnn: rename roundingType to outputShapeRounding for pool2d ops"

This is a reland of commit e5811467122a07253805711cf7331c2de1741f1d.

The original CL was reverted because two newly-added baseline files
under platform/win11-arm64/virtual/webnn-service-on-cpu/... still
referenced the old "roundingType" test names, which no longer matched
the renamed WPT cases ("outputShapeRounding"). Those baselines are
updated in this reland.

Original change's description:
> webnn: rename roundingType to outputShapeRounding for pool2d ops
>
> This CL renames MLPool2dOptions::roundingType to
> MLPool2dOptions::outputShapeRounding in test files and implementations
> according to Spec change [1].
>
> [1] webmachinelearning/webnn#770
>
> Bug: 498118207
> Change-Id: I815c7f7728071144835c0ada0747bc9de2999669
> Cq-Include-Trybots: luci.chromium.try​:mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7717139
> Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Auto-Submit: Dai, Feng <feng.dai@intel.com>
> Commit-Queue: Dai, Feng <feng.dai@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1618021}

Bug: 498118207
Change-Id: I4df2860081223af43493a0447ca5e69e104950df
Cq-Include-Trybots: luci.chromium.try​:win11-blink-rel, win11-arm64-blink-rel, mac14.arm64-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7882018
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Commit-Queue: Dai, Feng <feng.dai@intel.com>
Reviewed-by: Elias Klim <elklm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1639919}

--

wpt-commits: 58938037e8fd81f7a51b89985141c39ccf6922b1
wpt-pr: 60329
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.

Simplify the operand layout support of conv2d and pooling 2d operations

7 participants