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

Add Implementation Status of WebNN Operations page #41

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

ibelem
Copy link
Contributor

@ibelem ibelem commented May 10, 2023

Along with a broader introduction to WebNN in upcoming blogs, articles, etc., we need a "Implementation Status of WebNN Operations" page for developers to understand the actual implementation progress. We'll start with the backends or JS ML frameworks we already support.

  1. Add XNNPack/CPU status
  2. Add ONNXRuntime WebNN EP
  3. Removed formatted markdown for tables based on Fix first-wave models table formatting webnn#387

@lisa0314 @miaobin @Honry please help to review the contents of this PR.

@anssiko @huningxin Please provide your feedback if we are OK to share this data or any other thoughs, my plan was to merge this PR when @lisa0314 @miaobin land all the first-wave ops of XNNPack in Chromium in next 1-2 weeks.

10 239 115 52_4000_webnn-status_ (2)

webnn-ops.md Outdated Show resolved Hide resolved
@ibelem
Copy link
Contributor Author

ibelem commented May 11, 2023

@Honry @huningxin, added TFLite External Delegate status, PTAL.

Copy link
Contributor

@Honry Honry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@anssiko
Copy link
Member

anssiko commented May 11, 2023

This is a great starting point, thanks everyone for your contributions!

@ibelem, here are my comments:

  • Please investigate if it'd be feasible to use MDN browser-compat-data (BCD) conventions for this data to be exported into this presentation style you have here (you'd need to write your own BCD -> md/html exporter). BCD is a machine-readable format that is consumed by MDN and many other projects. @dontcallmedom can answer BCD related questions you may have. See also earlier discussion in #223. If this would be too big of an effort for this sprint we could make this BCD alignment a "v2" feature for this implementation status page.

Some minor suggestions:

This PR fixes #223.

Thanks again for your work on this!

@ibelem
Copy link
Contributor Author

ibelem commented May 12, 2023

  • Added web-platform-tests for each op, @BruceDai PTAL.
  • Updated permalink to [Impl Status] (/webnn-status/)

@anssiko thanks for your great suggestion on the BCD integration, we definitely need to do this for web developers and created an internal task.

The BCD data will cover not only the WebNN ops implementation status but also all the WebNN interfaces, constructors, methods etc., and the browser compatibility data for all of them. Maybe we need to think about what kind of WebNN milestones and what frequency of updates are appropriate.

Go back to this PR:

  • The BCD project is a Node.js based project and can be installed via npm, but as you suggested, our webmachinelearning.github.io was built on ruby/jekyll, unable to import the package directly. Do you know if BCD has restful APIs available for other web sites to fetch, rather than install the npm package?
  • Per the guidelines of BCD, if we want to have a comprehensive implementation status in one page, we may need to request to fetch several json files and merge them together then convert them into one table. We are not the caniuse.com but the WebML site only, I am afraid the ROI of developing .json files to md or html converter is not good enough.
    • The WebNN ML interface will be added in api/Navigator.json
    • Many of the json files in api/ folder for WebNN and it's interfaces

WDYT?

@anssiko
Copy link
Member

anssiko commented May 12, 2023

Thanks for the updates @ibelem!

A good approach might be to:

Do you know if BCD has restful APIs available for other web sites to fetch, rather than install the npm package?

I don't, but @dontcallmedom might know.

@ibelem
Copy link
Contributor Author

ibelem commented Jun 15, 2023

@lisa0314 @miaobin @Honry please help to review the updated ops support status of this PR.

@Honry
Copy link
Contributor

Honry commented Jun 16, 2023

@ibelem, for WebNN delegate, we've supported Slice and StridedSlice.

@ibelem
Copy link
Contributor Author

ibelem commented Jun 16, 2023

@anssiko All the 30 first-wave ops for WebNN XNNPack/CPU backend have been landed in upstream Chromium (yesterday), also updated the TFLite WebNN Delegate and ONNXRuntime WebNN EP supported ops to latest, PTAL.

@BruceDai
Copy link

LGTM, thanks @ibelem

@anssiko
Copy link
Member

anssiko commented Jun 16, 2023

Fantastic work @ibelem @lisa0314 @miaobin @Honry and others! 🚀

I'll announce this to the WG in our upcoming meeting. I expect you'll to keep this important resource up to date tracking both updates to the spec and implementations.

@anssiko anssiko self-requested a review June 16, 2023 14:31
@anssiko
Copy link
Member

anssiko commented Jun 16, 2023

@ibelem would it help you to keep the commit history or would you prefer squash and merge?

1. WebNN XNNPack/CPU ops implementation status for first-wave models defined in WebNN spec
2. W3C Web Platform Test (WPT) implementation status
3. TFLite WebNN delegate supported ops status
4. ONNX Runtime Web WebNN EP supported ops status
@ibelem ibelem force-pushed the webnn-ops branch 2 times, most recently from c59d883 to 675c5ab Compare June 17, 2023 08:58
@ibelem
Copy link
Contributor Author

ibelem commented Jun 17, 2023

Thanks @anssiko and @Honry @lisa0314 @miaobin @BruceDai for the review, the commits have been squashed as following:

675c5ab

Add implementation status of WebNN Operations page

  1. WebNN XNNPack/CPU ops implementation status for first-wave models defined in WebNN spec
  2. W3C Web Platform Test (WPT) implementation status
  3. TFLite WebNN delegate supported ops status
  4. ONNX Runtime Web WebNN EP supported ops status

@anssiko anssiko merged commit 144b3c3 into webmachinelearning:main Jun 19, 2023
@anssiko
Copy link
Member

anssiko commented Jun 19, 2023

@ibelem now live at https://webmachinelearning.github.io/webnn-status/ 🚀

The Jekyll version in use does not seem to understand some of the Jekyll syntax used.

For example, document.querySelector('#spec_total') returns null. A fix would probably be to convert {: #spec_total } to <span id="spec_total"> and similarly for the rest of the elements on this line: https://github.com/webmachinelearning/webmachinelearning.github.io/blob/main/webnn-status.md?plain=1#LL103C3-L103C19

Please take a look if that would fix the issue.

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.

5 participants