File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -336,9 +336,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
336
336
# Disables NVVM reflection to defer to after linking
337
337
set ( flags "SHELL:-Xclang -target-feature" "SHELL:-Xclang +ptx72"
338
338
"SHELL:-march=sm_86" "SHELL:-mllvm --nvvm-reflect-enable=false" )
339
- elseif ( ${ARCH} STREQUAL amdgcn )
340
- # AMDGCN needs generic address space for atomics
341
- set ( flags "SHELL:-Xclang -cl-std=CL2.0" )
342
339
else ()
343
340
set ( flags )
344
341
endif ()
@@ -378,6 +375,21 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
378
375
# have to be explicity declared in the soruce.
379
376
list ( APPEND flags -Xclang -fdeclare-spirv-builtins )
380
377
378
+ # OpenCL 3.0 extensions
379
+ list ( APPEND flags -cl-std=CL3.0 "SHELL:-Xclang" )
380
+ string (CONCAT CL_3_0_EXTENSIONS
381
+ "-cl-ext="
382
+ "+cl_khr_fp64,"
383
+ "+__opencl_c_3d_image_writes,"
384
+ "+__opencl_c_images,"
385
+ "+cl_khr_3d_image_writes,"
386
+ "+__opencl_c_generic_address_space" )
387
+ if ( NOT ${ARCH} STREQUAL amdgcn )
388
+ string (APPEND CL_3_0_EXTENSIONS
389
+ ",+cl_khr_fp16" )
390
+ endif ()
391
+ list ( APPEND flags ${CL_3_0_EXTENSIONS} )
392
+
381
393
add_libclc_builtin_set (libspirv-${arch_suffix}
382
394
TRIPLE ${t}
383
395
TARGET_ENV libspirv
You can’t perform that action at this time.
0 commit comments