Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
x/image/vector: TestFloatingAccumulateMask16 fails on js/wasm #31281
x/image/vector's TestFloatingAccumulateMask16 and TestMakeFlInXxx fails on js/wasm:
I manage to trim it down to this:
On amd64 it gives:
On wasm it gives:
This is because wasm currently only uses 64 bit float "registers" and only truncates the precision when using an explicit
The spec says:
I would conclude that the test is too strict or the x/image/vector package needs more explicit rounding.
On Sun, Apr 7, 2019 at 1:40 AM Richard Musiol ***@***.***> wrote: I tried to add explicit rounding, but this rabbit hole went too deep. I now have a CL that relaxes the tests to give a tolerance of 0.1%. I'm not at all sure if this is a good solution. Advice appreciated.
Do you have a link to that CL? I would like to keep the tests checking that, at least on x86_64, the SIMD and non-SIMD implementations produce exactly the same output. Perhaps, in the tests, we should allow a non-zero tolerance for wasm but a zero tolerance everywhere else. Perhaps we should add an additional test based on that "divide 16 by 1122" snippet to help document that tolerance knob.…