Understanding PyTorch Memory Management Mechanism
Author丨Mia Luo @ Zhihu (Authorized Reprint) Source丨https://zhuanlan.zhihu.com/p/486360176Editor丨Xiaoshutong, Jizhi Shutong 1. Background Introduction The analysis of the PyTorch memory management mechanism mainly aims to reduce the impact of “memory fragmentation”. A simple example is: As shown in the figure above, suppose we want to allocate 800MB of memory. Although the total free memory is 1000MB, the … Read more