Skip to content

Commit a5cf17f

Browse files
committed
[OpenCL] Expose wg collective functions for CL3 SPIR targets
Since the SPIR/SPIR-V targets enable all known features, we must ensure the Work-group Collective Functions feature macro is set for OpenCL 3.0. Fixes #55770
1 parent 99b0078 commit a5cf17f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/Headers/opencl-c-base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#if (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
6969
// For the SPIR and SPIR-V target all features are supported.
7070
#if defined(__SPIR__) || defined(__SPIRV__)
71+
#define __opencl_c_work_group_collective_functions 1
7172
#define __opencl_c_atomic_order_seq_cst 1
7273
#define __opencl_c_atomic_scope_device 1
7374
#define __opencl_c_atomic_scope_all_devices 1

0 commit comments

Comments
 (0)