Context
WebNN ships in Chrome 146. Provides access to NPUs, GPUs, and CPUs through a graph-based computation model. On devices with NPUs (Apple M-series, Intel Meteor Lake, Qualcomm), WebNN could be significantly faster than WebGPU.
Proposal
- Implement WebNN as a third compute backend alongside WebGPU and WASM SIMD
- Feature-detect at runtime: NPU > GPU > CPU
- Map core operations (matmul, softmax, rmsnorm) to WebNN graph ops
- Potentially much faster on NPU-equipped devices
References
- WebNN Spec
- ONNX Runtime Web already supports WebNN execution provider
Context
WebNN ships in Chrome 146. Provides access to NPUs, GPUs, and CPUs through a graph-based computation model. On devices with NPUs (Apple M-series, Intel Meteor Lake, Qualcomm), WebNN could be significantly faster than WebGPU.
Proposal
References