Open mwyrzykowski opened 1 month ago
I agree the test needs to be updated.
The bitcast tests as-is currently exists outside the numeric framework that does the heavy lifting of taking the union of FTZ or !FTZ paths, so probably is only considering the FTZ path somewhere. I will need to either convert it to use the numeric framework more, or spot fix the bespoke implementation.
I won't be able to address immediately, since I am OOO later this week, but I plan on taking a look when I have time.
In the following test case: https://gpuweb.github.io/cts/standalone/?q=webgpu:shader,execution,expression,call,builtin,bitcast:vec2f_to_vec4h:inputSource=%22uniform%22;alias=false
compiling with a Metal backend using
fastMathEnabled = YES
, we see the following failure:However, as_type(0x7fc00000) = { 0x7fc0, 0000 } when
fastMathEnabled = YES
as denormals and NaNs are not considered.Should the CTS be updated to allow both expectations @zoddicus ? That seems to be the conclusion from https://github.com/gpuweb/gpuweb/issues/4450