[libc-commits] [libc] [libc] Implement basic 'fenv.h' utilities on the AMD GPU (PR #83500)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue May 7 12:19:19 PDT 2024


jhuber6 wrote:

```console
> ninja -C runtimes/runtimes-amdgcn-amd-amdhsa-bins libc.test.src.math.smoke.nearbyint_test.__hermetic__
ninja: Entering directory `runtimes/runtimes-amdgcn-amd-amdhsa-bins'
[24/24] Running hermetic test libc.test.src.math.smoke.nearbyint_test.__hermetic__
FAILED: libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nearbyint_test.__hermetic__ /home/jhuber/Documents/llvm/llvm-project/build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nearbyint_test.__hermetic__ 
cd /home/jhuber/Documents/llvm/llvm-project/build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/math/smoke && /home/jhuber/Documents/llvm/llvm-project/build/bin/amdhsa-loader /home/jhuber/Documents/llvm/llvm-project/build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/math/smoke/libc.test.src.math.smoke.nearbyint_test.__hermetic__.__build__
[ RUN      ] LlvmLibcNearbyIntTest.TestNaN
[       OK ] LlvmLibcNearbyIntTest.TestNaN (took 4 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestInfinities
[       OK ] LlvmLibcNearbyIntTest.TestInfinities (took 6 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestZeroes
[       OK ] LlvmLibcNearbyIntTest.TestZeroes (took 6 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestIntegers
[       OK ] LlvmLibcNearbyIntTest.TestIntegers (took 26 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestSubnormalToNearest
[       OK ] LlvmLibcNearbyIntTest.TestSubnormalToNearest (took 2 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestSubnormalTowardZero
[       OK ] LlvmLibcNearbyIntTest.TestSubnormalTowardZero (took 2 us)
[ RUN      ] LlvmLibcNearbyIntTest.TestSubnormalToPosInf
/home/jhuber/Documents/llvm/llvm-project/libc/test/src/math/smoke/NearbyIntTest.h:70: FAILURE
Failed to match ((FPBits::one().get_val())) against LIBC_NAMESPACE::testing::getMatcher< LIBC_NAMESPACE::testing::TestCond::EQ>(((func(min_denormal)))).
Expected floating point value: 0x0000000000000000 = (S: 0, E: 0x0000, M: 0x0000000000000000)
Actual floating point value: 0x3FF0000000000000 = (S: 0, E: 0x03FF, M: 0x0000000000000000)
[  FAILED  ] LlvmLibcNearbyIntTest.TestSubnormalToPosInf
[ RUN      ] LlvmLibcNearbyIntTest.TestSubnormalToNegInf
/home/jhuber/Documents/llvm/llvm-project/libc/test/src/math/smoke/NearbyIntTest.h:77: FAILURE
Failed to match ((negative_one)) against LIBC_NAMESPACE::testing::getMatcher< LIBC_NAMESPACE::testing::TestCond::EQ>(((func(-min_denormal)))).
Expected floating point value: 0x8000000000000000 = (S: 1, E: 0x0000, M: 0x0000000000000000)
Actual floating point value: 0xBFF0000000000000 = (S: 1, E: 0x03FF, M: 0x0000000000000000)
[  FAILED  ] LlvmLibcNearbyIntTest.TestSubnormalToNegInf
Ran 8 tests.  PASS: 6  FAIL: 2
ninja: build stopped: subcommand failed.
```
This is the current output

https://github.com/llvm/llvm-project/pull/83500


More information about the libc-commits mailing list