W3C

– DRAFT –
WebML WG Teleconference – 10 August 2023

10 August 2023

Attendees

Present
Anssi_Kostiainen, Chai_Chaoweeraprasit, Dominique_Hazael-Massieux, Dwayne_Robinson, Joshua_Bell, Joshua_Lochner, Ningxin_Hu, Rachel_Yager, Rafael_Cintron, Vivek_Sekhar, Zoltan_Kis
Regrets
Dominique_Hazael-Massieux
Chair
Anssi
Scribe
Anssi, anssik

Meeting minutes

anssik: Welcome back after the summer break to an amazing second half!

Joshua_Bell: thanks for the intro, Anssi!
… very new to ML space and diving in to learn and contribute on behalf of Google here, working with other Googlers like Vivek, on how to improve the Web Platform with ML, enhancements to Wasm, WebGPU, Storage APIs near to my heart, also WebNN and work this group has done so far

Announcements

Implementation Status of WebNN Operations updated

anssik: in response to the WG's feedback the implementation status page has been updated, notably changes:
… - List implementation status for all 60 v1 ops
… - Clearer distinction between browser implementation and framework
… - Add "Browser version" column
… - Add DirectML backend as "WIP" while in a Chromium fork
… - MDN Browser Compat Data
… this status page fetches its data from webnn_status.json that contains the compat data in a machine-readable browser-compat-data ("BCD") format

webnn_status.json

anssik: This BCD data is used in web apps and software such as MDN Web Docs, CanIUse.com, Visual Studio Code, WebStorm and more
… this will help web developers write websites easier with WebNN, including auto-complete in IDE, checking for supported features per browser version
… huge thanks to Belem and the team for putting this data together, maintaining this as the implementation and spec evolve is important
… a future work item is to feed this data to MDN Web Docs and other sites to integrate this BCD data format
… questions, comments?

Chai: thank you Anssi!
… I noticed we refer to first 60 ops as "v1" and what comes after as "v2"
… do we want to relate our internal "v1" and "v2" with spec milestones

anssik: how was IndexDB 2.0 story, Joshua?

Joshua_Bell: we used versioning for that spec as a best effort and it led to a bit of confusion and we moved to a Living Standard model
… each version for IndexedDB is *not* incompatible with its previous major version
… changes are additive
… this is a little different on how specs work in some other WGs such as CSS
… I was going to suggest we use the Living Standard model here, as this maps to how browsers evolve features and what developers expect

Chai: we say "The total number of WebNN v1 ops is 60" in the status page

anssik: let's remove all versioning related labeling from our web developer-facing docs
… other questions, comments?

WebNN v2: text-to-image and text-to-text use cases and requirements

anssik: As a post-break thing, I want to come back to transformer-based generative AI use cases for text-to-image and text-to-text models.
… we choose these use cases as our initial v2 targets and are now soliciting input on new ops and data types required to support selected models informed by prototyping efforts.
… As a refresher, we've had a few great presos in the group lately:

Transformers.js presentation by Joshua Lochner

Transformer models presentation by Dwayne Robinson

anssik: Transformer-based models and use cases discussion happens in #375

webmachinelearning/webnn#375
… you can filter these v2 op proposals with "operation set" and "v2" label:

v2 op proposals

anssik: we have received one v2 op proposal, dedicated square root operator #438, a joint effort bt Dwayne and Ningxin. Thank you!

webmachinelearning/webnn#438
… you can use this issues #438 as an example on how to propose other v2 ops. Following our contribution guidelines this issues lists use case/sample model, discusses cross-framework support, cross-platform implementability. I expect us to have a similar GH issue for every new v2 op where to solicit input from all stakeholders

Contribution guidelines for proposing and adding a new operation

anssik: an action to everyone interested in v2 ops is to create similar issues for v2 op proposals, I'll apply GH labels to them so help aid discoverability

ningxin_hu: re dedicated square root operator #438, XNNPACK only support a dedicated square root so we map that to the squareroot of XNNPACK, if we have this dedicated op we can map explicitly instead of indirectly, should be done by the user code

chai: a reminder, from the spec review point of view, we'll also review the PR that is sent out to make changes to the spec after issue discussion
… a PR is expected in the coming weeks

WebIDL and Infra standard conventions

anssik: The `zk-conventions-integration` integration branch is now ready for review as announced on our last call. Let's discuss how to do the final review of this branch to get it merged into main soon as discussed.
… earlier today Zoltan submitted a catch-all PR to integrate these changes to the main branch:
… PR webmachinelearning/webnn#446

