reminisce commented on issue #8029: Bug on sum
URL: 
https://github.com/apache/incubator-mxnet/issues/8029#issuecomment-332393859
 
 
   @tqchen It was found that the control_deps of a gradient node is the 
gradient node itself. For a graph like this: `sym = data + data`, where `data` 
is a symbolic variable, the node entries in `vector<NodeEntry> v`  have the 
same node of op `_identity_with_attr_like_rhs` (same node ptr).
   
https://github.com/apache/incubator-mxnet/blob/master/src/executor/graph_executor.cc#L204
   
   Therefore, the assumption that `v[i-1]` does not depend on `v[i]` is not 
valid here and a cycle is introduced into the gradient graph. @piiswrong 
suggested checking with you to see if we could skip adding control deps for a 
node if `v[i-1]` and `v[i]` are the same. I checked the commit history, and it 
shows that you added [this 
line](https://github.com/apache/incubator-mxnet/blob/master/src/executor/graph_executor.cc#L204)
 for resolving this issue: https://github.com/apache/incubator-mxnet/pull/4093. 
Thank you for your help.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to