-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Autodiff] Modify inliner logic to award inlining benefits to linear … #69029
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
Conversation
|
@BradLarson @asl could one of you please kick off swift-ci? |
|
@swift-ci Please test |
|
@eeckstein do you think you could also take a look at this PR? |
…maps w/ control-flow For linear maps containing control-flow, closures (representing the pullbacks of intermediate values) may be passed as arguments, however, they may be hidden behind a branch-tracing enum (tracing execution flow of the original function). Such linear maps did not use to get inlining benefits as the compiler could not see that the intermediate pullback closures were actually part of the input. This change modifies the inliner logic to correctly award inlining benefits to linear maps containing control-flow, by checking if a "callee" in the linear map actually traces back to an input closure that was received as part of a branch-tracing enum input argument. Fixes swiftlang#68945
eeckstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
@swift-ci test |
|
I think the windows build might need to be retried. It seems like the build timed out? |
|
@swift-ci test |
1 similar comment
|
@swift-ci test |
|
@swift-ci benchmark |
Similar to swiftlang#69029 but for VJPs.
For linear maps containing control-flow, closures (representing the pullbacks of intermediate values) may be passed as arguments, however, they may be hidden behind a branch-tracing enum (tracing execution flow of the original function).
Such linear maps did not use to get inlining benefits as the compiler could not see that the intermediate pullback closures were actually part of the input.
This change modifies the inliner logic to correctly award inlining benefits to linear maps containing control-flow, by checking if a "callee" in the linear map actually traces back to an input closure that was received as part of a branch-tracing enum input argument.
Fixes #68945