ROCm / HIP

HIP: C++ Heterogeneous-Compute Interface for Portability
https://rocmdocs.amd.com/projects/HIP/
MIT License
3.54k stars 518 forks source link

[Issue]: I want to use rocgdb to trace the calling situation of the hip runtime functions。such as hipMalloc #3528

Closed fortunerains closed 1 week ago

fortunerains commented 2 weeks ago

Problem Description

I want to use rocgdb to trace the calling situation of the hip runtime functions, but found that the hipMalloc function cannot be traced and directly skipped in the gdb debugging process.

how can I trace hipMalloc running process?

The gdb process is as follows: image

Operating System

Linux td50 5.15.0-112-generic #122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

CPU

Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz

GPU

AMD Radeon RX 7900 XT

ROCm Version

ROCm 6.1.0

ROCm Component

HIP

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

kjayapra-amd commented 1 week ago

You need to have debug build for that. Please see the instructions below. https://github.com/ROCm/clr/blob/develop/README.md https://rocm.docs.amd.com/projects/HIP/en/latest/install/build.html