Skip to content

[AutoDiff] Fix differentiation for non-wrt inout parameters. #33305

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
Aug 5, 2020

Conversation

dan-zheng
Copy link
Contributor

tensorflow branch cherry-pick of #33304.


Fix SIL differential function type calculation to handle non-wrt inout
parameters.

Patch SILFunctionType::getDifferentiabilityResultIndices to prevent returning
empty result indices for @differentiable function types with no formal results
where all inout parameters are @noDerivative. TF-1305 tracks a robust fix.

Resolves SR-13305.

Exposes TF-1305: parameter/result differentiability hole for inout parameters.

Fix SIL differential function type calculation to handle non-wrt `inout`
parameters.

Patch `SILFunctionType::getDifferentiabilityResultIndices` to prevent returning
empty result indices for `@differentiable` function types with no formal results
where all `inout` parameters are `@noDerivative`. TF-1305 tracks a robust fix.

Resolves SR-13305.

Exposes TF-1305: parameter/result differentiability hole for `inout` parameters.
@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Aug 5, 2020
@dan-zheng dan-zheng requested a review from marcrasi August 5, 2020 00:45
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor Author

Merging to unblock SR-13305, since tests have passed. Feedback from mirror PR #33304 will be addressed.

@dan-zheng dan-zheng merged commit f53d574 into swiftlang:tensorflow Aug 5, 2020
@dan-zheng dan-zheng deleted the SR-13305-tf branch August 5, 2020 03:30
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.

1 participant