Stream: wasmtime

Topic: Check for SIMD support at runtime


view this post on Zulip Hanif Ariffin (Apr 06 2023 at 15:26):

Is it possible to check if the CPU supports SIMD at runtime? https://github.com/lapce/lapce/issues/1041
One solution that I found is to check the flags in proc/cpuinfo but I wonder if there's a better solution?

When starting Lapce (built from master) with plugins installed (in the following, only lapce-rust is installed), the console shows a panic related to wasmtime's use of SIMD: lsimons@bestever:~/work...

view this post on Zulip Chris Fallin (Apr 06 2023 at 16:24):

IMHO, the right solution here is to build fallbacks for CPUs that only have SSE2 -- https://github.com/bytecodealliance/wasmtime/issues/3810 tracks that

In #3809, a new extension to our fuzzing found that some of our Wasm-SIMD support requires nominally optional ISA features, at least on x86-64. I think we should try to have fallbacks such that we ...

view this post on Zulip Chris Fallin (Apr 06 2023 at 16:25):

We could also build the plumbing in Wasmtime to check this at startup, as you suggest, but IMHO that's a little more surprising: it means that we accept different modules based on some property of the environment that we don't control


Last updated: Dec 23 2024 at 14:03 UTC