Any way to check nvidia GPU memory fragmentation? and any method to reclaim them?

any way to check nvidia GPU memory fragmentation? and any method to reclaim them?
thanks!

It is not possible to control fragmentation from allocations created with cudaMalloc. CUDA memory pools do offer options to have finer-grain control over some parameters, however I doubt it would help here. What I would recommend is to:

  1. Use compute-sanitizer leak check feature (see documentation for compute-sanitizer)
  2. Switch to the stream-ordered allocation API (cudaMallocAsync / cudaFreeAsync)
  3. Create allocations as late as possible, and release them as early as possible
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.