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

Convert MLOperand methods into readonly attributes #774

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

a-sully
Copy link
Contributor

@a-sully a-sully commented Oct 29, 2024

Fixes #666

Implements the changes proposed in #666 (comment) while simplifying the declaration of these getters to use the pattern suggested in https://webidl.spec.whatwg.org/#idl-frozen-array


Preview | Diff

@a-sully
Copy link
Contributor Author

a-sully commented Oct 29, 2024

@fdwr this PR follows up on our recent thread on #666. I expect to migrate the Chromium implementation in the same way as the dimensions -> shape refactoring. PTAL?

@fdwr fdwr requested a review from huningxin October 29, 2024 21:03
@a-sully
Copy link
Contributor Author

a-sully commented Oct 29, 2024

I expect to migrate the Chromium implementation in the same way as the dimensions -> shape refactoring. PTAL?

Hmm unfortunately this style of migration may not be possible in this case, since the Blink bindings code doesn't support interfaces which have a method and an attribute of the same name. See the crashes in https://crrev.com/c/5975719

We can have getters or methods, but not both at the same time... so a migration period is not possible :/

Would you prefer to make this change now or later?

@fdwr
Copy link
Collaborator

fdwr commented Oct 29, 2024

We can have getters or methods, but not both at the same time... so a migration period is not possible :/

Would you prefer to make this change now or later?

Well I'd like to frontload any breaking changes sooner than later, which smoothens the path to origin trial. However, if we can't mitigate this in any way on the Chromium end, can we closely synchronize the changes by having the corresponding update in samples already ready before completing the Chromium change?

@ibelem : For the ORT-based samples, maybe we could update the sample logic to map a given Chromium version to a correspondingly compatible build of ORT, so there is implicitly a window of migration in the sample logic?

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

/cc @Honry @BruceDai for required changes in webnn-samples, webnn-baseline and tests.

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.

👍

@fdwr fdwr merged commit 673c6b5 into webmachinelearning:main Oct 30, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Oct 30, 2024
SHA: 673c6b5
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Honry added a commit to Honry/onnxruntime that referenced this pull request Oct 30, 2024
fdwr pushed a commit to microsoft/onnxruntime that referenced this pull request Oct 31, 2024
github-actions bot added a commit that referenced this pull request Nov 6, 2024
SHA: 673c6b5
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@a-sully a-sully deleted the mloperand-readonly-attributes branch November 7, 2024 21:10
ishwar-raut1 pushed a commit to ishwar-raut1/onnxruntime that referenced this pull request Nov 19, 2024
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
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.

Reconsider MLOperand methods
3 participants