Open bnason-nf opened 1 month ago
Maybe, you can shrink your WASM file by using wasm-opt tool like below:
wasm-opt --dce -Oz -o wgpukarting_output.wasm wgpukarting.wasm
In my environment, WASM file size reduced form 53.3 MB to 47.3 MB which makes it a little bit faster this. Do you have any compile options how you create the WASM file? Maybe it might be shrinked more than that.
Thanks @cngzhnp, unfortunately that didn't affect the wamrc compilation time at all.
Maybe my expectations are wrong, but I would have thought that compilation could happen at least an order of magnitude faster.
On my machine it takes about 18 minutes for wamrc to compile this wasm file:
https://github.com/bnason-nf/karting/raw/main/wgpukarting.wasm.gz
just curious; is this a real application which is expected to run on WAMR?
as this module seems to contain a lot of functions, i guess it's relatively easy to speed up compilation using more threads as we do for JIT. (well, if your system have spare CPUs, of course.)
Yes, this is an example one type of application that we would like to be able to run.
On my machine it takes about 18 minutes for wamrc to compile this wasm file:
https://github.com/bnason-nf/karting/raw/main/wgpukarting.wasm.gz
My command line is:
wamrc --target=x86_64 -o wgpukarting.aot wgpukarting.wasm
Even though this wasm file is very large, 18 minutes seems like an unexpectedly long time to compile. I'm building on a fast Linux machine:
Is there anything that could be done to speed up the compilation?