You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setup compiler backend for producing wasm32 + simd executables #4019
compiler/dialectsRelating to the IREE compiler dialects (flow, hal, vm)enhancement ➕New feature or requesthal/cpuRuntime Host/CPU-based HAL backendplatform/web 🌐Web-specific build, execution, benchmarking, and deployment
I suspect we will be able to reuse a majority of the LLVM AOT infra for producing the wasm32 binaries: it's just an LLVM target arch/format.
The WAMR examples compile with LLVM with --target=wasm32-wasi -msimd128. That should give us a .wasm file (vs. a .dll or .so) we can embed in a wasm flatbuffer (along with the reflection information) or reference as a file.
I've started on this. I have a WasmLinkerTool that finds wasm-ld and is able to link something with -iree-llvm-target-triple=wasm32-unknown-unknown. Will need to try out some flags and peek at what it generated to see if the output is usable.
compiler/dialectsRelating to the IREE compiler dialects (flow, hal, vm)enhancement ➕New feature or requesthal/cpuRuntime Host/CPU-based HAL backendplatform/web 🌐Web-specific build, execution, benchmarking, and deployment
Activity
[WIP] Starting on a WasmLinkerTool.
ScottTodd commentedon Feb 6, 2021
I've started on this. I have a
WasmLinkerToolthat findswasm-ldand is able to link something with-iree-llvm-target-triple=wasm32-unknown-unknown. Will need to try out some flags and peek at what it generated to see if the output is usable.benvanik commentedon Feb 6, 2021
ooo cool! I think I played with adding a wamr submodule once; didn't get far though :P

Initial WasmLinkerTool implementation and supporting cleanup. (#4958)
ScottTodd commentedon Mar 9, 2021
The wasm executables we can produce now are usable. Here's a prototype proving that we can call into them and read back the expected outputs using WAMR, which I'll be integrating into IREE's HAL (tracked in other issues): https://gist.github.com/ScottTodd/4d01f92c434e6caebf1bf2b180f02840.
I haven't looked into simd codegen or runtime support yet, and there is still some room for tweaking flags (
--allow-undefinedin particular).Configure compiler to generate 'wasm' executables using wasm-llvm-aot. (
Add note about how to use Wasm SIMD. (#8285)