-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WIP: Add PGO for apple darwin targets #140699
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: master
Are you sure you want to change the base?
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
What improvements are you seeing locally? Whenever we've tried this, every year or so, using the PGO profiles on osx never worked: almost all functions were reported as not being found in the profile and weren't optimized, so there were no real differences or gains. The same process works on linux and windows, and the functions were definitely in the profile files. It was hard to diagnose and debug in LLVM, and we didn't manage to know why it didn't work at the time. |
@lqd I am seeing few percents of improvement on Zed and ripgrep; admittedly I did not PGO LLVM itself (this branch is a bit of a mess, hence the WIP). I did not notice any logs for missing data in profiles. Small aside on incremental scenariosI didn't look thoroughly into it, but while eyeballing the training process I did not once see any incremental scenario being exercised; looking at the code we do seem to exercise all scenarios, but if that's not the case, that'd explain why the gains for Zed are not that big; our incremental build is heavily bottlenecked by deserialization of incremental build cache, which I imagine would benefit greatly from PGO. |
The logs are not shown by default unless one uses something like |
rust/src/tools/opt-dist/src/training.rs Line 112 in d4b119a
It would be good to see the results on the rustc-perf benchmarks (with wall times unfortunately, as we don't have icounts or other hardware counters easily available on the CLI), or https://github.com/Zoxc/rcb |
Yep, my hunch about incremental scenarios not being ran came from CARGO_INCREMENTAL always being set to 0, but it looks like that's set unconditionally, with an override on the crate being built (which makes sense). source |
Related to #79442