[flang-commits] [PATCH] D150161: [flang] CUDA Fortran - part 2/5: symbols & scopes

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue May 9 15:37:41 PDT 2023


klausler added inline comments.


================
Comment at: flang/lib/Semantics/resolve-names.cpp:3551
+    Say(currStmtSource().value(),
+        "Operands of CLUSTER_DIMS() must be three integer constants"_err_en_US);
+  } else if (auto *subp{currScope().symbol()
----------------
wangzpgi wrote:
> klausler wrote:
> > wangzpgi wrote:
> > > Can cluster_dim take variable argument such as "cluster_dim(x,y,z)", where x, y, and z are integer variables?
> > No, not according to https://docs.nvidia.com/hpc-sdk/compilers/cuda-fortran-prog-guide/index.html#cfref-new-subs-func-attr , which has "Beginning with the 23.3 release, support for thread block clusters is enabled for Hopper (cc90) and later targets. To specify the dimensions of the cluster, use the cluster_dims syntax and specify each x, y, and z dimension. Values must be numeric constants." in 3.1.3.
> It mentioned at the end of 3.1.2: "Also, as part of the Hopper support, the launch_bounds syntax has been extended to accept a third argument, an upper bound on the cluster size."
That's for LAUNCH_BOUNDS(), not CLUSTER_DIMS().


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

https://reviews.llvm.org/D150161



More information about the flang-commits mailing list