@@ -155,3 +155,130 @@ index acbbe0d94d..b340ccc912 100644
155155 num_segments.get(), num_gathered_indices, stream));
156156
157157 // CPU/GPU sync!
158+ diff --git a/cmake/patches/abseil/absl_cuda_warnings.patch b/cmake/patches/abseil/absl_cuda_warnings.patch
159+ index 144b9f904b..00a81517a4 100644
160+ --- a/cmake/patches/abseil/absl_cuda_warnings.patch
161+ +++ b/cmake/patches/abseil/absl_cuda_warnings.patch
162+ @@ -38,3 +38,122 @@ index 1234567..abcdefg 100644
163+ seed += uint16_t{0xad53};
164+ return seed;
165+ }
166+ + diff --git a/absl/container/internal/common.h b/absl/container/internal/common.h
167+ + index 1234567..abcdefg 100644
168+ + --- a/absl/container/internal/common.h
169+ + +++ b/absl/container/internal/common.h
170+ + @@ -67,6 +67,13 @@ struct IfRRef<T&&> {
171+ + using AddPtr = Other*;
172+ + };
173+ +
174+ + +// Workaround for NVCC (cudafe++) which fails to parse
175+ + +// `IfRRef<concrete_type>::AddPtr<Dependent>` when used as a template argument
176+ + +// inside a heavily macro-expanded template parameter list. Top-level alias
177+ + +// defers the member-template lookup outside the surrounding template-id.
178+ + +template <class T, class Other>
179+ + +using IfRRefAddPtr = typename IfRRef<T>::template AddPtr<Other>;
180+ + +
181+ + template <class, class = void>
182+ + struct IsTransparent : std::false_type {};
183+ + template <class T>
184+ + diff --git a/absl/container/internal/raw_hash_map.h b/absl/container/internal/raw_hash_map.h
185+ + index 1234567..abcdefg 100644
186+ + --- a/absl/container/internal/raw_hash_map.h
187+ + +++ b/absl/container/internal/raw_hash_map.h
188+ + @@ -106,8 +106,8 @@
189+ + typename K = key_type, class V = mapped_type, \
190+ + ABSL_INTERNAL_IF_##KValue##_NOR_##VValue( \
191+ + int = (EnableIf<LifetimeBoundKV<K, KValue, V, VValue, \
192+ + - IfRRef<int KQual>::AddPtr<K>, \
193+ + - IfRRef<int VQual>::AddPtr<V>>>()), \
194+ + + IfRRefAddPtr<int KQual, K>, \
195+ + + IfRRefAddPtr<int VQual, V>>>()), \
196+ + ABSL_INTERNAL_SINGLE_ARG( \
197+ + int &..., \
198+ + decltype(EnableIf<LifetimeBoundKV<K, KValue, V, VValue>>()) = \
199+ + diff --git a/absl/container/internal/btree_container.h b/absl/container/internal/btree_container.h
200+ + index 1234567..abcdefg 100644
201+ + --- a/absl/container/internal/btree_container.h
202+ + +++ b/absl/container/internal/btree_container.h
203+ + @@ -497,8 +497,8 @@
204+ + typename K = key_type, class M, \
205+ + ABSL_INTERNAL_IF_##KValue##_NOR_##MValue( \
206+ + int = (EnableIf<LifetimeBoundKV<K, KValue, M, MValue, \
207+ + - IfRRef<int KQual>::AddPtr<K>, \
208+ + - IfRRef<int MQual>::AddPtr<M>>>()), \
209+ + + IfRRefAddPtr<int KQual, K>, \
210+ + + IfRRefAddPtr<int MQual, M>>>()), \
211+ + ABSL_INTERNAL_SINGLE_ARG( \
212+ + int &..., \
213+ + decltype(EnableIf<LifetimeBoundKV<K, KValue, M, MValue>>()) = \
214+ + @@ -598,10 +598,10 @@
215+ + ABSL_INTERNAL_IF_##KValue( \
216+ + class... Args, \
217+ + int = (EnableIf< \
218+ + - LifetimeBoundK<K, KValue, IfRRef<int KQual>::AddPtr<K>>>())), \
219+ + + LifetimeBoundK<K, KValue, IfRRefAddPtr<int KQual, K>>>())), \
220+ + ABSL_INTERNAL_IF_##KValue( \
221+ + decltype(EnableIf<LifetimeBoundK< \
222+ + - K, KValue, IfRRef<int KQual>::AddPtr<K>>>()) = 0, \
223+ + + K, KValue, IfRRefAddPtr<int KQual, K>>>()) = 0, \
224+ + class... Args), \
225+ + std::enable_if_t<!std::is_convertible<K, const_iterator>::value, int> = \
226+ + 0> \
227+ + diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h
228+ + index 1234567..abcdefg 100644
229+ + --- a/absl/hash/internal/hash.h
230+ + +++ b/absl/hash/internal/hash.h
231+ + @@ -477,7 +477,7 @@ H AbslHashValue(H hash_state, T (&)[N]) {
232+ + template <typename H, typename T, size_t N>
233+ + H AbslHashValue(H hash_state, T (&)[N]) {
234+ + static_assert(
235+ + - sizeof(T) == -1,
236+ + + sizeof(T) == size_t(-1),
237+ + "Hashing C arrays is not allowed. For string literals, wrap the literal "
238+ + "in absl::string_view(). To hash the array contents, use "
239+ + "absl::MakeSpan() or make the array an std::array. To hash the array "
240+ + @@ -1265,7 +1265,7 @@ class ABSL_DLL MixingHashState : public HashStateBase<MixingHashState> {
241+ + }
242+ +
243+ + private:
244+ + - friend class MixingHashState::HashStateBase;
245+ + + friend class HashStateBase<MixingHashState>;
246+ + template <typename H>
247+ + friend H absl::hash_internal::hash_weakly_mixed_integer(H,
248+ + WeaklyMixedInteger);
249+ + diff --git a/absl/hash/hash.h b/absl/hash/hash.h
250+ + index 1234567..abcdefg 100644
251+ + --- a/absl/hash/hash.h
252+ + +++ b/absl/hash/hash.h
253+ + @@ -333,7 +333,8 @@ class HashState : public hash_internal::HashStateBase<HashState> {
254+ + absl::enable_if_t<
255+ + std::is_base_of<hash_internal::HashStateBase<T>, T>::value, int> = 0>
256+ + static HashState Create(T* state) {
257+ + - HashState s;
258+ + + HashState s = {};
259+ + + (void)s;
260+ + s.Init(state);
261+ + return s;
262+ + }
263+ + @@ -368,7 +369,7 @@ class HashState : public hash_internal::HashStateBase<HashState> {
264+ + private:
265+ + HashState() = default;
266+ +
267+ + - friend class HashState::HashStateBase;
268+ + + friend class hash_internal::HashStateBase<HashState>;
269+ + friend struct hash_internal::CombineRaw;
270+ +
271+ + template <typename T>
272+ + diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h
273+ + index 1234567..abcdefg 100644
274+ + --- a/absl/container/internal/raw_hash_set.h
275+ + +++ b/absl/container/internal/raw_hash_set.h
276+ + @@ -464,7 +464,7 @@ inline uint16_t NextSeed() {
277+ + inline uint16_t NextSeed() {
278+ + static_assert(PerTableSeed::kBitCount == 16);
279+ + thread_local uint16_t seed =
280+ + - static_cast<uint16_t>(reinterpret_cast<uintptr_t>(&seed));
281+ + + static_cast<uint16_t>(reinterpret_cast<uintptr_t>(&seed) & 0xFFFFu);
282+ + seed += uint16_t{0xad53};
283+ + return seed;
284+ + }
0 commit comments