Skip to content

Conversation

@lntue
Copy link
Contributor

@lntue lntue commented Jul 19, 2024

@lntue lntue requested review from jhuber6 and overmighty July 19, 2024 21:23
@llvmbot llvmbot added the libc label Jul 19, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 19, 2024

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/99708.diff

2 Files Affected:

  • (modified) libc/test/src/math/smoke/CMakeLists.txt (+2)
  • (modified) libc/test/src/math/smoke/HypotTest.h (+6)
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);

@lntue lntue merged commit 837d606 into llvm:main Jul 19, 2024
@lntue lntue deleted the hypot branch July 19, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants