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

Tracking Issue for f16 and f128 float types #116909

Open
3 tasks
traviscross opened this issue Oct 18, 2023 · 22 comments
Open
3 tasks

Tracking Issue for f16 and f128 float types #116909

traviscross opened this issue Oct 18, 2023 · 22 comments
Assignees
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-f16_and_f128 `#![feature(f16_and_f128)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@traviscross
Copy link
Contributor

traviscross commented Oct 18, 2023

This is a tracking issue for the RFC 3453 (rust-lang/rfcs#3453).

The feature gate for the issue is #![feature(f16_and_f128)].

From the RFC:

This RFC proposes adding new IEEE-compliant floating point types f16 and f128 into the core language and standard library. We will provide a soft float implementation for all targets, and use hardware support where possible.

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved questions

None so far.

Implementation history

@traviscross traviscross added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Oct 18, 2023
@traviscross

This comment has been minimized.

@rustbot rustbot added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Oct 18, 2023
@traviscross

This comment has been minimized.

@rustbot rustbot added the B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. label Oct 19, 2023
@tgross35

This comment was marked as outdated.

@gorentbarak

This comment has been minimized.

@gorentbarak

This comment has been minimized.

@gorentbarak

This comment has been minimized.

@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 27, 2023
@gorentbarak

This comment has been minimized.

@rustbot

This comment has been minimized.

@gorentbarak

This comment has been minimized.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 27, 2023
@lqd

This comment has been minimized.

@lqd lqd removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 27, 2023
@traviscross traviscross added the F-f16_and_f128 `#![feature(f16_and_f128)]` label Nov 4, 2023
@tgross35
Copy link
Contributor

tgross35 commented Dec 9, 2023

A blocking issue should be added: ensure C compatibility with ABI-cafe or similar

#114607 (comment)

@tgross35
Copy link
Contributor

tgross35 commented Feb 28, 2024

Implementation steps (could somebody link this in the top post?):

This is based on the suggested pattern at #120645 (comment). I have a more complete reference PR with most of these done at #114607

I am trying to consistently use unimplemented!("f16_f128") and // FIXME(f16_f128) to make needed changes easily greppable.

Nice to have changes:

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 20, 2024
…flip1995

Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, rust-lang/rust-clippy#12950

r? `@flip1995`

Tracking issue: rust-lang#116909
Fixes: rust-lang#126636
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 20, 2024
…flip1995

Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, rust-lang/rust-clippy#12950

r? ``@flip1995``

Tracking issue: rust-lang#116909
Fixes: rust-lang#126636
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 20, 2024
Rollup merge of rust-lang#126636 - tgross35:clippy-f16-f128-fixme, r=flip1995

Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, rust-lang/rust-clippy#12950

r? ``@flip1995``

Tracking issue: rust-lang#116909
Fixes: rust-lang#126636
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Jun 22, 2024
…manieu

Add `f16` inline ASM support for RISC-V

This PR adds `f16` inline ASM support for RISC-V. A `FIXME` is left for `f128` support as LLVM does not support the required `Q` (Quad-Precision Floating-Point) extension yet.

Relevant issue: rust-lang#125398
Tracking issue: rust-lang#116909

`@rustbot` label +F-f16_and_f128
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 22, 2024
Rollup merge of rust-lang#126530 - beetrees:f16-inline-asm-riscv, r=Amanieu

Add `f16` inline ASM support for RISC-V

This PR adds `f16` inline ASM support for RISC-V. A `FIXME` is left for `f128` support as LLVM does not support the required `Q` (Quad-Precision Floating-Point) extension yet.

Relevant issue: rust-lang#125398
Tracking issue: rust-lang#116909

`@rustbot` label +F-f16_and_f128
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 22, 2024
…nieu

Add `f16` inline ASM support for 32-bit ARM

