halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.77k stars 1.07k forks source link

OpenCL intrinsics for float16 seem to have neg_inf and inf switched #8257

Closed shoaibkamil closed 2 weeks ago

shoaibkamil commented 1 month ago

It looks to me like these lines are incorrect: https://github.com/halide/Halide/blob/7ca95d8658db5383325b7ca51cef21aaeaab89ca/src/CodeGen_OpenCL_Dev.cpp#L1189

I believe negative infinity should be 64512 and positive infinity should be 31744.