intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 46 forks source link

[Example] MobileNet example doesn't handle error of BNNS backend #163

Closed huningxin closed 5 years ago

huningxin commented 5 years ago

Chromium version: https://github.com/otcshare/chromium-src/commit/d3994c9c0993eca66865d8812867d49f998460f4

MobileNet compilation preference as PREFER_FAST_SINGLE_ANSWER

Expected result: Fall back to WASM backend if BNNS doesn't support MobileNet

Actual result: Example UI hangs on setting...

BruceDai commented 5 years ago

When testing MobileNet / Squeezent / SSD MobileNet / PoseNet with WebML on Mac OS, MPS backend would be default. Since currently MobileNet / SSD MobileNet / PoseNet all don't support BNNS backend, if we run MobileNet /SSD MobileNet/PoseNet demo by configuration prefer=fast on the purpose of calling BNNS backend, then Alert 'Failed to setup BNNS backend' would popup, then fall back to WASM backend.

@huningxin please correct me if I miss something details, thanks.

BruceDai commented 5 years ago

PR#170 has landed, close it.

BruceDai commented 5 years ago

@Christywl please help verify it.

Christywl commented 5 years ago

With Chromium nightly build 8d111d1 on Mac:

The examples(PoseNet/MobileNet/SDD MobileNet) fall back to WASM with BNNS backend and show 'Failed to setup WebML backend'.