Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted OpenCL extensions change in this PR in 4facfec
I find that target should define its supported extension via setSupportedOpenCLOpts API.


string( TOUPPER "CLC_${MACRO_ARCH}" CLC_TARGET_DEFINE )

list( APPEND build_flags
Expand Down
Loading