profile_cuda
The profile_cuda gadget profiles CUDA memory allocations in libcuda.so (Driver API).
It traces the following CUDA Driver API functions:
cuMemAlloc_v2- Allocate device memorycuMemAllocHost_v2- Allocate page-locked host memorycuMemAllocManaged- Allocate managed memorycuMemAllocPitch_v2- Allocate pitched device memory
The gadget aggregates memory allocations by user stack trace, allowing you to identify which code paths are responsible for CUDA memory usage.
Getting started
Running the gadget:
- kubectl gadget
- ig
$ kubectl gadget run ghcr.io/inspektor-gadget/gadget/profile_cuda:latest [flags]
$ sudo ig run ghcr.io/inspektor-gadget/gadget/profile_cuda:latest [flags]
Guide
TODO