Closed vladmandic closed 2 years ago
any updates? this is a week old without anyone taking a look and the same with the PR #6753 that goes with it.
@vladmandic We have reached out to the chrome WASM team trying to find out more about the best way to raise this issue with Edge team. cc @tlively
In case you're wondering on impact, even Microsoft's own VSCode for Web fails...
closing the issue as pr that detects wasm support has been merged. bigger issue on will edge keep blocking wasm on unverified sites remains, but that is beyond the scope of this issue.
WASM backend fails on recent versions of Edge/Chromimum
Tested with
I don't know when issue first occured (it used to work), but now it fails on both release and canary versions
No issues with Chrome 106.0.5241.2 or Firefox 103.0.2
Actual issue is when attempting to set backend using
tf.setBackend('wasm')
it silently fails and uses first available backend.Investigation
Attempting to use
await tf.env().getAsync('WASM_HAS_MULTITHREAD_SUPPORT');
Returns
false
on Edge, but returnstrue
on Chrome!Attempting to use
await tf.env().getAsync('WASM_HAS_SIMD_SUPPORT');
Results in exception error on Edge, but returns
true
on Chrome!And since
tfjs-backend-wasm
uses both flags on its init, it failsActual evalulation functions in
src/tfjs-backend-wasm/src/flags_wasm.ts
have try/catch block aroundWASM_HAS_SIMD_SUPPORT
, but no exception handling aroundWASM_HAS_MULTITHREAD_SUPPORT
- first thing is to add such a blockProposed PR is in #6753
This results in at least sane behavior - TFJS reports warning message
Aborted(no native wasm support detected)
and continues working using next available backendActual root cause
There is a workaround - disable
Use enhanced security for this site
in Edge,Then both flags return true and WASM backend works just fine
Per this Microsoft article, this feature
And Enhanced Security feature is now enabled by default for any newly visited sites,
but allows full functionality if site is re-visited multiple times (don't know exactly how many visits are needed)
Bigger issue is that Microsoft pretty much disabled
WebAssembly
namespace if enhanced security is enabled - thats a really bad decision from MS, but not much I can do about thatI suggest that TFJS team opens a dialog with Edge team as this has pretty big consequences
Environment