[llvm-branch-commits] [clang] clang/SPIRV: Respect __launch_bounds__ for AMDHIP case (PR #215616)
Yaxun Liu via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 11 19:12:10 PDT 2026
yxsamliu wrote:
Since this stack makes Clang directly consume __launch_bounds__ for AMD HIP, I think we should add AttrDocs for it.
In particular, it would be good to document the AMD behavior explicitly: for AMDGPU, the first argument maps to amdgpu_flat_work_group_size(1, maxThreads), and the second argument maps to amdgpu_waves_per_eu(minBlocks). For AMD SPIR-V, only the max work-group size is represented in !max_work_group_size, so the second argument is not preserved there.
This is user-visible behavior, and the AMDGPU and AMD SPIR-V lowering are not exactly the same, so documenting it would help avoid confusion.
https://github.com/llvm/llvm-project/pull/215616
More information about the llvm-branch-commits
mailing list