-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff] Run AutoDiff closure spec pass for all VJPs #81548
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
base: main
Are you sure you want to change the base?
[AutoDiff] Run AutoDiff closure spec pass for all VJPs #81548
Conversation
Tagging @JaapWijnen @clackary Could you please run your tests against the toolchain built from mainline with this PR applied? |
@swift-ci please test |
0b44392
to
5beb934
Compare
@swift-ci please test |
5beb934
to
72a4006
Compare
@swift-ci please test |
- Rename the test (prepare for multi basic block support) - Do not rely on SIL value numbering and use FileCheck variables - Ensure that sil-combine eliminates unneeded closures when running after autodiff closure specialization
72a4006
to
3f84308
Compare
@swift-ci please test |
preset=buildbot,tools=RA,stdlib=DA |
@kovdan01 I cherrypicked this onto |
@clackary Thanks! Could you please also run tests so we ensure that nothing becomes silently miscompiled? |
Ah, I should have specified. My tests include both compilation and running unit tests for those projects that are configured for it. We don't have unit tests configured to run for every single project, but most of the autodiff projects are set up this way. |
@asl FYI: Swift Test Linux Platform with preset looks unrelated to the changes introduced in this PR. Other build jobs are successful. |
Previously, AutoDiff closure specialization pass was triggered only on VJPs containing single basic block. However, the pass logic allows running on arbitrary VJPs. This PR enables the pass for all VJPs unconditionally. So, if the pullback corresponding to multiple-BB VJP accepts some closures directly as arguments, these closures might become specialized by the pass. Closures passed via payload of branch tracing enum are not specialized - this is subject for future changes.
The PR contains several commits.