Skip to Content
💡The WebNN Origin Trial is coming soon! Developers will soon be able to sign up for trial keys to explore →

Browser Compatibility

Device Selection Diagram

Windows ML · OpenVINO Execution Provider

This diagram shows the device selection flow for the Windows ML and OpenVINO EP.

This diagram applies only to Windows platforms with Intel devices, assuming no non-Intel hardware components are present. Multiple devices can be selected in priority order.

Based on each device’s capabilities, the graph may be partitioned into subgraphs if certain operators are unsupported on a device. Each subgraph is then assigned to an appropriate device. If all operators are supported, the entire graph is assigned to the highest-priority selected device.

The default CPU serves as the final fallback device to ensure maximum coverage of operator sets and individual operators.

Windows ML · Generic Execution Provider Selection

For any registered EP (not only OpenVINO), the Chromium ORT backend (ort/environment.cc) sorts the available EP devices, then picks devices for the requested device type.

  1. Sort order: NPU > GPU > CPU; for GPUs, discrete before integrated; EPs whose vendor matches the hardware vendor first; WebGPU EP before DirectML EP; the default CPU EP always last.
  2. cpu: the first CPU EP device, plus the default CPU EP.
  3. gpu: the first GPU EP device, plus CPU fallback (the default CPU EP and a CPU EP from the same vendor). If there is no GPU, or the only GPU is a software adapter (for example Microsoft Basic Render Driver / WARP), the CPU selection is used.
  4. npu: the first NPU EP device plus CPU fallback. If there is no NPU, or its driver is older than the EP’s minimum version, the GPU selection is used.
  5. Windows App Runtime and Windows 11 24H2+ are required for IHV EPs; otherwise only the built-in EPs are used.

The --webnn-ort-ep-device=<ep_name>,<vendor_id>,<device_id> switch overrides the selection for testing.

Lite RT

This flow shows the device selection for the WebNN LiteRT backend, used on ChromeOS, Linux, Android, and as the fallback on Windows and Apple platforms.

NPU requests are not yet accelerated by LiteRT (crbug.com/454732289) and run on XNNPACK.

Core ML

On macOS 14.4+ with Apple Silicon (non-incognito), WebNN maps the requested device type to MLModelConfiguration.computeUnits.

deviceDefaultWith kWebNNCoreMLExplicitGPUOrNPU
cpuMLComputeUnitsCPUOnlyMLComputeUnitsCPUOnly
gpuMLComputeUnitsAllMLComputeUnitsCPUAndGPU
npuMLComputeUnitsAllMLComputeUnitsCPUAndNeuralEngine
Last updated on