webmachinelearning / webnn

🧠 Web Neural Network API
https://www.w3.org/TR/webnn/
Other
397 stars 47 forks source link

Add MLTensor explainer #754

Closed a-sully closed 1 month ago

a-sully commented 3 months ago

This explainer builds off the discussions in #482, #541, and many others

Note that #753 proposes renaming MLBuffer to MLTensor. I agree, and so this explainer reflects that

Feedback is welcome

a-sully commented 3 months ago

@bbernhar or @RafaelCintron hopefully none of this comes as a surprise? Any feedback?

a-sully commented 3 months ago

FYI @huningxin I'll be OOO next week so please feel free to merge this PR once @bbernhar is happy with the PR (please resolve comments which have been adequately addressed). I'm also happy to address some nits when I get back

Thank you all for the thorough reviews!

anssiko commented 3 months ago

@a-sully thanks for producing this explainer and please enjoy your time off this week!

We discussed this explainer a little on our call https://www.w3.org/2024/08/22-webmachinelearning-minutes.html#t04 and folks liked it.

Reviewers should focus on the overall design, open questions. Spec changes including IDL will come in separate PRs. As @a-sully suggests, any IDL is tentative and is subject to change.

https://github.com/webmachinelearning/webnn/labels/webgpu%20interop issues addressed by the explainer can be marked for closure.

@a-sully MLTensor (and broadly WebGPU interop) was proposed as one of the TPAC topics https://github.com/webmachinelearning/meetings/issues/25 and I'd like you to introduce the proposal there. Features such as buffer-sharing between WebNN and WebGPU have cross-group interest.

anssiko commented 2 months ago

@Kangz much thanks for your review and advice. We'll have a high-bandwidth discussion about this proposal at our TPAC F2F https://github.com/webmachinelearning/meetings/issues/25 and your expertise would be of great use to the group in that session. You can join us in person or remotely (export your invite here). To narrow down on the timing, we'd get to this 23 Sep 2024 3-4pm PDT.

a-sully commented 1 month ago

WebGPU interop seems workable and LGTM

Thanks for the review!

@huningxin or @fdwr would you mind merging this PR? If other reviewers have further feedback, I'm happy to address it in follow-up changes!