-
Notifications
You must be signed in to change notification settings - Fork 246
Description
I am using WASM components in research to produce reproducible floating-point evaluation results (with a pre-runtime NaN canonicalization pass over the WASM bytecode). In particular, I am compiling the SZ3 (https://github.com/szcompressor/SZ3) scientific compressor, via its Rust bindings, to WASM, exposed in a component (https://github.com/juntyr/numcodecs-rs/tree/main/crates). In June 2025, the compressor, when running on lots of NaN values, was producing a low compression ratio. Now, in October, the compression ratio is higher. The version of SZ3 hasn't changed, the version of Zstandard (which SZ3 uses for lossless compression afterwards) hasn't changed. My hunch is that something regarding NaN canonicalization changed somewhere in my WASM pipeline, which includes
- my unchanged NaN canonicalization on the core WASM module bytecode (https://github.com/juntyr/numcodecs-rs/blob/main/crates/numcodecs-wasm-host-reproducible/src/transform/nan.rs)
- running in wasmtime
- using wasmtime_component_layer to polyfill components with just core WASM modules
- components are built using wit-bindgen
@alexcrichton I have tried to go through the changelogs of recent releases but cannot find anything recent (only bytecodealliance/wasmtime#9826 which seems a bit too early). Can you remember anything happening with NaNs in the meantime?