Skip to content

Explicitly use minimal type expansion for autodiff-related types (e.g. parameters and pullback result types) #77831

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 2, 2024

Conversation

asl
Copy link
Contributor

@asl asl commented Nov 25, 2024

As autodiff happens on function types it is not in general possible to determine the real expansion context of the function being differentiated. Use of minimal context is a conservative approach that should work even when libraty evolution mode is enabled.

Fixes #55179

…. parameters

and pullback result types). As autodiff happens on function types it is not
in general possible to determine the real expansion context of the function
being differentiated. Use of minimal context is a conservative approach that
should work even when libraty evolution mode is enabled.

Fixes #55179
@asl asl requested a review from rxwei November 25, 2024 18:42
@asl asl requested a review from eeckstein as a code owner November 25, 2024 18:42
@asl
Copy link
Contributor Author

asl commented Nov 25, 2024

@swift-ci please test

@asl
Copy link
Contributor Author

asl commented Nov 25, 2024

Tagging @JaapWijnen

@asl asl enabled auto-merge (squash) November 26, 2024 08:15
@asl
Copy link
Contributor Author

asl commented Dec 2, 2024

@swift-ci please smoke test

@asl asl merged commit 2161111 into main Dec 2, 2024
5 checks passed
@asl asl deleted the 55179-fix branch December 2, 2024 23:02
@asl asl added the AutoDiff label Dec 12, 2024
clackary pushed a commit to clackary/swift that referenced this pull request Feb 21, 2025
…. parameters and pullback result types) (swiftlang#77831)

As autodiff happens on function types it is not in general possible to determine the real expansion context of the function being differentiated. Use of minimal context is a conservative approach that should work even when libraty evolution mode is enabled.

Fixes swiftlang#55179

(cherry picked from commit 2161111)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SR-14236] [AutoDiff] Differentiation transform: library evolution -> leaked owned value was never consumed
2 participants