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

Add a Debug impl and some basic functions to f16 and f128 #123783

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

tgross35
Copy link
Contributor

compiler_builtins uses some convenience functions like is_nan and is_sign_positive. Add these, as well as a temporary implementation for Debug that prints the bit representation.

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @jhpratt

rustbot has assigned @jhpratt.
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 Apr 11, 2024
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor Author

tgross35 commented Apr 11, 2024

In #122470 I forgot to include a Debug implementation which is needed for compiler_builtins work, and it looks like some simple methods are also needed.

Unfortunately this won't pass CI until mangling support is added.

@rustbot label -T-libs +T-libs-api +S-blocked +F-f16_and_f128
r? @Amanieu

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 11, 2024
@rustbot rustbot assigned Amanieu and unassigned jhpratt Apr 11, 2024
@tgross35 tgross35 force-pushed the f16-f128-debug-impl branch from b18b8b3 to 016b64a Compare April 11, 2024 18:18
@rustbot rustbot added the F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` label Apr 11, 2024
@rust-log-analyzer

This comment has been minimized.

@@ -228,3 +228,19 @@ macro_rules! floating {

floating! { f32 }
floating! { f64 }

#[stable(feature = "rust1", since = "1.0.0")]
Copy link
Member

Choose a reason for hiding this comment

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

It's not the correct version, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just been using the same gate as the traits on f32 and f64 for now, since most of the impl macros don't have a way to specify the gate. I think that when this is closer to stabilization I will change the macros and add a separate gate, but for now I don't think it gains much to not just match the other floats.

`compiler_builtins` uses some convenience functions like `is_nan` and
`is_sign_positive`. Add these, as well as a temporary implementation for
`Debug` that prints the bit representation.
@tgross35 tgross35 force-pushed the f16-f128-debug-impl branch from 016b64a to 5159ecd Compare April 11, 2024 19:31
@tgross35
Copy link
Contributor Author

Convenient, looks like making everything inline means we don't get blocked by the mangling test.

@rustbot ready

@Amanieu
Copy link
Member

Amanieu commented Apr 11, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Apr 11, 2024

📌 Commit 5159ecd has been approved by Amanieu

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. S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Apr 11, 2024
@bors
Copy link
Contributor

bors commented Apr 12, 2024

⌛ Testing commit 5159ecd with merge 7bdae13...

@bors
Copy link
Contributor

bors commented Apr 12, 2024

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 7bdae13 to master...

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

Finished benchmarking commit (7bdae13): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

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)
2.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-2.2%, 2.6%] 2

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: 676.395s -> 677.095s (0.10%)
Artifact size: 316.00 MiB -> 316.00 MiB (-0.00%)

@tgross35 tgross35 deleted the f16-f128-debug-impl branch April 12, 2024 16:33
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-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants