Skip to content

[DO MERGE] PGO new solver #141453

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
May 31, 2025
Merged

[DO MERGE] PGO new solver #141453

merged 1 commit into from
May 31, 2025

Conversation

compiler-errors
Copy link
Member

🤔

I hope I did this right...

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label May 23, 2025
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 23, 2025
@bors
Copy link
Collaborator

bors commented May 23, 2025

⌛ Trying commit 8c50bba with merge d8dcadd...

bors added a commit that referenced this pull request May 23, 2025
[DONT MERGE] PGO new solver

🤔

I hope I did this right...
@Kobzol
Copy link
Contributor

Kobzol commented May 23, 2025

Looks about right. I was planning to do this, so thanks! We'll see how much longer it takes to run these new benchmarks, maybe it will be fine to just have 1-2 of the new-solver crates in the training set.

@compiler-errors
Copy link
Member Author

Yep, I'm not prepared to land this yet, I just want to see how much PGO actually matters for the new solver. I think just including a couple stressy crates like nalgebra would be sufficient :>

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 23, 2025

💔 Test failed - checks-actions

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 23, 2025
@Kobzol
Copy link
Contributor

Kobzol commented May 23, 2025

Oh, sorry, this is essentially a bug in the rustc-perf CLI parser, it tries to detect unused benchmarks, but it doesn't handle well situations where one benchmark is a prefix of another. Removing bitmaps-3.2.1-new-solver from the PGO set should fix this.

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 23, 2025

⌛ Trying commit e1d250f with merge 1fde446...

bors added a commit that referenced this pull request May 23, 2025
[DONT MERGE] PGO new solver

🤔

I hope I did this right...
@bors
Copy link
Collaborator

bors commented May 23, 2025

☀️ Try build successful - checks-actions
Build commit: 1fde446 (1fde4461620ecd56d23e8cc2559cc54591ba40f7)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1fde446): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 1.7%] 123
Regressions ❌
(secondary)
0.9% [0.1%, 4.2%] 122
Improvements ✅
(primary)
-0.4% [-0.8%, -0.1%] 44
Improvements ✅
(secondary)
-5.8% [-17.5%, -0.1%] 36
All ❌✅ (primary) 0.2% [-0.8%, 1.7%] 167

Max RSS (memory usage)

Results (primary -2.1%, secondary -3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [1.6%, 9.9%] 8
Improvements ✅
(primary)
-2.1% [-6.3%, -0.9%] 43
Improvements ✅
(secondary)
-4.9% [-9.0%, -1.8%] 32
All ❌✅ (primary) -2.1% [-6.3%, -0.9%] 43

Cycles

Results (primary -1.1%, secondary -11.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
-1.1% [-1.3%, -0.9%] 2
Improvements ✅
(secondary)
-11.7% [-22.2%, -1.7%] 21
All ❌✅ (primary) -1.1% [-1.3%, -0.9%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 776.992s -> 774.276s (-0.35%)
Artifact size: 365.49 MiB -> 368.39 MiB (0.79%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 24, 2025
@Kobzol
Copy link
Contributor

Kobzol commented May 24, 2025

Yup, looks like it helps quite a lot! We should land the general benchmark update and rustc-perd bump separately from adding the new solver benchmarks.

@compiler-errors
Copy link
Member Author

Blocked on #141490

@rustbot author

@bors
Copy link
Collaborator

bors commented May 29, 2025

☔ The latest upstream changes (presumably #141490) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 30, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9ef33a0): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.4%] 9
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 5
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 3
Improvements ✅
(secondary)
-7.1% [-15.1%, -0.2%] 16
All ❌✅ (primary) 0.2% [-0.2%, 0.4%] 12

Max RSS (memory usage)

Results (secondary -0.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [0.7%, 9.0%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-4.0%, -0.5%] 19
All ❌✅ (primary) - - 0

Cycles

Results (secondary -5.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.0% [0.5%, 2.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.4% [-18.5%, -0.4%] 25
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: 370.19 MiB -> 371.51 MiB (0.36%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 30, 2025
@compiler-errors
Copy link
Member Author

compiler-errors commented May 30, 2025

I think the results are basically similar.

Let me squash this and this should be good? Or is this still affecting bootstrap time (idk how to check)?

@Kobzol
Copy link
Contributor

Kobzol commented May 31, 2025

I think it's fine like this, thanks.

@compiler-errors
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 31, 2025
@compiler-errors compiler-errors marked this pull request as ready for review May 31, 2025 10:03
@rustbot
Copy link
Collaborator

rustbot commented May 31, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Kobzol
Copy link
Contributor

Kobzol commented May 31, 2025

r? kobzol

@bors r+

@bors
Copy link
Collaborator

bors commented May 31, 2025

📌 Commit 3253de6 has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2025
@bors
Copy link
Collaborator

bors commented May 31, 2025

⌛ Testing commit 3253de6 with merge 738c08b...

@Kobzol
Copy link
Contributor

Kobzol commented May 31, 2025

Funny, apparently bors doesn't understand DONT MERGE xD

@compiler-errors
Copy link
Member Author

lol

@compiler-errors compiler-errors changed the title [DONT MERGE] PGO new solver [DO MERGE] PGO new solver May 31, 2025
@bors
Copy link
Collaborator

bors commented May 31, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 738c08b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 31, 2025
@bors bors merged commit 738c08b into rust-lang:master May 31, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 31, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e0d014a (parent) -> 738c08b (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 738c08b63c4f9e3ebdaec5eece7b6fbc354f6467 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 5730.5s -> 7727.0s (34.8%)
  2. dist-various-1: 4382.0s -> 4887.9s (11.5%)
  3. x86_64-apple-2: 4757.4s -> 5246.1s (10.3%)
  4. x86_64-apple-1: 8881.7s -> 9750.8s (9.8%)
  5. x86_64-rust-for-linux: 2591.4s -> 2840.5s (9.6%)
  6. dist-x86_64-apple: 8900.4s -> 8047.2s (-9.6%)
  7. x86_64-msvc-ext1: 6875.2s -> 7281.0s (5.9%)
  8. dist-x86_64-musl: 7127.7s -> 7470.8s (4.8%)
  9. aarch64-gnu: 7031.3s -> 6708.3s (-4.6%)
  10. x86_64-gnu-llvm-19-1: 3951.3s -> 3771.4s (-4.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (738c08b): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.4%] 10
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 6
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-8.1% [-15.0%, -3.3%] 14
All ❌✅ (primary) 0.3% [-0.2%, 0.4%] 11

Max RSS (memory usage)

Results (secondary 0.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [0.4%, 9.0%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-4.0%, -0.5%] 25
All ❌✅ (primary) - - 0

Cycles

Results (secondary -4.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [0.5%, 9.2%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.4% [-19.7%, -0.4%] 22
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.196s -> 776.294s (-0.12%)
Artifact size: 370.47 MiB -> 372.28 MiB (0.49%)

@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Jun 2, 2025
@Mark-Simulacrum
Copy link
Member

Regressions are acceptable given the wins and intent of the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants