forked from DeepRec-AI/DeepRec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-abseil.patch
30 lines (27 loc) · 1.11 KB
/
0001-abseil.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -Naur a/absl/strings/string_view.h b/absl/strings/string_view.h
--- a/absl/strings/string_view.h 2019-01-15 18:16:04.531633539 +0000
+++ b/absl/strings/string_view.h 2019-01-15 18:20:20.578311553 +0000
@@ -492,7 +492,14 @@
(std::numeric_limits<difference_type>::max)();
static constexpr size_type CheckLengthInternal(size_type len) {
+#if defined(__NVCC__) && !defined(NDEBUG)
+ // An nvcc bug treats the original return expression as a non-constant,
+ // which is not allowed in a constexpr function.
+ // This only happens when NDEBUG is not defined
+ return len;
+#else
return ABSL_ASSERT(len <= kMaxSize), len;
+#endif
}
const char* ptr_;
diff --git "a/absl/synchronization/internal/graphcycles.cc" "b/absl/synchronization/internal/graphcycles.cc"
index 19f9aab5..27fec216 100644
--- "a/absl/synchronization/internal/graphcycles.cc"
+++ "b/absl/synchronization/internal/graphcycles.cc"
@@ -37,6 +37,7 @@
#include <algorithm>
#include <array>
+#include <limits>
#include "absl/base/internal/hide_ptr.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"