Browser Compatibility
WebNN APIs
WebNN | CPU | GPU | NPU |
---|---|---|---|
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.
Interface | Method | Chromium Version |
---|---|---|
navigator.ml | M112 | |
ML | M112 | |
ML | createContext() | M112 |
MLContext | M112 | |
MLContext | dispatch() | M128 |
MLContext | createTensor() | M129 |
MLContext | readTensor(tensor) | M129 |
MLContext | readTensor(tensor, outputData) | M129 |
MLContext | writeTensor() | M129 |
MLContext | opSupportLimits() | M128 |
MLGraph | M112 | |
MLOperand | M112 | |
MLOperand | MLNumber | M132 |
MLTensor | M124 | |
MLTensor | destroy() | M124 |
MLGraphBuilder | M112 | |
MLGraphBuilder | MLGraphBuilder() constructor | M112 |
MLGraphBuilder | input(name, descriptor) | M112 |
MLGraphBuilder | constant(descriptor, buffer) | M112 |
MLGraphBuilder | constant(type, value) | M112 |
MLGraphBuilder | build(outputs) | M112 |