Closed huningxin closed 3 years ago
@huningxin SGTM. Since this would be a standalone implementation, it sounds like it would be useful for development and benchmarking.
@jbingham @wchao1115 , thanks for your positive feedbacks.
I'd propose to create a repo under https://github.com/webmachinelearning/webnn-native to host the development. @anssiko
Per our resolution on WebML CG Teleconference – 21 January 2021, I created the following GH repo for the webnn-native project: https://github.com/webmachinelearning/webnn-native
@huningxin once the initial webnn-native
PR is available for review, please link it here and close this issue.
As the architecture diagram of WebNN explainer illustrates, WebNN highly relies on native ML APIs for hardware acceleration. There have been many design discussions within the CG are about the native ML API compatibility and performance. However, there is a lack of a good tool that could help the participants understand and evaluate different options in this important design space.
So, I propose to add a standalone native implementation of the WebNN API spec called
webnn-native
that complements the JavaScript implementation webnn-polyfill. Both the implementations would help inform the API spec development, validate implementability atop native APIs and provide a performance benchmark.Essentially,
webnn-native
could expose a header file (e.g.webnn.h
) that is generated by WebNN spec and include multiple native ML API backends, such as DirectML, NNAPI, ML Compute and OpenVINO mentioned in the explainer. Thewebnn.h
could also help the coordination with WebAssembly group that is included by CG charter.