memtt / malt

MALT is a MALloc Tracker to find where and how your made your memory allocations in C/C++/Fortran applications.
https://memtt.github.io/malt/
Other
107 stars 14 forks source link

Track cudaHostAlloc and hipHostMalloc #87

Open fpruvost opened 7 months ago

fpruvost commented 7 months ago

Hi, In our application our data blocks allocated on the main RAM (host) are pinned when using GPUs, and we use the functions cudaHostAlloc/cudaFreeHost (nvidia gpus) or hipHostMalloc/hipHostFree (amd gpus). Can malt track these functions ? Thanks

svalat commented 7 months ago

That's an interesting idea to add thanks.

For now, not possible in the current version.

A way could be to consider them as custom allocator playing with --wrap of malt but in practice they don't have the same signature (extra args).

I would say if we want to add this support we can :

  1. Capture & track them and also add a counter specific + charts to track GPU memory
  2. Track pinned memory

For point 2), that's far more work and I think it is not really trivial.

1) should be in principle quite easy to add even need to think a bit the right way to expose in the GUI to be usefull.