[PATCH] D105858: opencl-c.h: add 3.0 optional extension support for a few more bits

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 13 09:13:13 PDT 2021


azabaznov 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
----------------
Anastasia wrote:
> 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.
> 
Yeah, I we did. Note that this is applicable to fp64 and 3d image writes, while __openc_c_subgroups and cl_khr_subgroups are not equivalent as extension requires subgroup-independent forward progress but subgroup-independent forward progress is optional in OpenCL C 3.0. I'll try submit a patch for 3d image writes feature macro support this week.


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