[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)
Jun Wang via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 16 17:38:54 PST 2024
================
@@ -2705,6 +2705,30 @@ An error will be given if:
}];
}
+def AMDGPUNumWorkGroupsDocs : Documentation {
+ let Category = DocCatAMDGPUAttributes;
+ let Content = [{
+The number of work groups specifies the number of work groups when the kernel
+is dispatched.
+
+Clang supports the
+``__attribute__((amdgpu_num_work_groups(<x>, <y>, <z>)))`` attribute for the
+AMDGPU target. This attribute may be attached to a kernel function definition
+and is an optimization hint.
+
+``<x>`` parameter specifies the maximum number of work groups in the x dimentsion.
----------------
jwanggit86 wrote:
The 3 numbers specify the 3 dimensions for a 3D grid of threads. Conventionally the dimensions are referred to as x, y, and z. See attributes such as `reqd_work_group_size`.
https://github.com/llvm/llvm-project/pull/79035
More information about the cfe-commits
mailing list