Multi-stakeholder support³: Participation by all major browser vendors. Implementation experience across major OSes, platform APIs and key JavaScript ML frameworks.
Major unresolved issues with or opposition to this specification: none
This work is being funded by:
You should also know that...
Below is a summary of substantive changes since the previous TAG review in 2024 to assist you in this delta review.
Significant new features:
Add 12 new operators ("Wave 3") to support well-known transformer models based on an analysis of top 20 downloaded Hugging Face models. The models comprise of a diverse set of tasks, including Small Language Models and Large Language Models, object detection, sentence similarity, feature extraction, speech recognition, image segmentation, text classification, and text generation. See issue, PR, presentation for details on these operators and motivation.
Add MLTensor interface that represents a tensor, an input or output to an MLGraph. Update MLContext interface with new createTensor(), readTensor(), writeTensor() methods, change compute() to dispatch() for scheduling the workload, add new destroy() method for MLContext, MLGraph, MLTensor. These changes allow buffer reuse, chained inference, better resource management with explicit destruction, and the opportunity to share memory with WebGPU, minimizing copies. See MLTensor Explainer for details.
OpenedMar 20, 2025
Hello TAG!
I'm requesting an updated TAG review of WebNN API - previous TAG review: #933
Further details:
You should also know that...
Below is a summary of substantive changes since the previous TAG review in 2024 to assist you in this delta review.
Significant new features:
MLTensor
interface that represents a tensor, an input or output to anMLGraph
. UpdateMLContext
interface with newcreateTensor()
,readTensor()
,writeTensor()
methods, changecompute()
todispatch()
for scheduling the workload, add newdestroy()
method forMLContext
,MLGraph
,MLTensor
. These changes allow buffer reuse, chained inference, better resource management with explicit destruction, and the opportunity to share memory with WebGPU, minimizing copies. See MLTensor Explainer for details.Other substantial changes:
MLDeviceType
abstraction based on implementation feedback, see Device Selection Explainer for detailsMLContext.lost
attribute to signal context lost error at the earliest opportunity for improved debuggabilityopSupportLimits()
to allow checking whether operators/types are supported before creating a graphFloat16Array
by default, noteUint16Array
workaround informativelyMLOperand
methods into readonly attributes (dataType
,shape
) per Web Platform Design PrinciplesMLOperatorOptions.label
for more diagnosable error messagesMLNumber
for specifying numeric inputs of any typeThe group would like to seek TAG's explicit advise on the following: