ZTWHHH commited on
Commit
bab4271
·
verified ·
1 Parent(s): 1b34b72

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/nvbf16.h +353 -0
  2. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/nvfp16.h +349 -0
  3. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/vector_support.h +145 -0
  4. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/add_const.h +36 -0
  5. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/add_volatile.h +36 -0
  6. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/aligned_storage.h +145 -0
  7. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/alignment_of.h +39 -0
  8. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/common_reference.h +260 -0
  9. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/common_type.h +172 -0
  10. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/conjunction.h +65 -0
  11. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/copy_cv.h +72 -0
  12. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/copy_cvref.h +210 -0
  13. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/dependent_type.h +31 -0
  14. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/disjunction.h +75 -0
  15. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/enable_if.h +39 -0
  16. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/extent.h +68 -0
  17. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/has_unique_object_representation.h +45 -0
  18. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/integral_constant.h +58 -0
  19. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_aggregate.h +42 -0
  20. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_arithmetic.h +41 -0
  21. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_base_of.h +83 -0
  22. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_bounded_array.h +49 -0
  23. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_callable.h +44 -0
  24. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_class.h +68 -0
  25. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_constant_evaluated.h +47 -0
  26. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_core_convertible.h +43 -0
  27. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_default_constructible.h +38 -0
  28. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_destructible.h +115 -0
  29. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_enum.h +68 -0
  30. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_extended_floating_point.h +96 -0
  31. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_implicitly_default_constructible.h +53 -0
  32. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_member_function_pointer.h +79 -0
  33. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_member_pointer.h +57 -0
  34. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_move_constructible.h +40 -0
  35. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_constructible.h +84 -0
  36. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_convertible.h +57 -0
  37. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_copy_assignable.h +60 -0
  38. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_copy_constructible.h +41 -0
  39. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_move_constructible.h +40 -0
  40. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_null_pointer.h +51 -0
  41. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_object.h +60 -0
  42. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_pod.h +62 -0
  43. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_primary_template.h +50 -0
  44. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_reference.h +95 -0
  45. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_reference_wrapper.h +43 -0
  46. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_scalar.h +75 -0
  47. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_signed.h +75 -0
  48. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_standard_layout.h +57 -0
  49. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_swappable.h +203 -0
  50. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_trivial.h +56 -0
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/nvbf16.h ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // -*- C++ -*-
2
+ //===----------------------------------------------------------------------===//
3
+ //
4
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ // See https://llvm.org/LICENSE.txt for license information.
6
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
8
+ //
9
+ //===----------------------------------------------------------------------===//
10
+
11
+ #ifndef _LIBCUDACXX___COMPLEX_NVBF16_H
12
+ #define _LIBCUDACXX___COMPLEX_NVBF16_H
13
+
14
+ #include <cuda/std/detail/__config>
15
+
16
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
17
+ # pragma GCC system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
19
+ # pragma clang system_header
20
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
21
+ # pragma system_header
22
+ #endif // no system header
23
+
24
+ #if defined(_LIBCUDACXX_HAS_NVBF16)
25
+
26
+ _CCCL_DIAG_PUSH
27
+ _CCCL_DIAG_SUPPRESS_CLANG("-Wunused-function")
28
+ # include <cuda_bf16.h>
29
+ _CCCL_DIAG_POP
30
+
31
+ # include <cuda/std/__cmath/nvbf16.h>
32
+ # include <cuda/std/__complex/vector_support.h>
33
+ # include <cuda/std/__fwd/get.h>
34
+ # include <cuda/std/__type_traits/enable_if.h>
35
+ # include <cuda/std/__type_traits/integral_constant.h>
36
+ # include <cuda/std/__type_traits/is_constructible.h>
37
+ # include <cuda/std/__type_traits/is_extended_floating_point.h>
38
+ # include <cuda/std/cmath>
39
+ # include <cuda/std/complex>
40
+
41
+ # if !_CCCL_COMPILER(NVRTC)
42
+ # include <sstream> // for std::basic_ostringstream
43
+ # endif // !_CCCL_COMPILER(NVRTC)
44
+
45
+ // This is a workaround against the user defining macros __CUDA_NO_HALF_CONVERSIONS__ __CUDA_NO_HALF_OPERATORS__
46
+ namespace __cccl_internal
47
+ {
48
+ template <>
49
+ struct __is_non_narrowing_convertible<__nv_bfloat16, float>
50
+ {
51
+ static constexpr bool value = true;
52
+ };
53
+
54
+ template <>
55
+ struct __is_non_narrowing_convertible<__nv_bfloat16, double>
56
+ {
57
+ static constexpr bool value = true;
58
+ };
59
+
60
+ template <>
61
+ struct __is_non_narrowing_convertible<float, __nv_bfloat16>
62
+ {
63
+ static constexpr bool value = true;
64
+ };
65
+
66
+ template <>
67
+ struct __is_non_narrowing_convertible<double, __nv_bfloat16>
68
+ {
69
+ static constexpr bool value = true;
70
+ };
71
+ } // namespace __cccl_internal
72
+
73
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
74
+
75
+ template <>
76
+ struct __complex_alignment<__nv_bfloat16> : integral_constant<size_t, alignof(__nv_bfloat162)>
77
+ {};
78
+
79
+ template <>
80
+ struct __type_to_vector<__nv_bfloat16>
81
+ {
82
+ using __type = __nv_bfloat162;
83
+ };
84
+
85
+ template <>
86
+ struct __cccl_complex_overload_traits<__nv_bfloat16, false, false>
87
+ {
88
+ typedef __nv_bfloat16 _ValueType;
89
+ typedef complex<__nv_bfloat16> _ComplexType;
90
+ };
91
+
92
+ template <class _Tp>
93
+ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __convert_to_bfloat16(const _Tp& __value) noexcept
94
+ {
95
+ return __value;
96
+ }
97
+
98
+ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __convert_to_bfloat16(const float& __value) noexcept
99
+ {
100
+ return __float2bfloat16(__value);
101
+ }
102
+
103
+ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __convert_to_bfloat16(const double& __value) noexcept
104
+ {
105
+ return __double2bfloat16(__value);
106
+ }
107
+
108
+ template <>
109
+ class _CCCL_TYPE_VISIBILITY_DEFAULT _CCCL_ALIGNAS(alignof(__nv_bfloat162)) complex<__nv_bfloat16>
110
+ {
111
+ __nv_bfloat162 __repr_;
112
+
113
+ template <class _Up>
114
+ friend class complex;
115
+
116
+ template <class _Up>
117
+ friend struct __get_complex_impl;
118
+
119
+ public:
120
+ using value_type = __nv_bfloat16;
121
+
122
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const value_type& __re = value_type(), const value_type& __im = value_type())
123
+ : __repr_(__re, __im)
124
+ {}
125
+
126
+ template <class _Up, enable_if_t<__cccl_internal::__is_non_narrowing_convertible<value_type, _Up>::value, int> = 0>
127
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const complex<_Up>& __c)
128
+ : __repr_(__convert_to_bfloat16(__c.real()), __convert_to_bfloat16(__c.imag()))
129
+ {}
130
+
131
+ template <class _Up,
132
+ enable_if_t<!__cccl_internal::__is_non_narrowing_convertible<value_type, _Up>::value, int> = 0,
133
+ enable_if_t<_CCCL_TRAIT(is_constructible, value_type, _Up), int> = 0>
134
+ _LIBCUDACXX_HIDE_FROM_ABI explicit complex(const complex<_Up>& __c)
135
+ : __repr_(__convert_to_bfloat16(__c.real()), __convert_to_bfloat16(__c.imag()))
136
+ {}
137
+
138
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const value_type& __re)
139
+ {
140
+ __repr_.x = __re;
141
+ __repr_.y = value_type();
142
+ return *this;
143
+ }
144
+
145
+ template <class _Up>
146
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const complex<_Up>& __c)
147
+ {
148
+ __repr_.x = __convert_to_bfloat16(__c.real());
149
+ __repr_.y = __convert_to_bfloat16(__c.imag());
150
+ return *this;
151
+ }
152
+
153
+ # if !_CCCL_COMPILER(NVRTC)
154
+ template <class _Up>
155
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const ::std::complex<_Up>& __other)
156
+ : __repr_(_LIBCUDACXX_ACCESS_STD_COMPLEX_REAL(__other), _LIBCUDACXX_ACCESS_STD_COMPLEX_IMAG(__other))
157
+ {}
158
+
159
+ template <class _Up>
160
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const ::std::complex<_Up>& __other)
161
+ {
162
+ __repr_.x = _LIBCUDACXX_ACCESS_STD_COMPLEX_REAL(__other);
163
+ __repr_.y = _LIBCUDACXX_ACCESS_STD_COMPLEX_IMAG(__other);
164
+ return *this;
165
+ }
166
+
167
+ _CCCL_HOST operator ::std::complex<value_type>() const
168
+ {
169
+ return {__repr_.x, __repr_.y};
170
+ }
171
+ # endif // !_CCCL_COMPILER(NVRTC)
172
+
173
+ _LIBCUDACXX_HIDE_FROM_ABI value_type real() const
174
+ {
175
+ return __repr_.x;
176
+ }
177
+ _LIBCUDACXX_HIDE_FROM_ABI value_type imag() const
178
+ {
179
+ return __repr_.y;
180
+ }
181
+
182
+ _LIBCUDACXX_HIDE_FROM_ABI void real(value_type __re)
183
+ {
184
+ __repr_.x = __re;
185
+ }
186
+ _LIBCUDACXX_HIDE_FROM_ABI void imag(value_type __im)
187
+ {
188
+ __repr_.y = __im;
189
+ }
190
+
191
+ // Those additional volatile overloads are meant to help with reductions in thrust
192
+ _LIBCUDACXX_HIDE_FROM_ABI value_type real() const volatile
193
+ {
194
+ return __repr_.x;
195
+ }
196
+ _LIBCUDACXX_HIDE_FROM_ABI value_type imag() const volatile
197
+ {
198
+ return __repr_.y;
199
+ }
200
+
201
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator+=(const value_type& __re)
202
+ {
203
+ __repr_.x = __hadd(__repr_.x, __re);
204
+ return *this;
205
+ }
206
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator-=(const value_type& __re)
207
+ {
208
+ __repr_.x = __hsub(__repr_.x, __re);
209
+ return *this;
210
+ }
211
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator*=(const value_type& __re)
212
+ {
213
+ __repr_.x = __hmul(__repr_.x, __re);
214
+ __repr_.y = __hmul(__repr_.y, __re);
215
+ return *this;
216
+ }
217
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator/=(const value_type& __re)
218
+ {
219
+ __repr_.x = __hdiv(__repr_.x, __re);
220
+ __repr_.y = __hdiv(__repr_.y, __re);
221
+ return *this;
222
+ }
223
+
224
+ // We can utilize vectorized operations for those operators
225
+ _LIBCUDACXX_HIDE_FROM_ABI friend complex& operator+=(complex& __lhs, const complex& __rhs) noexcept
226
+ {
227
+ __lhs.__repr_ = __hadd2(__lhs.__repr_, __rhs.__repr_);
228
+ return __lhs;
229
+ }
230
+
231
+ _LIBCUDACXX_HIDE_FROM_ABI friend complex& operator-=(complex& __lhs, const complex& __rhs) noexcept
232
+ {
233
+ __lhs.__repr_ = __hsub2(__lhs.__repr_, __rhs.__repr_);
234
+ return __lhs;
235
+ }
236
+
237
+ _LIBCUDACXX_HIDE_FROM_ABI friend bool operator==(const complex& __lhs, const complex& __rhs) noexcept
238
+ {
239
+ return __hbeq2(__lhs.__repr_, __rhs.__repr_);
240
+ }
241
+ };
242
+
243
+ template <> // complex<float>
244
+ template <> // complex<__half>
245
+ _LIBCUDACXX_HIDE_FROM_ABI complex<float>::complex(const complex<__nv_bfloat16>& __c)
246
+ : __re_(__bfloat162float(__c.real()))
247
+ , __im_(__bfloat162float(__c.imag()))
248
+ {}
249
+
250
+ template <> // complex<double>
251
+ template <> // complex<__half>
252
+ _LIBCUDACXX_HIDE_FROM_ABI complex<double>::complex(const complex<__nv_bfloat16>& __c)
253
+ : __re_(__bfloat162float(__c.real()))
254
+ , __im_(__bfloat162float(__c.imag()))
255
+ {}
256
+
257
+ template <> // complex<float>
258
+ template <> // complex<__nv_bfloat16>
259
+ _LIBCUDACXX_HIDE_FROM_ABI complex<float>& complex<float>::operator=(const complex<__nv_bfloat16>& __c)
260
+ {
261
+ __re_ = __bfloat162float(__c.real());
262
+ __im_ = __bfloat162float(__c.imag());
263
+ return *this;
264
+ }
265
+
266
+ template <> // complex<double>
267
+ template <> // complex<__nv_bfloat16>
268
+ _LIBCUDACXX_HIDE_FROM_ABI complex<double>& complex<double>::operator=(const complex<__nv_bfloat16>& __c)
269
+ {
270
+ __re_ = __bfloat162float(__c.real());
271
+ __im_ = __bfloat162float(__c.imag());
272
+ return *this;
273
+ }
274
+
275
+ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 arg(__nv_bfloat16 __re)
276
+ {
277
+ return _CUDA_VSTD::atan2(__int2bfloat16_rn(0), __re);
278
+ }
279
+
280
+ // We have performance issues with some trigonometric functions with __nv_bfloat16
281
+ template <>
282
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__nv_bfloat16> asinh(const complex<__nv_bfloat16>& __x)
283
+ {
284
+ return complex<__nv_bfloat16>{_CUDA_VSTD::asinh(complex<float>{__x})};
285
+ }
286
+ template <>
287
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__nv_bfloat16> acosh(const complex<__nv_bfloat16>& __x)
288
+ {
289
+ return complex<__nv_bfloat16>{_CUDA_VSTD::acosh(complex<float>{__x})};
290
+ }
291
+ template <>
292
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__nv_bfloat16> atanh(const complex<__nv_bfloat16>& __x)
293
+ {
294
+ return complex<__nv_bfloat16>{_CUDA_VSTD::atanh(complex<float>{__x})};
295
+ }
296
+ template <>
297
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__nv_bfloat16> acos(const complex<__nv_bfloat16>& __x)
298
+ {
299
+ return complex<__nv_bfloat16>{_CUDA_VSTD::acos(complex<float>{__x})};
300
+ }
301
+
302
+ template <>
303
+ struct __get_complex_impl<__nv_bfloat16>
304
+ {
305
+ template <size_t _Index>
306
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr __nv_bfloat16& get(complex<__nv_bfloat16>& __z) noexcept
307
+ {
308
+ return (_Index == 0) ? __z.__repr_.x : __z.__repr_.y;
309
+ }
310
+
311
+ template <size_t _Index>
312
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr __nv_bfloat16&& get(complex<__nv_bfloat16>&& __z) noexcept
313
+ {
314
+ return _CUDA_VSTD::move((_Index == 0) ? __z.__repr_.x : __z.__repr_.y);
315
+ }
316
+
317
+ template <size_t _Index>
318
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr const __nv_bfloat16& get(const complex<__nv_bfloat16>& __z) noexcept
319
+ {
320
+ return (_Index == 0) ? __z.__repr_.x : __z.__repr_.y;
321
+ }
322
+
323
+ template <size_t _Index>
324
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr const __nv_bfloat16&& get(const complex<__nv_bfloat16>&& __z) noexcept
325
+ {
326
+ return _CUDA_VSTD::move((_Index == 0) ? __z.__repr_.x : __z.__repr_.y);
327
+ }
328
+ };
329
+
330
+ # if !_CCCL_COMPILER(NVRTC)
331
+ template <class _CharT, class _Traits>
332
+ ::std::basic_istream<_CharT, _Traits>&
333
+ operator>>(::std::basic_istream<_CharT, _Traits>& __is, complex<__nv_bfloat16>& __x)
334
+ {
335
+ ::std::complex<float> __temp;
336
+ __is >> __temp;
337
+ __x = __temp;
338
+ return __is;
339
+ }
340
+
341
+ template <class _CharT, class _Traits>
342
+ ::std::basic_ostream<_CharT, _Traits>&
343
+ operator<<(::std::basic_ostream<_CharT, _Traits>& __os, const complex<__nv_bfloat16>& __x)
344
+ {
345
+ return __os << complex<float>{__x};
346
+ }
347
+ # endif // !_CCCL_COMPILER(NVRTC)
348
+
349
+ _LIBCUDACXX_END_NAMESPACE_STD
350
+
351
+ #endif /// _LIBCUDACXX_HAS_NVBF16
352
+
353
+ #endif // _LIBCUDACXX___COMPLEX_NVBF16_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/nvfp16.h ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // -*- C++ -*-
2
+ //===----------------------------------------------------------------------===//
3
+ //
4
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ // See https://llvm.org/LICENSE.txt for license information.
6
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
8
+ //
9
+ //===----------------------------------------------------------------------===//
10
+
11
+ #ifndef _LIBCUDACXX___CUDA_COMPLEX_NVFP16_H
12
+ #define _LIBCUDACXX___CUDA_COMPLEX_NVFP16_H
13
+
14
+ #include <cuda/std/detail/__config>
15
+
16
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
17
+ # pragma GCC system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
19
+ # pragma clang system_header
20
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
21
+ # pragma system_header
22
+ #endif // no system header
23
+
24
+ #if defined(_LIBCUDACXX_HAS_NVFP16)
25
+
26
+ # include <cuda_fp16.h>
27
+
28
+ # include <cuda/std/__cmath/nvfp16.h>
29
+ # include <cuda/std/__complex/vector_support.h>
30
+ # include <cuda/std/__fwd/get.h>
31
+ # include <cuda/std/__type_traits/enable_if.h>
32
+ # include <cuda/std/__type_traits/integral_constant.h>
33
+ # include <cuda/std/__type_traits/is_constructible.h>
34
+ # include <cuda/std/__type_traits/is_extended_floating_point.h>
35
+ # include <cuda/std/cmath>
36
+ # include <cuda/std/complex>
37
+
38
+ # if !_CCCL_COMPILER(NVRTC)
39
+ # include <sstream> // for std::basic_ostringstream
40
+ # endif // !_CCCL_COMPILER(NVRTC)
41
+
42
+ // This is a workaround against the user defining macros __CUDA_NO_HALF_CONVERSIONS__ __CUDA_NO_HALF_OPERATORS__
43
+ namespace __cccl_internal
44
+ {
45
+ template <>
46
+ struct __is_non_narrowing_convertible<__half, float>
47
+ {
48
+ static constexpr bool value = true;
49
+ };
50
+
51
+ template <>
52
+ struct __is_non_narrowing_convertible<__half, double>
53
+ {
54
+ static constexpr bool value = true;
55
+ };
56
+
57
+ template <>
58
+ struct __is_non_narrowing_convertible<float, __half>
59
+ {
60
+ static constexpr bool value = true;
61
+ };
62
+
63
+ template <>
64
+ struct __is_non_narrowing_convertible<double, __half>
65
+ {
66
+ static constexpr bool value = true;
67
+ };
68
+ } // namespace __cccl_internal
69
+
70
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
71
+
72
+ template <>
73
+ struct __complex_alignment<__half> : integral_constant<size_t, alignof(__half2)>
74
+ {};
75
+
76
+ template <>
77
+ struct __type_to_vector<__half>
78
+ {
79
+ using __type = __half2;
80
+ };
81
+
82
+ template <>
83
+ struct __cccl_complex_overload_traits<__half, false, false>
84
+ {
85
+ typedef __half _ValueType;
86
+ typedef complex<__half> _ComplexType;
87
+ };
88
+
89
+ template <class _Tp>
90
+ _LIBCUDACXX_HIDE_FROM_ABI __half __convert_to_half(const _Tp& __value) noexcept
91
+ {
92
+ return __value;
93
+ }
94
+
95
+ _LIBCUDACXX_HIDE_FROM_ABI __half __convert_to_half(const float& __value) noexcept
96
+ {
97
+ return __float2half(__value);
98
+ }
99
+
100
+ _LIBCUDACXX_HIDE_FROM_ABI __half __convert_to_half(const double& __value) noexcept
101
+ {
102
+ return __double2half(__value);
103
+ }
104
+
105
+ template <>
106
+ class _CCCL_TYPE_VISIBILITY_DEFAULT _CCCL_ALIGNAS(alignof(__half2)) complex<__half>
107
+ {
108
+ __half2 __repr_;
109
+
110
+ template <class _Up>
111
+ friend class complex;
112
+
113
+ template <class _Up>
114
+ friend struct __get_complex_impl;
115
+
116
+ public:
117
+ using value_type = __half;
118
+
119
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const value_type& __re = value_type(), const value_type& __im = value_type())
120
+ : __repr_(__re, __im)
121
+ {}
122
+
123
+ template <class _Up, enable_if_t<__cccl_internal::__is_non_narrowing_convertible<value_type, _Up>::value, int> = 0>
124
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const complex<_Up>& __c)
125
+ : __repr_(__convert_to_half(__c.real()), __convert_to_half(__c.imag()))
126
+ {}
127
+
128
+ template <class _Up,
129
+ enable_if_t<!__cccl_internal::__is_non_narrowing_convertible<value_type, _Up>::value, int> = 0,
130
+ enable_if_t<_CCCL_TRAIT(is_constructible, value_type, _Up), int> = 0>
131
+ _LIBCUDACXX_HIDE_FROM_ABI explicit complex(const complex<_Up>& __c)
132
+ : __repr_(__convert_to_half(__c.real()), __convert_to_half(__c.imag()))
133
+ {}
134
+
135
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const value_type& __re)
136
+ {
137
+ __repr_.x = __re;
138
+ __repr_.y = value_type();
139
+ return *this;
140
+ }
141
+
142
+ template <class _Up>
143
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const complex<_Up>& __c)
144
+ {
145
+ __repr_.x = __convert_to_half(__c.real());
146
+ __repr_.y = __convert_to_half(__c.imag());
147
+ return *this;
148
+ }
149
+
150
+ # if !_CCCL_COMPILER(NVRTC)
151
+ template <class _Up>
152
+ _LIBCUDACXX_HIDE_FROM_ABI complex(const ::std::complex<_Up>& __other)
153
+ : __repr_(_LIBCUDACXX_ACCESS_STD_COMPLEX_REAL(__other), _LIBCUDACXX_ACCESS_STD_COMPLEX_IMAG(__other))
154
+ {}
155
+
156
+ template <class _Up>
157
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator=(const ::std::complex<_Up>& __other)
158
+ {
159
+ __repr_.x = _LIBCUDACXX_ACCESS_STD_COMPLEX_REAL(__other);
160
+ __repr_.y = _LIBCUDACXX_ACCESS_STD_COMPLEX_IMAG(__other);
161
+ return *this;
162
+ }
163
+
164
+ _CCCL_HOST operator ::std::complex<value_type>() const
165
+ {
166
+ return {__repr_.x, __repr_.y};
167
+ }
168
+ # endif // !_CCCL_COMPILER(NVRTC)
169
+
170
+ _LIBCUDACXX_HIDE_FROM_ABI value_type real() const
171
+ {
172
+ return __repr_.x;
173
+ }
174
+ _LIBCUDACXX_HIDE_FROM_ABI value_type imag() const
175
+ {
176
+ return __repr_.y;
177
+ }
178
+
179
+ _LIBCUDACXX_HIDE_FROM_ABI void real(value_type __re)
180
+ {
181
+ __repr_.x = __re;
182
+ }
183
+ _LIBCUDACXX_HIDE_FROM_ABI void imag(value_type __im)
184
+ {
185
+ __repr_.y = __im;
186
+ }
187
+
188
+ // Those additional volatile overloads are meant to help with reductions in thrust
189
+ _LIBCUDACXX_HIDE_FROM_ABI value_type real() const volatile
190
+ {
191
+ return __repr_.x;
192
+ }
193
+ _LIBCUDACXX_HIDE_FROM_ABI value_type imag() const volatile
194
+ {
195
+ return __repr_.y;
196
+ }
197
+
198
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator+=(const value_type& __re)
199
+ {
200
+ __repr_.x = __hadd(__repr_.x, __re);
201
+ return *this;
202
+ }
203
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator-=(const value_type& __re)
204
+ {
205
+ __repr_.x = __hsub(__repr_.x, __re);
206
+ return *this;
207
+ }
208
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator*=(const value_type& __re)
209
+ {
210
+ __repr_.x = __hmul(__repr_.x, __re);
211
+ __repr_.y = __hmul(__repr_.y, __re);
212
+ return *this;
213
+ }
214
+ _LIBCUDACXX_HIDE_FROM_ABI complex& operator/=(const value_type& __re)
215
+ {
216
+ __repr_.x = __hdiv(__repr_.x, __re);
217
+ __repr_.y = __hdiv(__repr_.y, __re);
218
+ return *this;
219
+ }
220
+
221
+ // We can utilize vectorized operations for those operators
222
+ _LIBCUDACXX_HIDE_FROM_ABI friend complex& operator+=(complex& __lhs, const complex& __rhs) noexcept
223
+ {
224
+ __lhs.__repr_ = __hadd2(__lhs.__repr_, __rhs.__repr_);
225
+ return __lhs;
226
+ }
227
+
228
+ _LIBCUDACXX_HIDE_FROM_ABI friend complex& operator-=(complex& __lhs, const complex& __rhs) noexcept
229
+ {
230
+ __lhs.__repr_ = __hsub2(__lhs.__repr_, __rhs.__repr_);
231
+ return __lhs;
232
+ }
233
+
234
+ _LIBCUDACXX_HIDE_FROM_ABI friend bool operator==(const complex& __lhs, const complex& __rhs) noexcept
235
+ {
236
+ return __hbeq2(__lhs.__repr_, __rhs.__repr_);
237
+ }
238
+ };
239
+
240
+ template <> // complex<float>
241
+ template <> // complex<__half>
242
+ _LIBCUDACXX_HIDE_FROM_ABI complex<float>::complex(const complex<__half>& __c)
243
+ : __re_(__half2float(__c.real()))
244
+ , __im_(__half2float(__c.imag()))
245
+ {}
246
+
247
+ template <> // complex<double>
248
+ template <> // complex<__half>
249
+ _LIBCUDACXX_HIDE_FROM_ABI complex<double>::complex(const complex<__half>& __c)
250
+ : __re_(__half2float(__c.real()))
251
+ , __im_(__half2float(__c.imag()))
252
+ {}
253
+
254
+ template <> // complex<float>
255
+ template <> // complex<__half>
256
+ _LIBCUDACXX_HIDE_FROM_ABI complex<float>& complex<float>::operator=(const complex<__half>& __c)
257
+ {
258
+ __re_ = __half2float(__c.real());
259
+ __im_ = __half2float(__c.imag());
260
+ return *this;
261
+ }
262
+
263
+ template <> // complex<double>
264
+ template <> // complex<__half>
265
+ _LIBCUDACXX_HIDE_FROM_ABI complex<double>& complex<double>::operator=(const complex<__half>& __c)
266
+ {
267
+ __re_ = __half2float(__c.real());
268
+ __im_ = __half2float(__c.imag());
269
+ return *this;
270
+ }
271
+
272
+ _LIBCUDACXX_HIDE_FROM_ABI __half arg(__half __re)
273
+ {
274
+ return _CUDA_VSTD::atan2(__int2half_rn(0), __re);
275
+ }
276
+
277
+ // We have performance issues with some trigonometric functions with __half
278
+ template <>
279
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__half> asinh(const complex<__half>& __x)
280
+ {
281
+ return complex<__half>{_CUDA_VSTD::asinh(complex<float>{__x})};
282
+ }
283
+ template <>
284
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__half> acosh(const complex<__half>& __x)
285
+ {
286
+ return complex<__half>{_CUDA_VSTD::acosh(complex<float>{__x})};
287
+ }
288
+ template <>
289
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__half> atanh(const complex<__half>& __x)
290
+ {
291
+ return complex<__half>{_CUDA_VSTD::atanh(complex<float>{__x})};
292
+ }
293
+ template <>
294
+ _LIBCUDACXX_HIDE_FROM_ABI complex<__half> acos(const complex<__half>& __x)
295
+ {
296
+ return complex<__half>{_CUDA_VSTD::acos(complex<float>{__x})};
297
+ }
298
+
299
+ template <>
300
+ struct __get_complex_impl<__half>
301
+ {
302
+ template <size_t _Index>
303
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr __half& get(complex<__half>& __z) noexcept
304
+ {
305
+ return (_Index == 0) ? __z.__repr_.x : __z.__repr_.y;
306
+ }
307
+
308
+ template <size_t _Index>
309
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr __half&& get(complex<__half>&& __z) noexcept
310
+ {
311
+ return _CUDA_VSTD::move((_Index == 0) ? __z.__repr_.x : __z.__repr_.y);
312
+ }
313
+
314
+ template <size_t _Index>
315
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr const __half& get(const complex<__half>& __z) noexcept
316
+ {
317
+ return (_Index == 0) ? __z.__repr_.x : __z.__repr_.y;
318
+ }
319
+
320
+ template <size_t _Index>
321
+ static _LIBCUDACXX_HIDE_FROM_ABI constexpr const __half&& get(const complex<__half>&& __z) noexcept
322
+ {
323
+ return _CUDA_VSTD::move((_Index == 0) ? __z.__repr_.x : __z.__repr_.y);
324
+ }
325
+ };
326
+
327
+ # if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && !_CCCL_COMPILER(NVRTC)
328
+ template <class _CharT, class _Traits>
329
+ ::std::basic_istream<_CharT, _Traits>& operator>>(::std::basic_istream<_CharT, _Traits>& __is, complex<__half>& __x)
330
+ {
331
+ ::std::complex<float> __temp;
332
+ __is >> __temp;
333
+ __x = __temp;
334
+ return __is;
335
+ }
336
+
337
+ template <class _CharT, class _Traits>
338
+ ::std::basic_ostream<_CharT, _Traits>&
339
+ operator<<(::std::basic_ostream<_CharT, _Traits>& __os, const complex<__half>& __x)
340
+ {
341
+ return __os << complex<float>{__x};
342
+ }
343
+ # endif // !_LIBCUDACXX_HAS_NO_LOCALIZATION && !_CCCL_COMPILER(NVRTC)
344
+
345
+ _LIBCUDACXX_END_NAMESPACE_STD
346
+
347
+ #endif /// _LIBCUDACXX_HAS_NVFP16
348
+
349
+ #endif // _LIBCUDACXX___CUDA_COMPLEX_NVFP16_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__complex/vector_support.h ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // -*- C++ -*-
2
+ //===----------------------------------------------------------------------===//
3
+ //
4
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ // See https://llvm.org/LICENSE.txt for license information.
6
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
8
+ //
9
+ //===----------------------------------------------------------------------===//
10
+
11
+ #ifndef _LIBCUDACXX___COMPLEX_TRAITS_H
12
+ #define _LIBCUDACXX___COMPLEX_TRAITS_H
13
+
14
+ #include <cuda/std/detail/__config>
15
+
16
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
17
+ # pragma GCC system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
19
+ # pragma clang system_header
20
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
21
+ # pragma system_header
22
+ #endif // no system header
23
+
24
+ #include <cuda/std/__type_traits/enable_if.h>
25
+ #include <cuda/std/__type_traits/integral_constant.h>
26
+ #include <cuda/std/__type_traits/is_arithmetic.h>
27
+ #include <cuda/std/__type_traits/is_extended_floating_point.h>
28
+ #include <cuda/std/__type_traits/is_floating_point.h>
29
+ #include <cuda/std/__type_traits/void_t.h>
30
+ #include <cuda/std/__utility/declval.h>
31
+ #include <cuda/std/cstddef>
32
+
33
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
34
+
35
+ template <class _Tp>
36
+ struct __is_complex_float
37
+ {
38
+ static constexpr auto value = _CCCL_TRAIT(is_floating_point, _Tp) || _CCCL_TRAIT(__is_extended_floating_point, _Tp);
39
+ };
40
+
41
+ template <class _Tp>
42
+ struct __is_complex_arithmetic
43
+ {
44
+ static constexpr auto value = _CCCL_TRAIT(is_arithmetic, _Tp) || __is_complex_float<_Tp>::value;
45
+ };
46
+
47
+ template <class _Tp>
48
+ struct __complex_alignment : integral_constant<size_t, 2 * sizeof(_Tp)>
49
+ {};
50
+
51
+ #if _LIBCUDACXX_CUDA_ABI_VERSION > 3
52
+ # define _LIBCUDACXX_COMPLEX_ALIGNAS _CCCL_ALIGNAS(__complex_alignment<_Tp>::value)
53
+ #else
54
+ # define _LIBCUDACXX_COMPLEX_ALIGNAS
55
+ #endif
56
+
57
+ template <class _Tp>
58
+ struct __type_to_vector;
59
+
60
+ template <class _Tp>
61
+ using __type_to_vector_t = typename __type_to_vector<_Tp>::__type;
62
+
63
+ template <class _Tp, typename = void>
64
+ struct __has_vector_type : false_type
65
+ {};
66
+
67
+ template <class _Tp>
68
+ struct __has_vector_type<_Tp, void_t<__type_to_vector_t<_Tp>>> : true_type
69
+ {};
70
+
71
+ template <class _Tp>
72
+ struct __abcd_results
73
+ {
74
+ _Tp __ac;
75
+ _Tp __bd;
76
+ _Tp __ad;
77
+ _Tp __bc;
78
+ };
79
+
80
+ template <class _Tp>
81
+ struct __ab_results
82
+ {
83
+ _Tp __a;
84
+ _Tp __b;
85
+ };
86
+
87
+ template <class _Tp, typename = enable_if_t<!__has_vector_type<_Tp>::value>>
88
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __abcd_results<_Tp>
89
+ __complex_calculate_partials(_Tp __a, _Tp __b, _Tp __c, _Tp __d) noexcept
90
+ {
91
+ return {__a * __c, __b * __d, __a * __d, __b * __c};
92
+ }
93
+
94
+ template <class _Tp, typename = enable_if_t<!__has_vector_type<_Tp>::value>>
95
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __ab_results<_Tp>
96
+ __complex_piecewise_mul(_Tp __x1, _Tp __y1, _Tp __x2, _Tp __y2) noexcept
97
+ {
98
+ return {__x1 * __x2, __y1 * __y2};
99
+ }
100
+
101
+ template <class _Tp>
102
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 enable_if_t<__has_vector_type<_Tp>::value, __abcd_results<_Tp>>
103
+ __complex_calculate_partials(_Tp __a, _Tp __b, _Tp __c, _Tp __d) noexcept
104
+ {
105
+ __abcd_results<_Tp> __ret;
106
+
107
+ using _Vec = __type_to_vector_t<_Tp>;
108
+
109
+ _Vec __first{__a, __b};
110
+ _Vec __second{__c, __d};
111
+ _Vec __second_flip{__d, __c};
112
+
113
+ _Vec __ac_bd = __first * __second;
114
+ _Vec __ad_bc = __first * __second_flip;
115
+
116
+ __ret.__ac = __ac_bd.x;
117
+ __ret.__bd = __ac_bd.y;
118
+ __ret.__ad = __ad_bc.x;
119
+ __ret.__bc = __ad_bc.y;
120
+
121
+ return __ret;
122
+ }
123
+
124
+ template <class _Tp>
125
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 enable_if_t<__has_vector_type<_Tp>::value, __ab_results<_Tp>>
126
+ __complex_piecewise_mul(_Tp __x1, _Tp __y1, _Tp __x2, _Tp __y2) noexcept
127
+ {
128
+ __ab_results<_Tp> __ret;
129
+
130
+ using _Vec = __type_to_vector_t<_Tp>;
131
+
132
+ _Vec __v1{__x1, __y1};
133
+ _Vec __v2{__x2, __y2};
134
+
135
+ _Vec __result = __v1 * __v2;
136
+
137
+ __ret.__a = __result.x;
138
+ __ret.__b = __result.y;
139
+
140
+ return __ret;
141
+ }
142
+
143
+ _LIBCUDACXX_END_NAMESPACE_STD
144
+
145
+ #endif // _LIBCUDACXX___COMPLEX_TRAITS_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/add_const.h ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ template <class _Tp>
26
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT add_const
27
+ {
28
+ typedef _CCCL_NODEBUG_ALIAS const _Tp type;
29
+ };
30
+
31
+ template <class _Tp>
32
+ using add_const_t _CCCL_NODEBUG_ALIAS = typename add_const<_Tp>::type;
33
+
34
+ _LIBCUDACXX_END_NAMESPACE_STD
35
+
36
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/add_volatile.h ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ template <class _Tp>
26
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT add_volatile
27
+ {
28
+ typedef _CCCL_NODEBUG_ALIAS volatile _Tp type;
29
+ };
30
+
31
+ template <class _Tp>
32
+ using add_volatile_t _CCCL_NODEBUG_ALIAS = typename add_volatile<_Tp>::type;
33
+
34
+ _LIBCUDACXX_END_NAMESPACE_STD
35
+
36
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/aligned_storage.h ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H
10
+ #define _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H
11
+
12
+ #include <cuda/std/detail/__config>
13
+
14
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
15
+ # pragma GCC system_header
16
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
17
+ # pragma clang system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
19
+ # pragma system_header
20
+ #endif // no system header
21
+
22
+ #include <cuda/std/__type_traits/conditional.h>
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/nat.h>
25
+ #include <cuda/std/__type_traits/type_list.h>
26
+ #include <cuda/std/cstddef>
27
+
28
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
29
+
30
+ template <class _Tp>
31
+ struct __align_type
32
+ {
33
+ static const size_t value = _LIBCUDACXX_PREFERRED_ALIGNOF(_Tp);
34
+ typedef _Tp type;
35
+ };
36
+
37
+ struct __struct_double
38
+ {
39
+ long double __lx;
40
+ };
41
+ struct __struct_double4
42
+ {
43
+ double __lx[4];
44
+ };
45
+
46
+ typedef __type_list<__align_type<unsigned char>,
47
+ __align_type<unsigned short>,
48
+ __align_type<unsigned int>,
49
+ __align_type<unsigned long>,
50
+ __align_type<unsigned long long>,
51
+ __align_type<double>,
52
+ __align_type<long double>,
53
+ __align_type<__struct_double>,
54
+ __align_type<__struct_double4>,
55
+ __align_type<int*>>
56
+ __all_types;
57
+
58
+ template <size_t _Align>
59
+ struct _CCCL_ALIGNAS(_Align) __fallback_overaligned
60
+ {
61
+ static const size_t value = _Align;
62
+ using type = __fallback_overaligned;
63
+ };
64
+
65
+ template <size_t _Align>
66
+ struct __has_align
67
+ {
68
+ template <class _Ty>
69
+ using __call = bool_constant<_Align == _Ty::value>;
70
+ };
71
+
72
+ template <class _TL, size_t _Align>
73
+ struct __find_pod
74
+ : public __type_front<__type_find_if<__type_push_back<_TL, __fallback_overaligned<_Align>>, __has_align<_Align>>>
75
+ {};
76
+
77
+ _CCCL_HOST_DEVICE constexpr size_t __select_align_fn_2_(size_t __len, size_t __min, size_t __max)
78
+ {
79
+ return __len < __max ? __min : __max;
80
+ }
81
+
82
+ _CCCL_HOST_DEVICE constexpr size_t __select_align_fn_(size_t __len, size_t __a1, size_t __a2)
83
+ {
84
+ return __select_align_fn_2_(__len, __a2 < __a1 ? __a2 : __a1, __a1 < __a2 ? __a2 : __a1);
85
+ }
86
+
87
+ template <size_t _Len>
88
+ struct __select_align_fn
89
+ {
90
+ template <class _State, class _Ty>
91
+ using __call = integral_constant<size_t, __select_align_fn_(_Len, _State::value, _Ty::value)>;
92
+ };
93
+
94
+ template <class _TL, size_t _Len>
95
+ struct __find_max_align : public __type_fold_left<_TL, integral_constant<size_t, 0>, __select_align_fn<_Len>>
96
+ {};
97
+
98
+ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
99
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT aligned_storage
100
+ {
101
+ typedef typename __find_pod<__all_types, _Align>::type _Aligner;
102
+ union type
103
+ {
104
+ _Aligner __align;
105
+ unsigned char __data[(_Len + _Align - 1) / _Align * _Align];
106
+ };
107
+ };
108
+
109
+ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
110
+ using aligned_storage_t _CCCL_NODEBUG_ALIAS = typename aligned_storage<_Len, _Align>::type;
111
+
112
+ #define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
113
+ template <size_t _Len> \
114
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT aligned_storage<_Len, n> \
115
+ { \
116
+ struct _CCCL_ALIGNAS(n) type \
117
+ { \
118
+ unsigned char __lx[(_Len + n - 1) / n * n]; \
119
+ }; \
120
+ }
121
+
122
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1);
123
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2);
124
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4);
125
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x8);
126
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x10);
127
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x20);
128
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x40);
129
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x80);
130
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x100);
131
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x200);
132
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x400);
133
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
134
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
135
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
136
+ // PE/COFF does not support alignment beyond 8192 (=0x2000)
137
+ #if !defined(_WIN32)
138
+ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
139
+ #endif // !defined(_WIN32)
140
+
141
+ #undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
142
+
143
+ _LIBCUDACXX_END_NAMESPACE_STD
144
+
145
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/alignment_of.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/cstddef>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ template <class _Tp>
29
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT alignment_of : public integral_constant<size_t, _LIBCUDACXX_ALIGNOF(_Tp)>
30
+ {};
31
+
32
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
33
+ template <class _Tp>
34
+ _CCCL_INLINE_VAR constexpr size_t alignment_of_v = _LIBCUDACXX_ALIGNOF(_Tp);
35
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
36
+
37
+ _LIBCUDACXX_END_NAMESPACE_STD
38
+
39
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/common_reference.h ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ // SPDX-FileCopyrightText: Copyright (c) Microsoft Corporation.
8
+ //
9
+ //===----------------------------------------------------------------------===//
10
+
11
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H
12
+ #define _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H
13
+
14
+ #include <cuda/std/detail/__config>
15
+
16
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
17
+ # pragma GCC system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
19
+ # pragma clang system_header
20
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
21
+ # pragma system_header
22
+ #endif // no system header
23
+
24
+ #include <cuda/std/__type_traits/common_type.h>
25
+ #include <cuda/std/__type_traits/conditional.h>
26
+ #include <cuda/std/__type_traits/copy_cv.h>
27
+ #include <cuda/std/__type_traits/copy_cvref.h>
28
+ #include <cuda/std/__type_traits/disjunction.h>
29
+ #include <cuda/std/__type_traits/enable_if.h>
30
+ #include <cuda/std/__type_traits/is_array.h>
31
+ #include <cuda/std/__type_traits/is_convertible.h>
32
+ #include <cuda/std/__type_traits/is_reference.h>
33
+ #include <cuda/std/__type_traits/is_same.h>
34
+ #include <cuda/std/__type_traits/is_scalar.h>
35
+ #include <cuda/std/__type_traits/remove_cvref.h>
36
+ #include <cuda/std/__type_traits/remove_reference.h>
37
+ #include <cuda/std/__type_traits/void_t.h>
38
+ #include <cuda/std/__utility/declval.h>
39
+
40
+ _CCCL_NV_DIAG_SUPPRESS(1384) // warning: pointer converted to bool
41
+
42
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
43
+
44
+ // common_reference
45
+
46
+ // Let COND_RES(X, Y) be:
47
+ #if _CCCL_COMPILER(MSVC) // Workaround for DevCom-1627396
48
+ template <class _Tp>
49
+ _Tp __returns_exactly() noexcept; // not defined
50
+
51
+ template <class _Xp, class _Yp>
52
+ using __cond_res_if_right = decltype(false ? __returns_exactly<_Xp>() : __returns_exactly<_Yp>());
53
+
54
+ template <class _Tp, class _Up, class = void>
55
+ struct __cond_res_workaround
56
+ {};
57
+
58
+ template <class _Tp, class _Up>
59
+ struct __cond_res_workaround<_Tp, _Up, void_t<__cond_res_if_right<_Tp, _Up>>>
60
+ {
61
+ using _RTp = remove_cvref_t<_Tp>;
62
+ using type =
63
+ conditional_t<is_same_v<_RTp, remove_cvref_t<_Up>> && (is_scalar_v<_RTp> || is_array_v<_RTp>)
64
+ && ((is_lvalue_reference_v<_Tp> && is_rvalue_reference_v<_Up>)
65
+ || (is_rvalue_reference_v<_Tp> && is_lvalue_reference_v<_Up>) ),
66
+ decay_t<__copy_cv_t<remove_reference_t<_Tp>, remove_reference_t<_Up>>>,
67
+ __cond_res_if_right<_Tp, _Up>>;
68
+ };
69
+
70
+ template <class _Xp, class _Yp>
71
+ using __cond_res = typename __cond_res_workaround<_Xp, _Yp>::type;
72
+ #else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
73
+ template <class _Xp, class _Yp>
74
+ using __cond_res = decltype(false ? _CUDA_VSTD::declval<_Xp (&)()>()() : _CUDA_VSTD::declval<_Yp (&)()>()());
75
+ #endif // !_CCCL_COMPILER(MSVC)
76
+
77
+ // Let `XREF(A)` denote a unary alias template `T` such that `T<U>` denotes the same type as `U`
78
+ // with the addition of `A`'s cv and reference qualifiers, for a non-reference cv-unqualified type
79
+ // `U`.
80
+ // [Note: `XREF(A)` is `__xref<A>::template __call`]
81
+ template <class _Tp>
82
+ using __xref = __apply_cvref_fn<_Tp>;
83
+
84
+ // Given types A and B, let X be remove_reference_t<A>, let Y be remove_reference_t<B>,
85
+ // and let COMMON-REF(A, B) be:
86
+ template <class _Ap, class _Bp, class = void>
87
+ struct __common_ref;
88
+
89
+ template <class _Xp, class _Yp>
90
+ using __common_ref_t _CCCL_NODEBUG_ALIAS = typename __common_ref<_Xp, _Yp>::__type;
91
+
92
+ template <class _Xp, class _Yp>
93
+ using __cv_cond_res = __cond_res<__copy_cv_t<_Xp, _Yp>&, __copy_cv_t<_Yp, _Xp>&>;
94
+
95
+ // If A and B are both lvalue reference types, COMMON-REF(A, B) is
96
+ // COND-RES(COPYCV(X, Y)&, COPYCV(Y, X)&) if that type exists and is a reference type.
97
+ template <class _Ap, class _Bp>
98
+ struct __common_ref<_Ap&, _Bp&, enable_if_t<_CCCL_TRAIT(is_reference, __cv_cond_res<_Ap, _Bp>)>>
99
+ {
100
+ using __type = __cv_cond_res<_Ap, _Bp>;
101
+ };
102
+
103
+ // Otherwise, let C be remove_reference_t<COMMON-REF(X&, Y&)>&&. ...
104
+ template <class _Xp, class _Yp>
105
+ using __common_ref_C = remove_reference_t<__common_ref_t<_Xp&, _Yp&>>&&;
106
+
107
+ // .... If A and B are both rvalue reference types, C is well-formed, and
108
+ // is_convertible_v<A, C> && is_convertible_v<B, C> is true, then COMMON-REF(A, B) is C.
109
+ template <class _Ap, class _Bp, class = void>
110
+ struct __common_ref_rr
111
+ {};
112
+
113
+ template <class _Ap, class _Bp>
114
+ struct __common_ref_rr<_Ap&&,
115
+ _Bp&&,
116
+ enable_if_t<_CCCL_TRAIT(is_convertible, _Ap&&, __common_ref_C<_Ap, _Bp>)
117
+ && _CCCL_TRAIT(is_convertible, _Bp&&, __common_ref_C<_Ap, _Bp>)>>
118
+ {
119
+ using __type = __common_ref_C<_Ap, _Bp>;
120
+ };
121
+
122
+ template <class _Ap, class _Bp>
123
+ struct __common_ref<_Ap&&, _Bp&&> : __common_ref_rr<_Ap&&, _Bp&&>
124
+ {};
125
+
126
+ // Otherwise, let D be COMMON-REF(const X&, Y&). ...
127
+ template <class _Tp, class _Up>
128
+ using __common_ref_D = __common_ref_t<const _Tp&, _Up&>;
129
+
130
+ // ... If A is an rvalue reference and B is an lvalue reference and D is well-formed and
131
+ // is_convertible_v<A, D> is true, then COMMON-REF(A, B) is D.
132
+ template <class _Ap, class _Bp, class = void>
133
+ struct __common_ref_lr
134
+ {};
135
+
136
+ template <class _Ap, class _Bp>
137
+ struct __common_ref_lr<_Ap&&, _Bp&, enable_if_t<_CCCL_TRAIT(is_convertible, _Ap&&, __common_ref_D<_Ap, _Bp>)>>
138
+ {
139
+ using __type = __common_ref_D<_Ap, _Bp>;
140
+ };
141
+
142
+ template <class _Ap, class _Bp>
143
+ struct __common_ref<_Ap&&, _Bp&> : __common_ref_lr<_Ap&&, _Bp&>
144
+ {};
145
+
146
+ // Otherwise, if A is an lvalue reference and B is an rvalue reference, then
147
+ // COMMON-REF(A, B) is COMMON-REF(B, A).
148
+ template <class _Ap, class _Bp>
149
+ struct __common_ref<_Ap&, _Bp&&> : __common_ref_lr<_Bp&&, _Ap&>
150
+ {};
151
+
152
+ // Otherwise, COMMON-REF(A, B) is ill-formed.
153
+ template <class _Ap, class _Bp, class>
154
+ struct __common_ref
155
+ {};
156
+
157
+ // Note C: For the common_reference trait applied to a parameter pack [...]
158
+
159
+ template <class...>
160
+ struct common_reference;
161
+
162
+ template <class... _Types>
163
+ using common_reference_t _CCCL_NODEBUG_ALIAS = typename common_reference<_Types...>::type;
164
+
165
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
166
+ template <class, class, class = void>
167
+ _CCCL_INLINE_VAR constexpr bool __has_common_reference = false;
168
+
169
+ template <class _Tp, class _Up>
170
+ _CCCL_INLINE_VAR constexpr bool __has_common_reference<_Tp, _Up, void_t<common_reference_t<_Tp, _Up>>> = true;
171
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
172
+
173
+ // bullet 1 - sizeof...(T) == 0
174
+ template <>
175
+ struct common_reference<>
176
+ {};
177
+
178
+ // bullet 2 - sizeof...(T) == 1
179
+ template <class _Tp>
180
+ struct common_reference<_Tp>
181
+ {
182
+ using type = _Tp;
183
+ };
184
+
185
+ // bullet 3 - sizeof...(T) == 2
186
+ template <class _Tp, class _Up, class = void>
187
+ struct __common_reference_sub_bullet3;
188
+ template <class _Tp, class _Up, class = void>
189
+ struct __common_reference_sub_bullet2 : __common_reference_sub_bullet3<_Tp, _Up>
190
+ {};
191
+ template <class _Tp, class _Up, class = void>
192
+ struct __common_reference_sub_bullet1 : __common_reference_sub_bullet2<_Tp, _Up>
193
+ {};
194
+
195
+ // sub-bullet 1 - If T1 and T2 are reference types and COMMON-REF(T1, T2) is well-formed, then
196
+ // the member typedef `type` denotes that type.
197
+ template <class _Tp, class _Up>
198
+ struct common_reference<_Tp, _Up> : __common_reference_sub_bullet1<_Tp, _Up>
199
+ {};
200
+
201
+ template <class _Tp, class _Up>
202
+ struct __common_reference_sub_bullet1<
203
+ _Tp,
204
+ _Up,
205
+ void_t<__common_ref_t<_Tp, _Up>, enable_if_t<_CCCL_TRAIT(is_reference, _Tp) && _CCCL_TRAIT(is_reference, _Up)>>>
206
+ {
207
+ using type = __common_ref_t<_Tp, _Up>;
208
+ };
209
+
210
+ // sub-bullet 2 - Otherwise, if basic_common_reference<remove_cvref_t<T1>, remove_cvref_t<T2>, XREF(T1), XREF(T2)>::type
211
+ // is well-formed, then the member typedef `type` denotes that type.
212
+ template <class, class, template <class> class, template <class> class>
213
+ struct basic_common_reference
214
+ {};
215
+
216
+ template <class _Tp, class _Up>
217
+ using __basic_common_reference_t _CCCL_NODEBUG_ALIAS =
218
+ typename basic_common_reference<remove_cvref_t<_Tp>,
219
+ remove_cvref_t<_Up>,
220
+ __xref<_Tp>::template __call,
221
+ __xref<_Up>::template __call>::type;
222
+
223
+ template <class _Tp, class _Up>
224
+ struct __common_reference_sub_bullet2<_Tp, _Up, void_t<__basic_common_reference_t<_Tp, _Up>>>
225
+ {
226
+ using type = __basic_common_reference_t<_Tp, _Up>;
227
+ };
228
+
229
+ // sub-bullet 3 - Otherwise, if COND-RES(T1, T2) is well-formed,
230
+ // then the member typedef `type` denotes that type.
231
+ template <class _Tp, class _Up>
232
+ struct __common_reference_sub_bullet3<_Tp, _Up, void_t<__cond_res<_Tp, _Up>>>
233
+ {
234
+ using type = __cond_res<_Tp, _Up>;
235
+ };
236
+
237
+ // sub-bullet 4 & 5 - Otherwise, if common_type_t<T1, T2> is well-formed,
238
+ // then the member typedef `type` denotes that type.
239
+ // - Otherwise, there shall be no member `type`.
240
+ template <class _Tp, class _Up, class>
241
+ struct __common_reference_sub_bullet3 : common_type<_Tp, _Up>
242
+ {};
243
+
244
+ // bullet 4 - If there is such a type `C`, the member typedef type shall denote the same type, if
245
+ // any, as `common_reference_t<C, Rest...>`.
246
+ template <class _Tp, class _Up, class _Vp, class... _Rest>
247
+ struct common_reference<_Tp, _Up, _Vp, void_t<common_reference_t<_Tp, _Up>>, _Rest...>
248
+ : common_reference<common_reference_t<_Tp, _Up>, _Vp, _Rest...>
249
+ {};
250
+
251
+ // bullet 5 - Otherwise, there shall be no member `type`.
252
+ template <class...>
253
+ struct common_reference
254
+ {};
255
+
256
+ _LIBCUDACXX_END_NAMESPACE_STD
257
+
258
+ _CCCL_NV_DIAG_DEFAULT(1384)
259
+
260
+ #endif // _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/common_type.h ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/copy_cvref.h>
24
+ #include <cuda/std/__type_traits/decay.h>
25
+ #include <cuda/std/__type_traits/enable_if.h>
26
+ #include <cuda/std/__type_traits/is_arithmetic.h>
27
+ #include <cuda/std/__type_traits/is_extended_floating_point.h>
28
+ #include <cuda/std/__type_traits/is_same.h>
29
+ #include <cuda/std/__type_traits/remove_cvref.h>
30
+ #include <cuda/std/__type_traits/void_t.h>
31
+ #include <cuda/std/__utility/declval.h>
32
+
33
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
34
+
35
+ template <class... _Tp>
36
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT common_type;
37
+
38
+ template <class... _Tp>
39
+ using common_type_t _CCCL_NODEBUG_ALIAS = typename common_type<_Tp...>::type;
40
+
41
+ // Let COND_RES(X, Y) be:
42
+ template <class _Tp, class _Up>
43
+ using __cond_type = decltype(false ? declval<_Tp>() : declval<_Up>());
44
+
45
+ // We need to ensure that extended floating point types like __half and __nv bfloat16 have a common type with real
46
+ // floating point types
47
+ template <class _Tp, class _Up, class = void>
48
+ struct __common_type_extended_floating_point
49
+ {};
50
+
51
+ #if !defined(__CUDA_NO_HALF_CONVERSIONS__) && !defined(__CUDA_NO_HALF_OPERATORS__) \
52
+ && !defined(__CUDA_NO_BFLOAT16_CONVERSIONS__) && !defined(__CUDA_NO_BFLOAT16_OPERATORS__)
53
+ template <class _Tp, class _Up>
54
+ struct __common_type_extended_floating_point<_Tp,
55
+ _Up,
56
+ enable_if_t<_CCCL_TRAIT(__is_extended_floating_point, remove_cvref_t<_Tp>)
57
+ && _CCCL_TRAIT(is_arithmetic, remove_cvref_t<_Up>)>>
58
+ {
59
+ using type = common_type_t<__copy_cvref_t<_Tp, float>, _Up>;
60
+ };
61
+
62
+ template <class _Tp, class _Up>
63
+ struct __common_type_extended_floating_point<
64
+ _Tp,
65
+ _Up,
66
+ enable_if_t<_CCCL_TRAIT(is_arithmetic, remove_cvref_t<_Tp>)
67
+ && _CCCL_TRAIT(__is_extended_floating_point, remove_cvref_t<_Up>)>>
68
+ {
69
+ using type = common_type_t<_Tp, __copy_cvref_t<_Up, float>>;
70
+ };
71
+ #endif // extended floating point as arithmetic type
72
+
73
+ template <class _Tp, class _Up, class = void>
74
+ struct __common_type3 : __common_type_extended_floating_point<_Tp, _Up>
75
+ {};
76
+
77
+ #if _CCCL_STD_VER >= 2020
78
+ // sub-bullet 4 - "if COND_RES(CREF(D1), CREF(D2)) denotes a type..."
79
+ template <class _Tp, class _Up>
80
+ struct __common_type3<_Tp, _Up, void_t<__cond_type<const _Tp&, const _Up&>>>
81
+ {
82
+ using type = remove_cvref_t<__cond_type<const _Tp&, const _Up&>>;
83
+ };
84
+ #endif // _CCCL_STD_VER >= 2020
85
+
86
+ template <class _Tp, class _Up, class = void>
87
+ struct __common_type2_imp : __common_type3<_Tp, _Up>
88
+ {};
89
+
90
+ // MSVC has a bug in its declval handling, where it happily accepts __cond_type<_Tp, _Up>, even though both
91
+ // branches have diverging return types, this happens for extended floating point types
92
+ template <class _Tp, class _Up>
93
+ using __msvc_declval_workaround =
94
+ #if _CCCL_COMPILER(MSVC)
95
+ enable_if_t<_CCCL_TRAIT(is_same, __cond_type<_Tp, _Up>, __cond_type<_Up, _Tp>)>;
96
+ #else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
97
+ void;
98
+ #endif // !_CCCL_COMPILER(MSVC)
99
+
100
+ // sub-bullet 3 - "if decay_t<decltype(false ? declval<D1>() : declval<D2>())> ..."
101
+ template <class _Tp, class _Up>
102
+ struct __common_type2_imp<_Tp, _Up, void_t<__cond_type<_Tp, _Up>, __msvc_declval_workaround<_Tp, _Up>>>
103
+ {
104
+ typedef _CCCL_NODEBUG_ALIAS decay_t<__cond_type<_Tp, _Up>> type;
105
+ };
106
+
107
+ template <class, class = void>
108
+ struct __common_type_impl
109
+ {};
110
+
111
+ template <class... _Tp>
112
+ struct __common_types;
113
+
114
+ template <class _Tp, class _Up>
115
+ struct __common_type_impl<__common_types<_Tp, _Up>, void_t<common_type_t<_Tp, _Up>>>
116
+ {
117
+ typedef common_type_t<_Tp, _Up> type;
118
+ };
119
+
120
+ template <class _Tp, class _Up, class _Vp, class... _Rest>
121
+ struct __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...>, void_t<common_type_t<_Tp, _Up>>>
122
+ : __common_type_impl<__common_types<common_type_t<_Tp, _Up>, _Vp, _Rest...>>
123
+ {};
124
+
125
+ // bullet 1 - sizeof...(Tp) == 0
126
+
127
+ template <>
128
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT common_type<>
129
+ {};
130
+
131
+ // bullet 2 - sizeof...(Tp) == 1
132
+
133
+ template <class _Tp>
134
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT common_type<_Tp> : public common_type<_Tp, _Tp>
135
+ {};
136
+
137
+ // bullet 3 - sizeof...(Tp) == 2
138
+
139
+ // sub-bullet 1 - "If is_same_v<T1, D1> is false or ..."
140
+ template <class _Tp, class _Up, class _D1 = decay_t<_Tp>, class _D2 = decay_t<_Up>>
141
+ struct __common_type2 : common_type<_D1, _D2>
142
+ {};
143
+
144
+ template <class _Tp, class _Up>
145
+ struct __common_type2<_Tp, _Up, _Tp, _Up> : __common_type2_imp<_Tp, _Up>
146
+ {};
147
+
148
+ template <class _Tp, class _Up>
149
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT common_type<_Tp, _Up> : __common_type2<_Tp, _Up>
150
+ {};
151
+
152
+ // bullet 4 - sizeof...(Tp) > 2
153
+
154
+ template <class _Tp, class _Up, class _Vp, class... _Rest>
155
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT common_type<_Tp, _Up, _Vp, _Rest...>
156
+ : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...>>
157
+ {};
158
+
159
+ template <class... _Tp>
160
+ using common_type_t _CCCL_NODEBUG_ALIAS = typename common_type<_Tp...>::type;
161
+
162
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
163
+ template <class, class, class = void>
164
+ _CCCL_INLINE_VAR constexpr bool __has_common_type = false;
165
+
166
+ template <class _Tp, class _Up>
167
+ _CCCL_INLINE_VAR constexpr bool __has_common_type<_Tp, _Up, void_t<common_type_t<_Tp, _Up>>> = true;
168
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
169
+
170
+ _LIBCUDACXX_END_NAMESPACE_STD
171
+
172
+ #endif // _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/conjunction.h ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/conditional.h>
24
+ #include <cuda/std/__type_traits/enable_if.h>
25
+ #include <cuda/std/__type_traits/integral_constant.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ template <class...>
30
+ using __expand_to_true = true_type;
31
+
32
+ template <class... _Pred>
33
+ _CCCL_HOST_DEVICE __expand_to_true<enable_if_t<_Pred::value>...> __and_helper(int);
34
+
35
+ template <class...>
36
+ _CCCL_HOST_DEVICE false_type __and_helper(...);
37
+
38
+ // _And always performs lazy evaluation of its arguments.
39
+ //
40
+ // However, `_And<_Pred...>` itself will evaluate its result immediately (without having to
41
+ // be instantiated) since it is an alias, unlike `conjunction<_Pred...>`, which is a struct.
42
+ // If you want to defer the evaluation of `_And<_Pred...>` itself, use `_Lazy<_And, _Pred...>`.
43
+ template <class... _Pred>
44
+ using _And _CCCL_NODEBUG_ALIAS = decltype(__and_helper<_Pred...>(0));
45
+
46
+ template <class...>
47
+ struct conjunction : true_type
48
+ {};
49
+
50
+ template <class _Arg>
51
+ struct conjunction<_Arg> : _Arg
52
+ {};
53
+
54
+ template <class _Arg, class... _Args>
55
+ struct conjunction<_Arg, _Args...> : _If<!bool(_Arg::value), _Arg, conjunction<_Args...>>
56
+ {};
57
+
58
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
59
+ template <class... _Args>
60
+ _CCCL_INLINE_VAR constexpr bool conjunction_v = conjunction<_Args...>::value;
61
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
62
+
63
+ _LIBCUDACXX_END_NAMESPACE_STD
64
+
65
+ #endif // _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/copy_cv.h ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/copy_cvref.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ // Let COPYCV(FROM, TO) be an alias for type TO with the addition of FROM's
28
+ // top-level cv-qualifiers.
29
+ #ifndef _CCCL_NO_VARIABLE_TEMPLATES
30
+ template <class>
31
+ extern __apply_cvref_ __apply_cv;
32
+ template <class _Tp>
33
+ extern __apply_cvref_c __apply_cv<const _Tp>;
34
+ template <class _Tp>
35
+ extern __apply_cvref_v __apply_cv<volatile _Tp>;
36
+ template <class _Tp>
37
+ extern __apply_cvref_cv __apply_cv<const volatile _Tp>;
38
+
39
+ template <class _Tp>
40
+ using __apply_cv_fn = decltype(__apply_cv<_Tp>);
41
+ #else // ^^^ !_CCCL_NO_VARIABLE_TEMPLATES / _CCCL_NO_VARIABLE_TEMPLATES vvv
42
+ template <class>
43
+ struct __apply_cv
44
+ {
45
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_;
46
+ };
47
+ template <class _Tp>
48
+ struct __apply_cv<const _Tp>
49
+ {
50
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_c;
51
+ };
52
+ template <class _Tp>
53
+ struct __apply_cv<volatile _Tp>
54
+ {
55
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_v;
56
+ };
57
+ template <class _Tp>
58
+ struct __apply_cv<const volatile _Tp>
59
+ {
60
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_cv;
61
+ };
62
+
63
+ template <class _Tp>
64
+ using __apply_cv_fn _CCCL_NODEBUG_ALIAS = typename __apply_cv<_Tp>::type;
65
+ #endif // _CCCL_NO_VARIABLE_TEMPLATES
66
+
67
+ template <class _From, class _To>
68
+ using __copy_cv_t = typename __apply_cv_fn<_From>::template __call<_To>;
69
+
70
+ _LIBCUDACXX_END_NAMESPACE_STD
71
+
72
+ #endif // _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/copy_cvref.h ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_lvalue_reference.h>
24
+ #include <cuda/std/__type_traits/add_rvalue_reference.h>
25
+
26
+ #if _CCCL_COMPILER(GCC, <, 7)
27
+ # define _CCCL_ADD_LVALUE_REFERENCE_WAR(_Tp) add_lvalue_reference_t<_Tp>
28
+ # define _CCCL_ADD_RVALUE_REFERENCE_WAR(_Tp) add_rvalue_reference_t<_Tp>
29
+ #else
30
+ # define _CCCL_ADD_LVALUE_REFERENCE_WAR(_Tp) _Tp&
31
+ # define _CCCL_ADD_RVALUE_REFERENCE_WAR(_Tp) _Tp&&
32
+ #endif
33
+
34
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
35
+
36
+ struct __apply_cvref_
37
+ {
38
+ template <class _Tp>
39
+ using __call _CCCL_NODEBUG_ALIAS = _Tp;
40
+ };
41
+
42
+ struct __apply_cvref_c
43
+ {
44
+ template <class _Tp>
45
+ using __call _CCCL_NODEBUG_ALIAS = const _Tp;
46
+ };
47
+
48
+ struct __apply_cvref_v
49
+ {
50
+ template <class _Tp>
51
+ using __call _CCCL_NODEBUG_ALIAS = volatile _Tp;
52
+ };
53
+
54
+ struct __apply_cvref_cv
55
+ {
56
+ template <class _Tp>
57
+ using __call _CCCL_NODEBUG_ALIAS = const volatile _Tp;
58
+ };
59
+
60
+ struct __apply_cvref_lr
61
+ {
62
+ template <class _Tp>
63
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_LVALUE_REFERENCE_WAR(_Tp);
64
+ };
65
+
66
+ struct __apply_cvref_clr
67
+ {
68
+ template <class _Tp>
69
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_LVALUE_REFERENCE_WAR(const _Tp);
70
+ };
71
+
72
+ struct __apply_cvref_vlr
73
+ {
74
+ template <class _Tp>
75
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_LVALUE_REFERENCE_WAR(volatile _Tp);
76
+ };
77
+
78
+ struct __apply_cvref_cvlr
79
+ {
80
+ template <class _Tp>
81
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_LVALUE_REFERENCE_WAR(const volatile _Tp);
82
+ };
83
+
84
+ struct __apply_cvref_rr
85
+ {
86
+ template <class _Tp>
87
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_RVALUE_REFERENCE_WAR(_Tp);
88
+ };
89
+
90
+ struct __apply_cvref_crr
91
+ {
92
+ template <class _Tp>
93
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_RVALUE_REFERENCE_WAR(const _Tp);
94
+ };
95
+
96
+ struct __apply_cvref_vrr
97
+ {
98
+ template <class _Tp>
99
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_RVALUE_REFERENCE_WAR(volatile _Tp);
100
+ };
101
+
102
+ struct __apply_cvref_cvrr
103
+ {
104
+ template <class _Tp>
105
+ using __call _CCCL_NODEBUG_ALIAS = _CCCL_ADD_RVALUE_REFERENCE_WAR(const volatile _Tp);
106
+ };
107
+
108
+ #ifndef _CCCL_NO_VARIABLE_TEMPLATES
109
+ template <class>
110
+ extern __apply_cvref_ __apply_cvref;
111
+ template <class _Tp>
112
+ extern __apply_cvref_c __apply_cvref<const _Tp>;
113
+ template <class _Tp>
114
+ extern __apply_cvref_v __apply_cvref<volatile _Tp>;
115
+ template <class _Tp>
116
+ extern __apply_cvref_cv __apply_cvref<const volatile _Tp>;
117
+ template <class _Tp>
118
+ extern __apply_cvref_lr __apply_cvref<_Tp&>;
119
+ template <class _Tp>
120
+ extern __apply_cvref_clr __apply_cvref<const _Tp&>;
121
+ template <class _Tp>
122
+ extern __apply_cvref_vlr __apply_cvref<volatile _Tp&>;
123
+ template <class _Tp>
124
+ extern __apply_cvref_cvlr __apply_cvref<const volatile _Tp&>;
125
+ template <class _Tp>
126
+ extern __apply_cvref_rr __apply_cvref<_Tp&&>;
127
+ template <class _Tp>
128
+ extern __apply_cvref_crr __apply_cvref<const _Tp&&>;
129
+ template <class _Tp>
130
+ extern __apply_cvref_vrr __apply_cvref<volatile _Tp&&>;
131
+ template <class _Tp>
132
+ extern __apply_cvref_cvrr __apply_cvref<const volatile _Tp&&>;
133
+
134
+ template <class _Tp>
135
+ using __apply_cvref_fn = decltype(__apply_cvref<_Tp>);
136
+ #else // ^^^ !_CCCL_NO_VARIABLE_TEMPLATES / _CCCL_NO_VARIABLE_TEMPLATES vvv
137
+ template <class>
138
+ struct __apply_cvref
139
+ {
140
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_;
141
+ };
142
+ template <class _Tp>
143
+ struct __apply_cvref<const _Tp>
144
+ {
145
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_c;
146
+ };
147
+ template <class _Tp>
148
+ struct __apply_cvref<volatile _Tp>
149
+ {
150
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_v;
151
+ };
152
+ template <class _Tp>
153
+ struct __apply_cvref<const volatile _Tp>
154
+ {
155
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_cv;
156
+ };
157
+ template <class _Tp>
158
+ struct __apply_cvref<_Tp&>
159
+ {
160
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_lr;
161
+ };
162
+ template <class _Tp>
163
+ struct __apply_cvref<const _Tp&>
164
+ {
165
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_clr;
166
+ };
167
+ template <class _Tp>
168
+ struct __apply_cvref<volatile _Tp&>
169
+ {
170
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_vlr;
171
+ };
172
+ template <class _Tp>
173
+ struct __apply_cvref<const volatile _Tp&>
174
+ {
175
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_cvlr;
176
+ };
177
+ template <class _Tp>
178
+ struct __apply_cvref<_Tp&&>
179
+ {
180
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_rr;
181
+ };
182
+ template <class _Tp>
183
+ struct __apply_cvref<const _Tp&&>
184
+ {
185
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_crr;
186
+ };
187
+ template <class _Tp>
188
+ struct __apply_cvref<volatile _Tp&&>
189
+ {
190
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_vrr;
191
+ };
192
+ template <class _Tp>
193
+ struct __apply_cvref<const volatile _Tp&&>
194
+ {
195
+ using type _CCCL_NODEBUG_ALIAS = __apply_cvref_cvrr;
196
+ };
197
+
198
+ template <class _Tp>
199
+ using __apply_cvref_fn _CCCL_NODEBUG_ALIAS = typename __apply_cvref<_Tp>::type;
200
+ #endif // _CCCL_NO_VARIABLE_TEMPLATES
201
+
202
+ template <class _From, class _To>
203
+ using __copy_cvref_t = typename __apply_cvref_fn<_From>::template __call<_To>;
204
+
205
+ _LIBCUDACXX_END_NAMESPACE_STD
206
+
207
+ #undef _CCCL_ADD_RVALUE_REFERENCE_WAR
208
+ #undef _CCCL_ADD_LVALUE_REFERENCE_WAR
209
+
210
+ #endif // _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/dependent_type.h ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_DEPENDENT_TYPE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_DEPENDENT_TYPE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ template <class _Tp, bool>
26
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT __dependent_type : public _Tp
27
+ {};
28
+
29
+ _LIBCUDACXX_END_NAMESPACE_STD
30
+
31
+ #endif // _LIBCUDACXX___TYPE_TRAITS_DEPENDENT_TYPE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/disjunction.h ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ template <bool>
28
+ struct _OrImpl;
29
+
30
+ template <>
31
+ struct _OrImpl<true>
32
+ {
33
+ template <class _Res, class _First, class... _Rest>
34
+ using _Result _CCCL_NODEBUG_ALIAS =
35
+ typename _OrImpl<!bool(_First::value) && sizeof...(_Rest) != 0>::template _Result<_First, _Rest...>;
36
+ };
37
+
38
+ template <>
39
+ struct _OrImpl<false>
40
+ {
41
+ template <class _Res, class...>
42
+ using _Result = _Res;
43
+ };
44
+
45
+ // _Or always performs lazy evaluation of its arguments.
46
+ //
47
+ // However, `_Or<_Pred...>` itself will evaluate its result immediately (without having to
48
+ // be instantiated) since it is an alias, unlike `disjunction<_Pred...>`, which is a struct.
49
+ // If you want to defer the evaluation of `_Or<_Pred...>` itself, use `_Lazy<_Or, _Pred...>`
50
+ // or `disjunction<_Pred...>` directly.
51
+ template <class... _Args>
52
+ using _Or _CCCL_NODEBUG_ALIAS = typename _OrImpl<sizeof...(_Args) != 0>::template _Result<false_type, _Args...>;
53
+
54
+ #if _CCCL_COMPILER(MSVC)
55
+ template <class... _Args>
56
+ struct disjunction : false_type
57
+ {};
58
+
59
+ template <class _First, class... _Rest>
60
+ struct disjunction<_First, _Rest...> : _OrImpl<true>::template _Result<false_type, _First, _Rest...>
61
+ {};
62
+ #else
63
+ template <class... _Args>
64
+ struct disjunction : _Or<_Args...>
65
+ {};
66
+ #endif // !_CCCL_COMPILER(MSVC)
67
+
68
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
69
+ template <class... _Args>
70
+ _CCCL_INLINE_VAR constexpr bool disjunction_v = _Or<_Args...>::value;
71
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
72
+
73
+ _LIBCUDACXX_END_NAMESPACE_STD
74
+
75
+ #endif // _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/enable_if.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ template <bool, class _Tp = void>
26
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT enable_if
27
+ {};
28
+ template <class _Tp>
29
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT enable_if<true, _Tp>
30
+ {
31
+ typedef _Tp type;
32
+ };
33
+
34
+ template <bool _Bp, class _Tp = void>
35
+ using enable_if_t _CCCL_NODEBUG_ALIAS = typename enable_if<_Bp, _Tp>::type;
36
+
37
+ _LIBCUDACXX_END_NAMESPACE_STD
38
+
39
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/extent.h ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //
9
+ //===----------------------------------------------------------------------===//
10
+
11
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_EXTENT_H
12
+ #define _LIBCUDACXX___TYPE_TRAITS_EXTENT_H
13
+
14
+ #include <cuda/std/detail/__config>
15
+
16
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
17
+ # pragma GCC system_header
18
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
19
+ # pragma clang system_header
20
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
21
+ # pragma system_header
22
+ #endif // no system header
23
+
24
+ #include <cuda/std/__type_traits/integral_constant.h>
25
+ #include <cuda/std/cstddef>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_ARRAY_EXTENT) && !defined(_LIBCUDACXX_USE_ARRAY_EXTENT_FALLBACK)
30
+
31
+ template <class _Tp, size_t _Dim = 0>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent : integral_constant<size_t, _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Dim)>
33
+ {};
34
+
35
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
36
+ template <class _Tp, unsigned _Ip = 0>
37
+ _CCCL_INLINE_VAR constexpr size_t extent_v = _CCCL_BUILTIN_ARRAY_EXTENT(_Tp, _Ip);
38
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
39
+
40
+ #else // ^^^ _CCCL_BUILTIN_ARRAY_EXTENT ^^^ / vvv !_CCCL_BUILTIN_ARRAY_EXTENT vvv
41
+
42
+ template <class _Tp, unsigned _Ip = 0>
43
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent : public integral_constant<size_t, 0>
44
+ {};
45
+ template <class _Tp>
46
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[], 0> : public integral_constant<size_t, 0>
47
+ {};
48
+ template <class _Tp, unsigned _Ip>
49
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value>
50
+ {};
51
+ template <class _Tp, size_t _Np>
52
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[_Np], 0> : public integral_constant<size_t, _Np>
53
+ {};
54
+ template <class _Tp, size_t _Np, unsigned _Ip>
55
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT extent<_Tp[_Np], _Ip>
56
+ : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value>
57
+ {};
58
+
59
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
60
+ template <class _Tp, unsigned _Ip = 0>
61
+ _CCCL_INLINE_VAR constexpr size_t extent_v = extent<_Tp, _Ip>::value;
62
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
63
+
64
+ #endif // !_CCCL_BUILTIN_ARRAY_EXTENT
65
+
66
+ _LIBCUDACXX_END_NAMESPACE_STD
67
+
68
+ #endif // _LIBCUDACXX___TYPE_TRAITS_EXTENT_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/has_unique_object_representation.h ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/remove_all_extents.h>
25
+ #include <cuda/std/__type_traits/remove_cv.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_HAS_UNIQUE_OBJECT_REPRESENTATIONS)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT has_unique_object_representations
33
+ : public integral_constant<bool, __has_unique_object_representations(remove_cv_t<remove_all_extents_t<_Tp>>)>
34
+ {};
35
+
36
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
37
+ template <class _Tp>
38
+ _CCCL_INLINE_VAR constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value;
39
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
40
+
41
+ #endif // _CCCL_BUILTIN_HAS_UNIQUE_OBJECT_REPRESENTATIONS
42
+
43
+ _LIBCUDACXX_END_NAMESPACE_STD
44
+
45
+ #endif // _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/integral_constant.h ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ template <class _Tp, _Tp __v>
26
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT integral_constant
27
+ {
28
+ static constexpr const _Tp value = __v;
29
+ typedef _Tp value_type;
30
+ typedef integral_constant type;
31
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr operator value_type() const noexcept
32
+ {
33
+ return value;
34
+ }
35
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr value_type operator()() const noexcept
36
+ {
37
+ return value;
38
+ }
39
+ };
40
+
41
+ template <class _Tp, _Tp __v>
42
+ constexpr const _Tp integral_constant<_Tp, __v>::value;
43
+
44
+ typedef integral_constant<bool, true> true_type;
45
+ typedef integral_constant<bool, false> false_type;
46
+
47
+ template <bool _Val>
48
+ using _BoolConstant _LIBCUDACXX_DEPRECATED _CCCL_NODEBUG_ALIAS = integral_constant<bool, _Val>;
49
+
50
+ template <bool __b>
51
+ using bool_constant = integral_constant<bool, __b>;
52
+
53
+ // deprecated [Since 2.7.0]
54
+ #define _LIBCUDACXX_BOOL_CONSTANT(__b) bool_constant<(__b)>
55
+
56
+ _LIBCUDACXX_END_NAMESPACE_STD
57
+
58
+ #endif // _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_aggregate.h ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ #if defined(_CCCL_BUILTIN_IS_AGGREGATE)
28
+
29
+ template <class _Tp>
30
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_aggregate : public integral_constant<bool, _CCCL_BUILTIN_IS_AGGREGATE(_Tp)>
31
+ {};
32
+
33
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
34
+ template <class _Tp>
35
+ _CCCL_INLINE_VAR constexpr bool is_aggregate_v = _CCCL_BUILTIN_IS_AGGREGATE(_Tp);
36
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
37
+
38
+ #endif // defined(_CCCL_BUILTIN_IS_AGGREGATE)
39
+
40
+ _LIBCUDACXX_END_NAMESPACE_STD
41
+
42
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_arithmetic.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_floating_point.h>
25
+ #include <cuda/std/__type_traits/is_integral.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ template <class _Tp>
30
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_arithmetic
31
+ : public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value>
32
+ {};
33
+
34
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
35
+ template <class _Tp>
36
+ _CCCL_INLINE_VAR constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value;
37
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
38
+
39
+ _LIBCUDACXX_END_NAMESPACE_STD
40
+
41
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_base_of.h ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/enable_if.h>
24
+ #include <cuda/std/__type_traits/integral_constant.h>
25
+ #include <cuda/std/__type_traits/is_class.h>
26
+ #include <cuda/std/__utility/declval.h>
27
+ #include <cuda/std/cstddef>
28
+
29
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
30
+
31
+ #if defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK)
32
+
33
+ template <class _Bp, class _Dp>
34
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of : public integral_constant<bool, _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp)>
35
+ {};
36
+
37
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
38
+ template <class _Bp, class _Dp>
39
+ _CCCL_INLINE_VAR constexpr bool is_base_of_v = _CCCL_BUILTIN_IS_BASE_OF(_Bp, _Dp);
40
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
41
+
42
+ #else // defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK)
43
+
44
+ namespace __is_base_of_imp
45
+ {
46
+ template <class _Tp>
47
+ struct _Dst
48
+ {
49
+ _LIBCUDACXX_HIDE_FROM_ABI _Dst(const volatile _Tp&);
50
+ };
51
+ template <class _Tp>
52
+ struct _Src
53
+ {
54
+ _LIBCUDACXX_HIDE_FROM_ABI operator const volatile _Tp&();
55
+ template <class _Up>
56
+ _LIBCUDACXX_HIDE_FROM_ABI operator const _Dst<_Up>&();
57
+ };
58
+ template <size_t>
59
+ struct __one
60
+ {
61
+ typedef char type;
62
+ };
63
+ template <class _Bp, class _Dp>
64
+ _CCCL_HOST_DEVICE typename __one<sizeof(_Dst<_Bp>(_CUDA_VSTD::declval<_Src<_Dp>>()))>::type __test(int);
65
+ template <class _Bp, class _Dp>
66
+ _CCCL_HOST_DEVICE __two __test(...);
67
+ } // namespace __is_base_of_imp
68
+
69
+ template <class _Bp, class _Dp>
70
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_base_of
71
+ : public integral_constant<bool, is_class<_Bp>::value && sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2>
72
+ {};
73
+
74
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
75
+ template <class _Bp, class _Dp>
76
+ _CCCL_INLINE_VAR constexpr bool is_base_of_v = is_base_of<_Bp, _Dp>::value;
77
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
78
+
79
+ #endif // defined(_CCCL_BUILTIN_IS_BASE_OF) && !defined(_LIBCUDACXX_USE_IS_BASE_OF_FALLBACK)
80
+
81
+ _LIBCUDACXX_END_NAMESPACE_STD
82
+
83
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_bounded_array.h ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/cstddef>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ template <class>
29
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_bounded_array : false_type
30
+ {};
31
+ template <class _Tp, size_t _Np>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_bounded_array<_Tp[_Np]> : true_type
33
+ {};
34
+
35
+ template <class>
36
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_bounded_array : false_type
37
+ {};
38
+ template <class _Tp, size_t _Np>
39
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_bounded_array<_Tp[_Np]> : true_type
40
+ {};
41
+
42
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
43
+ template <class _Tp>
44
+ _CCCL_INLINE_VAR constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value;
45
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
46
+
47
+ _LIBCUDACXX_END_NAMESPACE_STD
48
+
49
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_callable.h ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__utility/declval.h>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ template <class _Func, class... _Args, class = decltype(_CUDA_VSTD::declval<_Func>()(_CUDA_VSTD::declval<_Args>()...))>
29
+ _LIBCUDACXX_HIDE_FROM_ABI true_type __is_callable_helper(int);
30
+ template <class...>
31
+ _LIBCUDACXX_HIDE_FROM_ABI false_type __is_callable_helper(...);
32
+
33
+ template <class _Func, class... _Args>
34
+ struct __is_callable : decltype(__is_callable_helper<_Func, _Args...>(0))
35
+ {};
36
+
37
+ #ifndef _CCCL_NO_VARIABLE_TEMPLATES
38
+ template <class _Func, class... _Args>
39
+ _CCCL_INLINE_VAR constexpr bool __is_callable_v = decltype(__is_callable_helper<_Func, _Args...>(0))::value;
40
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
41
+
42
+ _LIBCUDACXX_END_NAMESPACE_STD
43
+
44
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_class.h ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_union.h>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ struct __two
29
+ {
30
+ char __lx[2];
31
+ };
32
+
33
+ #if defined(_CCCL_BUILTIN_IS_CLASS) && !defined(_LIBCUDACXX_USE_IS_CLASS_FALLBACK)
34
+
35
+ template <class _Tp>
36
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class : public integral_constant<bool, _CCCL_BUILTIN_IS_CLASS(_Tp)>
37
+ {};
38
+
39
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
40
+ template <class _Tp>
41
+ _CCCL_INLINE_VAR constexpr bool is_class_v = _CCCL_BUILTIN_IS_CLASS(_Tp);
42
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
43
+
44
+ #else
45
+
46
+ namespace __is_class_imp
47
+ {
48
+ template <class _Tp>
49
+ _CCCL_HOST_DEVICE char __test(int _Tp::*);
50
+ template <class _Tp>
51
+ _CCCL_HOST_DEVICE __two __test(...);
52
+ } // namespace __is_class_imp
53
+
54
+ template <class _Tp>
55
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_class
56
+ : public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value>
57
+ {};
58
+
59
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
60
+ template <class _Tp>
61
+ _CCCL_INLINE_VAR constexpr bool is_class_v = is_class<_Tp>::value;
62
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
63
+
64
+ #endif // defined(_CCCL_BUILTIN_IS_CLASS) && !defined(_LIBCUDACXX_USE_IS_CLASS_FALLBACK)
65
+
66
+ _LIBCUDACXX_END_NAMESPACE_STD
67
+
68
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_constant_evaluated.h ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
24
+
25
+ #if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED)
26
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_constant_evaluated() noexcept
27
+ {
28
+ return _CCCL_BUILTIN_IS_CONSTANT_EVALUATED();
29
+ }
30
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __cccl_default_is_constant_evaluated() noexcept
31
+ {
32
+ return _CCCL_BUILTIN_IS_CONSTANT_EVALUATED();
33
+ }
34
+ #else // ^^^ _CCCL_BUILTIN_IS_CONSTANT_EVALUATED ^^^ / vvv !_CCCL_BUILTIN_IS_CONSTANT_EVALUATED vvv
35
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_constant_evaluated() noexcept
36
+ {
37
+ return false;
38
+ }
39
+ _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __cccl_default_is_constant_evaluated() noexcept
40
+ {
41
+ return true;
42
+ }
43
+ #endif // !_CCCL_BUILTIN_IS_CONSTANT_EVALUATED
44
+
45
+ _LIBCUDACXX_END_NAMESPACE_STD
46
+
47
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_core_convertible.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ // [conv.general]/3 says "E is convertible to T" whenever "T t=E;" is well-formed.
28
+ // We can't test for that, but we can test implicit convertibility by passing it
29
+ // to a function. Notice that __is_core_convertible<void,void> is false,
30
+ // and __is_core_convertible<immovable-type,immovable-type> is true in C++17 and later.
31
+
32
+ template <class _Tp, class _Up, class = void>
33
+ struct __is_core_convertible : public false_type
34
+ {};
35
+
36
+ template <class _Tp, class _Up>
37
+ struct __is_core_convertible<_Tp, _Up, decltype(static_cast<void (*)(_Up)>(0)(static_cast<_Tp (*)()>(0)()))>
38
+ : public true_type
39
+ {};
40
+
41
+ _LIBCUDACXX_END_NAMESPACE_STD
42
+
43
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_default_constructible.h ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/is_constructible.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ template <class _Tp>
28
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_default_constructible : public is_constructible<_Tp>
29
+ {};
30
+
31
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
32
+ template <class _Tp>
33
+ _CCCL_INLINE_VAR constexpr bool is_default_constructible_v = is_constructible_v<_Tp>;
34
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
35
+
36
+ _LIBCUDACXX_END_NAMESPACE_STD
37
+
38
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_destructible.h ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_function.h>
25
+ #include <cuda/std/__type_traits/is_reference.h>
26
+ #include <cuda/std/__type_traits/remove_all_extents.h>
27
+ #include <cuda/std/__utility/declval.h>
28
+
29
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
30
+
31
+ #if defined(_CCCL_BUILTIN_IS_DESTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_DESTRUCTIBLE_FALLBACK)
32
+
33
+ template <class _Tp>
34
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_destructible
35
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp)>
36
+ {};
37
+
38
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
39
+ template <class _Tp>
40
+ _CCCL_INLINE_VAR constexpr bool is_destructible_v = _CCCL_BUILTIN_IS_DESTRUCTIBLE(_Tp);
41
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
42
+
43
+ #else // ^^^ _CCCL_BUILTIN_IS_DESTRUCTIBLE ^^^ / vvv !_CCCL_BUILTIN_IS_DESTRUCTIBLE vvv
44
+
45
+ // if it's a reference, return true
46
+ // if it's a function, return false
47
+ // if it's void, return false
48
+ // if it's an array of unknown bound, return false
49
+ // Otherwise, return "declval<_Up&>().~_Up()" is well-formed
50
+ // where _Up is remove_all_extents<_Tp>::type
51
+
52
+ template <class>
53
+ struct __is_destructible_apply
54
+ {
55
+ typedef int type;
56
+ };
57
+
58
+ template <typename _Tp>
59
+ struct __is_destructor_wellformed
60
+ {
61
+ template <typename _Tp1>
62
+ _LIBCUDACXX_HIDE_FROM_ABI static true_type
63
+ __test(typename __is_destructible_apply<decltype(_CUDA_VSTD::declval<_Tp1&>().~_Tp1())>::type);
64
+
65
+ template <typename _Tp1>
66
+ _LIBCUDACXX_HIDE_FROM_ABI static false_type __test(...);
67
+
68
+ static const bool value = decltype(__test<_Tp>(12))::value;
69
+ };
70
+
71
+ template <class _Tp, bool>
72
+ struct __destructible_imp;
73
+
74
+ template <class _Tp>
75
+ struct __destructible_imp<_Tp, false>
76
+ : public integral_constant<bool, __is_destructor_wellformed<remove_all_extents_t<_Tp>>::value>
77
+ {};
78
+
79
+ template <class _Tp>
80
+ struct __destructible_imp<_Tp, true> : public true_type
81
+ {};
82
+
83
+ template <class _Tp, bool>
84
+ struct __destructible_false;
85
+
86
+ template <class _Tp>
87
+ struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value>
88
+ {};
89
+
90
+ template <class _Tp>
91
+ struct __destructible_false<_Tp, true> : public false_type
92
+ {};
93
+
94
+ template <class _Tp>
95
+ struct is_destructible : public __destructible_false<_Tp, is_function<_Tp>::value>
96
+ {};
97
+
98
+ template <class _Tp>
99
+ struct is_destructible<_Tp[]> : public false_type
100
+ {};
101
+
102
+ template <>
103
+ struct is_destructible<void> : public false_type
104
+ {};
105
+
106
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
107
+ template <class _Tp>
108
+ _CCCL_INLINE_VAR constexpr bool is_destructible_v = is_destructible<_Tp>::value;
109
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
110
+
111
+ #endif // !_CCCL_BUILTIN_IS_DESTRUCTIBLE
112
+
113
+ _LIBCUDACXX_END_NAMESPACE_STD
114
+
115
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_enum.h ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_array.h>
25
+ #include <cuda/std/__type_traits/is_class.h>
26
+ #include <cuda/std/__type_traits/is_floating_point.h>
27
+ #include <cuda/std/__type_traits/is_function.h>
28
+ #include <cuda/std/__type_traits/is_integral.h>
29
+ #include <cuda/std/__type_traits/is_member_pointer.h>
30
+ #include <cuda/std/__type_traits/is_pointer.h>
31
+ #include <cuda/std/__type_traits/is_reference.h>
32
+ #include <cuda/std/__type_traits/is_union.h>
33
+ #include <cuda/std/__type_traits/is_void.h>
34
+
35
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
36
+
37
+ #if defined(_CCCL_BUILTIN_IS_ENUM) && !defined(_LIBCUDACXX_USE_IS_ENUM_FALLBACK)
38
+
39
+ template <class _Tp>
40
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum : public integral_constant<bool, _CCCL_BUILTIN_IS_ENUM(_Tp)>
41
+ {};
42
+
43
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
44
+ template <class _Tp>
45
+ _CCCL_INLINE_VAR constexpr bool is_enum_v = _CCCL_BUILTIN_IS_ENUM(_Tp);
46
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
47
+
48
+ #else
49
+
50
+ template <class _Tp>
51
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_enum
52
+ : public integral_constant<
53
+ bool,
54
+ !is_void<_Tp>::value && !is_integral<_Tp>::value && !is_floating_point<_Tp>::value && !is_array<_Tp>::value
55
+ && !is_pointer<_Tp>::value && !is_reference<_Tp>::value && !is_member_pointer<_Tp>::value
56
+ && !is_union<_Tp>::value && !is_class<_Tp>::value && !is_function<_Tp>::value>
57
+ {};
58
+
59
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
60
+ template <class _Tp>
61
+ _CCCL_INLINE_VAR constexpr bool is_enum_v = is_enum<_Tp>::value;
62
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
63
+
64
+ #endif // defined(_CCCL_BUILTIN_IS_ENUM) && !defined(_LIBCUDACXX_USE_IS_ENUM_FALLBACK)
65
+
66
+ _LIBCUDACXX_END_NAMESPACE_STD
67
+
68
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_extended_floating_point.h ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_EXTENDED_FLOATING_POINT_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_EXTENDED_FLOATING_POINT_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+
25
+ #if defined(_CCCL_HAS_NVFP16)
26
+ # include <cuda_fp16.h>
27
+ #endif // _CCCL_HAS_NVFP16
28
+
29
+ #if defined(_CCCL_HAS_NVBF16)
30
+ _CCCL_DIAG_PUSH
31
+ _CCCL_DIAG_SUPPRESS_CLANG("-Wunused-function")
32
+ # include <cuda_bf16.h>
33
+ _CCCL_DIAG_POP
34
+ #endif // _CCCL_HAS_NVBF16
35
+
36
+ #if _CCCL_HAS_NVFP8()
37
+ # include <cuda_fp8.h>
38
+ #endif // _CCCL_HAS_NVFP8()
39
+
40
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
41
+
42
+ template <class _Tp>
43
+ struct __is_extended_floating_point : false_type
44
+ {};
45
+
46
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
47
+ template <class _Tp>
48
+ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v
49
+ # if defined(_CCCL_NO_INLINE_VARIABLES)
50
+ = __is_extended_floating_point<_Tp>::value;
51
+ # else // ^^^ _CCCL_NO_INLINE_VARIABLES ^^^ / vvv !_CCCL_NO_INLINE_VARIABLES vvv
52
+ = false;
53
+ # endif // !_CCCL_NO_INLINE_VARIABLES
54
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
55
+
56
+ #if defined(_CCCL_HAS_NVFP16)
57
+ template <>
58
+ struct __is_extended_floating_point<__half> : true_type
59
+ {};
60
+
61
+ # ifndef _CCCL_NO_INLINE_VARIABLES
62
+ template <>
63
+ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__half> = true;
64
+ # endif // !_CCCL_NO_INLINE_VARIABLES
65
+ #endif // _CCCL_HAS_NVFP16
66
+
67
+ #if defined(_CCCL_HAS_NVBF16)
68
+ template <>
69
+ struct __is_extended_floating_point<__nv_bfloat16> : true_type
70
+ {};
71
+
72
+ # ifndef _CCCL_NO_INLINE_VARIABLES
73
+ template <>
74
+ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_bfloat16> = true;
75
+ # endif // !_CCCL_NO_INLINE_VARIABLES
76
+ #endif // _CCCL_HAS_NVBF16
77
+
78
+ #if _CCCL_HAS_NVFP8()
79
+ template <>
80
+ struct __is_extended_floating_point<__nv_fp8_e4m3> : true_type
81
+ {};
82
+ template <>
83
+ struct __is_extended_floating_point<__nv_fp8_e5m2> : true_type
84
+ {};
85
+
86
+ # ifndef _CCCL_NO_INLINE_VARIABLES
87
+ template <>
88
+ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp8_e4m3> = true;
89
+ template <>
90
+ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__nv_fp8_e5m2> = true;
91
+ # endif // !_CCCL_NO_INLINE_VARIABLES
92
+ #endif // _CCCL_HAS_NVFP8()
93
+
94
+ _LIBCUDACXX_END_NAMESPACE_STD
95
+
96
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_EXTENDED_FLOATING_POINT_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_implicitly_default_constructible.h ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_default_constructible.h>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ // First of all, we can't implement this check in C++03 mode because the {}
29
+ // default initialization syntax isn't valid.
30
+ // Second, we implement the trait in a funny manner with two defaulted template
31
+ // arguments to workaround Clang's PR43454.
32
+ template <class _Tp>
33
+ _LIBCUDACXX_HIDE_FROM_ABI void __test_implicit_default_constructible(_Tp);
34
+
35
+ template <class _Tp, class = void, class = typename is_default_constructible<_Tp>::type>
36
+ struct __is_implicitly_default_constructible : false_type
37
+ {};
38
+
39
+ template <class _Tp>
40
+ struct __is_implicitly_default_constructible<_Tp,
41
+ decltype(__test_implicit_default_constructible<_Tp const&>({})),
42
+ true_type> : true_type
43
+ {};
44
+
45
+ template <class _Tp>
46
+ struct __is_implicitly_default_constructible<_Tp,
47
+ decltype(__test_implicit_default_constructible<_Tp const&>({})),
48
+ false_type> : false_type
49
+ {};
50
+
51
+ _LIBCUDACXX_END_NAMESPACE_STD
52
+
53
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_member_function_pointer.h ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_function.h>
25
+ #include <cuda/std/__type_traits/remove_cv.h>
26
+ #include <cuda/std/cstddef>
27
+
28
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
29
+
30
+ template <class _Tp>
31
+ struct __cccl_is_member_pointer
32
+ {
33
+ enum
34
+ {
35
+ __is_member = false,
36
+ __is_func = false,
37
+ __is_obj = false
38
+ };
39
+ };
40
+ template <class _Tp, class _Up>
41
+ struct __cccl_is_member_pointer<_Tp _Up::*>
42
+ {
43
+ enum
44
+ {
45
+ __is_member = true,
46
+ __is_func = is_function<_Tp>::value,
47
+ __is_obj = !__is_func,
48
+ };
49
+ };
50
+
51
+ #if defined(_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER) && !defined(_LIBCUDACXX_USE_IS_MEMBER_FUNCTION_POINTER_FALLBACK)
52
+
53
+ template <class _Tp>
54
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer
55
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp)>
56
+ {};
57
+
58
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
59
+ template <class _Tp>
60
+ _CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER(_Tp);
61
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
62
+
63
+ #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER vvv
64
+
65
+ template <class _Tp>
66
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer
67
+ : public integral_constant<bool, __cccl_is_member_pointer<remove_cv_t<_Tp>>::__is_func>
68
+ {};
69
+
70
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
71
+ template <class _Tp>
72
+ _CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value;
73
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
74
+
75
+ #endif // !_CCCL_BUILTIN_IS_MEMBER_FUNCTION_POINTER
76
+
77
+ _LIBCUDACXX_END_NAMESPACE_STD
78
+
79
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_member_pointer.h ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_member_function_pointer.h>
25
+ #include <cuda/std/__type_traits/remove_cv.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_IS_MEMBER_POINTER) && !defined(_LIBCUDACXX_USE_IS_MEMBER_POINTER_FALLBACK)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer
33
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp)>
34
+ {};
35
+
36
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
37
+ template <class _Tp>
38
+ _CCCL_INLINE_VAR constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_POINTER(_Tp);
39
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
40
+
41
+ #else // ^^^ _CCCL_BUILTIN_IS_MEMBER_POINTER ^^^ / vvv !_CCCL_BUILTIN_IS_MEMBER_POINTER vvv
42
+
43
+ template <class _Tp>
44
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer
45
+ : public integral_constant<bool, __cccl_is_member_pointer<remove_cv_t<_Tp>>::__is_member>
46
+ {};
47
+
48
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
49
+ template <class _Tp>
50
+ _CCCL_INLINE_VAR constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value;
51
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
52
+
53
+ #endif // !_CCCL_BUILTIN_IS_MEMBER_POINTER
54
+
55
+ _LIBCUDACXX_END_NAMESPACE_STD
56
+
57
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_move_constructible.h ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_lvalue_reference.h>
24
+ #include <cuda/std/__type_traits/add_rvalue_reference.h>
25
+ #include <cuda/std/__type_traits/is_constructible.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ template <class _Tp>
30
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_move_constructible : public is_constructible<_Tp, add_rvalue_reference_t<_Tp>>
31
+ {};
32
+
33
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
34
+ template <class _Tp>
35
+ _CCCL_INLINE_VAR constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value;
36
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
37
+
38
+ _LIBCUDACXX_END_NAMESPACE_STD
39
+
40
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_constructible.h ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_constructible.h>
25
+ #include <cuda/std/__type_traits/is_scalar.h>
26
+ #include <cuda/std/__utility/declval.h>
27
+
28
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
29
+
30
+ #if defined(_CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_CONSTRUCTIBLE_FALLBACK)
31
+
32
+ template <class _Tp, class... _Args>
33
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible
34
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...)>
35
+ {};
36
+
37
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
38
+ template <class _Tp, class... _Args>
39
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = _CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(_Tp, _Args...);
40
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
41
+
42
+ #else
43
+
44
+ template <bool, bool, class _Tp, class... _Args>
45
+ struct __cccl_is_nothrow_constructible;
46
+
47
+ template <class _Tp, class... _Args>
48
+ struct __cccl_is_nothrow_constructible</*is constructible*/ true, /*is reference*/ false, _Tp, _Args...>
49
+ : public integral_constant<bool, noexcept(_Tp(_CUDA_VSTD::declval<_Args>()...))>
50
+ {};
51
+
52
+ template <class _Tp>
53
+ _LIBCUDACXX_HIDE_FROM_ABI void __implicit_conversion_to(_Tp) noexcept
54
+ {}
55
+
56
+ template <class _Tp, class _Arg>
57
+ struct __cccl_is_nothrow_constructible</*is constructible*/ true, /*is reference*/ true, _Tp, _Arg>
58
+ : public integral_constant<bool, noexcept(__implicit_conversion_to<_Tp>(_CUDA_VSTD::declval<_Arg>()))>
59
+ {};
60
+
61
+ template <class _Tp, bool _IsReference, class... _Args>
62
+ struct __cccl_is_nothrow_constructible</*is constructible*/ false, _IsReference, _Tp, _Args...> : public false_type
63
+ {};
64
+
65
+ template <class _Tp, class... _Args>
66
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible
67
+ : __cccl_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, is_reference<_Tp>::value, _Tp, _Args...>
68
+ {};
69
+
70
+ template <class _Tp, size_t _Ns>
71
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible<_Tp[_Ns]>
72
+ : __cccl_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp>
73
+ {};
74
+
75
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
76
+ template <class _Tp, class... _Args>
77
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value;
78
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
79
+
80
+ #endif // defined(_CCCL_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_CONSTRUCTIBLE_FALLBACK)
81
+
82
+ _LIBCUDACXX_END_NAMESPACE_STD
83
+
84
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_convertible.h ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/conjunction.h>
24
+ #include <cuda/std/__type_traits/disjunction.h>
25
+ #include <cuda/std/__type_traits/integral_constant.h>
26
+ #include <cuda/std/__type_traits/is_convertible.h>
27
+ #include <cuda/std/__type_traits/is_void.h>
28
+ #include <cuda/std/__type_traits/lazy.h>
29
+ #include <cuda/std/__utility/declval.h>
30
+
31
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
32
+
33
+ template <typename _Tp>
34
+ _CCCL_HOST_DEVICE static void __test_noexcept(_Tp) noexcept;
35
+
36
+ template <typename _Fm, typename _To>
37
+ _CCCL_HOST_DEVICE static bool_constant<noexcept(_CUDA_VSTD::__test_noexcept<_To>(_CUDA_VSTD::declval<_Fm>()))>
38
+ __is_nothrow_convertible_test();
39
+
40
+ template <typename _Fm, typename _To>
41
+ struct __is_nothrow_convertible_helper : decltype(__is_nothrow_convertible_test<_Fm, _To>())
42
+ {};
43
+
44
+ template <typename _Fm, typename _To>
45
+ struct is_nothrow_convertible
46
+ : _Or<_And<is_void<_To>, is_void<_Fm>>,
47
+ _Lazy<_And, is_convertible<_Fm, _To>, __is_nothrow_convertible_helper<_Fm, _To>>>::type
48
+ {};
49
+
50
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
51
+ template <typename _Fm, typename _To>
52
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value;
53
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
54
+
55
+ _LIBCUDACXX_END_NAMESPACE_STD
56
+
57
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_copy_assignable.h ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_const.h>
24
+ #include <cuda/std/__type_traits/add_lvalue_reference.h>
25
+ #include <cuda/std/__type_traits/is_nothrow_assignable.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE) && !defined(_LIBCUDACXX_USE_IS_NOTHROW_ASSIGNABLE_FALLBACK)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable
33
+ : public integral_constant<bool,
34
+ _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(
35
+ add_lvalue_reference_t<_Tp>, add_lvalue_reference_t<typename add_const<_Tp>::type>)>
36
+ {};
37
+
38
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
39
+ template <class _Tp>
40
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = _CCCL_BUILTIN_IS_NOTHROW_ASSIGNABLE(
41
+ add_lvalue_reference_t<_Tp>, add_lvalue_reference_t<typename add_const<_Tp>::type>);
42
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
43
+
44
+ #else
45
+
46
+ template <class _Tp>
47
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_assignable
48
+ : public is_nothrow_assignable<add_lvalue_reference_t<_Tp>, add_lvalue_reference_t<typename add_const<_Tp>::type>>
49
+ {};
50
+
51
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
52
+ template <class _Tp>
53
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value;
54
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
55
+
56
+ #endif
57
+
58
+ _LIBCUDACXX_END_NAMESPACE_STD
59
+
60
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_copy_constructible.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_const.h>
24
+ #include <cuda/std/__type_traits/add_lvalue_reference.h>
25
+ #include <cuda/std/__type_traits/is_nothrow_constructible.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ template <class _Tp>
30
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_copy_constructible
31
+ : public is_nothrow_constructible<_Tp, add_lvalue_reference_t<typename add_const<_Tp>::type>>
32
+ {};
33
+
34
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
35
+ template <class _Tp>
36
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value;
37
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
38
+
39
+ _LIBCUDACXX_END_NAMESPACE_STD
40
+
41
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_nothrow_move_constructible.h ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_rvalue_reference.h>
24
+ #include <cuda/std/__type_traits/is_nothrow_constructible.h>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ template <class _Tp>
29
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_move_constructible
30
+ : public is_nothrow_constructible<_Tp, add_rvalue_reference_t<_Tp>>
31
+ {};
32
+
33
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
34
+ template <class _Tp>
35
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value;
36
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
37
+
38
+ _LIBCUDACXX_END_NAMESPACE_STD
39
+
40
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_null_pointer.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/remove_cv.h>
25
+ #include <cuda/std/cstddef>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ template <class _Tp>
30
+ struct __is_nullptr_t_impl : public false_type
31
+ {};
32
+ template <>
33
+ struct __is_nullptr_t_impl<nullptr_t> : public true_type
34
+ {};
35
+
36
+ template <class _Tp>
37
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT __is_nullptr_t : public __is_nullptr_t_impl<remove_cv_t<_Tp>>
38
+ {};
39
+
40
+ template <class _Tp>
41
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_null_pointer : public __is_nullptr_t_impl<remove_cv_t<_Tp>>
42
+ {};
43
+
44
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
45
+ template <class _Tp>
46
+ _CCCL_INLINE_VAR constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
47
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
48
+
49
+ _LIBCUDACXX_END_NAMESPACE_STD
50
+
51
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_object.h ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_array.h>
25
+ #include <cuda/std/__type_traits/is_class.h>
26
+ #include <cuda/std/__type_traits/is_scalar.h>
27
+ #include <cuda/std/__type_traits/is_union.h>
28
+
29
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
30
+
31
+ #if defined(_CCCL_BUILTIN_IS_OBJECT) && !defined(_LIBCUDACXX_USE_IS_OBJECT_FALLBACK)
32
+
33
+ template <class _Tp>
34
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object : public integral_constant<bool, _CCCL_BUILTIN_IS_OBJECT(_Tp)>
35
+ {};
36
+
37
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
38
+ template <class _Tp>
39
+ _CCCL_INLINE_VAR constexpr bool is_object_v = _CCCL_BUILTIN_IS_OBJECT(_Tp);
40
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
41
+
42
+ #else
43
+
44
+ template <class _Tp>
45
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_object
46
+ : public integral_constant<bool,
47
+ is_scalar<_Tp>::value || is_array<_Tp>::value || is_union<_Tp>::value
48
+ || is_class<_Tp>::value>
49
+ {};
50
+
51
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
52
+ template <class _Tp>
53
+ _CCCL_INLINE_VAR constexpr bool is_object_v = is_object<_Tp>::value;
54
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
55
+
56
+ #endif // defined(_CCCL_BUILTIN_IS_OBJECT) && !defined(_LIBCUDACXX_USE_IS_OBJECT_FALLBACK)
57
+
58
+ _LIBCUDACXX_END_NAMESPACE_STD
59
+
60
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_pod.h ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_POD_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_POD_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_trivially_copy_assignable.h>
25
+ #include <cuda/std/__type_traits/is_trivially_copy_constructible.h>
26
+ #include <cuda/std/__type_traits/is_trivially_default_constructible.h>
27
+ #include <cuda/std/__type_traits/is_trivially_destructible.h>
28
+ #include <cuda/std/cstddef>
29
+
30
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
31
+
32
+ #if defined(_CCCL_BUILTIN_IS_POD) && !defined(_LIBCUDACXX_USE_IS_POD_FALLBACK)
33
+
34
+ template <class _Tp>
35
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod : public integral_constant<bool, _CCCL_BUILTIN_IS_POD(_Tp)>
36
+ {};
37
+
38
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
39
+ template <class _Tp>
40
+ _CCCL_INLINE_VAR constexpr bool is_pod_v = _CCCL_BUILTIN_IS_POD(_Tp);
41
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
42
+
43
+ #else
44
+
45
+ template <class _Tp>
46
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pod
47
+ : public integral_constant<
48
+ bool,
49
+ is_trivially_default_constructible<_Tp>::value && is_trivially_copy_constructible<_Tp>::value
50
+ && is_trivially_copy_assignable<_Tp>::value && is_trivially_destructible<_Tp>::value>
51
+ {};
52
+
53
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
54
+ template <class _Tp>
55
+ _CCCL_INLINE_VAR constexpr bool is_pod_v = is_pod<_Tp>::value;
56
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
57
+
58
+ #endif // defined(_CCCL_BUILTIN_IS_POD) && !defined(_LIBCUDACXX_USE_IS_POD_FALLBACK)
59
+
60
+ _LIBCUDACXX_END_NAMESPACE_STD
61
+
62
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_POD_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_primary_template.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/enable_if.h>
24
+ #include <cuda/std/__type_traits/is_same.h>
25
+ #include <cuda/std/__type_traits/is_valid_expansion.h>
26
+ #include <cuda/std/__type_traits/void_t.h>
27
+
28
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
29
+
30
+ #if _CCCL_COMPILER(MSVC)
31
+ template <class _Tp, class = void>
32
+ struct __is_primary_template : false_type
33
+ {};
34
+
35
+ template <class _Tp>
36
+ struct __is_primary_template<_Tp, void_t<typename _Tp::__primary_template>>
37
+ : public is_same<_Tp, typename _Tp::__primary_template>
38
+ {};
39
+
40
+ #else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
41
+
42
+ template <class _Tp>
43
+ using __test_for_primary_template = enable_if_t<_IsSame<_Tp, typename _Tp::__primary_template>::value>;
44
+ template <class _Tp>
45
+ using __is_primary_template = _IsValidExpansion<__test_for_primary_template, _Tp>;
46
+ #endif // !_CCCL_COMPILER(MSVC)
47
+
48
+ _LIBCUDACXX_END_NAMESPACE_STD
49
+
50
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_reference.h ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+
25
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
26
+
27
+ #if defined(_CCCL_BUILTIN_IS_LVALUE_REFERENCE) && !defined(_LIBCUDACXX_USE_IS_LVALUE_REFERENCE_FALLBACK) \
28
+ && defined(_CCCL_BUILTIN_IS_RVALUE_REFERENCE) && !defined(_LIBCUDACXX_USE_IS_RVALUE_REFERENCE_FALLBACK) \
29
+ && defined(_CCCL_BUILTIN_IS_REFERENCE) && !defined(_LIBCUDACXX_USE_IS_REFERENCE_FALLBACK)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_lvalue_reference
33
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp)>
34
+ {};
35
+
36
+ template <class _Tp>
37
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_rvalue_reference
38
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp)>
39
+ {};
40
+
41
+ template <class _Tp>
42
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference : public integral_constant<bool, _CCCL_BUILTIN_IS_REFERENCE(_Tp)>
43
+ {};
44
+
45
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
46
+ template <class _Tp>
47
+ _CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = _CCCL_BUILTIN_IS_LVALUE_REFERENCE(_Tp);
48
+ template <class _Tp>
49
+ _CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = _CCCL_BUILTIN_IS_RVALUE_REFERENCE(_Tp);
50
+ template <class _Tp>
51
+ _CCCL_INLINE_VAR constexpr bool is_reference_v = _CCCL_BUILTIN_IS_REFERENCE(_Tp);
52
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
53
+
54
+ #else
55
+
56
+ template <class _Tp>
57
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_lvalue_reference : public false_type
58
+ {};
59
+ template <class _Tp>
60
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_lvalue_reference<_Tp&> : public true_type
61
+ {};
62
+
63
+ template <class _Tp>
64
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_rvalue_reference : public false_type
65
+ {};
66
+ template <class _Tp>
67
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_rvalue_reference<_Tp&&> : public true_type
68
+ {};
69
+
70
+ template <class _Tp>
71
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference : public false_type
72
+ {};
73
+ template <class _Tp>
74
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference<_Tp&> : public true_type
75
+ {};
76
+ template <class _Tp>
77
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_reference<_Tp&&> : public true_type
78
+ {};
79
+
80
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
81
+ template <class _Tp>
82
+ _CCCL_INLINE_VAR constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value;
83
+
84
+ template <class _Tp>
85
+ _CCCL_INLINE_VAR constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value;
86
+
87
+ template <class _Tp>
88
+ _CCCL_INLINE_VAR constexpr bool is_reference_v = is_reference<_Tp>::value;
89
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
90
+
91
+ #endif // !_CCCL_BUILTIN_IS_LVALUE_REFERENCE
92
+
93
+ _LIBCUDACXX_END_NAMESPACE_STD
94
+
95
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_reference_wrapper.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/remove_cv.h>
25
+
26
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
27
+
28
+ template <class _Tp>
29
+ class _CCCL_TYPE_VISIBILITY_DEFAULT reference_wrapper;
30
+
31
+ template <class _Tp>
32
+ struct __is_reference_wrapper_impl : public false_type
33
+ {};
34
+ template <class _Tp>
35
+ struct __is_reference_wrapper_impl<reference_wrapper<_Tp>> : public true_type
36
+ {};
37
+ template <class _Tp>
38
+ struct __is_reference_wrapper : public __is_reference_wrapper_impl<remove_cv_t<_Tp>>
39
+ {};
40
+
41
+ _LIBCUDACXX_END_NAMESPACE_STD
42
+
43
+ #endif // _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_scalar.h ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_arithmetic.h>
25
+ #include <cuda/std/__type_traits/is_enum.h>
26
+ #include <cuda/std/__type_traits/is_member_pointer.h>
27
+ #include <cuda/std/__type_traits/is_null_pointer.h>
28
+ #include <cuda/std/__type_traits/is_pointer.h>
29
+ #include <cuda/std/cstddef>
30
+
31
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
32
+
33
+ #if defined(_CCCL_BUILTIN_IS_SCALAR) && !defined(_LIBCUDACXX_USE_IS_SCALAR_FALLBACK)
34
+
35
+ template <class _Tp>
36
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar : public integral_constant<bool, _CCCL_BUILTIN_IS_SCALAR(_Tp)>
37
+ {};
38
+
39
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
40
+ template <class _Tp>
41
+ _CCCL_INLINE_VAR constexpr bool is_scalar_v = _CCCL_BUILTIN_IS_SCALAR(_Tp);
42
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
43
+
44
+ #else
45
+
46
+ template <class _Tp>
47
+ struct __is_block : false_type
48
+ {};
49
+ # if defined(_LIBCUDACXX_HAS_EXTENSION_BLOCKS)
50
+ template <class _Rp, class... _Args>
51
+ struct __is_block<_Rp (^)(_Args...)> : true_type
52
+ {};
53
+ # endif
54
+
55
+ template <class _Tp>
56
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar
57
+ : public integral_constant<bool,
58
+ is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value
59
+ || __is_nullptr_t<_Tp>::value || __is_block<_Tp>::value || is_enum<_Tp>::value>
60
+ {};
61
+
62
+ template <>
63
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_scalar<nullptr_t> : public true_type
64
+ {};
65
+
66
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
67
+ template <class _Tp>
68
+ _CCCL_INLINE_VAR constexpr bool is_scalar_v = is_scalar<_Tp>::value;
69
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
70
+
71
+ #endif // defined(_CCCL_BUILTIN_IS_SCALAR) && !defined(_LIBCUDACXX_USE_IS_SCALAR_FALLBACK)
72
+
73
+ _LIBCUDACXX_END_NAMESPACE_STD
74
+
75
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_signed.h ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_arithmetic.h>
25
+
26
+ _CCCL_DIAG_PUSH
27
+ _CCCL_DIAG_SUPPRESS_MSVC(4197) // top-level volatile in cast is ignored
28
+
29
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
30
+
31
+ #if defined(_CCCL_BUILTIN_IS_SIGNED) && !defined(_LIBCUDACXX_USE_IS_SIGNED_FALLBACK)
32
+
33
+ template <class _Tp>
34
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public integral_constant<bool, _CCCL_BUILTIN_IS_SIGNED(_Tp)>
35
+ {};
36
+
37
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
38
+ template <class _Tp>
39
+ _CCCL_INLINE_VAR constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp);
40
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
41
+
42
+ #else
43
+
44
+ template <class _Tp, bool = is_integral<_Tp>::value>
45
+ struct __cccl_is_signed_impl : public bool_constant<(_Tp(-1) < _Tp(0))>
46
+ {};
47
+
48
+ template <class _Tp>
49
+ struct __cccl_is_signed_impl<_Tp, false> : public true_type
50
+ {}; // floating point
51
+
52
+ template <class _Tp, bool = is_arithmetic<_Tp>::value>
53
+ struct __cccl_is_signed : public __cccl_is_signed_impl<_Tp>
54
+ {};
55
+
56
+ template <class _Tp>
57
+ struct __cccl_is_signed<_Tp, false> : public false_type
58
+ {};
59
+
60
+ template <class _Tp>
61
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public __cccl_is_signed<_Tp>
62
+ {};
63
+
64
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
65
+ template <class _Tp>
66
+ _CCCL_INLINE_VAR constexpr bool is_signed_v = is_signed<_Tp>::value;
67
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
68
+
69
+ #endif // defined(_CCCL_BUILTIN_IS_SIGNED) && !defined(_LIBCUDACXX_USE_IS_SIGNED_FALLBACK)
70
+
71
+ _LIBCUDACXX_END_NAMESPACE_STD
72
+
73
+ _CCCL_DIAG_POP
74
+
75
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_standard_layout.h ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_scalar.h>
25
+ #include <cuda/std/__type_traits/remove_all_extents.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_IS_STANDARD_LAYOUT) && !defined(_LIBCUDACXX_USE_IS_STANDARD_LAYOUT_FALLBACK)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout
33
+ : public integral_constant<bool, _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp)>
34
+ {};
35
+
36
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
37
+ template <class _Tp>
38
+ _CCCL_INLINE_VAR constexpr bool is_standard_layout_v = _CCCL_BUILTIN_IS_STANDARD_LAYOUT(_Tp);
39
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
40
+
41
+ #else
42
+
43
+ template <class _Tp>
44
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_standard_layout
45
+ : integral_constant<bool, is_scalar<remove_all_extents_t<_Tp>>::value>
46
+ {};
47
+
48
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
49
+ template <class _Tp>
50
+ _CCCL_INLINE_VAR constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value;
51
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
52
+
53
+ #endif // defined(_CCCL_BUILTIN_IS_STANDARD_LAYOUT) && !defined(_LIBCUDACXX_USE_IS_STANDARD_LAYOUT_FALLBACK)
54
+
55
+ _LIBCUDACXX_END_NAMESPACE_STD
56
+
57
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_swappable.h ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SWAPPABLE_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_SWAPPABLE_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/add_lvalue_reference.h>
24
+ #include <cuda/std/__type_traits/conditional.h>
25
+ #include <cuda/std/__type_traits/disjunction.h>
26
+ #include <cuda/std/__type_traits/enable_if.h>
27
+ #include <cuda/std/__type_traits/is_move_assignable.h>
28
+ #include <cuda/std/__type_traits/is_move_constructible.h>
29
+ #include <cuda/std/__type_traits/is_nothrow_move_assignable.h>
30
+ #include <cuda/std/__type_traits/is_nothrow_move_constructible.h>
31
+ #include <cuda/std/__type_traits/is_referenceable.h>
32
+ #include <cuda/std/__type_traits/is_same.h>
33
+ #include <cuda/std/__type_traits/is_void.h>
34
+ #include <cuda/std/__type_traits/nat.h>
35
+ #include <cuda/std/__type_traits/type_identity.h>
36
+ #include <cuda/std/__utility/declval.h>
37
+ #include <cuda/std/cstddef>
38
+
39
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
40
+
41
+ // We need to detect whether there is already a free function swap that would end up being ambiguous.
42
+ // This can happen when a type pulls in both namespace std and namespace cuda::std via ADL.
43
+ // In that case we are always safe to just not do anything because that type must be host only.
44
+ // However, we must be careful to ensure that we still create the overload if there is just a hidden friend swap
45
+ namespace __detect_hidden_friend_swap
46
+ {
47
+ // This will intentionally create an ambiguity with std::swap if that is find-able by ADL. But it will not interfere
48
+ // with hidden friend swap
49
+ template <class _Tp>
50
+ _CCCL_HOST_DEVICE void swap(_Tp&, _Tp&);
51
+
52
+ struct __hidden_friend_swap_found
53
+ {};
54
+
55
+ template <class _Tp>
56
+ _LIBCUDACXX_HIDE_FROM_ABI auto __swap(_Tp& __lhs, _Tp& __rhs) -> decltype(swap(__lhs, __rhs));
57
+ _LIBCUDACXX_HIDE_FROM_ABI auto __swap(...) -> __hidden_friend_swap_found;
58
+ template <class _Tp>
59
+ struct __has_hidden_friend_swap
60
+ : is_same<decltype(__detect_hidden_friend_swap::__swap(_CUDA_VSTD::declval<_Tp&>(), _CUDA_VSTD::declval<_Tp&>())),
61
+ void>
62
+ {};
63
+ } // namespace __detect_hidden_friend_swap
64
+
65
+ namespace __detect_adl_swap
66
+ {
67
+
68
+ template <class _Tp>
69
+ void swap(_Tp&, _Tp&) = delete;
70
+
71
+ struct __no_adl_swap_found
72
+ {};
73
+ template <class _Tp>
74
+ _LIBCUDACXX_HIDE_FROM_ABI auto __swap(_Tp& __lhs, _Tp& __rhs) -> decltype(swap(__lhs, __rhs));
75
+ _LIBCUDACXX_HIDE_FROM_ABI auto __swap(...) -> __no_adl_swap_found;
76
+ template <class _Tp>
77
+ struct __has_no_adl_swap
78
+ : is_same<decltype(__detect_adl_swap::__swap(_CUDA_VSTD::declval<_Tp&>(), _CUDA_VSTD::declval<_Tp&>())),
79
+ __no_adl_swap_found>
80
+ {};
81
+ template <class _Tp, size_t _Np>
82
+ struct __has_no_adl_swap_array
83
+ : is_same<
84
+ decltype(__detect_adl_swap::__swap(_CUDA_VSTD::declval<_Tp (&)[_Np]>(), _CUDA_VSTD::declval<_Tp (&)[_Np]>())),
85
+ __no_adl_swap_found>
86
+ {};
87
+
88
+ // We should only define swap if there is no ADL found function or it is a hidden friend
89
+ template <class _Tp>
90
+ struct __can_define_swap : _Or<__has_no_adl_swap<_Tp>, __detect_hidden_friend_swap::__has_hidden_friend_swap<_Tp>>
91
+ {};
92
+ } // namespace __detect_adl_swap
93
+
94
+ template <class _Tp>
95
+ struct __is_swappable;
96
+ template <class _Tp>
97
+ struct __is_nothrow_swappable;
98
+
99
+ template <class _Tp>
100
+ using __swap_result_t _CCCL_NODEBUG_ALIAS =
101
+ enable_if_t<__detect_adl_swap::__can_define_swap<_Tp>::value && _CCCL_TRAIT(is_move_constructible, _Tp)
102
+ && _CCCL_TRAIT(is_move_assignable, _Tp)>;
103
+
104
+ // we use type_identity_t<_Tp> as second parameter, to avoid ambiguity with std::swap, which will thus be preferred by
105
+ // overload resolution (which is ok since std::swap is only considered when explicitly called, or found by ADL for types
106
+ // from std::)
107
+ template <class _Tp>
108
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __swap_result_t<_Tp> swap(_Tp& __x, type_identity_t<_Tp>& __y) noexcept(
109
+ _CCCL_TRAIT(is_nothrow_move_constructible, _Tp) && _CCCL_TRAIT(is_nothrow_move_assignable, _Tp));
110
+
111
+ template <class _Tp, size_t _Np>
112
+ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14
113
+ enable_if_t<__detect_adl_swap::__has_no_adl_swap_array<_Tp, _Np>::value && __is_swappable<_Tp>::value>
114
+ swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) noexcept(__is_nothrow_swappable<_Tp>::value);
115
+
116
+ namespace __detail
117
+ {
118
+ // ALL generic swap overloads MUST already have a declaration available at this point.
119
+
120
+ template <class _Tp, class _Up = _Tp, bool _NotVoid = !_CCCL_TRAIT(is_void, _Tp) && !_CCCL_TRAIT(is_void, _Up)>
121
+ struct __swappable_with
122
+ {
123
+ template <class _LHS, class _RHS>
124
+ _LIBCUDACXX_HIDE_FROM_ABI static decltype(swap(_CUDA_VSTD::declval<_LHS>(), _CUDA_VSTD::declval<_RHS>()))
125
+ __test_swap(int);
126
+ template <class, class>
127
+ _LIBCUDACXX_HIDE_FROM_ABI static __nat __test_swap(long);
128
+
129
+ // Extra parens are needed for the C++03 definition of decltype.
130
+ typedef decltype((__test_swap<_Tp, _Up>(0))) __swap1;
131
+ typedef decltype((__test_swap<_Up, _Tp>(0))) __swap2;
132
+
133
+ static const bool value = _IsNotSame<__swap1, __nat>::value && _IsNotSame<__swap2, __nat>::value;
134
+ };
135
+
136
+ template <class _Tp, class _Up>
137
+ struct __swappable_with<_Tp, _Up, false> : false_type
138
+ {};
139
+
140
+ template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value>
141
+ struct __nothrow_swappable_with
142
+ {
143
+ static const bool value = noexcept(swap(_CUDA_VSTD::declval<_Tp>(), _CUDA_VSTD::declval<_Up>()))
144
+ && noexcept(swap(_CUDA_VSTD::declval<_Up>(), _CUDA_VSTD::declval<_Tp>()));
145
+ };
146
+
147
+ template <class _Tp, class _Up>
148
+ struct __nothrow_swappable_with<_Tp, _Up, false> : false_type
149
+ {};
150
+
151
+ } // namespace __detail
152
+
153
+ template <class _Tp>
154
+ struct __is_swappable : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value>
155
+ {};
156
+
157
+ template <class _Tp>
158
+ struct __is_nothrow_swappable : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp&>::value>
159
+ {};
160
+
161
+ #if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
162
+
163
+ template <class _Tp, class _Up>
164
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_swappable_with
165
+ : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value>
166
+ {};
167
+
168
+ template <class _Tp>
169
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_swappable
170
+ : public conditional_t<__cccl_is_referenceable<_Tp>::value,
171
+ is_swappable_with<add_lvalue_reference_t<_Tp>, add_lvalue_reference_t<_Tp>>,
172
+ false_type>
173
+ {};
174
+
175
+ template <class _Tp, class _Up>
176
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable_with
177
+ : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value>
178
+ {};
179
+
180
+ template <class _Tp>
181
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable
182
+ : public conditional_t<__cccl_is_referenceable<_Tp>::value,
183
+ is_nothrow_swappable_with<add_lvalue_reference_t<_Tp>, add_lvalue_reference_t<_Tp>>,
184
+ false_type>
185
+ {};
186
+
187
+ template <class _Tp, class _Up>
188
+ _CCCL_INLINE_VAR constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
189
+
190
+ template <class _Tp>
191
+ _CCCL_INLINE_VAR constexpr bool is_swappable_v = is_swappable<_Tp>::value;
192
+
193
+ template <class _Tp, class _Up>
194
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value;
195
+
196
+ template <class _Tp>
197
+ _CCCL_INLINE_VAR constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
198
+
199
+ #endif // !_CCCL_NO_VARIABLE_TEMPLATES
200
+
201
+ _LIBCUDACXX_END_NAMESPACE_STD
202
+
203
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_SWAPPABLE_H
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__type_traits/is_trivial.h ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H
11
+ #define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H
12
+
13
+ #include <cuda/std/detail/__config>
14
+
15
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
16
+ # pragma GCC system_header
17
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
18
+ # pragma clang system_header
19
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
20
+ # pragma system_header
21
+ #endif // no system header
22
+
23
+ #include <cuda/std/__type_traits/integral_constant.h>
24
+ #include <cuda/std/__type_traits/is_trivially_copyable.h>
25
+ #include <cuda/std/__type_traits/is_trivially_default_constructible.h>
26
+
27
+ _LIBCUDACXX_BEGIN_NAMESPACE_STD
28
+
29
+ #if defined(_CCCL_BUILTIN_IS_TRIVIAL) && !defined(_LIBCUDACXX_USE_IS_TRIVIAL_FALLBACK)
30
+
31
+ template <class _Tp>
32
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial : public integral_constant<bool, _CCCL_BUILTIN_IS_TRIVIAL(_Tp)>
33
+ {};
34
+
35
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
36
+ template <class _Tp>
37
+ _CCCL_INLINE_VAR constexpr bool is_trivial_v = _CCCL_BUILTIN_IS_TRIVIAL(_Tp);
38
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
39
+
40
+ #else
41
+
42
+ template <class _Tp>
43
+ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivial
44
+ : public integral_constant<bool, is_trivially_copyable<_Tp>::value && is_trivially_default_constructible<_Tp>::value>
45
+ {};
46
+
47
+ # if !defined(_CCCL_NO_VARIABLE_TEMPLATES)
48
+ template <class _Tp>
49
+ _CCCL_INLINE_VAR constexpr bool is_trivial_v = is_trivial<_Tp>::value;
50
+ # endif // !_CCCL_NO_VARIABLE_TEMPLATES
51
+
52
+ #endif // defined(_CCCL_BUILTIN_IS_TRIVIAL) && !defined(_LIBCUDACXX_USE_IS_TRIVIAL_FALLBACK)
53
+
54
+ _LIBCUDACXX_END_NAMESPACE_STD
55
+
56
+ #endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H