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

Use unsigned long for size related options of conv2d, convTranspose2d and pooling operations #294

Merged
merged 2 commits into from Dec 20, 2022

Conversation

huningxin
Copy link
Contributor

@huningxin huningxin commented Sep 8, 2022

There are no use cases for negative values of these attributes including:

  • MLConv2dOptions: padding, strides, dilations and groups.
  • MLConvTranspose2dOptions: padding, strides, dilations, outputPadding, outputSizes and groups.
  • MLPool2dOptions: windowDimensions, padding, strides, dilations and outputSizes.

fix #269

@wchao1115 @anssiko @wacky6 @miaobin, PTAL. Thanks!


Preview | Diff

There are no use cases for negative values of these attributes including:
- MLConv2dOptions: padding, strides, dilations and groups.
- MLConvTranspose2dOptions: padding, strides, dilations, outputPadding,
  outputSizes and groups.
- MLPool2dOptions: windowDimensions, padding, strides, dilations and
  outputSizes.

fix webmachinelearning#269
@huningxin huningxin changed the title Change the type of some attributes to unsigned long Use unsigned long for size related options of conv2d, convTranspose2d and pooling operations Sep 17, 2022
@anssiko
Copy link
Member

anssiko commented Dec 1, 2022

@wchao1115 can we merge this?

@anssiko
Copy link
Member

anssiko commented Dec 7, 2022

@wchao1115 gentle ping, PTAL.

@anssiko
Copy link
Member

anssiko commented Dec 16, 2022

Thanks again @wchao1115!

@huningxin I addressed the merge conflict. PTAL and feel free to merge when you're good.

@BruceDai for wpt test alignment.

@BruceDai
Copy link
Contributor

@anssiko Thanks for your reminder, I got it.

@huningxin
Copy link
Contributor Author

Thanks for the review and approval. Also thanks @anssiko for the rebasing. I am going to merge it.

@huningxin huningxin merged commit 5a4e73e into webmachinelearning:main Dec 20, 2022
github-actions bot added a commit that referenced this pull request Dec 20, 2022
SHA: 5a4e73e
Reason: push, by huningxin

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 Jan 18, 2023
This CL implements the WebNN spec changes [1] and [2] that fix the data
type of attributes for MLConv2dOptions, MLPool2dOptions and
MLResample2dOptions by using unsigned integers instead of signed
integers. For those attributes, the negative values are not meaningful.

The MLGraphBuilder, MLGraphBuilderTest and MLGraphXnnpack are updated
according to this IDL change.

[1]: webmachinelearning/webnn#294
[2]: webmachinelearning/webnn#306


Bug: 1273291
Change-Id: Ic7aa42ff20676b959695e66608d3254ce368c7e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4164044
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Commit-Queue: ningxin hu <ningxin.hu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1093807}
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.

Define the data type of the padding, strides and dilations of MLConv2dOptions as sequence<unsigned long>
5 participants