Skip to content

Commit ec0a880

Browse files
committed
libclc: Add clspv64 target
Add a variant of the clspv target that is built using spir64. This is a pre-requisite to supporting spir64 in clspv which is required to take advantage of SPV_KHR_physical_storage_buffer which in turn enables more OpenCL C programs to be compiled with clspv. https://reviews.llvm.org/D116668
1 parent ef1ca4d commit ec0a880

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

libclc/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
88
amdgcn-mesa3d/lib/SOURCES;
99
amdgpu/lib/SOURCES;
1010
clspv/lib/SOURCES;
11+
clspv64/lib/SOURCES;
1112
generic/lib/SOURCES;
1213
ptx/lib/SOURCES;
1314
ptx-nvidiacl/lib/SOURCES;
@@ -21,6 +22,7 @@ set( LIBCLC_TARGETS_ALL
2122
amdgcn--
2223
amdgcn--amdhsa
2324
clspv--
25+
clspv64--
2426
r600--
2527
nvptx--
2628
nvptx64--
@@ -156,6 +158,7 @@ set( amdgcn--_devices tahiti )
156158
set( amdgcn-mesa-mesa3d_devices ${amdgcn--_devices} )
157159
set( amdgcn--amdhsa_devices none )
158160
set( clspv--_devices none )
161+
set( clspv64--_devices none )
159162
set( nvptx--_devices none )
160163
set( nvptx64--_devices none )
161164
set( nvptx--nvidiacl_devices none )
@@ -214,7 +217,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
214217

215218
set( dirs )
216219

217-
if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND NOT ${ARCH} STREQUAL clspv )
220+
if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND
221+
NOT ${ARCH} STREQUAL clspv AND NOT ${ARCH} STREQUAL clspv64)
218222
LIST( APPEND dirs generic )
219223
endif()
220224

@@ -245,7 +249,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
245249

246250
# Add the generated convert.cl here to prevent adding
247251
# the one listed in SOURCES
248-
if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND NOT ${ARCH} STREQUAL "clspv" )
252+
if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND
253+
NOT ${ARCH} STREQUAL "clspv" AND NOT ${ARCH} STREQUAL "clspv64" )
249254
set( rel_files convert.cl )
250255
set( objects convert.cl )
251256
if( NOT ENABLE_RUNTIME_SUBNORMAL )
@@ -299,6 +304,10 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
299304
set( t "spir--" )
300305
set( build_flags )
301306
set( opt_flags -O3 )
307+
elseif( ${ARCH} STREQUAL "clspv64" )
308+
set( t "spir64--" )
309+
set( build_flags )
310+
set( opt_flags -O3 )
302311
else()
303312
set( build_flags )
304313
set( opt_flags -O3 )

libclc/clspv64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
clspv

0 commit comments

Comments
 (0)