Closed ghli2 closed 4 years ago
Hi @ghli2 - the netlify demo is subscribed to a Chrome origin trial for WASM SIMD. Unless you've also opted your demo domain in to an origin trial, then you have to manually enable SIMD by going to chrome://flags ("WebAssembly SIMD support", "WebAssembly Threads support") - hopefully that will fix it!
I enabled SIMD in the browser and now it does use the correct ...-simd-threads.wasm
binary. However, I noticed that, at least for BodyPix, the ResNet50 model/architecture does not seem to work with wasm (it doesn't classify people at all) and shows a XNN status for xnn_create_max_pooling2d_nhwc_f32 is not successful.
warning. Is ResNet50 not compatable with wasm?
I also noticed that on the blazeface demo, using wasm, my gpu spins up to 20% while there is effectively no GPU utilization with BodyPix, does WASM use GPU acceleration as well?
On an related note, I am exploring the use of these WASM enhancements in the interest of speed. I've read that MobileNetV2 is faster than MobileNetV1. BodyPix currently uses MobileNetV1, seeing how both architectures are 'MobileNet', is there a way short of retraining a model to switch to MobileNetV2?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 dyas if no further activity occurs. Thank you.
Closing as stale. Please @mention us if this needs more attention.
Versions: tfjs 2.3.0, tfjs-backend-wasm 2.3.0 Browser: Electron 10
Describe the current behavior tfjs requests
tfjs-backend-wasm.wasm
instead oftfjs-backend-wasm-threaded-simd.wasm
. Wasm then runs very slowly.Describe the expected behavior An optimized wasm file should have been pulled and used. I tried the demo https://tfjs-wasm-simd-demo.netlify.app/ and I do have simd and multithreading capabilities.
Standalone code to reproduce the issue index.html
index.js
(On a related side note, would the wasm optimizations even be faster than webgl?)