Skip to content

WebNN backend for NPU acceleration #388

Description

@sauravpanda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    browserBrowser/WASM specificinnovationNovel/differentiated features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions