diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-07-21 11:18:13 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-07-21 13:15:09 -0500 |
commit | 69bd7fae2b037c6538d531f39c25c160d8e6ff87 (patch) | |
tree | ec6f50cb73d114839a7ead8202c7a3bf1f977619 /libc | |
parent | 65c9153cf055d398a224adcbfdddf23059b433d1 (diff) | |
download | llvm-69bd7fae2b037c6538d531f39c25c160d8e6ff87.zip llvm-69bd7fae2b037c6538d531f39c25c160d8e6ff87.tar.gz llvm-69bd7fae2b037c6538d531f39c25c160d8e6ff87.tar.bz2 |
[libc] Disable 'DecodeInOtherBases` test on GPU targets
This test is excessively slow on GPU targets, taking anywhere beween 5
and 60 seconds to complete each time it's run. See
https://lab.llvm.org/buildbot/#/builders/55/builds/52203/steps/12/logs/stdio
for an example on the NVPTX buildbot. Simply disable testing this on the
GPU for now.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D155979
Diffstat (limited to 'libc')
-rw-r--r-- | libc/test/src/stdlib/StrtolTest.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/test/src/stdlib/StrtolTest.h b/libc/test/src/stdlib/StrtolTest.h index 0bc7161..24726b4 100644 --- a/libc/test/src/stdlib/StrtolTest.h +++ b/libc/test/src/stdlib/StrtolTest.h @@ -8,6 +8,7 @@ #include "src/__support/CPP/limits.h" #include "src/__support/CPP/type_traits.h" +#include "src/__support/macros/properties/architectures.h" #include "src/errno/libc_errno.h" #include "test/UnitTest/Test.h" @@ -198,6 +199,12 @@ struct StrtoTest : public __llvm_libc::testing::Test { } void DecodeInOtherBases(FunctionT func) { + // This test is excessively slow on the GPU, so we limit the innermost loop. +#if defined(LIBC_TARGET_ARCH_IS_GPU) + constexpr int limit = 0; +#else + constexpr int limit = 36; +#endif char small_string[4] = {'\0', '\0', '\0', '\0'}; for (int base = 2; base <= 36; ++base) { for (int first_digit = 0; first_digit <= 36; ++first_digit) { @@ -245,7 +252,7 @@ struct StrtoTest : public __llvm_libc::testing::Test { small_string[0] = int_to_b36_char(first_digit); for (int second_digit = 0; second_digit <= 36; ++second_digit) { small_string[1] = int_to_b36_char(second_digit); - for (int third_digit = 0; third_digit <= 36; ++third_digit) { + for (int third_digit = 0; third_digit <= limit; ++third_digit) { small_string[2] = int_to_b36_char(third_digit); if (first_digit < base && second_digit < base && |