anssik: ... This PR is composed of 111 commits, and includes also commits that address the review feedback received to date. Much thanks Zoltan for this pushing this effort!
… as discussed earlier, to recap, these changes align the entire specification with modern specification conventions and add stylistic improvements
… now that we have a PR against main we can use the familiar tools for preview and diffing, here are the URLs:

PR preview

PR diff

<zkis> https://zolkis.github.io/webnn/

anssik: I want us discuss and agree on how the editors would like to integrate these changes and how extensively we want to review this PR and for how long we expect it to take
… I'm understood the WG wants to rebase its v2 op work on top of this and thus would like to merge this rather soon
… thoughts?

Zoltan: a full PR is temporary so it includes everyone's commits, earlier there was a request to squash everything into a single commit, that's doable after
… current commits are clean adding algorithms one by one

Chai: thank you Zoltan, this is massive set of work!
… I helped review the integration branch during the break, it looks pretty nice, only one change to integration branch that is approved and merged now
… related to note section styling
… this is looking pretty good now!
… if there are no more updates on this change, I'll let Ningxin look at it too
… I think we can merge soon, additional changes on top of this should be rather small and we can take this to main directly

Ningxin: echo Chai, thanks a lot Zoltan for this work!
… discussed this work with Zoltan, and agree Zoltan sent this PR to make it easier to review and preview as Anssi shared
… I talked with other implementers e.g. Chrome code contributors who implemented DML and XNNPACK backend, most of the algorithms are parameter validation clarification
… the implementer team plans to review these changes in the coming weeks and can come back in the next meeting perhaps
… we provide our feedback in the PR as usual
… we have already provided review comments and Zoltan has addressed them in his branch already
… summarize, we have started review work and want to ensure algorithms are matching implementations

anssik: proposal is to check on our next meeting how far we are with the review and decide if we're ready to merge to main or need more time

Zoltan: want to merge soon to allow new work on top using the latest style
… can we do a basic sanity check by the next meeting?

ningxin_hu: I expect it is more about sanity check, translation from declarative to algorithmic prose
… we'll report back on our review progress, I believe our next meeting in 2 weeks we know better

Chai: the concern I had was that the size of the change and the impact on the entire document, we resolved this by working on a branch until we have an atomic change that we can apply at once
… would it be better for Zoltan to merge the whole change and then have incremental updates to the content that is still pending review?

Zoltan: can manage either way, many algorithms haven't received any review yet, the rest would benefit from a sanity check, unless we want to merge a number of PRs soon

ningxin_hu: if this is a blocker for new PRs we can do a sanity check review and merge

anssik: are you OK to make a decision on whether we are ready to merge at our next meeting?

Chai: OK with that

New features

anssik: I triaged a few issues from June we did not have time to discuss then, let's check them out

Allow 0 size dimensions

webmachinelearning/webnn#391
… Dwayne spotted in Chromium review that 0 size dimensions really should just be treated as "no operation" (aka NOP, no-op, NOOP... etc.)
… we did have quite extensive look into native ML APIs for this in the issue including some test cases: NumPy, TensorFlow, PyTorch, ONNX / ONNX Runtime, XNNPack, DirectML
… it looks like Apple's CoreML / MPS / BNNS documentation is not clear on what the behavior is for 0 size dimensions

Dwayne: re implementation difficulties, CoreML not sure due to documentations lacking detail

anssik: anyone able to check support on Apple's platform?

ningxin_hu: question re some backends disallowing 0 size dimensions, is this a framework or WebNN API responsibility? Web frameworks could also apply a workaround for this.

Dwayne: it's going to be more challenging for frameworks to adopt WebNN if they need to do the work
… burden on higher-level framework vs backend

anssik: (per https://www.w3.org/TR/design-principles/#priority-of-constituencies the implementation should take the burden, not higher-level frameworks)

anssik: plan to do some more prototyping and come back?

Dwayne: correct

Minutes manually created (not a transcript), formatted by scribe.perl version 221 (Fri Jul 21 14:01:30 2023 UTC).

Diagnostics

Maybe present: anssik, Chai, Dwayne, Ningxin, Zoltan

All speakers: anssik, Chai, Dwayne, Joshua_Bell, Ningxin, ningxin_hu, Zoltan

Active on IRC: anssik, chai, dom__, ningxin_hu, zkis