barry-jin edited a comment on issue #20687:
URL: 
https://github.com/apache/incubator-mxnet/issues/20687#issuecomment-948924317


   Hi @matteosal, the implementations of executor are totally different between 
v1.6 and v2.0. In v1.6, we are using executor C-APIs exposed from backend 
([example](https://github.com/apache/incubator-mxnet/blob/c76593162c2a5e421243dd09a8c3cde044efaa3f/python/mxnet/executor.py#L150)),
 but in v2.0, we are using CachedOp APIs 
([example](https://github.com/apache/incubator-mxnet/blob/5f0efbbe33a1ef2af140e91a8fd367cd3bf92373/python/mxnet/executor.py#L183)).
 You could try to add some parameters when initializing 
[CachedOp](https://github.com/apache/incubator-mxnet/blob/5f0efbbe33a1ef2af140e91a8fd367cd3bf92373/python/mxnet/executor.py#L124)
 to do hybridization (reference: 
[ref1](https://github.com/apache/incubator-mxnet/blob/5f0efbbe33a1ef2af140e91a8fd367cd3bf92373/python/mxnet/gluon/block.py#L1391-L1406),
 
[ref2](https://github.com/apache/incubator-mxnet/pull/20462/files#diff-0b3b9d55159f8526d638cd6f3d571c1eeed96f3bcdc37492425a0749d5a3f208L124))
 to see the memory allocation optimizations. 
 For the GPU memory allocation increase, it is probably related to loading the 
kernels to GPU. 


-- 
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: issues-unsubscr...@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org
For additional commands, e-mail: issues-h...@mxnet.apache.org

Reply via email to