diff options
author | Shilei Tian <i@tianshilei.me> | 2025-09-26 00:41:39 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2025-09-26 00:44:30 -0400 |
commit | df4aefa35603a18fca196eae469cc66758fc822d (patch) | |
tree | e331fc6a783746d06dcb9f720dbed7f319a650f7 | |
parent | 6da9d03b8d10f8d645be2a93a9eadc422d619daa (diff) | |
download | llvm-users/shiltian/cluster_dims_clang_support.zip llvm-users/shiltian/cluster_dims_clang_support.tar.gz llvm-users/shiltian/cluster_dims_clang_support.tar.bz2 |
more information on no_dimsusers/shiltian/cluster_dims_clang_support
-rw-r--r-- | clang/include/clang/Basic/AttrDocs.td | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index e5174e2..05b8df7 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -7552,10 +7552,14 @@ The ``__cluster_dims__`` and `__no_cluster__`` attributes are mutually exclusive def CUDANoClusterAttrDoc : Documentation { let Category = DocCatDecl; let Content = [{ -In CUDA/HIP programming, the LLVM/Clang-exclusive ``__no_cluster__`` attribute can be applied to -a kernel function to indicate that the thread block cluster feature will not be enabled at both -compile time and kernel launch time. The ``__cluster_dims__`` and `__no_cluster__`` attributes -are mutually exclusive. +In CUDA/HIP programming, a kernel function can still be launched with the cluster feature +enabled at runtime, even without the ``__cluster_dims__`` attribute. The LLVM/Clang-exclusive +``__no_cluster__`` attribute can be applied to a kernel function to explicitly indicate that +the cluster feature will not be enabled either at compile time or at kernel launch time. This +allows the compiler to apply certain optimizations without assuming that clustering could be +enabled at runtime. It is undefined behavior to launch a kernel with the ``__no_cluster__`` +attribute if the cluster feature is enabled at runtime. The ``__cluster_dims__`` and +``__no_cluster__`` attributes are mutually exclusive. .. code:: |