ReferenceBrowser CompatibilityWebNN API

Browser Compatibility

WebNN APIs

WebNNCPUGPUNPU
chromsOS✅ LiteRT/XNNPACK🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
Linux✅ LiteRT/XNNPACK🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
macOS✅ Core ML✅ Core ML✅ Core ML
Windows✅ LiteRT/XNNPACK
🚀ℹ️ WCR/MLAS (deprecated)
✅ DirectML✅ DirectML
Android✅ LiteRT/XNNPACK🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
🚀ℹ️ LiteRT
To do, temporarily fallback to XNNPACK
iOS❌ Core ML❌ Core ML❌ Core ML
  • 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