-
Notifications
You must be signed in to change notification settings - Fork 42
How to Run Chromium builds with WebNN API
Platform | Version | Note | Platform | Version | Note |
---|---|---|---|---|---|
Windows | 10.xxxx/Insider Preview | Linux Ubuntu | 16.04 | ||
macOS | 10.13/10.14 | Android | 8.1.0+ |
The Chromium Command Line are required for enabling specific WebNN backends when run with WebNN API enabled Chromium binaries.
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
w/o | DNNL | clDNN |
Install and update graphic driver (Intel Graphic Driver) for clDNN
-
Unzip the Chromium binary chrome-win32.zip for Windows
-
Open cmd.exe and go to Chrome-bin folder
-
Run Chromium:
chrome.exe --no-sandbox
-
Visit webml-polyfill/examples and select examples (e.g. Image Classification)
-
Select
Backend
(e.g.SUSTAINED_SPEED
== clDNN backend), and then selectModel
(e.g. MobileNet v1)
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
--use-dml | DirectML |
Install Windows Insider Preview
Run Chromium:
chrome.exe --no-sandbox --use-dml
and select SUSTAINED_SPEED
backend
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | ULTRA_LOW_POWER |
---|---|---|---|
--use-inference-engine | IE-MKLDNN | IE-clDNN | IE-GNA |
Install Openvino 2020.3 LTS version following the steps and set the environment variables.
Run Chromium:
chrome.exe --no-sandbox --use-inference-engine
and select SUSTAINED_SPEED
or FAST_SINGLE_ANSWER
or ULTRA_LOW_POWER
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
w/o --use-inference-engine | DNNL | clDNN |
Please follow the How-to-Install-the-Graphics-Driver-for-OpenCL-on-Linux-to-Run-WebNN-clDNN-Backend to install the dependencies and driver.
-
Install the Chromium binary chromium-browser-unstable_xx.x.xxxx.x-x_amd64.deb for Linux Ubuntu:
sudo dpkg -i chromium-browser-unstable_xx.x.xxxx.x-x_amd64.deb
-
Run Chromium:
/usr/bin/chromium-browser-unstable --no-sandbox
-
Visit webml-polyfill/examples and select examples (e.g. Image Classification)
-
Select
Backend
(e.g.SUSTAINED_SPEED
== clDNN backend), and then selectModel
(e.g. MobileNet v1)
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER | ULTRA_LOW_POWER |
---|---|---|---|---|
--use-inference-engine | IE-MKLDNN | IE-clDNN | IE-MYRIAD | IE-GNA |
Install Openvino 2020.3 LTS version following the steps and set the environment variables.
Run Chromium:
/usr/bin/chromium-browser-unstable --no-sandbox --use-inference-engine
and select SUSTAINED_SPEED
or FAST_SINGLE_ANSWER
or LOW_POWER
or ULTRA_LOW_POWER
Note: IE-MYRIAD needs Intel® Neural Compute Stick 2
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
w/o --use-mkldnn | BNNS | MPS |
-
Unzip the Chromium binary chromium-mac.zip for macOS
-
Run Chromium:
./Chromium.app/Contents/MacOS/Chromium
-
Visit webml-polyfill/examples and select examples (e.g. Image Classification)
-
Select
Backend
(e.g.SUSTAINED_SPEED
== MPS backend), and then selectModel
(e.g. MobileNet v1)
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
--use-dnnl | DNNL |
Run Chromium:
./Chromium.app/Contents/MacOS/Chromium --no-sandbox --use-dnnl
and select FAST_SINGLE_ANSWER
backend
Chromium Command Line | FAST_SINGLE_ANSWER | SUSTAINED_SPEED | LOW_POWER |
---|---|---|---|
w/o command line | NNAPI | NNAPI | NNAPI |
-
Install the Chromium binary ChromePublic.apk for Android:
adb install ChromePublic.apk
-
Open Chromium app
-
Visit webml-polyfill/examples and select examples (e.g. Image Classification)
-
Select
Backend
(e.g.SUSTAINED_SPEED
== NNAPI backend), and then selectModel
(e.g. MobileNet v1)