ptrendx opened a new pull request #16781: Fix for #16747
URL: https://github.com/apache/incubator-mxnet/pull/16781
 
 
   ## Description ##
   Fixes #16747.
   
   This PR fixes 2 problems:
    - the name for the fused op on the backward pass contained names of nodes 
in the forward pass, sometimes making the name excessively long. This happened 
because backward nodes had control dependencies to corresponding forward nodes 
and `DFSVisit` (used to generate the FusedOp name) traverses those edges as 
well.
    - under some circumstances (including the ones in #16747) backward node 
inside a FusedOp could have multiple nodes listed in control dependencies 
(instead of just a single one - the corresponding forward node). FusedOp would 
then take all of them and treat them as nodes required for type and shape 
inference. If any of such unnecessary nodes was another backward node that was 
subsequently fused, such control dependency would be changed into a Helper 
node, which does not exist in the IndexedGraph, causing an error during 
`ProvideAttrToFusion` call. This PR changes the behavior so that only the first 
control dependency (real forward node) is taken into account when constructing 
control dependencies of the fusion node.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to