[clang] [llvm] [OpenMP][amdgpu] Use max teams for amdgpu-max-num-workgroups (PR #195203)
Kevin Sala Penades via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 10:45:57 PDT 2026
================
@@ -32,8 +32,8 @@ void foo(int N) {
// CHECK-AMDGPU: attributes #[[ATTR1]] = { {{.*}} "amdgpu-flat-work-group-size"="1,256" {{.*}} }
// CHECK-AMDGPU: attributes #[[ATTR2]] = { {{.*}} "amdgpu-flat-work-group-size"="1,4" {{.*}} }
-// CHECK-AMDGPU: attributes #[[ATTR3]] = { {{.*}} "amdgpu-flat-work-group-size"="1,42" "amdgpu-max-num-workgroups"="42,1,1"{{.*}} }
-// CHECK-AMDGPU: attributes #[[ATTR4]] = { {{.*}} "amdgpu-flat-work-group-size"="1,22" "amdgpu-max-num-workgroups"="42,1,1"{{.*}} }
+// CHECK-AMDGPU: attributes #[[ATTR3]] = { {{.*}} "amdgpu-flat-work-group-size"="1,42" {{.*}} }
+// CHECK-AMDGPU: attributes #[[ATTR4]] = { {{.*}} "amdgpu-flat-work-group-size"="1,22" {{.*}} }
----------------
kevinsala wrote:
My understanding is that the `launch_bounds(N,M)` within a `ompx_attribute` means N maximum number of threads, and M minimum number of blocks. This doesn't seem documented anywhere. In this scenario, since we don't know the maximum, setting `amdgpu-max-num-workgroups"="42,1,1` shouldn't be valid.
https://github.com/llvm/llvm-project/pull/195203
More information about the cfe-commits
mailing list