Skip to content

Rollup of 5 pull requests #139473

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 13 commits into from
Apr 7, 2025
Merged

Rollup of 5 pull requests #139473

merged 13 commits into from
Apr 7, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Apr 7, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

beetrees and others added 13 commits April 6, 2025 02:31
- fix errors caused by the move of `ast::Item::ident` (see rust-lang#138740)
- move the logic of getting `sig`, `vis`, and `ident` from two seperate
  `match` statements into one (less repetition especially with the
  nested `match`)
Verify that the expanded `inline` and `rustc_autodiff` macros are not
duplicated.
…ZuseZ4

fix usage of `autodiff` macro with inner functions

This PR adds additional handling into the expansion step of the `std::autodiff` macro (in `compiler/rustc_builtin_macros/src/autodiff.rs`), which allows the macro to be applied to inner functions.

```rust
#![feature(autodiff)]
use std::autodiff::autodiff;

fn main() {
    #[autodiff(d_inner, Forward, Dual, DualOnly)]
    fn inner(x: f32) -> f32 {
        x * x
    }
}
```

Previously, the compiler didn't allow this due to only handling `Annotatable::Item` and `Annotatable::AssocItem` and missing the handling of `Annotatable::Stmt`. This resulted in the rather generic error

```
error: autodiff must be applied to function
 --> src/main.rs:6:5
  |
6 | /     fn inner(x: f32) -> f32 {
7 | |         x * x
8 | |     }
  | |_____^

error: could not compile `enzyme-test` (bin "enzyme-test") due to 1 previous error
```

This issue was originally reported [here](EnzymeAD#184).

Quick question: would it make sense to add a ui test to ensure there is no regression on this?
This is my first contribution, so I'm extra grateful for any piece of feedback!! :D

r? `@oli-obk`

Tracking issue for autodiff: rust-lang#124509
…-new, r=lcnr

Make the UnifyKey and UnifyValue imports non-nightly

Explicitly depend on ena in rustc_type_ir and import types from there.

This is required for rust-analyzer to use the new solver.

r? types
Remove LLVM 18 inline ASM span fallback

The minimum supported LLVM version is now 19, so this fallback is no longer required.
…inal, r=joshtriplett

style guide: add let-chain rules

Reopens rust-lang#110568

refs rust-lang#53667 and I suppose rust-lang#132833 as well

This reflects the style rules that the style team had already agreed upon back in 2023, with the addition of literals in the lhs being permissible for single line formatting, and the removal of unnecessary language/example snippets around non-`&&` operators that was a small hiccup in the original PR.

It also reflects current formatting behavior implemented in rustfmt (though note that the adjustment to include literals has been implemented & merged, but is still pending a sync to nightly)
…s, r=oli-obk

More trivial tweaks

Found some really tiny nits when trying to find places that span tracking caused queries to be recomputed in incremental; these probably don't need a perf run b/c they're so simple.

r? oli-obk
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 7, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 7, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

📌 Commit 58ad763 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 Apr 7, 2025
@bors
Copy link
Collaborator

bors commented Apr 7, 2025

⌛ Testing commit 58ad763 with merge 8fb32ab...

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 8fb32ab to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 7, 2025
@bors bors merged commit 8fb32ab into rust-lang:master Apr 7, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 7, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138314 fix usage of autodiff macro with inner functions ea0f7561bf3b4931bfe674a556bd8cdcbf51245f (link)
#139426 Make the UnifyKey and UnifyValue imports non-nightly 10ebcdf99329366cdbda6033dfc8eadab75dcaf4 (link)
#139431 Remove LLVM 18 inline ASM span fallback 3b606b3cf183a55342ecb1606f1f54b9b9200d5b (link)
#139456 style guide: add let-chain rules df6356546392ae8f728e7b2dc400f06682a749e1 (link)
#139467 More trivial tweaks 74e62a977d98881fff8d99fca75a9be2f1eb2ea3 (link)

previous master: b9856b6e40

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link

github-actions bot commented Apr 7, 2025

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 b9856b6 (parent) -> 8fb32ab (this PR)

Test differences

Show 6 test diffs

Additionally, 6 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. aarch64-gnu: 6528.3s -> 9912.8s (51.8%)
  2. aarch64-gnu-debug: 4055.0s -> 5764.0s (42.1%)
  3. dist-x86_64-apple: 8524.7s -> 10876.8s (27.6%)
  4. dist-i686-msvc: 6787.8s -> 7454.1s (9.8%)
  5. dist-x86_64-mingw: 7516.4s -> 8101.6s (7.8%)
  6. x86_64-gnu: 6500.3s -> 6893.4s (6.0%)
  7. dist-riscv64-linux: 4969.5s -> 5255.0s (5.7%)
  8. aarch64-apple: 3892.9s -> 4079.5s (4.8%)
  9. i686-gnu-2: 6480.5s -> 6754.2s (4.2%)
  10. x86_64-msvc-1: 8687.4s -> 8898.7s (2.4%)
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.

@Kobzol Kobzol deleted the rollup-ycksn9b branch April 7, 2025 10:07
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8fb32ab): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (secondary 2.5%)

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.5% [2.1%, 2.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 778.587s -> 778.024s (-0.07%)
Artifact size: 365.96 MiB -> 365.92 MiB (-0.01%)

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. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants