Installation
To use WebNN before the Origin Trial milestone, complete these setup requirements.
- Window 11, version 21H2 or newer
- It’s recommended to install the latest Intel® Arc™ & Iris® Xe Graphics on Windows for improved WebNN compatibility and performance
Enabling WebNN
Download and install the latest Chrome Canary or Edge Canary
Navigate to about://flags
in browser address bar
Search for Enables WebNN API
and change it to Enabled
Exit browser
Running WebNN on CPU or GPU
Launch Chrome Canary or Edge Canary
launch-chrome-canary
"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe"
launch-edge-canary
"%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe"
Running WebNN on NPU
- Window 11, version 24H2 or newer
- It’s recommended to install the Intel® Core™ Ultra NPU Driver 32.0.100.3717 on Windows for improved WebNN compatibility and performance
- Prepare the
DirectML.dll
. Download the latest redistributable Microsoft.AI.DirectML , renamemicrosoft.ai.directml.[version].nupkg
tomicrosoft.ai.directml.[version].nupkg.zip
and extract it
Chrome Canary
Put the DirectML.dll
into correct path
Copy \bin\x64-win\DirectML.dll
to %LOCALAPPDATA%\Google\Chrome SxS\Application\[version]\
%LOCALAPPDATA%
meansC:\Users\<username>\AppData\Local\
- Note that Chrome Canary frequently updates automatically. When this occurs, recopy the
DirectML.dll
to the new version’s directory.
Launch Chrome Canary in Windows Command Line
enable-webnn-npu-chrome-canary
"%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --use-redist-dml --disable_webnn_for_npu=0
Edge Canary
Put the DirectML.dll
into correct path
Copy \bin\x64-win\DirectML.dll
to %LOCALAPPDATA%\Microsoft\Edge SxS\Application\[version]\
%LOCALAPPDATA%
meansC:\Users\<username>\AppData\Local\
- Note that Edge Canary frequently updates automatically. When this occurs, recopy the
DirectML.dll
to the new version’s directory.
Launch Edge Canary in Windows Command Line
enable-webnn-npu-edge-canary
"%LOCALAPPDATA%\Microsoft\Edge SxS\Application\msedge.exe" --disable_webnn_for_npu=0
Test your WebNN API installation at Playground - Hello WebNN.
Last updated on