[libc-commits] [PATCH] D155979: [libc] Disable 'DecodeInOtherBases` test on GPU targets
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Jul 21 11:15:22 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG69bd7fae2b03: [libc] Disable 'DecodeInOtherBases` test on GPU targets (authored by jhuber6).
Changed prior to commit:
https://reviews.llvm.org/D155979?vs=542994&id=543001#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155979/new/
https://reviews.llvm.org/D155979
Files:
libc/test/src/stdlib/StrtolTest.h
Index: libc/test/src/stdlib/StrtolTest.h
===================================================================
--- libc/test/src/stdlib/StrtolTest.h
+++ 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 @@
}
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 @@
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 &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155979.543001.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230721/51164b47/attachment.bin>
More information about the libc-commits
mailing list