Skip to content
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

Enable f16 tests on non-GNU Windows #130959

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Sep 27, 2024

There is a MinGW ABI bug that prevents f16 and f128 from being usable on windows-gnu targets. This does not affect MSVC; however, we have f16 and f128 tests disabled on all Windows targets.

Update the gating to only affect windows-gnu, which means f16 tests will be enabled. There is no effect for f128 since the default fallback is false.

try-job: x86_64-msvc
try-job: i686-msvc

@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2024

r? @joboet

rustbot has assigned @joboet.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 27, 2024
@tgross35
Copy link
Contributor Author

tgross35 commented Sep 27, 2024

#129385 should ideally merge first so this is effectively blocked. But we should at least be able to test the change.

@bors try

Cc @beetrees to double check this

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2024
…nu, r=<try>

Enable `f16` tests on non-GNU Windows

There is a MinGW ABI bug that prevents `f16` and `f128` from being usable on `windows-gnu` targets. This does not affect MSVC; however, we have `f16` and `f128` tests disabled on all Windows targets.

Update the gating to only affect `windows-gnu`, which means `f16` tests will be enabled. There is no effect for `f128` since the default fallback is `false`.

try-job: x86_64-msvc
try-job: i686-msvc
@bors
Copy link
Contributor

bors commented Sep 27, 2024

⌛ Trying commit a8902f0 with merge 2db5115...

@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 added the F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` label Sep 27, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 27, 2024

💔 Test failed - checks-actions

@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 Sep 27, 2024
@tgross35 tgross35 force-pushed the f16-f128-only-disable-win-gnu branch from a8902f0 to 83d56df Compare September 27, 2024 23:28
@tgross35
Copy link
Contributor Author

@bors try

@bors
Copy link
Contributor

bors commented Sep 27, 2024

⌛ Trying commit 83d56df with merge ee9a311...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2024
…nu, r=<try>

Enable `f16` tests on non-GNU Windows

There is a MinGW ABI bug that prevents `f16` and `f128` from being usable on `windows-gnu` targets. This does not affect MSVC; however, we have `f16` and `f128` tests disabled on all Windows targets.

Update the gating to only affect `windows-gnu`, which means `f16` tests will be enabled. There is no effect for `f128` since the default fallback is `false`.

try-job: x86_64-msvc
try-job: i686-msvc
@workingjubilee workingjubilee added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 28, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 28, 2024

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member

float tests + Windows, I can think of few more exciting combinations. already getting mysterious failures...

@bors rollup=iffy

@@ -104,7 +104,7 @@ fn main() {
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
("arm64ec", _) => false,
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
("x86_64", "windows") => false,
("x86_64", "windows") if target_env == "gnu" => false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it also check for target_abi == "" or target_abi != "llvm" to enable it for gnullvm targets since it works fine with Clang?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do gnullvm targets avoid linking MinGW/GCC libraries at all? I'm honestly not positive how those works.

If you are suggesting updating the gate to if target_env == "gnu" && target_abi == "" => false I can do that after figuring out what is currently failing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnullvm targets are based on mingw-w64 just like regular gnu targets but built using the Clang / LLVM toolchain. In https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054 you've said Clang is using proper ABI, so this feature should be fine. Doesn't have to be done in this PR though.
The same for f128.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang uses the correct ABI, but the problem is it can link symbols from libgcc which means things wind up broken. Maybe this isn't the case for gnullvm for some reason?

In any case I'll plan to leave this PR as-is for now unless you are able to check that things work on gnullvm (or I'll try to do that at some point after this merges).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnullvm targets don't use anything from GCC/GNU, so this is not a problem. FWIW libgcc is replaced by compiler-rt and libgcc_{s,eh} is replaced by libunwind.

I'm trying to tests that, but I have troubles cross-compiling full toolchain because workspace resolver = "2" exposed Cargo bug:

Building tool rustdoc (stage1 -> stage2, x86_64-pc-windows-gnullvm)
thread 'main' panicked at src/cargo\core\resolver\features.rs:323:14:
activated_features for invalid package: features did not find PackageId { name: "windows_x86_64_gnullvm", version: "0.52.6", source: "registry `crates-io`" } HostDep
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

That might get a fix soon: rust-lang/cargo#14593
Otherwise I'll work around it another way, so I'll take care of that change then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's really interesting. compiler-rt may have been part of the problem too since GCC was being used to build it - but I don't really remember exactly what I was testing, and sounds like that might not be a problem anyway.

Anyway, totally your discretion since you're probably the main one testing this target :) feel free to r? me if you wind up putting up a followup PR.

Copy link
Contributor

@mati865 mati865 Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLVM mingw-w64 toolchains are purely LLVM + mingw-w64 based, no GNU tools like GCC or Binutils are used at any point.

EDIT: feel free to resolve this discussion, my button has disappeared.

@tgross35
Copy link
Contributor Author

I have no clue what the error was and raw logs don't work - did the runner just die?

@bors try

@bors
Copy link
Contributor

bors commented Sep 28, 2024

⌛ Trying commit 83d56df with merge fb032d2...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 28, 2024
…nu, r=<try>

Enable `f16` tests on non-GNU Windows

There is a MinGW ABI bug that prevents `f16` and `f128` from being usable on `windows-gnu` targets. This does not affect MSVC; however, we have `f16` and `f128` tests disabled on all Windows targets.

Update the gating to only affect `windows-gnu`, which means `f16` tests will be enabled. There is no effect for `f128` since the default fallback is `false`.

try-job: x86_64-msvc
try-job: i686-msvc
@bors
Copy link
Contributor

bors commented Sep 28, 2024

☀️ Try build successful - checks-actions
Build commit: fb032d2 (fb032d2d45aca90636bdb78b89b4e4182aac62c4)

@tgross35
Copy link
Contributor Author

Woo. Still will need a rebase after #129385 so I can drop the second commit here, but this seems to have done what it's expected to.

@rustbot review

@rustbot rustbot removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 28, 2024
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 28, 2024
@tgross35 tgross35 added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 28, 2024
@rustbot

This comment was marked as outdated.

@tgross35 tgross35 force-pushed the f16-f128-only-disable-win-gnu branch from 83d56df to 58559fc Compare September 28, 2024 23:23
@tgross35
Copy link
Contributor Author

#129385 merged so I was able to drop the second commit.

@rustbot label -S-blocked

@rustbot rustbot removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 28, 2024
@bors
Copy link
Contributor

bors commented Oct 1, 2024

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

There is a MinGW ABI bug that prevents `f16` and `f128` from being
usable on `windows-gnu` targets. This does not affect MSVC; however, we
have `f16` and `f128` tests disabled on all Windows targets.

Update the gating to only affect `windows-gnu`, which means `f16` tests
will be enabled. There is no effect for `f128` since the default
fallback is `false`.
@tgross35 tgross35 force-pushed the f16-f128-only-disable-win-gnu branch from 58559fc to 6b09a93 Compare October 1, 2024 02:42
@joboet
Copy link
Member

joboet commented Oct 1, 2024

That appears to work, let's merge it.
@bors r+

@bors
Copy link
Contributor

bors commented Oct 1, 2024

📌 Commit 6b09a93 has been approved by joboet

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 Oct 1, 2024
@bors
Copy link
Contributor

bors commented Oct 1, 2024

⌛ Testing commit 6b09a93 with merge c4f7176...

@bors
Copy link
Contributor

bors commented Oct 1, 2024

☀️ Test successful - checks-actions
Approved by: joboet
Pushing c4f7176 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 1, 2024
@bors bors merged commit c4f7176 into rust-lang:master Oct 1, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 1, 2024
@tgross35 tgross35 deleted the f16-f128-only-disable-win-gnu branch October 1, 2024 14:19
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c4f7176): 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 (primary 1.4%)

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)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.4%, 1.4%] 1

Cycles

Results (secondary -5.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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-7.2%, -4.2%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 771.18s -> 771.847s (0.09%)
Artifact size: 341.46 MiB -> 341.40 MiB (-0.02%)

Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 7, 2024
enable f16 and f128 on windows-gnullvm targets

Continuation of rust-lang#130959
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 7, 2024
Rollup merge of rust-lang#131308 - mati865:gnullvm-f16-f128, r=tgross35

enable f16 and f128 on windows-gnullvm targets

Continuation of rust-lang#130959
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

8 participants