MasterJH5574 opened a new pull request, #16066:
URL: https://github.com/apache/tvm/pull/16066

   This PR supports clearing up all the allocated memory.
   
   Prior to this PR, all the allocated memory are managed in the pool of memory 
manager. The allocated memory in the pool is on hold and never freed. 
Consequently, the pool size always goes up monotonically within a single run in 
a process.
   
   While good to save time of memory allocation, in some cases (e.g., on mobile 
phones which may have running memory limit) we need to clear the pool and free 
all the memory in order to prevent the pool from endlessly growing up and some 
of allocated memory not being effectively utilized (fragmentation).
   
   Therefore, this PR introduces a PackedFunc that helps clean up the memory 
manager, releasing all the allocated memory. Runtime apps can decide when to 
invoke this PackedFunc and clean up the pool. Usually, this will happen at some 
app "reset" or "reload" stage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to