Remove the MLContext.compute() method#795
Merged
fdwr merged 3 commits intowebmachinelearning:mainfrom Dec 2, 2024
Merged
Conversation
a-sully
commented
Nov 27, 2024
Contributor
Author
|
@huningxin @fdwr PTAL? |
inexorabletash
approved these changes
Nov 27, 2024
Contributor
inexorabletash
left a comment
There was a problem hiding this comment.
LGTM
This does make me realize that as part of #529 we'll likely need to define queuing for operations on the timeline that share tensors, to avoid racy behavior. With ArrayBuffers transferred away synchronously during compute(), there wasn't the possibility for multiple compute()s to compete for access to the buffer or script to read/write the contents.
huningxin
reviewed
Nov 28, 2024
huningxin
approved these changes
Nov 28, 2024
Contributor
huningxin
left a comment
There was a problem hiding this comment.
LGTM with a comment to example, thanks!
Contributor
Author
|
Thanks for the reviews, @huningxin and @inexorabletash @fdwr PTAL? |
github-actions bot
added a commit
that referenced
this pull request
Dec 2, 2024
SHA: 4e80205 Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
caugner
pushed a commit
to mdn/browser-compat-data
that referenced
this pull request
Dec 19, 2024
Not in the spec anymore: webmachinelearning/webnn#795
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #791. Made possible by #787 which specified
dispatch()The changes proposed in #786 have also been rolled into this PR, since they can't really be decoupled from
compute()removal at this pointI've tried to keep this PR minimal and focused on removing algorithms and IDL definitions which are no longer relevant. The spec still contains lots of normative text which was written with
compute()in mind which doesn't map as well todispatch()- specifically text which contains assumptions about how graph execution relates to compute devices. I've lightly updated some of this text where necessary to match thedispatch()paradigm, but my intention is to avoid opening the can of worms that is #749 in this PR :)Preview | Diff