Stream: git-wasmtime

Topic: wasmtime / issue #4517 cranelift: Add MinGW `fma` regress...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2022 at 14:16):

alexcrichton commented on issue #4517:

Since this is just for the interpreter one possibility would be to use libm::fma which is a port of musl's implementation to Rust which should provide stability across platforms perhaps.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2022 at 07:57):

afonso360 commented on issue #4517:

libm's fma seems a lot better than MinGW's and it think it's implementation is correct.

However, CI's still failing and I can't quite pin down why. libm disagrees with the native fmadd instruction in aarch64 by exactly 1 bit, in the failing input. This seems like a rounding issue somewhere, libm has the LSB as 1 and fmadd has it as 0.

I've checked fegetround and we are running with the default rounding mode.

The other weird issue is that when I try to extract the failing input into a separate rust program and execute there, everything works and I get the correct result that agrees with the native instructions.

I'll keep looking into this, but if anyone has any ideas, let me know.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2022 at 08:17):

afonso360 edited a comment on issue #4517:

libm's fma seems a lot better than MinGW's we are now only off by 1 LSB.

I've filed https://github.com/rust-lang/libm/issues/263 to follow up with libm.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 29 2022 at 05:28):

afonso360 commented on issue #4517:

@alexcrichton since there is no way to know how long this is going to take with libm. What do you think about disabling the interpreter on the fma tests temporarily?

An alternative could be to have a reduced set of inputs that does not fail in a separate file.

That way we can resolve this now and move ahead with the CI upgrades.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 29 2022 at 14:09):

alexcrichton commented on issue #4517:

Sounds reasonable to me, thanks for helping to push on this @afonso360!


Last updated: Nov 22 2024 at 16:03 UTC