[libc-commits] [libc] 837d606 - [libc] Temporarily disable hypotf sNaN tests for NVPTX targets. (#99708)

via libc-commits libc-commits at lists.llvm.org
Fri Jul 19 14:24:44 PDT 2024


Author: lntue
Date: 2024-07-19T17:24:40-04:00
New Revision: 837d606458f014ceed1b5d4504909f32b83362a8

URL: https://github.com/llvm/llvm-project/commit/837d606458f014ceed1b5d4504909f32b83362a8
DIFF: https://github.com/llvm/llvm-project/commit/837d606458f014ceed1b5d4504909f32b83362a8.diff

LOG: [libc] Temporarily disable hypotf sNaN tests for NVPTX targets. (#99708)

https://lab.llvm.org/buildbot/#/builders/101/builds/2269

Added: 
    

Modified: 
    libc/test/src/math/smoke/CMakeLists.txt
    libc/test/src/math/smoke/HypotTest.h

Removed: 
    


################################################################################
diff  --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 9384df8f5290d..a02648ea1018b 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -2738,6 +2738,7 @@ add_fp_unittest(
   DEPENDS
     libc.src.math.hypotf
     libc.src.__support.FPUtil.fp_bits
+    libc.src.__support.macros.properties.architectures    
 )
 
 add_fp_unittest(
@@ -2751,6 +2752,7 @@ add_fp_unittest(
   DEPENDS
     libc.src.math.hypot
     libc.src.__support.FPUtil.fp_bits
+    libc.src.__support.macros.properties.architectures
 )
 
 add_fp_unittest(

diff  --git a/libc/test/src/math/smoke/HypotTest.h b/libc/test/src/math/smoke/HypotTest.h
index 7921d531a3196..d7c62dcbeb0ed 100644
--- a/libc/test/src/math/smoke/HypotTest.h
+++ b/libc/test/src/math/smoke/HypotTest.h
@@ -9,6 +9,7 @@
 #ifndef LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H
 #define LLVM_LIBC_TEST_SRC_MATH_HYPOTTEST_H
 
+#include "src/__support/macros/properties/architectures.h"
 #include "test/UnitTest/FPMatcher.h"
 #include "test/UnitTest/Test.h"
 
@@ -25,8 +26,13 @@ class HypotTestTemplate : public LIBC_NAMESPACE::testing::Test {
     // Pythagorean triples.
     constexpr T PYT[N][3] = {{3, 4, 5}, {5, 12, 13}, {8, 15, 17}, {7, 24, 25}};
 
+#ifndef LIBC_TARGET_ARCH_IS_NVPTX
+    // TODO: Investigate why sNaN tests are failing on nVidia.
+    // https://github.com/llvm/llvm-project/issues/99706.
     EXPECT_FP_EQ(func(inf, sNaN), aNaN);
     EXPECT_FP_EQ(func(sNaN, neg_inf), aNaN);
+#endif // !LIBC_TARGET_ARCH_IS_NVPTX
+
     EXPECT_FP_EQ(func(inf, aNaN), inf);
     EXPECT_FP_EQ(func(aNaN, neg_inf), inf);
     EXPECT_FP_EQ(func(aNaN, aNaN), aNaN);


        


More information about the libc-commits mailing list