jhuber6 wrote: > The linker's job is symbol resolution, layout, and relocation. "Compute each > kernel's transitive VGPR/SGPR/LDS/scratch and re-encode compute_pgm_rsrc*" is > codegen finalization, not linking. > This makes midend/backend passes inside the ELF kinker - wrong layer.
The kernel's resource requirements are fundamentally the breadth of the call graph. When we launch a kernel we need to explicitly allocate the maximum amount of resources used by *any* function reachable by the kernel. This information is only known during the final link, so it's fundamentally a linker issue. You could theoretically punt this to the loader, but that would add significant overhead on a very hot path and require that this metadata live in the final executable. https://github.com/llvm/llvm-project/pull/206787 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
