Dump compiler-determined GPU kernel resource usage (#1965)

Adds --kernel-resource-use flag to install.sh to allow dumping per-GPU kernel resource use at compile time (e.g., VGPRs, LDS, SGPRs, scratch, etc.)
Dieser Commit ist enthalten in:
alex-breslow-amd
2025-10-13 09:12:10 -07:00
committet von alex-breslow-amd
Ursprung 97f2665da2
Commit ff209e5b19
2 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
+5
Datei anzeigen
@@ -35,6 +35,7 @@ option(ENABLE_NPKIT "Enable NPKit"
option(ENABLE_IFC "Enable indirect function call" OFF)
option(GENERATE_SYM_KERNELS "Generate symmetric memory kernels" OFF)
option(INSTALL_DEPENDENCIES "Force install dependencies" OFF)
option(REPORT_KERNEL_RESOURCE_USE "Append -Rpass-analysis=kernel to CXX flags" OFF)
option(ROCTX "Enable ROCTX" ON)
option(PROFILE "Enable profiling" OFF)
option(TIMETRACE "Enable time-trace during compilation" OFF)
@@ -1186,6 +1187,10 @@ if (HAVE_KERNARG_PRELOAD)
target_compile_options(rccl PRIVATE -mllvm --amdgpu-kernarg-preload-count=16)
endif()
if (REPORT_KERNEL_RESOURCE_USE)
target_link_options(rccl PRIVATE -Rpass-analysis=kernel-resource-usage)
endif()
if (DUMP_ASM) # Save temporary files from kernel compilation
message(STATUS "Disassembling librccl.so to asm")
# Maintain symbols but without changing code. Keep additional data in dwarf section of binary.