Skip to content

[AutoDiff] Unify adjoint entry block generation with the general logic. #25255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2019

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Jun 5, 2019

In control flow AD support, the logic that handles entry adjoint block generation should not be different than the general logic that generates intermediate blocks and processes active values. The only special thing about the entry adjoint block is that it need no phi args because its corresponding original block (the original exit) has no successors.

This PR unifies the block generation logic, moving us a bit closer to the memory leak fix.

In control flow AD support, the logic that handles non-entry adjoint block generation should not be different than the general logic that generates intermediate blocks and processes active values. The only special thing about the adjoint entry block is that it need no phi args because the original block (the original exit) has no successors.

This PR unifies the block generation logic, moving us a bit closer to the memory leak fix.
@rxwei rxwei added the tensorflow This is for "tensorflow" branch PRs. label Jun 5, 2019
@rxwei rxwei requested a review from dan-zheng June 5, 2019 02:28
@rxwei rxwei force-pushed the control-flow-leak branch from 69487d4 to e8ee0fe Compare June 5, 2019 02:28
@rxwei
Copy link
Contributor Author

rxwei commented Jun 5, 2019

@swift-ci please test tensorflow

Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rxwei
Copy link
Contributor Author

rxwei commented Jun 5, 2019

@swift-ci please test tensorflow

1 similar comment
@rxwei
Copy link
Contributor Author

rxwei commented Jun 5, 2019

@swift-ci please test tensorflow

@rxwei rxwei merged commit 5ac83e2 into swiftlang:tensorflow Jun 5, 2019
@rxwei rxwei deleted the control-flow-leak branch June 5, 2019 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tensorflow This is for "tensorflow" branch PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants