[libclc] [libclc] Set OpenCL version to 3.0 (PR #135733)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 01:45:51 PDT 2025
================
@@ -411,6 +411,16 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
+ # OpenCL 3.0 extensions
+ string(CONCAT CL_3_0_EXTENSIONS
+ "-cl-ext="
+ "+cl_khr_fp64,"
+ "+cl_khr_fp16,"
+ "+__opencl_c_3d_image_writes,"
+ "+__opencl_c_images,"
+ "+cl_khr_3d_image_writes")
+ list( APPEND build_flags -cl-std=CL3.0 "-Xclang" ${CL_3_0_EXTENSIONS} )
----------------
frasercrmck wrote:
We would need a more target-configurable way of enabling OpenCL extensions. Not all targets do fp16/fp64, not all do 3D image writes, etc.
https://github.com/llvm/llvm-project/pull/135733
More information about the cfe-commits
mailing list