Closed bashbaug closed 7 months ago
Fixed in https://github.com/intel/intel-graphics-compiler/commit/0db1db3c3bffa255e90912924871f60e0b6ab24c Thanks @bashbaug for the bug submission and thanks @MichalMroz12 for the fix.
It looks like the fix for this issue was backed out in https://github.com/intel/intel-graphics-compiler/commit/3cf68d7a152e776010cacbee4d2a37986c581455
So, it is still occurring. Can this issue be re-opened?
Found during a review of new fp16 CTS tests:
https://github.com/KhronosGroup/OpenCL-CTS/pull/1681#pullrequestreview-1737478851
IGC is currently generating incorrect results for
fract
for small negative inputs. Specifically, it is returning1.0
, rather than a number close to but not quite1.0
.It looks like this is because IGC is using to the fp32 constant
0x1.fffffep-1f
rather than the fp16 constant0x1.ffcp-1f
:https://github.com/intel/intel-graphics-compiler/blob/d9e9d2961d14b88748fd27f8a1d65d76c5e4420b/IGC/BiFModule/Implementation/Math/fract.cl#L288-L295
If I use the fp16 constant instead:
Then I get the right results: