Browser Compatibility
WebNN APIs
May 20, 2025: DirectML was officially deprecated during Microsoft Build 2025. WebNN will leverage Windows ML to access OpenVINO and other EPs to get hardware acceleration.
| WebNN | CPU | GPU | NPU |
|---|---|---|---|
| chromsOS | ✅ LiteRT/XNNPACK | 🚀ℹ️ LiteRT/MLDrift | 🚀ℹ️ LiteRT To do, temporarily fallback to XNNPACK |
| Linux | ✅ LiteRT/XNNPACK | 🚀ℹ️ LiteRT/MLDrift | 🚀ℹ️ LiteRT To do, temporarily fallback to XNNPACK |
| macOS | ✅ Core ML | ✅ Core ML | ✅ Core ML |
| Windows | ✅ LiteRT/XNNPACK 🚀ℹ️ WCR/MLAS (deprecated) | ℹ️ DirectML (deprecated) 🚀ℹ️ Windows ML | ℹ️ DirectML (deprecated) 🚀ℹ️ Windows ML |
| Android | ✅ LiteRT/XNNPACK | 🚀ℹ️ LiteRT/MLDrift | 🚀ℹ️ 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 |
Last updated on