Commit Graph

2 Commits

Author SHA1 Message Date
Lu Fang
7163bfdf58 Fix the weird bug in control_flow_op_test.py (#26931)
Summary:
In some version of python, then_net and else_net may switch the order. Let's make sure we are iterating the right arg node.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26931

Reviewed By: hl475

Differential Revision: D17614829

Pulled By: houseroad

fbshipit-source-id: 3f1b4eb91ecf4d808f58c34896d3e628aa2e0af0
2019-09-26 20:44:03 -07:00
Yiming Wu
a1494efdfa fix auto grad summing for IfOp where intermediate output needs renaming (#14772)
Summary:
fix auto grad summing for IfOp where intermediate output needs renaming.

Bug before this diff:
- we only renames the output of IfOp without changing the subnet ops output
- this results in blob not found error

the unittest provides an example
this diff fix that for IfOp
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14772

Differential Revision: D13327090

Pulled By: harouwu

fbshipit-source-id: ec40ee88526ace3619c54551e223dd71158a02f8
2018-12-09 08:26:46 -08:00