stephenrawls commented on issue #14053: in-place reshape ops
URL: https://github.com/apache/incubator-mxnet/pull/14053#issuecomment-460090968
 
 
   @szha -- Thanks for the detailed explanation, that helps a lot.
   
   So just for clarity, I see that in the operator definition for expand_dims, 
it sets the FInPlaceIdentity attribute to true:
   
https://github.com/apache/incubator-mxnet/blob/45d1a1e6ff9c58cfc75f72651c1bf671ac7f1885/src/operator/tensor/matrix_op.cc#L400-L419
   
   I didn't see anything in the plan_memory.cc file that depended on autograd / 
training.
   
   So should I take it that the code is smart enough to not allocate new memory 
for the expand_dims operator in symbolic mode, i.e. not to make a copy, even 
during training when using autograd?
   
   If so, then I think I understand it, and I see what you mean about only 
needing to fix this for the Python ndarray use case.
   
   Thanks again!
   Stephen

----------------------------------------------------------------
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