[clang] [CIR][AMDGPU] Honor __launch_bounds__ on HIP kernels (PR #233929)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 23:16:34 PDT 2026
================
@@ -63,6 +64,9 @@ handleAMDGPUFlatWorkGroupSizeAttr(const FunctionDecl *fd, cir::FuncOp func,
} else {
assert(max == 0 && "Max must be zero");
}
+ } else if (lbMaxThreads > 0) {
+ func->setAttr("cir.amdgpu-flat-work-group-size",
----------------
steffenlarsen wrote:
The attribute string should probably be defined in clang/include/clang/CIR/Dialect/IR/CIRDialect.td in a `getAMDGPU_________` function. Same for "cir.amdgpu-waves-per-eu" further down.
https://github.com/llvm/llvm-project/pull/233929
More information about the cfe-commits
mailing list