Skip to content

[SYCL] Bump libclc to OpenCL 3.0 #8100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 1, 2023
Merged
Changes from all commits
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
18 changes: 15 additions & 3 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
# Disables NVVM reflection to defer to after linking
set( flags "SHELL:-Xclang -target-feature" "SHELL:-Xclang +ptx72"
"SHELL:-march=sm_86" "SHELL:-mllvm --nvvm-reflect-enable=false")
elseif( ${ARCH} STREQUAL amdgcn )
# AMDGCN needs generic address space for atomics
set( flags "SHELL:-Xclang -cl-std=CL2.0")
else()
set ( flags )
endif()
Expand Down Expand Up @@ -378,6 +375,21 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
# have to be explicity declared in the soruce.
list( APPEND flags -Xclang -fdeclare-spirv-builtins)

# OpenCL 3.0 extensions
list( APPEND flags -cl-std=CL3.0 "SHELL:-Xclang" )
string(CONCAT CL_3_0_EXTENSIONS
"-cl-ext="
"+cl_khr_fp64,"
"+__opencl_c_3d_image_writes,"
"+__opencl_c_images,"
"+cl_khr_3d_image_writes,"
"+__opencl_c_generic_address_space")
if ( NOT ${ARCH} STREQUAL amdgcn )
string(APPEND CL_3_0_EXTENSIONS
",+cl_khr_fp16")
endif()
list( APPEND flags ${CL_3_0_EXTENSIONS})

add_libclc_builtin_set(libspirv-${arch_suffix}
TRIPLE ${t}
TARGET_ENV libspirv
Expand Down