arcadiaphy edited a comment on issue #14176: uncomment memory pool free
URL: https://github.com/apache/incubator-mxnet/pull/14176#issuecomment-465102234
 
 
   @marcoabreu @KellenSunderland
   I have played with ASAN test of mlp_cpu example, there are roughly two kinds 
of memory leaks:
   
   1. When using threaded engine, the memory release is depended upon workers 
in engine, and thus asynchronous. When program exits, the destruction of engine 
will not wait for all operation including memory release to finish, leading to 
leaked memory. This kind of leak is not very serious since it only happens on 
exit, and is more like ungraceful program exit.
   2. True memory leak that happens elsewhere.
   
   To fully address the 1st leak is hard, many memories are hidden in 
global/thread_local singleton, so it's related to enforce a correct destruction 
order on static variables (the engine is also a static variable) and make 
engine to wait for unfinished operations. Actually, I don't find any mechanisms 
concerning static variable destruction order in mxnet, so I wonder why there is 
no problem in usage.
   
   A easy workaround is to use naive engine in ASAN tests, if leaks still 
exists, then it's definitely the 2nd leak and we must fix them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to