Open doctorpangloss opened 9 months ago
Thank you for including this code snippet @doctorpangloss. While the update will enable support for the specific mobile browser, it's important to note that WASM multithreading still faces limited support across various versions, platforms, and browsers. Additionally, this change will require you running your own server to deploy your project. I'm looking forward to the day multithreading is better supported, as it would enhance the robustness and performance of the library.
This middleware will add the appropriate CORS headers to enable WASM multithreading:
Naturally, this must be on
https
.Additionally, you may consider building EIGEN with ARM NEON SIMD.
iOS 16.5.1 is the minimum version for working SIMD, although 16.4 will report it is supported. See https://github.com/microsoft/onnxruntime/issues/15644 https://webkit.org/blog/14154/webkit-features-in-safari-16-5/#:~:text=Fixed%20WASM%20SIMD%20breaking%20WebP%20decoding%20applications
wasm-feature-detect
can detect threads and SIMD before loading the appropriate build.