Skip to content

Commit 793054d

Browse files
author
Hugh Delaney
committed
Bump libclc to OpenCL 3.0
1 parent e56f14f commit 793054d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

libclc/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,18 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
375375
# have to be explicity declared in the soruce.
376376
list( APPEND flags -Xclang -fdeclare-spirv-builtins)
377377

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_fp16,"
383+
"+cl_khr_fp64,"
384+
"+__opencl_c_3d_image_writes,"
385+
"+__opencl_c_images,"
386+
"+cl_khr_3d_image_writes,"
387+
"+__opencl_c_generic_address_space")
388+
list( APPEND flags ${CL_3_0_EXTENSIONS})
389+
378390
add_libclc_builtin_set(libspirv-${arch_suffix}
379391
TRIPLE ${t}
380392
TARGET_ENV libspirv

libclc/test/binding/core/GroupWaitEvents.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Autogenerated by gen-libclc-test.py
1111

12-
// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s
12+
// RUN: %clang -emit-llvm -cl-std=CL2.0 -S -o - %s | FileCheck %s
1313

1414
#include <spirv/spirv_types.h>
1515

0 commit comments

Comments
 (0)