[PATCH] D38770: AMDGPU: Use stricter bounds for workitem builtins

Tony Tye via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 16 20:42:10 PDT 2017


t-tye added inline comments.


================
Comment at: include/clang/Basic/TargetInfo.h:1060
+  /// \returns Maximum device supported OpenCL workgroup size.
+  virtual unsigned getOpenCLMaxWorkGroupSize(unsigned Dim) const {
+    return 0;
----------------
Is this specifically tied to OpenCL or is it the target's maximum supported work-group size? There are other languages besides OpenCL that have the notion of work-groups, and would seem better to generalize this.


================
Comment at: lib/Basic/Targets/AMDGPU.h:73-74
 
+  // The maximum supported group size is 1024, but some runtimes currently only
+  // support 256.
+  unsigned MaxWorkGroupSize = 1024;
----------------
Probably want to update this comment as all runtimes are moving to support the full capabilities of the hardware which is 1024 for all current AMDGCN targets.


https://reviews.llvm.org/D38770





More information about the cfe-commits mailing list