Enabling Insider version of Edge for WebNN Dev Preview GPU
WebNN Dev Preview GPU requires a compatible browser to run, and Windows* 11
v21H2 (DML 1.6.0) or higher:
- Download the Microsoft Edge
Canary or Dev browser
- To enable WebNN, in your browser address bar, enter
about://flags
, and then press
Enter
. An Experiments page opens
- In the Search flags box, enter
webnn
.
Enables WebNN API appears
- In the drop-down menu, select
Enabled
- Relaunch your browser
Enabling Insider version of Edge for WebNN Dev Preview NPU
To get started with WebNN NPU on DirectML compatible devices you will need:
- Windows 11, version 24H2 or newer
- Insider version of Edge (exact instructions provided below)
- The latest driver from our WebNN NPU Partners:
Enabling Insider version of Edge:
-
Microsoft Edge Canary or Dev
Channel with WebNN flag enabled in
about:flags
- Download from https://www.microsoft.com/en-us/edge/download/insider
- Run installer
- Navigate to
about://flags
- Search for
Enables WebNN API
and change it to Enabled
- Exit browser
-
Download DirectML redistributable
- Download DirectML from https://www.nuget.org/packages/Microsoft.AI.DirectML/1.15.4
- Rename
microsoft.ai.directml.1.15.4.nupkg
to
microsoft.ai.directml.1.15.4.nupkg.zip
and extract it
-
Copy
microsoft.ai.directml.1.15.4.nupkg.zip\bin\<arch>-win\directml.dll
to the appropriate
directory
(replace with x64 on Intel devices and arm64 on Qualcomm devices)
- Edge Dev:
C:\Program Files (x86)\Microsoft\Edge Dev\Application\129.0.2779.0\
- When the dialog asks for Administrator permission, choose
Continue
- Edge Canary:
%LOCALAPPDATA%\Microsoft\Edge SxS\Application\129.0.2779.0\
- Note the following on copying
Directml.dll
to Edge directory
- The version-specific directory (129.0.2779.0) may differ on your machine
- New versions of Edge may require
directml.dll
to be recopied to the directory
-
Launch Edge insider
- Open terminal and change your working directory to the Edge Insider build:
- If using Edge Dev:
C:\Program Files (x86)\Microsoft\Edge Dev\Application
- If using Edge Canary:
%LOCALAPPDATA%\Microsoft\Edge SxS\Application
.\msedge.exe --use-redist-dml --disable_webnn_for_npu=0 --disable-gpu-sandbox