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
----------------
azabaznov wrote:
> 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.
Ok, I see so while the functions are identical they are not entirely equivalent 
extensions so vendors might support one but not the other? In this case I think 
we should keep checking both but it would be good to add a comment explaining 
why we are checking both macros here.

Btw do you happen to have spec reference? I can't find anything relevant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105858/new/

https://reviews.llvm.org/D105858

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to