larroy opened a new issue #15375: Memory leak in Naive engine when profiling
URL: https://github.com/apache/incubator-mxnet/issues/15375
 
 
   I believe there's a memory leak in Naive engine here:
   
   
https://github.com/apache/incubator-mxnet/blob/master/src/engine/naive_engine.cc#L164
   
   I think it would be a great opportunity to refactor how NewOperator is 
released. As it's also difficult to reason about the release of the operator 
memory in the threaded engine (looks correct to me, but it takes quite a bit to 
dig it up and understand).
   
   I would propose returning a unique_ptr directly with a custom deleter using 
a virtual operator() that is specialized for the engine type which will get the 
same effect as how operators are being released now. This would make easier to 
reason about this memory management part.
   
   
https://github.com/apache/incubator-mxnet/blob/master/src/engine/threaded_engine.cc#L270
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to