[llvm] [AMDGPU] Add amdgpu-accum-offset attribute to bound available arch VGPR (PR #218745)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 11:14:10 PDT 2026
================
----------------
JoshuaGrindstaff wrote:
What do you mean by "offset" VGPRs? I want to cap VGPRs with `amdgpu-accum-offset` so that the function can run with the offset of any reachable kernel.
Do you mean why I don't approach the limit from above and remove VGPR from the top based on an inherited usage of AGPRs (different from `amdgpu-agpr-alloc`), I don't do that since different callers can have different total sizes. If kernel A has 256 total registers while kernel B can only have 128 registers, the usage of 30 AGPRs would mean something different for kernel A then it would be for kernel B.
A B
\ /
C
A - 216 accum-offset, 40 agpr-alloc
B - 98 accum-offset, 30 agpr-alloc
Even though A has a higher agpr count here, we should only consider B's agpr-alloc/accum-offset since it's the one that will affect C.
https://github.com/llvm/llvm-project/pull/218745
More information about the llvm-commits
mailing list