[libc][math][c++23] Add bfloat16 support in LLVM libc - #144463
Conversation
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
…_type Signed-off-by: krishna2803 <kpandey81930@gmail.com>
…n type Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
…d headers Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
…lization for MPFRNumber Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
| } | ||
| } | ||
|
|
||
| constexpr bool operator==(const BFloat16 other) const { |
There was a problem hiding this comment.
we should implement floating point equality of the same type in FPBits, and it should follow IEEE 754 rules for equality (aka not bit identical in some cases).
lntue
left a comment
There was a problem hiding this comment.
Add unit tests to make sure the class and the MPFR utility work.
Signed-off-by: krishna2803 <kpandey81930@gmail.com>
overmighty
left a comment
There was a problem hiding this comment.
Some last comments and then this PR should be ready to merge unless we get more requests from Tue.
Co-authored-by: OverMighty <its.overmighty@gmail.com>
Co-authored-by: OverMighty <its.overmighty@gmail.com>
Co-authored-by: OverMighty <its.overmighty@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Co-authored-by: OverMighty <its.overmighty@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
|
If you just change the tests to use the |
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
overmighty
left a comment
There was a problem hiding this comment.
Last nits for real this time, but LGTM otherwise.
| } | ||
| } | ||
|
|
||
| TEST_F(LlvmLibcBfloat16ToFloatTest, SpecialIntegers) { |
There was a problem hiding this comment.
Nit: this only tests conversion from integer to bfloat16 so the test suite could have a more fitting name, e.g., LlvmLibcBfloat16ConversionTest, with test names ToFloatPositiveRange, ToFloatNegativeRange, and FromInteger.
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Co-authored-by: OverMighty <its.overmighty@gmail.com>
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/215/builds/710 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/25780 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/25813 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/25782 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/93/builds/25287 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/24707 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/43/builds/25123 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/9065 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/183/builds/15780 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/188/builds/16804 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/19169 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/196/builds/9931 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/182/builds/12289 Here is the relevant piece of the build log for the reference |
This PR enables support for BFloat16 type in LLVM libc along with support for testing BFloat16 functions via MPFR.
cc @overmighty @lntue