评价此页

torch.cuda.memory.memory_snapshot#

torch.cuda.memory.memory_snapshot(mempool_id=None)[source]#

Return a snapshot of the CUDA memory allocator state across all devices.

Interpreting the output of this function requires familiarity with the memory allocator internals.

注意

有关 GPU 内存管理的更多详细信息,请参阅 内存管理