wasm3 / wasm-coremark

CoreMark 1.0 ported to WebAssembly
39 stars 2 forks source link

More implementation about coremark-minimal #2

Closed clearloop closed 3 years ago

clearloop commented 3 years ago

Hi @vshymanskyy, we just wrote some code for running the coremark-minimal.wasm using wasmtime and wasmi, ping me if it is welcome for pulling request the code into this repo.

It would be nice if there is more explanation about the result f32 in coremark-minimal ; >

vshymanskyy commented 3 years ago

wasmtime results look weird. I'll try to reproduce

vshymanskyy commented 3 years ago

@clearloop Please read this: https://github.com/eembc/coremark#log-file-format This benchmark should take 12..20 seconds. The coremark-minimal does not produce the text output, just the final test result.

One more note: there's no need to run CoreMark multiple times, perform averaging, etc. When reporting results, it's important to include the system details like CPU model and speed, RAM speed, etc.

vshymanskyy commented 3 years ago

On my machine:

cargo run --release
./target/release/bm wasmi
...
314.14435

I think your wasmi result is underestimated. Please re-run in release mode.

vshymanskyy commented 3 years ago

I tried running WASI build using wasmtime, and unfortunately it freezes:

# wasmtime 0.25.0
wasmtime run coremark.wasm
...

Created a ticket: https://github.com/bytecodealliance/wasmtime/issues/2737

vshymanskyy commented 3 years ago

@clearloop looks like the sctipt is misinterpreting the wasmtime result. 1185203011 => raw 0x46A4C343 => which can be treated as f32 21089.6

In other words, you should use this to convert res to f32:

f32::from_bits(res)
vshymanskyy commented 3 years ago

@clearloop it would be cool to include wasm3 in the same test script, using wasm3-rs

clearloop commented 3 years ago

wasmtime results look weird. I'll try to reproduce

I think it's weird too, but I don't know why LOL

@clearloop looks like the script is misinterpreting the wasmtime result. 1185203011 => raw 0x46A4C343 => which can be treated as f32 21089.6

In other words, you should use this to convert res to f32:

f32::from_bits(res)

Thanks!!!

When reporting results, it's important to include the system details like CPU model and speed, RAM speed, etc.

Thanks for your advice, actually I don't know include what system details now ~

@clearloop it would be cool to include wasm3 in the same test script, using wasm3-rs

I'll do it~ I can add wasmer to it as well

vshymanskyy commented 3 years ago

@clearloop here's a PR: https://github.com/patractlabs/wasm-coremark/pull/1

clearloop commented 3 years ago

Hi @vshymanskyy, I'm closing this issue since we have added wasm3 coremark in patractlabs/wasm-coremark, that repo terms to prove that wasm3 is better than wasmi haha, it's really awesome, you did a great job!

vshymanskyy commented 3 years ago

Thanks! I'll add a link to your repo to the main readme.