Skip to content

[AutoDiff] Fix cloned curry thunk verification error. #28662

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 1 commit into from
Dec 10, 2019

Conversation

dan-zheng
Copy link
Contributor

@dan-zheng dan-zheng commented Dec 9, 2019

Differentiation has special support for canonicalizing differentiable_function
instructions of curry thunk applications: curry thunks are cloned to a version
returning a differentiable_function of the original return value.

In cloned curry thunks, the differentiable_function instruction is now
created right after the returned value's defining instruction, not at the end of
the function. This avoids stack_alloc/stack_dealloc ordering issues.

Resolves TF-1039.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Dec 9, 2019
@dan-zheng dan-zheng requested review from rxwei and marcrasi December 9, 2019 21:15
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

Differentiation has special support for canonicalizing `differentiable_function`
instructions of curry thunk applications: curry thunks are cloned to a version
returning a `differentiable_function` of the original return value.

In cloned curry thunks, the `differentiable_function` instruction is now
created right after the return value's defining instruction, not at the end of
the function. This avoids `alloc_stack`/`dealloc_stack` ordering issues.

Resolves TF-1039.
@dan-zheng
Copy link
Contributor Author

@swift-ci Please clean test tensorflow

1 similar comment
@dan-zheng
Copy link
Contributor Author

@swift-ci Please clean test tensorflow

@dan-zheng dan-zheng merged commit b88a119 into swiftlang:tensorflow Dec 10, 2019
@dan-zheng dan-zheng deleted the TF-1037 branch December 10, 2019 01:26
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.

3 participants