[PATCH] D105858: opencl-c.h: add 3.0 optional extension support for a few more bits
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 13 09:06:58 PDT 2021
Anastasia added a subscriber: azabaznov.
Anastasia added inline comments.
================
Comment at: clang/lib/Headers/opencl-c-base.h:329
#endif // defined(__opencl_c_atomic_scope_all_devices)
-#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups)
+#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP
----------------
We had a discussion with @azabaznov around features that are aliasing each other and we have discussed to use one feature macro for those. Clang should already ensure that both are set/unset simultaneously? And for those that are not set in clang we can set them correctly here in the header directly.
================
Comment at: clang/lib/Headers/opencl-c.h:15290
uint __ovld get_num_sub_groups(void);
-#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
+#if defined(__opencl_c_subgroups)
uint __ovld get_enqueued_num_sub_groups(void);
----------------
I think that here guarding the OpenCL version is correct?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105858/new/
https://reviews.llvm.org/D105858
More information about the cfe-commits
mailing list