Closed cdmurph32 closed 1 year ago
FYI Glassbench does not work in webassembly for a multitude of reasons. I'm playing around with benchmark-simple, which works with WASM, but I don't know if that would be be something that should be merged.
Thank you for your work. I will check it when I have more free time.
I removed the simple benchmark stuff. Looks good!
How run benchmarks? I've got many errors:
[wasm-validator error in function 2164] unexpected false: SIMD operation (SIMD is disabled), on
(v128.store align=1
(local.get $1)
(v128.load offset=1351328 align=1
(i32.const 0)
)
)
I use command:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --wasm-features all" cargo wasi bench --bench bench_resize
How run benchmarks? I've got many errors:
[wasm-validator error in function 2164] unexpected false: SIMD operation (SIMD is disabled), on (v128.store align=1 (local.get $1) (v128.load offset=1351328 align=1 (i32.const 0) ) )
I use command:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --wasm-features all" cargo wasi bench --bench bench_resize
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=." cargo bench .
Thank you so much!
Methodology:
Issues encountered:
_mm_cvtps_epi32
convertsinf
toi32::MIN
or2_147_483_648u32
, while its wasm32 equivalent (on AVX),u32x4_trunc_sat_f32x4
, convertsinf
to u32::MAX.i32x4_trunc_sat_f32x4
convertsinf
toi32::MAX
and cannot be used. This is corrected by capping the result ofu32x4_trunc_sat_f32x4
at 2_147_483_648, but introduces an additional instruction.Test command:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=." cargo wasi test -- --nocapture