-
Notifications
You must be signed in to change notification settings - Fork 31
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
CR Request for Web Neural Network API webnn #491
Comments
Entering CR based on a single browser prototype implementation and some JS libraries seems somewhat concerning/premature. Is the working group sure this can be interoperably implemented across many platforms? (the two backends seem insufficient, tbh) |
@marcoscaceres, I’m happy to see also you are interested in this API and its implementations! In short, cross-platform interoperability has been a key consideration for this API from the beginning due to the nature of this domain. The API is not tied to any particular platform and the WG has paid attention that the API is implementable on top of existing major platform APIs, such as Android Neural Networks API, Windows DirectML, Core ML and macOS/iOS Metal Performance Shaders and Basic Neural Network Subroutines as codified in the WG Charter. As a bonus, the API is polyfillable on top of WebGL, WebGPU and WebAssembly. There’s also a pure-JS implementation. The WG has also developed a test suite with domain experts that goes beyond your typical expectations. It pays special attention to numerical precision. If you’re interested in learning more about the implementations of this API, I’m happy to invite you as a guest to our future calls so you can ask questions from the experts in this domain. We have already received encouraging feedback from your colleagues at the recent F2F. We discussed some of that feedback at our bi-weekly yesterday and welcome you folks on board in an official capacity. |
As stated by Chai
That's concerning 😢 I'm not sure who gave that feedback, but that sounds like something pretty critical to fix before going to CR. And then:
Which again is concerning. Out of interest, who was it from Apple that gave the feedback and where? I can ping them for details. |
@marcoscaceres those quotes (I minuted, possible errors mine) are nothing that you should worry about in the context of this CR transition. Please provide your feedback in webmachinelearning/webnn#350 and we’ll invite you to our next meeting and help you understand this API so also you can start make helpful contributions. I’m sorry to say, but currently you are just confusing things here. |
Sorry, I'm confused. The above suggests the spec is not implementable on Apple's platforms and you are saying I shouldn't be worried? I think Apple's AC rep would formally object to the spec proceeding to CR if Apple folks are not confident it's implementable on multiple backends (specially if Apple's has provided feedback already with those concerns). We risk again getting into a single-engine situation, which would be extremely unfortunate and something we should avoid. I can try to get WebKit folks to provide more feedback in the meantime - but it would send the wrong message to publish a CR if the WG has received feedback already the it may not work with one of the platforms/frameworks (per webmachinelearning/webnn#350). |
@marcoscaceres with all due respect, this is a Candidate Recommendation transition, not a Proposed Recommendation transition. |
The Process document for Transitioning to Candidate Recommendation say:
If the document proceeds to CR it means that the group believes it's implementable. Folks from Apple are saying it's not implementable (webmachinelearning/webnn#350) so this shouldn't go to CR (because it will just get kicked back to WD again). It's sending the wrong signal that the document is ready, when folks from Apple are saying it is not. It would be better to keep it at WD until webmachinelearning/webnn#350 is addressed. |
This CR allows the WG to formally collect implementation experience to demonstrate that the specification works in practice. Helpful contributions at this stage are technical contributions toward the specification, further implementation experience and user feedback. An appeal is not considered a helpful contribution. The WG is specifically interested in further implementation feedback with regard to the MLCommandEncoder interface and continues to gather further implementation experience to enable more efficient WebGPU integration. The spec may evolve based on this experience. This is all normal for a CR and is all noted in the Status section. The information brought to the WG's attention suggests the API is implementable on all major platforms (I want to clarify this because I see confusing out of context quotes misrepresented in this issue). The WG has concrete evidence of this already: XNNPACK that is the backend of the first implementation is supported across architectures, including ARM64 on iOS and macOS. More implementations are in development. |
Sure, but webmachinelearning/webnn#350 remains an issue. If the working group knows it's going to go back to CR (and possibly having to completely refactor the API), then why go to CR already? Saying it works with XNNPACK isn't particularly helpful. |
webmachinelearning/webnn#350 is vague and it's not clear if this is a use case which isn't addressed by the specification, or if it is purely a concern about the specification being implementable. Depending on which way it is, it is a different conversation. |
It's a concern about the specification [not] being implementable on Apple's platforms/frameworks. WebKit folks are evaluating how/if we can join the working group and hopefully provide guidance towards addressing the issues. However, we are concerned about the spec going to CR prematurely for the reasons I already gave: It sends a bad signal and we don't want the design/API shape to be locked in before an opportunity to provide adequate feedback. |
The definition of a CR says:
Unless webmachinelearning/webnn#350 gets refined within a week, I don't see a reason to block this transition, which fits the purpose of moving to CR. If implementation feedback is raised which require revising the design, it is expected to send the document back to Working Draft status. |
One more thought: I understand that the concern is about native implementation of this specification on Apple's platforms/frameworks and the integration with WebGPU. Tt may be that we need to refine the CR exit criteria for this specification. What are the proposed CR exit criteria for this specification and what is the minimum duration for this CR? |
@plehegar, your questions were probably more geared toward @dontcallmedom, but here's my input for your consideration: I'd prefer to use the success criteria from the proposed charter that adds an additional explicit expectation with regard to open test suites. I'll defer to @dontcallmedom for the minimum duration for this CR. From the WG leadership point of view, the WG is not in a hurry to exit CR and wants to give all interested implementers ample time to join the effort and provide feedback. |
Looking at the draft charter under AC review, I think the following lines would make sense to surface in the CR exit criteria:
In terms of minimum CR duration, we could probably go with 6 months? |
Approved with the updated exit criteria. |
as discussed in w3c/transitions#491
FWIW, @marcoscaceres and @plehegar, I'm the author of WebNN issue #350. My apologies that the issue lacks some details. Will update it soon. Since it's related to what being discussed here regarding Apple's position on WebNN's implementability, please allow me to clarify. Overall, Apple believes that WebNN is implementable with ANE (Apple Neural Engine) b/c WebNN is format-agnostic and that its interface is flexible enough to allow ANE to target compile the ML graph at the right time. They, however, noted an issue that we should also consider, which has to do with an ability to target multiple devices within the same graph. This is a legitimate feedback that we're looking into, but is not considered an implementation blocker. As for the GPU texture support issue, it wasn't directed at WebNN but rather at DirectML as an implementation note i.e. a comparison was made relative to DirectML exclusive support of GPU buffers. The current WebNN spec defines WebGPU interop support for both GPU buffer and texture. Hope this clears up some confusion. |
CR published https://www.w3.org/TR/2023/CR-webnn-20230330/ |
Pretty disappointing tbh :( Don't complain when we need to go back to WD when it doesn't work with Apple's frameworks. We did warn you. |
as discussed in w3c/transitions#491
as discussed in w3c/transitions#491
Document title, URLs, estimated publication date
Title: Web Neural Network API
URL: https://www.w3.org/TR/webnn/
Date: whenever transition is approved
Abstract
This document describes a dedicated low-level API for neural network inference hardware acceleration.
Status
https://www.w3.org/TR/webnn/#sotd amended for CR, and with additional note prepared in https://github.com/webmachinelearning/webnn/pull/340/files
Link to group's decision to request transition
https://lists.w3.org/Archives/Public/public-webmachinelearning-wg/2023Mar/0000.html
Changes
N/A (1st CR)
Requirements satisfied
As documented in webmachinelearning/webnn#240
Dependencies met (or not)
The normative dependencies haven't grown since FPWD (dependency to WebGL has actually been removed). The most significant dependency is to WebGPU and the spec may have to evolve significantly based on experience of implementing bridges between WebNN and WebGPU.
Wide Review
Documented in webmachinelearning/webnn#239
Issues addressed
The group address 95 issues; 68 remain open, including:
The rest we expect to be informed by implementation and adoption experience (in particular the ones on defining the right set of operations to support).
Formal Objections
None
Implementation
WPT tests tracker webmachinelearning/webnn#265
Patent disclosures
https://www.w3.org/groups/wg/webmachinelearning/ipr/
cc @anssiko
The text was updated successfully, but these errors were encountered: