radeon_gpu_analyzer icon indicating copy to clipboard operation
radeon_gpu_analyzer copied to clipboard

Any HIP kernel support?

Open hgtsoi opened this issue 3 years ago • 1 comments

Any HIP kernel build and source code correlation support on the schedule?

hgtsoi avatar Jul 20 '22 07:07 hgtsoi

Hi @hgtsoi, RGA version 2.9.1 and later can be used to perform binary analysis of prebuilt HIP Code Objects binary. Given a prebuilt HIP Code Object binary, you should be able to see a breakdown of all kernels in the file and get the disassembly, VGPR pressure and resource usage statistics per kernel. Line correlation support for HIP binaries is on the roadmap as well.

AmitBM avatar Nov 12 '24 19:11 AmitBM

@AmitBM I am trying to analyze code object binary compiled on gfx942 arch but I am getting the following error.

Error: failed to disassemble CodeObject. error: Unknown target id 0x0

I am compiling the HIP file using the following command.

hipcc -g -O3 --offload-arch=gfx942 -std=c++20 -Rpass-analysis=kernel-resource-usage code.hip -o code

Could you provide me the correct compilation command so that I can analyze my binary file using rga?

AkashKarnatak avatar May 15 '25 09:05 AkashKarnatak

Hi @AkashKarnatak,

Can you please share the compiled CodeObject?

AmitBM avatar May 15 '25 15:05 AmitBM

I was able to make it work. Running the compile command with --save-temps flag generates a code object .o file which rga is able to analyze.

hipcc -g -O3 --offload-arch=gfx942 -std=c++20 -Rpass-analysis=kernel-resource-usage --save-temps code.hip -o code

Thank you.

AkashKarnatak avatar May 15 '25 15:05 AkashKarnatak