[libclc] [libclc] Move fp16 pragma guards out of header file (PR #122751)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 14 01:31:31 PST 2025
================
@@ -207,10 +207,6 @@
return BUILTIN(x); \
}
-#ifdef cl_khr_fp16
-
-#pragma OPENCL EXTENSION cl_khr_fp16 : enable
-
#define _CLC_DEFINE_UNARY_BUILTIN_FP16(FUNCTION) \
_CLC_DEF _CLC_OVERLOAD half FUNCTION(half x) { \
return (half)FUNCTION((float)x); \
----------------
frasercrmck wrote:
True. It wouldn't solve the problem of other headers potentially disabling the pragmas, so we'd still need (or prefer) users to enable pragmas at the "call sites". But as a matter of principle I'm happy to do as you suggest.
https://github.com/llvm/llvm-project/pull/122751
More information about the cfe-commits
mailing list