-
Notifications
You must be signed in to change notification settings - Fork 48
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
Remove the MLContext.compute() method #795
Conversation
@huningxin @fdwr PTAL? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a comment to example, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Thanks for the reviews, @huningxin and @inexorabletash @fdwr PTAL? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM Mr. Sully.
SHA: 4e80205 Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Not in the spec anymore: webmachinelearning/webnn#795
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