Skip to content

Commit 6488fde

Browse files
lntueyuxuanchen1997
authored andcommitted
[libc] Temporarily disable hypotf sNaN tests for NVPTX targets. (#99708)
Summary: https://lab.llvm.org/buildbot/#/builders/101/builds/2269 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251425
1 parent 78f779b commit 6488fde

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc/test/src/math/smoke/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,6 +2738,7 @@ add_fp_unittest(
27382738
DEPENDS
27392739
libc.src.math.hypotf
27402740
libc.src.__support.FPUtil.fp_bits
2741+
libc.src.__support.macros.properties.architectures
27412742
)
27422743

27432744
add_fp_unittest(
@@ -2751,6 +2752,7 @@ add_fp_unittest(
27512752
DEPENDS
27522753
libc.src.math.hypot
27532754
libc.src.__support.FPUtil.fp_bits
2755+
libc.src.__support.macros.properties.architectures
27542756
)
27552757

27562758
add_fp_unittest(

libc/test/src/math/smoke/HypotTest.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H
1010
#define LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H
1111

12+
#include "src/__support/macros/properties/architectures.h"
1213
#include "test/UnitTest/FPMatcher.h"
1314
#include "test/UnitTest/Test.h"
1415

@@ -25,8 +26,13 @@ class HypotTestTemplate : public LIBC_NAMESPACE::testing::Test {
2526
// Pythagorean triples.
2627
constexpr T PYT[N][3] = {{3, 4, 5}, {5, 12, 13}, {8, 15, 17}, {7, 24, 25}};
2728

29+
#ifndef LIBC_TARGET_ARCH_IS_NVPTX
30+
// TODO: Investigate why sNaN tests are failing on nVidia.
31+
// https://github.com/llvm/llvm-project/issues/99706.
2832
EXPECT_FP_EQ(func(inf, sNaN), aNaN);
2933
EXPECT_FP_EQ(func(sNaN, neg_inf), aNaN);
34+
#endif // !LIBC_TARGET_ARCH_IS_NVPTX
35+
3036
EXPECT_FP_EQ(func(inf, aNaN), inf);
3137
EXPECT_FP_EQ(func(aNaN, neg_inf), inf);
3238
EXPECT_FP_EQ(func(aNaN, aNaN), aNaN);

0 commit comments

Comments
 (0)