Stonesjtu / pytorch_memlab

Profiling and inspecting memory in pytorch
MIT License
1.01k stars 37 forks source link

Memory leak when calling mem reporter #17

Closed Stonesjtu closed 3 years ago

Stonesjtu commented 4 years ago

The tensor_name and tensor_device mapping dict maintains a reference to the key / value tensor, which prevents python collecting unused tensors.

Stonesjtu commented 3 years ago

Fixed in #18