Skip to Content
💡The WebNN Origin Trial is coming! Developers can sign up for trial keys to explore →
ReferenceBrowser CompatibilityWebNN API

Browser Compatibility

WebNN APIs

May 20, 2025: DirectML was officially deprecated during Microsoft Build 2025. WebNN leverages Windows ML to access OpenVINO and other execution providers (EPs) for hardware acceleration. The DirectML backend (dml/) is no longer present in the Chromium WebNN service; DirectML is only reachable as an ONNX Runtime EP.

Platform / Build ConditionsCPU (device: "cpu")GPU (device: "gpu")NPU (device: "npu")
Windows 11 24H2+ with feature kWebNNOnnxRuntime (enabled by default)ONNX Runtime (Windows ML): the default CPU EP, plus a same-vendor CPU EP when available (ort/environment.cc: SelectEpDevicesForCpu)ONNX Runtime: first GPU EP device (discrete before integrated, WebGPU EP before DirectML EP) with CPU EP fallback; falls back to CPU when there is no GPU or only a software adapter such as WARP (SelectEpDevicesForGpu)ONNX Runtime: first NPU EP device with CPU EP fallback; falls back to the GPU selection when there is no NPU or the NPU driver is below the EP’s minimum version (SelectEpDevicesForNpu)
Windows before 11 24H2, Windows App Runtime unavailable, or kWebNNOnnxRuntime disabled / ORT environment creation failedLiteRT with XNNPACK, in the renderer process (webnn_context_provider_impl.cc: FallbackToTFLite)LiteRT GPU accelerator (WebGPU) in the GPU process, then in-process LiteRT when unavailable (tflite/graph_impl_litert.cc)In-process LiteRT; NPU accelerator is not supported yet (crbug.com/454732289)
macOS ≥14.4 on Apple Silicon, non-incognito, with feature kWebNNCoreML (enabled by default)Core ML with MLComputeUnitsCPUOnly (coreml/graph_impl_coreml.mm)Core ML with MLComputeUnitsAll; MLComputeUnitsCPUAndGPU when kWebNNCoreMLExplicitGPUOrNPU is on (off by default)Core ML with MLComputeUnitsAll; MLComputeUnitsCPUAndNeuralEngine when kWebNNCoreMLExplicitGPUOrNPU is on
macOS Intel, macOS <14.4, incognito, or Core ML disabledLiteRT + XNNPACK (in-process)LiteRT GPU accelerator (WebGPU), then in-process fallbackIn-process LiteRT
iOSkWebNNCoreML is disabled by default (Core ML sandbox issue, crbug.com/417496826), so LiteRT + XNNPACKLiteRT GPU accelerator, then in-process fallbackIn-process LiteRT
ChromeOS, Linux, AndroidLiteRT + XNNPACK in the renderer processLiteRT GPU accelerator (WebGPU/Dawn) in the GPU process when available; otherwise in-process LiteRTIn-process LiteRT; NPU accelerator is not supported yet
  • Backend selection is implemented in WebNNContextProviderImpl::CreateWebNNContext (webnn_context_provider_impl.cc): Windows tries ONNX Runtime first, Apple platforms try Core ML, and everything else (or any failed attempt) goes through FallbackToTFLite, which uses LiteRT.
  • features.gni enables TFLite/LiteRT (webnn_use_tflite, webnn_use_litert) on Android, ChromeOS, Linux, Apple and Windows. webnn_use_chrome_ml_api (enable_ml_internal) is a build flag only; the OpenCL and NNAPI delegate paths described in earlier versions of this page are not in the current sources.
  • LiteRT routing (ShouldUseInProcessTflite): cpu and npu requests are served in the renderer process; gpu requests first try a LiteRT context in the GPU process using the WebGPU accelerator (preloaded before sandbox lockdown), and the renderer creates an in-process context if that is not supported. With kWebNNLiteRTGpuInRenderer (off by default) GPU requests run in the renderer.
  • LiteRT enables the XNNPACK CPU accelerator whenever it is built in (BUILD_LITERT_WITH_XNNPACK), so GPU requests always keep CPU as a fallback.
  • ONNX Runtime requires Windows 11 24H2 or later (kWinAppRuntimeSupportedMinVersion) and the Windows App Runtime; with --webnn-ort-ignore-ihv-eps or an older Windows version, only the built-in EPs are used. --webnn-ort-disable-cpu-fallback disables the CPU EP fallback.
  • kWebNNCompilerProcess (Apple on by default, Windows off by default) moves graph compilation into a separate Compiler process.
  • Core ML only reports gpu/npu when the corresponding compute units are available on the device (coreml/graph_impl_coreml.mm).

Note

  • The WebNN API mainly supported with Chromium-based browsers on ChromeOS, Linux, macOS, Windows and Android.
  • Chromium-based browsers include but are not limited to Google Chrome, Microsoft Edge, Opera, Vivaldi, Brave, Samsung Internet etc.
InterfaceMethodChromium Version
navigator.mlM112
MLM112
MLcreateContext()M112
MLContextM112
MLContextdispatch()M128
MLContextcreateTensor()M129
MLContextreadTensor(tensor)M129
MLContextreadTensor(tensor, outputData)M129
MLContextwriteTensor()M129
MLContextopSupportLimits()M128
MLGraphM112
MLOperandM112
MLOperandMLNumberM132
MLTensorM124
MLTensordestroy()M124
MLGraphBuilderM112
MLGraphBuilderMLGraphBuilder() constructorM112
MLGraphBuilderinput(name, descriptor)M112
MLGraphBuilderconstant(descriptor, buffer)M112
MLGraphBuilderconstant(type, value)M112
MLGraphBuilderbuild(outputs)M112
Last updated on