[w3ctag/design-reviews] Delta review (to CR) of Web Neural Network API (Issue #771)

Hi TAG!

I'm requesting a **delta** TAG review of the [Web Neural Network API](https://www.w3.org/TR/webnn/).

<details>
<summary><h4>More details about this review request</h4></summary>
The Web Neural Network API (or WebNN API in short) is a specification for constructing and executing computational graphs of neural networks. It provides web applications with the ability to create, compile, and run machine learning networks on the web browsers. The WebNN API may be implemented in web browsers using the available native operating system machine learning APIs for the best performance and reliability of results.

  - Explainer: https://github.com/webmachinelearning/webnn/blob/master/explainer.md

  - Specification URL: https://www.w3.org/TR/webnn/

  - Tests: [mocha tests](https://webmachinelearning.github.io/webnn-polyfill/test/), [migrating](https://github.com/web-platform-tests/wpt/issues?q=label%3Awg-s_webmachinelearning+) to [wpt/webnn](https://github.com/web-platform-tests/wpt/tree/master/webnn)
  - Security and Privacy self-review: completed, see [wide review tracker](https://github.com/webmachinelearning/webnn/issues/239)
  - GitHub repo: https://github.com/webmachinelearning/webnn

  - Primary contacts:
      - Ningxin Hu (@huningxin), Intel, Editor
      - Chai Chaoweeraprasit (@wchao1115), Microsoft, Editor
      - Anssi Kostiainen (@anssiko), Intel, Chair
  - Organization(s)/project(s) driving the specification: [participants](https://www.w3.org/groups/wg/webmachinelearning/participants) of the Web Machine Learning Working Group
  - Key pieces of existing multi-stakeholder review or discussion of this specification: [Web and Machine Learning workshop report](https://www.w3.org/2020/06/machine-learning-workshop/report.html) and [spec GH issues](https://github.com/webmachinelearning/webnn/issues) 
  - External status/issue trackers for this specification:

Further details:

  - [x] I have reviewed the TAG's [API Design Principles](https://w3ctag.github.io/design-principles/)
  - Relevant time constraints or deadlines: CR publication slated Q4 2022
  - The group where the work on this specification is currently being done: [Web Machine Learning Working Group](https://webmachinelearning.github.io/)
  - The group where standardization of this work is intended to be done:
  - Major unresolved issues with or opposition to this specification: N/A
  - This work is being funded by: N/A
</details>

>For the full review template, please unfold the above section ⤴️

The [initial TAG review](570) completed Oct 2021. This delta request focuses your attention on the following architectural changes and issues since the previous review:

- Naming of the sync and async methods: `createContext`, `build` and `compute`. The WG has considered two API naming conventions (`x() + xSync()` or `xAsync() + x()`) but was unable to reach consensus and [resolved](https://www.w3.org/2022/09/08-webmachinelearning-minutes.html#r01) to seek TAG recommendation.  See https://github.com/webmachinelearning/webnn/issues/272

  
- Related to the naming issue, the WG [decided](https://github.com/webmachinelearning/webnn/issues/229) to restrict the [sync API to worker context only](https://www.w3.org/TR/webnn/#api-mlcontext-sync-execution). This API complements the [async API](https://www.w3.org/TR/webnn/#api-mlcontext-async-execution). The key use case for the sync API is to support Wasm code generators. The async API is the recommended path for mainstream use cases. We would like to hear the TAG perspective on this API split. We are aware that the worker-only sync API design is a rare exception on the web platform.

- The WG [resolved](https://github.com/webmachinelearning/webnn/issues/268) to drop support for WebGL and focused on [WebGPU interoperability](https://www.w3.org/TR/webnn/#api-mlcontext-webgpu-interop).

The CR publication is slated for Q4 2022 so your feedback is the most impactful if it arrives by the end Oct 2022 latest.

We'd prefer the TAG provide feedback as:

  💬 leave review feedback as a **comment in this issue** and @-notify @anssiko

For context, these are the related issues in the WebNN GH repo:
- https://github.com/webmachinelearning/webnn/issues/272

- https://github.com/webmachinelearning/webnn/issues/229

- https://github.com/webmachinelearning/webnn/issues/268


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/771

You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/771@github.com>

Received on Friday, 9 September 2022 08:37:40 UTC