Skip to content

Rollup of 6 pull requests #144231

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

Closed
wants to merge 21 commits into from

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jul 20, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Gelbpunkt and others added 21 commits July 18, 2025 19:05
This test depends on the target-specific behavior of crt-static for musl
targets. However, running the testsuite on a musl host requires
setting `crt-static` to `false`, as it wouldn't otherwise be possible to
build rustc. This in turn will enable `-Ctarget-feature=-crt-static` for
all tests, mismatching the expected `+crt-static` for the musl target
tested in this testcase.

Since this test specifically tests the default value of `crt-static` for
the musl target, ignoring it entirely makes more sense than manually
setting `-Ctarget-feature=+crt-static` here, but both would be valid
approaches.

Signed-off-by: Jens Reidel <[email protected]>
This reverts the hack in rust-lang#133889
now that `Pin`'s field is no longer public.
gpu offload host code generation

r? ghost

This will generate most of the host side code to use llvm's offload feature.
The first PR will only handle automatic mem-transfers to and from the device.
So if a user calls a kernel, we will copy inputs back and forth, but we won't do the actual kernel launch.
Before merging, we will use LLVM's Info infrastructure to verify that the memcopies match what openmp offloa generates in C++. `LIBOMPTARGET_INFO=-1 ./my_rust_binary` should print that a memcpy to and later from the device is happening.

A follow-up PR will generate the actual device-side kernel which will then do computations on the GPU.
A third PR will implement manual host2device and device2host functionality, but the goal is to minimize cases where a user has to overwrite our default handling due to performance issues.

I'm trying to get a full MVP out first, so this just recognizes GPU functions based on magic names. The final frontend will obviously move this over to use proper macros, like I'm already doing it for the autodiff work.
This work will also be compatible with std::autodiff, so one can differentiate GPU kernels.

Tracking:
- rust-lang#131513
…-foreign-items, r=RalfJung

Miri: non-deterministic floating point operations in `foreign_items`

Part of [rust-lang/miri/rust-lang#3555](rust-lang/miri#3555 (comment)), this pr does the `foreign_items` work.

Some things have changed since rust-lang#138062 and rust-lang#142514. I moved the "helpers" used for creating fixed outputs and clamping operations to their defined ranges to `helpers.rs`. These are now also extended to handle the floating-point operations in `foreign_items`. Tests in `miri/tests/float.rs` were changed/added.

Failing tests in `std` were extracted, run under miri with `-Zmiri-many-seeds=0..1000` and changed accordingly. Double checked with `-Zmiri-many-seeds`.

I noticed that the C standard doesn't specify the output ranges for all of its mathematical operations; it just specifies them as:
```
Returns
The sinh functions return sinh x.
```
So I used [Wolfram|Alpha](https://www.wolframalpha.com/).
…=compiler-errors

tests: Skip supported-crate-types test on musl hosts

This test depends on the target-specific default of crt-static for musl targets. However, running the testsuite on a musl host requires setting `crt-static` to `false`, as it wouldn't otherwise be possible to build rustc. This in turn will enable `-Ctarget-feature=-crt-static` for all tests, mismatching the expected `+crt-static` for the musl target tested in this testcase.

Since this test specifically tests the default value of `crt-static` for the musl target, ignoring it entirely makes more sense than manually setting `-Ctarget-feature=+crt-static` here, but both would be valid approaches.
…_impls, r=compiler-errors

Debug impls for DropElaborators

It's a little weird that these just have a completely empty Debug impl. Now they're `ElaborateDropsCtxt { .. }` and `DropShimElaborator { .. }`.
Add non-regression test for rust-lang#144168

This is a non-regression test for issue rust-lang#144168, reduced from `zerocopy`, to go with rust-lang#144172 since it had no test yet, and we didn't want to delay it from landing.

Closes rust-lang#144168

I've checked that the test does fail without rust-lang#144172.
…ler-errors

Don't consider unstable fields always-inhabited

This reverts the hack in rust-lang#133889 now that `Pin`'s field is no longer public.

Fixes rust-lang#143468.

r? ``@compiler-errors``
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 20, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented Jul 20, 2025

📌 Commit f2f5c89 has been approved by GuillaumeGomez

It is now in the queue for this repository.

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

bors commented Jul 21, 2025

⌛ Testing commit f2f5c89 with merge 7b82649...

bors added a commit that referenced this pull request Jul 21, 2025
Rollup of 6 pull requests

Successful merges:

 - #142097 (gpu offload host code generation)
 - #143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - #144144 (tests: Skip supported-crate-types test on musl hosts)
 - #144162 (Debug impls for DropElaborators)
 - #144189 (Add non-regression test for #144168)
 - #144216 (Don't consider unstable fields always-inhabited)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- num::flt2dec::strategy::dragon::shortest_sanity_test stdout ----

thread 'num::flt2dec::strategy::dragon::shortest_sanity_test' panicked at library/coretests/tests/num/flt2dec/mod.rs:443:5:
shortest mismatch for v=ldexp_f64(1.0, 64): actual ("18446744073709535", 20), expected ("18446744073709552", 20)

---- num::flt2dec::strategy::grisu::shortest_sanity_test stdout ----

thread 'num::flt2dec::strategy::grisu::shortest_sanity_test' panicked at library/coretests/tests/num/flt2dec/mod.rs:443:5:
shortest mismatch for v=ldexp_f64(1.0, 64): actual ("18446744073709543", 20), expected ("18446744073709552", 20)


failures:
    num::flt2dec::strategy::dragon::shortest_sanity_test
    num::flt2dec::strategy::grisu::shortest_sanity_test

test result: FAILED. 2090 passed; 2 failed; 9 ignored; 0 measured; 0 filtered out; finished in 553.58s

error: test failed, to rerun pass `-p coretests --test coretests`
Build completed unsuccessfully in 0:28:05
make: *** [Makefile:53: check-aux] Error 1
  local time: Mon Jul 21 02:29:50 UTC 2025
  network time: Mon, 21 Jul 2025 02:29:50 GMT
##[error]Process completed with exit code 2.
Post job cleanup.

@bors
Copy link
Collaborator

bors commented Jul 21, 2025

💔 Test failed - checks-actions

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

Probably #143906.
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 21, 2025
@jieyouxu jieyouxu closed this Jul 21, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 21, 2025
@GuillaumeGomez GuillaumeGomez deleted the rollup-hjxqi9q branch July 21, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.