Skip to content

[AutoDiff] Fix PullbackCloner tangent value category mismatch issues. #33964

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 3 commits into from
Sep 16, 2020

Conversation

dan-zheng
Copy link
Contributor

Cherry-pick of #33611 to tensorflow branch.


Fix SIL pullback function type calculation: remap original unowned results to
the correct pullback parameter convention depending on the TangentVector type
lowering.

Make PullbackCloner visitors for the following instructions check and handle
tangent value categories: struct, struct_extract, tuple, destructure_tuple.

Add differentiation tests for Optional struct and class stored properties,
exercising the instruction visitors above.

Resolves SR-13430.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Sep 16, 2020
@dan-zheng dan-zheng requested a review from efremale September 16, 2020 15:45
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

Fix SIL pullback function type calculation: remap original `unowned` results to
the correct pullback parameter convention depending on the `TangentVector` type
lowering.

Make `PullbackCloner` visitors for the following instructions check and handle
tangent value categories: `struct`, `struct_extract`, `tuple`, `destructure_tuple`.

Add differentiation tests for `Optional` struct and class stored properties,
exercising the instruction visitors above.

Resolves SR-13430.
@dan-zheng dan-zheng force-pushed the tensorflow-autodiff-fixes branch from b1fb088 to 2ee26da Compare September 16, 2020 16:45
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng dan-zheng merged commit 54fe511 into swiftlang:tensorflow Sep 16, 2020
@dan-zheng dan-zheng deleted the tensorflow-autodiff-fixes branch September 16, 2020 17:00
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