Adds `f16` inline ASM support for 32-bit ARM. SIMD vector types are taken from [here](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:`@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&f:@navigationhierarchiesarchitectures=[A32]).`

Relevant issue: rust-lang#125398
Tracking issue: rust-lang#116909

`@rustbot` label +F-f16_and_f128
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 22, 2024
…nieu

Add `f16` inline ASM support for 32-bit ARM

Adds `f16` inline ASM support for 32-bit ARM. SIMD vector types are taken from [here](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:``@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&f:@navigationhierarchiesarchitectures=[A32]).``

Relevant issue: rust-lang#125398
Tracking issue: rust-lang#116909

``@rustbot`` label +F-f16_and_f128
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 22, 2024
Rollup merge of rust-lang#126555 - beetrees:f16-inline-asm-arm, r=Amanieu

Add `f16` inline ASM support for 32-bit ARM

Adds `f16` inline ASM support for 32-bit ARM. SIMD vector types are taken from [here](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:`@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&f:@navigationhierarchiesarchitectures=[A32]).`

Relevant issue: rust-lang#125398
Tracking issue: rust-lang#116909

`@rustbot` label +F-f16_and_f128
@beetrees
Copy link
Contributor

64-bit MIPS targets (all tier 3) have a bug involving f128 that prevents compilation of compiler-builtins in debug mode without the no-f16-f128 feature: llvm/llvm-project#96432

compiler-errors added a commit to compiler-errors/rust that referenced this issue Jun 23, 2024
…Simulacrum

Add more constants, functions, and tests for `f16` and `f128`

This adds everything that was in some way blocked on const eval, since rust-lang#126429 landed. There is a lot of `cfg(bootstrap)` since that is a fairly recent change.

`f128` tests are disabled on everything except x86_64 and Linux aarch64, which are two platforms I know have "good" support for these types - meaning basic math symbols are available and LLVM doesn't hit selection crashes. `f16` tests are enabled on almost everything except for known LLVM crashes. Doctests are only enabled on x86_64.

Tracking issue: rust-lang#116909
@beetrees
Copy link
Contributor

beetrees commented Jun 23, 2024

wasm32 (tier 2) has f16 bugs with failing to round in-between operations (llvm/llvm-project#96437) and quietening signalling NaNs in some situations when passing to and returning from a function (llvm/llvm-project#96438).

bors added a commit to rust-lang-ci/rust that referenced this issue Jun 23, 2024
…mulacrum

Add more constants, functions, and tests for `f16` and `f128`

This adds everything that was in some way blocked on const eval, since rust-lang#126429 landed. There is a lot of `cfg(bootstrap)` since that is a fairly recent change.

`f128` tests are disabled on everything except x86_64 and Linux aarch64, which are two platforms I know have "good" support for these types - meaning basic math symbols are available and LLVM doesn't hit selection crashes. `f16` tests are enabled on almost everything except for known LLVM crashes. Doctests are only enabled on x86_64.

Tracking issue: rust-lang#116909
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 26, 2024
…mulacrum

Add more constants, functions, and tests for `f16` and `f128`

This adds everything that was in some way blocked on const eval, since rust-lang#126429 landed. There is a lot of `cfg(bootstrap)` since that is a fairly recent change.

`f128` tests are disabled on everything except x86_64 and Linux aarch64, which are two platforms I know have "good" support for these types - meaning basic math symbols are available and LLVM doesn't hit selection crashes. `f16` tests are enabled on almost everything except for known LLVM crashes. Doctests are only enabled on x86_64.

Tracking issue: rust-lang#116909
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jun 27, 2024
Add more constants, functions, and tests for `f16` and `f128`

This adds everything that was in some way blocked on const eval, since rust-lang/rust#126429 landed. There is a lot of `cfg(bootstrap)` since that is a fairly recent change.

`f128` tests are disabled on everything except x86_64 and Linux aarch64, which are two platforms I know have "good" support for these types - meaning basic math symbols are available and LLVM doesn't hit selection crashes. `f16` tests are enabled on almost everything except for known LLVM crashes. Doctests are only enabled on x86_64.

Tracking issue: rust-lang/rust#116909
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, rust-lang#12950

r? ``@flip1995``

Tracking issue: rust-lang/rust#116909
Fixes: rust-lang/rust#126636
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Add more constants, functions, and tests for `f16` and `f128`

This adds everything that was in some way blocked on const eval, since rust-lang/rust#126429 landed. There is a lot of `cfg(bootstrap)` since that is a fairly recent change.

`f128` tests are disabled on everything except x86_64 and Linux aarch64, which are two platforms I know have "good" support for these types - meaning basic math symbols are available and LLVM doesn't hit selection crashes. `f16` tests are enabled on almost everything except for known LLVM crashes. Doctests are only enabled on x86_64.

Tracking issue: rust-lang/rust#116909
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 5, 2024
…rister

Add Natvis visualiser and debuginfo tests for `f16`

To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .

`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
@beetrees
Copy link
Contributor

beetrees commented Jul 8, 2024

It seems the LLVM f16 excess precision and ABI-handling bugs aren't limited to WASM:

The list of affected LLVM backends is included in each issue: both affect tier 2 and tier 3 Rust targets.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 8, 2024
…rister

Add Natvis visualiser and debuginfo tests for `f16`

To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .

`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 8, 2024
…rister

Add Natvis visualiser and debuginfo tests for `f16`

To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .

`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 9, 2024
…rister

Add Natvis visualiser and debuginfo tests for `f16`

To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .

`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 9, 2024
…rister

Add Natvis visualiser and debuginfo tests for `f16`

To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` .

`f16`/`f128` MSVC debug info issue: rust-lang#121837
Tracking issue: rust-lang#116909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-f16_and_f128 `#![feature(f16_and_f128)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants