Closed
Description
With clang, libjit is compiled with the -ffast-math
option, but it should be avoided in case of usage of NaN. For instance, in gcc, the -ffast-math
flag activates the -ffinite-math-only
flag that disables the NaN functionality.
With the ReplaceNaN
operator, Glow makes use of NaN in libjit.
It turns out that in my Linux environment, libjit_element_is_nan_kernel_f
doesn't work properly. Even when a NaN number is provided, isnan()
returns false (while printf
by the way correctly prints NaN).
It makes the CPU/InterpAndCPU.replaceNaN/0
test fail.
When I disable -ffast-math
for the target CPURuntime
, the test passes correctly
Metadata
Metadata
Assignees
Labels
No labels