You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reducing excessive control dependencies from inplacing
Summary:
Preventing inplace finder from creating unneeded control dependencies which sometimes resulted in cycles.
- Operation `A`, has two inplace read/write users `B` and `C`.
- Inplace finder looks at inplace op `B` first, and adds control dependencies to guarantee it happens after all of its peers (other users of its inplace operand, in this case `C`).
- Next inplace finder looks at inplace op `C`. It sees that one of its peers (`B`) is reachable from it (because of the control dependency) so the situation cannot be resolved by inserting control dependencies. Instead it inserts a copy (`A` -> `copy` -> `C`).
- Previously `copy` copied control successors from `A`, and control predecessors from `C`. Both of these are unnecessary.
Test Plan: Existing inplace tests.
Reviewers: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, samuelh
Reviewed By: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, samuelh
Maniphest Tasks: T66881
Differential Revision: https://phabricator.sourcevertex.net/D74373
0 commit comments