Skip to content

[SYCL][NATIVECPU][libclc]Mark opencl_c_generic_address_space as unsupported on Native CPU #13109

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
Mar 28, 2024
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
9 changes: 9 additions & 0 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( t "spir64--" )
set( build_flags "-Wno-unknown-assumption")
set( opt_flags -O3 )
elseif( ${ARCH} STREQUAL "x86_64")
set( supports_generic_addrspace FALSE )
else()
set( build_flags )
set( opt_flags -O3 )
Expand All @@ -449,6 +451,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
"+cl_khr_3d_image_writes")
if(supports_generic_addrspace)
string( APPEND CL_3_0_EXTENSIONS ",+__opencl_c_generic_address_space" )
else()
# Explictly disable opencl_c_generic_address_space (it may be enabled
# by default on some targets). We also disable opencl_c_pipes and
# opencl_c_device_enqueue since they require generic address space.
string( APPEND CL_3_0_EXTENSIONS ",-__opencl_c_generic_address_space" )
string( APPEND CL_3_0_EXTENSIONS ",-__opencl_c_pipes" )
string( APPEND CL_3_0_EXTENSIONS ",-__opencl_c_device_enqueue" )
endif()
list( APPEND flags ${CL_3_0_EXTENSIONS})

Expand Down