ZTWHHH commited on
Commit
fe4df50
·
verified ·
1 Parent(s): c1c81dd

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/torch/include/ATen/cpu/vec/vec512/vec512.h +291 -0
  2. vllm/lib/python3.10/site-packages/torch/include/ATen/cpu/vec/vec512/vec512_int.h +1459 -0
  3. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_conj_physical_compositeexplicitautograd_dispatch.h +25 -0
  4. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_ctc_loss_backward_cpu_dispatch.h +24 -0
  5. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cufft_get_plan_cache_max_size_native.h +21 -0
  6. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_debug_has_internal_overlap_compositeimplicitautograd_dispatch.h +23 -0
  7. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_log10_cuda_dispatch.h +24 -0
  8. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_adam_compositeexplicitautograd_dispatch.h +28 -0
  9. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_dropout_ops.h +39 -0
  10. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_is_all_true.h +30 -0
  11. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_make_per_channel_quantized_tensor_compositeexplicitautograd_dispatch.h +24 -0
  12. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_from_mask_compositeexplicitautograd_dispatch.h +24 -0
  13. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_from_tensor_list_native.h +22 -0
  14. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_pdist_backward.h +39 -0
  15. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_flash_attention_ops.h +28 -0
  16. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_sparse_sum_backward_compositeexplicitautograd_dispatch.h +24 -0
  17. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_test_functorch_fallback.h +39 -0
  18. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_unique2_ops.h +39 -0
  19. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_unsafe_index_put_ops.h +28 -0
  20. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_bicubic2d_aa_ops.h +50 -0
  21. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_nearest_exact2d_backward_compositeexplicitautogradnonfunctional_dispatch.h +24 -0
  22. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/align_to.h +26 -0
  23. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/all_compositeexplicitautogradnonfunctional_dispatch.h +25 -0
  24. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/argmin_native.h +23 -0
  25. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/bitwise_and_meta.h +27 -0
  26. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cauchy_meta_dispatch.h +23 -0
  27. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/constant_pad_nd_native.h +22 -0
  28. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/conv_tbc.h +39 -0
  29. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/corrcoef.h +30 -0
  30. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_convolution_relu_cuda_dispatch.h +24 -0
  31. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask.h +39 -0
  32. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fft_hfftn.h +91 -0
  33. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fft_ifft.h +91 -0
  34. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fractional_max_pool3d_native.h +26 -0
  35. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fused_moving_avg_obs_fake_quant_compositeimplicitautograd_dispatch.h +23 -0
  36. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/gather_compositeimplicitautograd_dispatch.h +25 -0
  37. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/hamming_window_compositeexplicitautograd_dispatch.h +38 -0
  38. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/hardshrink_compositeexplicitautogradnonfunctional_dispatch.h +23 -0
  39. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/index_copy_meta.h +39 -0
  40. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/is_set_to_cpu_dispatch.h +23 -0
  41. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/less_equal_ops.h +83 -0
  42. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cross_native.h +24 -0
  43. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_lu_factor_ex_cuda_dispatch.h +25 -0
  44. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/matrix_H.h +26 -0
  45. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/max_pool3d.h +30 -0
  46. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/moveaxis_ops.h +39 -0
  47. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/msort.h +39 -0
  48. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/native_batch_norm_backward_cpu_dispatch.h +23 -0
  49. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/new_ones.h +97 -0
  50. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/new_ones_compositeexplicitautograd_dispatch.h +30 -0
vllm/lib/python3.10/site-packages/torch/include/ATen/cpu/vec/vec512/vec512.h ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // DO NOT DEFINE STATIC DATA IN THIS HEADER!
4
+ // See Note [Do not compile initializers with AVX]
5
+
6
+ #include <ATen/cpu/vec/intrinsics.h>
7
+
8
+ #include <ATen/cpu/vec/vec_base.h>
9
+ #include <ATen/cpu/vec/vec512/vec512_float.h>
10
+ #include <ATen/cpu/vec/vec512/vec512_bfloat16.h>
11
+ #include <ATen/cpu/vec/vec512/vec512_double.h>
12
+ #include <ATen/cpu/vec/vec512/vec512_int.h>
13
+ #include <ATen/cpu/vec/vec512/vec512_qint.h>
14
+ #include <ATen/cpu/vec/vec512/vec512_complex_float.h>
15
+ #include <ATen/cpu/vec/vec512/vec512_complex_double.h>
16
+ #include <ATen/cpu/vec/vec512/vec512_convert.h>
17
+ #include <ATen/cpu/vec/vec512/vec512_mask.h>
18
+
19
+ #include <algorithm>
20
+ #include <cstddef>
21
+ #include <cstdint>
22
+ #include <cstring>
23
+ #include <ostream>
24
+
25
+ namespace at {
26
+ namespace vec {
27
+
28
+ // See Note [CPU_CAPABILITY namespace]
29
+ inline namespace CPU_CAPABILITY {
30
+
31
+ inline std::ostream& operator<<(std::ostream& stream, const c10::qint32& val) {
32
+ stream << val.val_;
33
+ return stream;
34
+ }
35
+ inline std::ostream& operator<<(std::ostream& stream, const c10::qint8& val) {
36
+ stream << static_cast<int>(val.val_);
37
+ return stream;
38
+ }
39
+ inline std::ostream& operator<<(std::ostream& stream, const c10::quint8& val) {
40
+ stream << static_cast<unsigned int>(val.val_);
41
+ return stream;
42
+ }
43
+
44
+ template <typename T>
45
+ std::ostream& operator<<(std::ostream& stream, const Vectorized<T>& vec) {
46
+ T buf[Vectorized<T>::size()];
47
+ vec.store(buf);
48
+ stream << "vec[";
49
+ for (int i = 0; i != Vectorized<T>::size(); i++) {
50
+ if (i != 0) {
51
+ stream << ", ";
52
+ }
53
+ stream << buf[i];
54
+ }
55
+ stream << "]";
56
+ return stream;
57
+ }
58
+
59
+
60
+ #if defined(CPU_CAPABILITY_AVX512)
61
+
62
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CAST (AVX512) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
+
64
+ template<>
65
+ inline Vectorized<float> cast<float, double>(const Vectorized<double>& src) {
66
+ return _mm512_castpd_ps(src);
67
+ }
68
+
69
+ template<>
70
+ inline Vectorized<double> cast<double, float>(const Vectorized<float>& src) {
71
+ return _mm512_castps_pd(src);
72
+ }
73
+
74
+ template<>
75
+ inline Vectorized<float> cast<float, int32_t>(const Vectorized<int32_t>& src) {
76
+ return _mm512_castsi512_ps(src);
77
+ }
78
+
79
+ template<>
80
+ inline Vectorized<double> cast<double, int64_t>(const Vectorized<int64_t>& src) {
81
+ return _mm512_castsi512_pd(src);
82
+ }
83
+
84
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GATHER ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
+ #ifndef _MSC_VER
86
+ // MSVC is not working well on complex function overload.
87
+ template<int64_t scale = 1>
88
+ std::enable_if_t<scale == 1 || scale == 2 || scale == 4 || scale == 8, Vectorized<double>>
89
+ inline gather(const double* base_addr, const Vectorized<int64_t>& vindex) {
90
+ return _mm512_i64gather_pd(vindex, base_addr, scale);
91
+ }
92
+
93
+ template<int64_t scale = 1>
94
+ std::enable_if_t<scale == 1 || scale == 2 || scale == 4 || scale == 8, Vectorized<float>>
95
+ inline gather(const float* base_addr, const Vectorized<int32_t>& vindex) {
96
+ return _mm512_i32gather_ps(vindex, base_addr, scale);
97
+ }
98
+ #endif
99
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MASK GATHER ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
+ #ifndef _MSC_VER
101
+ // MSVC is not working well on complex function overload.
102
+ template<int64_t scale = 1>
103
+ std::enable_if_t<scale == 1 || scale == 2 || scale == 4 || scale == 8, Vectorized<double>>
104
+ inline mask_gather(const Vectorized<double>& src, const double* base_addr,
105
+ const Vectorized<int64_t>& vindex, Vectorized<double>& mask) {
106
+ auto all_ones = _mm512_castsi512_pd(_mm512_set1_epi64(0xFFFFFFFFFFFFFFFF));
107
+ auto mask_ = _mm512_cmp_pd_mask(all_ones, mask.values, _CMP_EQ_OQ);
108
+ return _mm512_mask_i64gather_pd(src, mask_, vindex, base_addr, scale);
109
+ }
110
+
111
+ template<int64_t scale = 1>
112
+ std::enable_if_t<scale == 1 || scale == 2 || scale == 4 || scale == 8, Vectorized<float>>
113
+ inline mask_gather(const Vectorized<float>& src, const float* base_addr,
114
+ const Vectorized<int32_t>& vindex, Vectorized<float>& mask) {
115
+ auto all_ones = _mm512_castsi512_ps(_mm512_set1_epi32(0xFFFFFFFF));
116
+ auto mask_ = _mm512_cmp_ps_mask(all_ones, mask.values, _CMP_EQ_OQ);
117
+ return _mm512_mask_i32gather_ps(src, mask_, vindex, base_addr, scale);
118
+ }
119
+ #endif
120
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CONVERT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
+
122
+ template<>
123
+ Vectorized<int64_t>
124
+ inline convert_to_int_of_same_size<double>(const Vectorized<double> &src) {
125
+ return _mm512_cvtpd_epi64(src);
126
+ }
127
+
128
+ template<>
129
+ Vectorized<int32_t>
130
+ inline convert_to_int_of_same_size<float>(const Vectorized<float> &src) {
131
+ return _mm512_cvttps_epi32(src);
132
+ }
133
+
134
+ template<>
135
+ Vectorized<double>
136
+ inline convert_to_fp_of_same_size<double>(const Vectorized<int64_t> &src) {
137
+ return _mm512_cvtepi64_pd(src);
138
+ }
139
+
140
+ template<>
141
+ Vectorized<float>
142
+ inline convert_to_fp_of_same_size<float>(const Vectorized<int32_t> &src) {
143
+ return _mm512_cvtepi32_ps(src);
144
+ }
145
+
146
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTERLEAVE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+
148
+ template <>
149
+ std::pair<Vectorized<double>, Vectorized<double>>
150
+ inline interleave2<double>(const Vectorized<double>& a, const Vectorized<double>& b) {
151
+ // inputs:
152
+ // a = {a0, a1, a3, a3, a4, a5, a6, a7}
153
+ // b = {b0, b1, b2, b3, b4, b5, b6, b7}
154
+ // group cols crossing lanes:
155
+ // return {a0, b0, a1, b1, a2, b2, a3, b3}
156
+ // {a4, b4, a5, b5, a6, b6, a7, b7}
157
+ __m512i idx1 = _mm512_set_epi64(11, 3, 10, 2, 9, 1, 8, 0);
158
+ __m512i idx2 = _mm512_set_epi64(15, 7, 14, 6, 13, 5, 12, 4);
159
+ return std::make_pair(_mm512_mask_permutex2var_pd(a, 0xff, idx1, b),
160
+ _mm512_mask_permutex2var_pd(a, 0xff, idx2, b));
161
+ }
162
+
163
+ template <>
164
+ std::pair<Vectorized<float>, Vectorized<float>>
165
+ inline interleave2<float>(const Vectorized<float>& a, const Vectorized<float>& b) {
166
+ // inputs:
167
+ // a = {a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15}
168
+ // b = {b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15}
169
+ //
170
+ // return:
171
+ // {a0, b0, a1, b1, a2, b2, a3, b3, a4, b4, a5, b5, a6, b6, a7, b7}
172
+ // {a8, b8, a9, b9, a10, b10, a11, b11, a12, b12, a13, b13, a14, b14, a15, b15}
173
+ __m512i idx1 = _mm512_set_epi32(23, 7, 22, 6, 21, 5, 20, 4,
174
+ 19, 3, 18, 2, 17, 1, 16, 0);
175
+ __m512i idx2 = _mm512_set_epi32(31, 15, 30, 14, 29, 13, 28, 12,
176
+ 27, 11, 26, 10, 25, 9, 24, 8);
177
+ return std::make_pair(_mm512_mask_permutex2var_ps(a, 0xffff, idx1, b),
178
+ _mm512_mask_permutex2var_ps(a, 0xffff, idx2, b));
179
+ }
180
+
181
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEINTERLEAVE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182
+
183
+ template <>
184
+ std::pair<Vectorized<double>, Vectorized<double>>
185
+ inline deinterleave2<double>(const Vectorized<double>& a, const Vectorized<double>& b) {
186
+ // inputs:
187
+ // a = {a0, b0, a1, b1, a2, b2, a3, b3}
188
+ // b = {a4, b4, a5, b5, a6, b6, a7, b7}
189
+ // output:
190
+ // return {a0, a1, a2, a3, a4, a5, a6, a7}
191
+ // {b0, b1, b2, b3, b4, b5, b6, b7}
192
+ // The members of indices have been written in binary format for better understandability
193
+ __m512i idx1 = _mm512_set_epi64(14, 12, 10, 8, 6, 4, 2, 0);
194
+ __m512i idx2 = _mm512_set_epi64(15, 13, 11, 9, 7, 5, 3, 1);
195
+
196
+ return std::make_pair(_mm512_mask_permutex2var_pd(a, 0xff, idx1, b),
197
+ _mm512_mask_permutex2var_pd(a, 0xff, idx2, b));
198
+ }
199
+
200
+ template <>
201
+ std::pair<Vectorized<float>, Vectorized<float>>
202
+ inline deinterleave2<float>(const Vectorized<float>& a, const Vectorized<float>& b) {
203
+ // inputs:
204
+ // a = {a0, b0, a1, b1, a2, b2, a3, b3, a4, b4, a5, b5, a6, b6, a7, b7}
205
+ // b = {a8, b8, a9, b9, a10, b10, a11, b11, a12, b12, a13, b13, a14, b14, a15, b15}
206
+ // output:
207
+ // return {a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15}
208
+ // {b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15}
209
+ __m512i idx1 = _mm512_set_epi32(30, 28, 26, 24, 22, 20, 18, 16,
210
+ 14, 12, 10, 8, 6, 4, 2, 0);
211
+ __m512i idx2 = _mm512_set_epi32(31, 29, 27, 25, 23, 21, 19, 17,
212
+ 15, 13, 11, 9, 7, 5, 3, 1);
213
+
214
+ return std::make_pair(_mm512_mask_permutex2var_ps(a, 0xffff, idx1, b),
215
+ _mm512_mask_permutex2var_ps(a, 0xffff, idx2, b));
216
+ }
217
+
218
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FLIP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219
+
220
+ template<>
221
+ inline Vectorized<float> flip(const Vectorized<float> & v) {
222
+ const __m512i mask = _mm512_set_epi32(0, 1, 2, 3, 4, 5, 6, 7,
223
+ 8, 9, 10, 11, 12, 13, 14, 15);
224
+ return _mm512_permutexvar_ps(mask, v);
225
+ }
226
+
227
+ template<>
228
+ inline Vectorized<double> flip(const Vectorized<double> & v) {
229
+ const __m512i mask = _mm512_set_epi64(0, 1, 2, 3, 4, 5, 6, 7);
230
+ return _mm512_permutexvar_pd(mask, v);
231
+ }
232
+
233
+ template<>
234
+ inline Vectorized<int64_t> flip(const Vectorized<int64_t> & v) {
235
+ const __m512i mask = _mm512_set_epi64(0, 1, 2, 3, 4, 5, 6, 7);
236
+ return _mm512_permutexvar_epi64(mask, v);
237
+ }
238
+
239
+ template<>
240
+ inline Vectorized<int32_t> flip(const Vectorized<int32_t> & v) {
241
+ const __m512i mask = _mm512_set_epi32(0, 1, 2, 3, 4, 5, 6, 7,
242
+ 8, 9, 10, 11, 12, 13, 14, 15);
243
+ return _mm512_permutexvar_epi32(mask, v);
244
+ }
245
+
246
+ template<>
247
+ inline Vectorized<int16_t> flip(const Vectorized<int16_t> & v) {
248
+ const __m512i mask = _mm512_set_epi16(
249
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
250
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
251
+ );
252
+ return _mm512_permutexvar_epi16(mask, v);
253
+ }
254
+
255
+ inline __m512i flip8(const __m512i & v) {
256
+ const __m512i mask1 = _mm512_set_epi8(
257
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
258
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
259
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
260
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
261
+ );
262
+ const __m512i mask2 = _mm512_set_epi64(1, 0, 3, 2, 5, 4, 7, 6);
263
+ auto reversed_vec = _mm512_shuffle_epi8(v, mask1);
264
+ return _mm512_permutexvar_epi64(mask2, reversed_vec);
265
+ }
266
+
267
+ template<>
268
+ inline Vectorized<int8_t> flip(const Vectorized<int8_t> & v) {
269
+ return flip8(v);
270
+ }
271
+
272
+ template<>
273
+ inline Vectorized<uint8_t> flip(const Vectorized<uint8_t> & v) {
274
+ return flip8(v);
275
+ }
276
+
277
+ inline Vectorized<bool> operator&&(
278
+ const Vectorized<bool>& self,
279
+ const Vectorized<bool>& other) {
280
+ const __m512i* self_ = reinterpret_cast<const __m512i*>(self.as_bytes());
281
+ const __m512i* other_ = reinterpret_cast<const __m512i*>(other.as_bytes());
282
+ __m512i out = _mm512_and_si512(*self_, *other_);
283
+ Vectorized<bool> ret;
284
+ // We do not have a constructer that takes __m512i, so we need to memcpy
285
+ std::memcpy(ret, &out, ret.size() * sizeof(bool));
286
+ return ret;
287
+ }
288
+
289
+ #endif // defined(CPU_CAPABILITY_AVX512)
290
+
291
+ }}}
vllm/lib/python3.10/site-packages/torch/include/ATen/cpu/vec/vec512/vec512_int.h ADDED
@@ -0,0 +1,1459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // DO NOT DEFINE STATIC DATA IN THIS HEADER!
4
+ // See Note [Do not compile initializers with AVX]
5
+
6
+ #include <ATen/cpu/vec/intrinsics.h>
7
+ #include <ATen/cpu/vec/vec_base.h>
8
+ #include <c10/macros/Macros.h>
9
+ #include <c10/util/irange.h>
10
+
11
+ namespace at {
12
+ namespace vec {
13
+ inline namespace CPU_CAPABILITY {
14
+
15
+ #ifdef CPU_CAPABILITY_AVX512
16
+
17
+ struct Vectorizedi {
18
+ protected:
19
+ __m512i values;
20
+ static constexpr __m512i zero_vector {0, 0, 0, 0, 0, 0, 0, 0};
21
+ static inline __m512i invert(const __m512i& v) {
22
+ const auto ones = _mm512_set1_epi64(-1);
23
+ return _mm512_xor_si512(ones, v);
24
+ }
25
+ public:
26
+ Vectorizedi() {}
27
+ Vectorizedi(__m512i v) : values(v) {}
28
+ operator __m512i() const {
29
+ return values;
30
+ }
31
+ };
32
+
33
+ #else
34
+
35
+ struct Vectorizedi {}; // dummy definition to make Vectorizedi always defined
36
+
37
+ #endif // CPU_CAPABILITY_AVX512
38
+
39
+ #ifdef CPU_CAPABILITY_AVX512
40
+
41
+ template <>
42
+ class Vectorized<int64_t> : public Vectorizedi {
43
+ private:
44
+ static const Vectorized<int64_t> ones;
45
+ public:
46
+ using value_type = int64_t;
47
+ using size_type = int;
48
+ static constexpr size_type size() {
49
+ return 8;
50
+ }
51
+ using Vectorizedi::Vectorizedi;
52
+ Vectorized() {}
53
+ Vectorized(int64_t v) { values = _mm512_set1_epi64(v); }
54
+ Vectorized(int64_t val1, int64_t val2, int64_t val3, int64_t val4,
55
+ int64_t val5, int64_t val6, int64_t val7, int64_t val8) {
56
+ values = _mm512_setr_epi64(val1, val2, val3, val4,
57
+ val5, val6, val7, val8);
58
+ }
59
+ template <int64_t mask>
60
+ static Vectorized<int64_t> blend(Vectorized<int64_t> a, Vectorized<int64_t> b) {
61
+ return _mm512_mask_blend_epi64(mask, a.values, b.values);
62
+ }
63
+ static Vectorized<int64_t> blendv(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b,
64
+ const Vectorized<int64_t>& mask) {
65
+ auto msb_one = _mm512_set1_epi64(0xFFFFFFFFFFFFFFFF);
66
+ auto mask_ = _mm512_cmp_epi64_mask(mask, msb_one, _MM_CMPINT_EQ);
67
+ return _mm512_mask_blend_epi64(mask_, a.values, b.values);
68
+ }
69
+ template <typename step_t>
70
+ static Vectorized<int64_t> arange(int64_t base = 0, step_t step = static_cast<step_t>(1)) {
71
+ return Vectorized<int64_t>(base, base + step, base + 2 * step, base + 3 * step,
72
+ base + 4 * step, base + 5 * step, base + 6 * step, base + 7 * step);
73
+ }
74
+ static Vectorized<int64_t>
75
+ set(Vectorized<int64_t> a, Vectorized<int64_t> b, int64_t count = size()) {
76
+ switch (count) {
77
+ case 0:
78
+ return a;
79
+ case 1:
80
+ return blend<1>(a, b);
81
+ case 2:
82
+ return blend<3>(a, b);
83
+ case 3:
84
+ return blend<7>(a, b);
85
+ case 4:
86
+ return blend<15>(a, b);
87
+ case 5:
88
+ return blend<31>(a, b);
89
+ case 6:
90
+ return blend<63>(a, b);
91
+ case 7:
92
+ return blend<127>(a, b);
93
+ }
94
+ return b;
95
+ }
96
+ static Vectorized<int64_t> loadu(const void* ptr) {
97
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
98
+ }
99
+ static Vectorized<int64_t> loadu(const void* ptr, int64_t count) {
100
+ if (count == size()) {
101
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
102
+ } else {
103
+ __mmask8 mask = (1ULL << count) - 1;
104
+ return _mm512_maskz_loadu_epi64(mask, ptr);
105
+ }
106
+ }
107
+ void store(void* ptr, int count = size()) const {
108
+ if (count == size()) {
109
+ // ptr need not to be aligned here. See
110
+ // https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-for-intel-advanced-vector-extensions/intrinsics-for-load-and-store-operations-1/mm512-storeu-si512.html
111
+ _mm512_storeu_si512(reinterpret_cast<__m512i*>(ptr), values);
112
+ } else if (count > 0) {
113
+ __mmask8 mask = (1ULL << count) - 1;
114
+ _mm512_mask_storeu_epi64(ptr, mask, values);
115
+ }
116
+ }
117
+ const int64_t& operator[](int idx) const = delete;
118
+ int64_t& operator[](int idx) = delete;
119
+ Vectorized<int64_t> abs() const {
120
+ auto is_larger_mask = _mm512_cmpgt_epi64_mask(zero_vector, values);
121
+ auto is_larger = _mm512_mask_set1_epi64(zero_vector, is_larger_mask, 0xFFFFFFFFFFFFFFFF);
122
+ auto inverse = _mm512_xor_si512(values, is_larger);
123
+ return _mm512_sub_epi64(inverse, is_larger);
124
+ }
125
+ Vectorized<int64_t> real() const {
126
+ return *this;
127
+ }
128
+ Vectorized<int64_t> imag() const {
129
+ return _mm512_set1_epi64(0);
130
+ }
131
+ Vectorized<int64_t> conj() const {
132
+ return *this;
133
+ }
134
+ Vectorized<int64_t> neg() const;
135
+ Vectorized<int64_t> operator==(const Vectorized<int64_t>& other) const {
136
+ auto mask = _mm512_cmpeq_epi64_mask(values, other.values);
137
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
138
+ }
139
+ Vectorized<int64_t> operator!=(const Vectorized<int64_t>& other) const {
140
+ auto mask = _mm512_cmpneq_epi64_mask(values, other.values);
141
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
142
+ }
143
+ Vectorized<int64_t> operator<(const Vectorized<int64_t>& other) const {
144
+ auto mask = _mm512_cmplt_epi64_mask(values, other.values);
145
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
146
+ }
147
+ Vectorized<int64_t> operator<=(const Vectorized<int64_t>& other) const {
148
+ auto mask = _mm512_cmple_epi64_mask(values, other.values);
149
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
150
+ }
151
+ Vectorized<int64_t> operator>(const Vectorized<int64_t>& other) const {
152
+ auto mask = _mm512_cmpgt_epi64_mask(values, other.values);
153
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
154
+ }
155
+ Vectorized<int64_t> operator>=(const Vectorized<int64_t>& other) const {
156
+ auto mask = _mm512_cmpge_epi64_mask(values, other.values);
157
+ return _mm512_mask_set1_epi64(zero_vector, mask, 0xFFFFFFFFFFFFFFFF);
158
+ }
159
+
160
+ Vectorized<int64_t> eq(const Vectorized<int64_t>& other) const;
161
+ Vectorized<int64_t> ne(const Vectorized<int64_t>& other) const;
162
+ Vectorized<int64_t> gt(const Vectorized<int64_t>& other) const;
163
+ Vectorized<int64_t> ge(const Vectorized<int64_t>& other) const;
164
+ Vectorized<int64_t> lt(const Vectorized<int64_t>& other) const;
165
+ Vectorized<int64_t> le(const Vectorized<int64_t>& other) const;
166
+ };
167
+
168
+ template <>
169
+ class Vectorized<int32_t> : public Vectorizedi {
170
+ private:
171
+ static constexpr __m512i zero_vector {0, 0, 0, 0, 0, 0, 0, 0};
172
+ static const Vectorized<int32_t> ones;
173
+ public:
174
+ using value_type = int32_t;
175
+ static constexpr int size() {
176
+ return 16;
177
+ }
178
+ using Vectorizedi::Vectorizedi;
179
+ Vectorized() {}
180
+ Vectorized(int32_t v) { values = _mm512_set1_epi32(v); }
181
+ Vectorized(int32_t val1, int32_t val2, int32_t val3, int32_t val4,
182
+ int32_t val5, int32_t val6, int32_t val7, int32_t val8,
183
+ int32_t val9, int32_t val10, int32_t val11, int32_t val12,
184
+ int32_t val13, int32_t val14, int32_t val15, int32_t val16) {
185
+ values = _mm512_setr_epi32(val1, val2, val3, val4, val5, val6, val7, val8,
186
+ val9, val10, val11, val12, val13, val14, val15, val16);
187
+ }
188
+ template <int64_t mask>
189
+ static Vectorized<int32_t> blend(Vectorized<int32_t> a, Vectorized<int32_t> b) {
190
+ return _mm512_mask_blend_epi32(mask, a.values, b.values);
191
+ }
192
+ static Vectorized<int32_t> blendv(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b,
193
+ const Vectorized<int32_t>& mask) {
194
+ auto msb_one = _mm512_set1_epi32(0xFFFFFFFF);
195
+ auto mask_ = _mm512_cmp_epi32_mask(mask, msb_one, _MM_CMPINT_EQ);
196
+ return _mm512_mask_blend_epi32(mask_, a.values, b.values);
197
+ }
198
+ template <typename step_t>
199
+ static Vectorized<int32_t> arange(int32_t base = 0, step_t step = static_cast<step_t>(1)) {
200
+ return Vectorized<int32_t>(
201
+ base, base + step, base + 2 * step, base + 3 * step,
202
+ base + 4 * step, base + 5 * step, base + 6 * step, base + 7 * step,
203
+ base + 8 * step, base + 9 * step, base + 10 * step, base + 11 * step,
204
+ base + 12 * step, base + 13 * step, base + 14 * step, base + 15 * step);
205
+ }
206
+ static Vectorized<int32_t>
207
+ set(Vectorized<int32_t> a, Vectorized<int32_t> b, int32_t count = size()) {
208
+ switch (count) {
209
+ case 0:
210
+ return a;
211
+ case 1:
212
+ return blend<1>(a, b);
213
+ case 2:
214
+ return blend<3>(a, b);
215
+ case 3:
216
+ return blend<7>(a, b);
217
+ case 4:
218
+ return blend<15>(a, b);
219
+ case 5:
220
+ return blend<31>(a, b);
221
+ case 6:
222
+ return blend<63>(a, b);
223
+ case 7:
224
+ return blend<127>(a, b);
225
+ case 8:
226
+ return blend<255>(a, b);
227
+ case 9:
228
+ return blend<511>(a, b);
229
+ case 10:
230
+ return blend<1023>(a, b);
231
+ case 11:
232
+ return blend<2047>(a, b);
233
+ case 12:
234
+ return blend<4095>(a, b);
235
+ case 13:
236
+ return blend<8191>(a, b);
237
+ case 14:
238
+ return blend<16383>(a, b);
239
+ case 15:
240
+ return blend<32767>(a, b);
241
+ }
242
+ return b;
243
+ }
244
+ static Vectorized<int32_t> loadu(const void* ptr) {
245
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
246
+ }
247
+ static Vectorized<int32_t> loadu(const void* ptr, int32_t count) {
248
+ if (count == size()) {
249
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
250
+ } else {
251
+ __mmask16 mask = (1ULL << count) - 1;
252
+ return _mm512_maskz_loadu_epi32(mask, ptr);
253
+ }
254
+ }
255
+ void store(void* ptr, int count = size()) const {
256
+ if (count == size()) {
257
+ // ptr need not to be aligned here. See
258
+ // https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-for-intel-advanced-vector-extensions/intrinsics-for-load-and-store-operations-1/mm512-storeu-si512.html
259
+ _mm512_storeu_si512(reinterpret_cast<__m512i*>(ptr), values);
260
+ } else if (count > 0) {
261
+ __mmask16 mask = (1ULL << count) - 1;
262
+ _mm512_mask_storeu_epi32(ptr, mask, values);
263
+ }
264
+ }
265
+ const int32_t& operator[](int idx) const = delete;
266
+ int32_t& operator[](int idx) = delete;
267
+ Vectorized<int32_t> abs() const {
268
+ return _mm512_abs_epi32(values);
269
+ }
270
+ Vectorized<int32_t> real() const {
271
+ return *this;
272
+ }
273
+ Vectorized<int32_t> imag() const {
274
+ return _mm512_set1_epi32(0);
275
+ }
276
+ Vectorized<int32_t> conj() const {
277
+ return *this;
278
+ }
279
+ Vectorized<int32_t> neg() const;
280
+ Vectorized<int32_t> operator==(const Vectorized<int32_t>& other) const {
281
+ auto mask = _mm512_cmpeq_epi32_mask(values, other.values);
282
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
283
+ }
284
+ Vectorized<int32_t> operator!=(const Vectorized<int32_t>& other) const {
285
+ auto mask = _mm512_cmpneq_epi32_mask(values, other.values);
286
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
287
+ }
288
+ Vectorized<int32_t> operator<(const Vectorized<int32_t>& other) const {
289
+ auto mask = _mm512_cmplt_epi32_mask(values, other.values);
290
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
291
+ }
292
+ Vectorized<int32_t> operator<=(const Vectorized<int32_t>& other) const {
293
+ auto mask = _mm512_cmple_epi32_mask(values, other.values);
294
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
295
+ }
296
+ Vectorized<int32_t> operator>(const Vectorized<int32_t>& other) const {
297
+ auto mask = _mm512_cmpgt_epi32_mask(values, other.values);
298
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
299
+ }
300
+ Vectorized<int32_t> operator>=(const Vectorized<int32_t>& other) const {
301
+ auto mask = _mm512_cmpge_epi32_mask(values, other.values);
302
+ return _mm512_mask_set1_epi32(zero_vector, mask, 0xFFFFFFFF);
303
+ }
304
+ Vectorized<int32_t> eq(const Vectorized<int32_t>& other) const;
305
+ Vectorized<int32_t> ne(const Vectorized<int32_t>& other) const;
306
+ Vectorized<int32_t> gt(const Vectorized<int32_t>& other) const;
307
+ Vectorized<int32_t> ge(const Vectorized<int32_t>& other) const;
308
+ Vectorized<int32_t> lt(const Vectorized<int32_t>& other) const;
309
+ Vectorized<int32_t> le(const Vectorized<int32_t>& other) const;
310
+ };
311
+
312
+ template <>
313
+ inline void convert(const int32_t *src, float *dst, int64_t n) {
314
+ int64_t i;
315
+ // int32_t and float have same size
316
+ #ifndef _MSC_VER
317
+ # pragma unroll
318
+ #endif
319
+ for (i = 0; i <= (n - Vectorized<int32_t>::size()); i += Vectorized<int32_t>::size()) {
320
+ auto input_vec = _mm512_loadu_si512(reinterpret_cast<const __m512i*>(src + i));
321
+ auto output_vec = _mm512_cvtepi32_ps(input_vec);
322
+ _mm512_storeu_ps(reinterpret_cast<float*>(dst + i), output_vec);
323
+ }
324
+ #ifndef _MSC_VER
325
+ # pragma unroll
326
+ #endif
327
+ for (; i < n; i++) {
328
+ dst[i] = static_cast<float>(src[i]);
329
+ }
330
+ }
331
+
332
+ template <>
333
+ inline void convert(const int32_t *src, double *dst, int64_t n) {
334
+ int64_t i;
335
+ // int32_t has half the size of double
336
+ #ifndef _MSC_VER
337
+ # pragma unroll
338
+ #endif
339
+ for (i = 0; i <= (n - Vectorized<double>::size()); i += Vectorized<double>::size()) {
340
+ auto input_256_vec = _mm256_loadu_si256(reinterpret_cast<const __m256i*>(src + i));
341
+ auto output_vec = _mm512_cvtepi32_pd(input_256_vec);
342
+ _mm512_storeu_pd(reinterpret_cast<double*>(dst + i), output_vec);
343
+ }
344
+ #ifndef _MSC_VER
345
+ # pragma unroll
346
+ #endif
347
+ for (; i < n; i++) {
348
+ dst[i] = static_cast<double>(src[i]);
349
+ }
350
+ }
351
+
352
+ template <>
353
+ class Vectorized<int16_t> : public Vectorizedi {
354
+ private:
355
+ static const Vectorized<int16_t> ones;
356
+ static constexpr __m512i zero_vector {0, 0, 0, 0, 0, 0, 0, 0};
357
+ public:
358
+ using value_type = int16_t;
359
+ static constexpr int size() {
360
+ return 32;
361
+ }
362
+ using Vectorizedi::Vectorizedi;
363
+ Vectorized() {}
364
+ Vectorized(int16_t v) { values = _mm512_set1_epi16(v); }
365
+ Vectorized(int16_t val1, int16_t val2, int16_t val3, int16_t val4,
366
+ int16_t val5, int16_t val6, int16_t val7, int16_t val8,
367
+ int16_t val9, int16_t val10, int16_t val11, int16_t val12,
368
+ int16_t val13, int16_t val14, int16_t val15, int16_t val16,
369
+ int16_t val17, int16_t val18, int16_t val19, int16_t val20,
370
+ int16_t val21, int16_t val22, int16_t val23, int16_t val24,
371
+ int16_t val25, int16_t val26, int16_t val27, int16_t val28,
372
+ int16_t val29, int16_t val30, int16_t val31, int16_t val32) {
373
+ values = _mm512_set_epi16(val32, val31, val30, val29, val28, val27, val26, val25,
374
+ val24, val23, val22, val21, val20, val19, val18, val17,
375
+ val16, val15, val14, val13, val12, val11, val10, val9,
376
+ val8, val7, val6, val5, val4, val3, val2, val1);
377
+ }
378
+ template <int64_t mask>
379
+ static Vectorized<int16_t> blend(Vectorized<int16_t> a, Vectorized<int16_t> b) {
380
+ return _mm512_mask_blend_epi16(mask, a.values, b.values);
381
+ }
382
+ static Vectorized<int16_t> blendv(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b,
383
+ const Vectorized<int16_t>& mask) {
384
+ auto msb_one = _mm512_set1_epi16(0xFFFF);
385
+ auto mask_ = _mm512_cmp_epi16_mask(mask, msb_one, _MM_CMPINT_EQ);
386
+ return _mm512_mask_blend_epi16(mask_, a.values, b.values);
387
+ }
388
+ template <typename step_t>
389
+ static Vectorized<int16_t> arange(int16_t base = 0, step_t step = static_cast<step_t>(1)) {
390
+ return Vectorized<int16_t>(
391
+ base, base + step, base + 2 * step, base + 3 * step,
392
+ base + 4 * step, base + 5 * step, base + 6 * step, base + 7 * step,
393
+ base + 8 * step, base + 9 * step, base + 10 * step, base + 11 * step,
394
+ base + 12 * step, base + 13 * step, base + 14 * step, base + 15 * step,
395
+ base + 16 * step, base + 17 * step, base + 18 * step, base + 19 * step,
396
+ base + 20 * step, base + 21 * step, base + 22 * step, base + 23 * step,
397
+ base + 24 * step, base + 25 * step, base + 26 * step, base + 27 * step,
398
+ base + 28 * step, base + 29 * step, base + 30 * step, base + 31 * step
399
+ );
400
+ }
401
+ static Vectorized<int16_t>
402
+ set(Vectorized<int16_t> a, Vectorized<int16_t> b, int16_t count = size()) {
403
+ switch (count) {
404
+ case 0:
405
+ return a;
406
+ case 1:
407
+ return blend<0x1>(a, b);
408
+ case 2:
409
+ return blend<0x3>(a, b);
410
+ case 3:
411
+ return blend<0x7>(a, b);
412
+ case 4:
413
+ return blend<0xF>(a, b);
414
+ case 5:
415
+ return blend<0x1F>(a, b);
416
+ case 6:
417
+ return blend<0x3F>(a, b);
418
+ case 7:
419
+ return blend<0x7F>(a, b);
420
+ case 8:
421
+ return blend<0xFF>(a, b);
422
+ case 9:
423
+ return blend<0x1FF>(a, b);
424
+ case 10:
425
+ return blend<0x3FF>(a, b);
426
+ case 11:
427
+ return blend<0x7FF>(a, b);
428
+ case 12:
429
+ return blend<0xFFF>(a, b);
430
+ case 13:
431
+ return blend<0x1FFF>(a, b);
432
+ case 14:
433
+ return blend<0x3FFF>(a, b);
434
+ case 15:
435
+ return blend<0x7FFF>(a, b);
436
+ case 16:
437
+ return blend<0xFFFF>(a, b);
438
+ case 17:
439
+ return blend<0x1FFFF>(a, b);
440
+ case 18:
441
+ return blend<0x3FFFF>(a, b);
442
+ case 19:
443
+ return blend<0x7FFFF>(a, b);
444
+ case 20:
445
+ return blend<0xFFFFF>(a, b);
446
+ case 21:
447
+ return blend<0x1FFFFF>(a, b);
448
+ case 22:
449
+ return blend<0x3FFFFF>(a, b);
450
+ case 23:
451
+ return blend<0x7FFFFF>(a, b);
452
+ case 24:
453
+ return blend<0xFFFFFF>(a, b);
454
+ case 25:
455
+ return blend<0x1FFFFFF>(a, b);
456
+ case 26:
457
+ return blend<0x3FFFFFF>(a, b);
458
+ case 27:
459
+ return blend<0x7FFFFFF>(a, b);
460
+ case 28:
461
+ return blend<0xFFFFFFF>(a, b);
462
+ case 29:
463
+ return blend<0x1FFFFFFF>(a, b);
464
+ case 30:
465
+ return blend<0x3FFFFFFF>(a, b);
466
+ case 31:
467
+ return blend<0x7FFFFFFF>(a, b);
468
+ }
469
+ return b;
470
+ }
471
+ static Vectorized<int16_t> loadu(const void* ptr) {
472
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
473
+ }
474
+ static Vectorized<int16_t> loadu(const void* ptr, int16_t count) {
475
+ if (count == size()) {
476
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
477
+ } else {
478
+ __mmask32 mask = (1ULL << count) - 1;
479
+ return _mm512_maskz_loadu_epi16(mask, ptr);
480
+ }
481
+ }
482
+ void store(void* ptr, int count = size()) const {
483
+ if (count == size()) {
484
+ // ptr need not to be aligned here. See
485
+ // https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-for-intel-advanced-vector-extensions/intrinsics-for-load-and-store-operations-1/mm512-storeu-si512.html
486
+ _mm512_storeu_si512(reinterpret_cast<__m512i*>(ptr), values);
487
+ } else if (count > 0) {
488
+ __mmask32 mask = (1ULL << count) - 1;
489
+ _mm512_mask_storeu_epi16(ptr, mask, values);
490
+ }
491
+ }
492
+ const int16_t& operator[](int idx) const = delete;
493
+ int16_t& operator[](int idx) = delete;
494
+ Vectorized<int16_t> abs() const {
495
+ return _mm512_abs_epi16(values);
496
+ }
497
+ Vectorized<int16_t> real() const {
498
+ return *this;
499
+ }
500
+ Vectorized<int16_t> imag() const {
501
+ return _mm512_set1_epi16(0);
502
+ }
503
+ Vectorized<int16_t> conj() const {
504
+ return *this;
505
+ }
506
+ Vectorized<int16_t> neg() const;
507
+ Vectorized<int16_t> operator==(const Vectorized<int16_t>& other) const {
508
+ auto mask = _mm512_cmpeq_epi16_mask(values, other.values);
509
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
510
+ }
511
+ Vectorized<int16_t> operator!=(const Vectorized<int16_t>& other) const {
512
+ auto mask = _mm512_cmpneq_epi16_mask(values, other.values);
513
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
514
+ }
515
+ Vectorized<int16_t> operator<(const Vectorized<int16_t>& other) const {
516
+ auto mask = _mm512_cmplt_epi16_mask(values, other.values);
517
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
518
+ }
519
+ Vectorized<int16_t> operator<=(const Vectorized<int16_t>& other) const {
520
+ auto mask = _mm512_cmple_epi16_mask(values, other.values);
521
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
522
+ }
523
+ Vectorized<int16_t> operator>(const Vectorized<int16_t>& other) const {
524
+ auto mask = _mm512_cmpgt_epi16_mask(values, other.values);
525
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
526
+ }
527
+ Vectorized<int16_t> operator>=(const Vectorized<int16_t>& other) const {
528
+ auto mask = _mm512_cmpge_epi16_mask(values, other.values);
529
+ return _mm512_mask_set1_epi16(zero_vector, mask, 0xFFFF);
530
+ }
531
+
532
+ Vectorized<int16_t> eq(const Vectorized<int16_t>& other) const;
533
+ Vectorized<int16_t> ne(const Vectorized<int16_t>& other) const;
534
+ Vectorized<int16_t> gt(const Vectorized<int16_t>& other) const;
535
+ Vectorized<int16_t> ge(const Vectorized<int16_t>& other) const;
536
+ Vectorized<int16_t> lt(const Vectorized<int16_t>& other) const;
537
+ Vectorized<int16_t> le(const Vectorized<int16_t>& other) const;
538
+ };
539
+
540
+ template <typename T>
541
+ class Vectorized8 : public Vectorizedi {
542
+ static_assert(
543
+ std::is_same_v<T, int8_t> || std::is_same_v<T, uint8_t>,
544
+ "Only int8_t/uint8_t are supported");
545
+ protected:
546
+ static constexpr __m512i zero_vector {0, 0, 0, 0, 0, 0, 0, 0};
547
+ static const Vectorized<T> ones;
548
+ public:
549
+ using value_type = T;
550
+ static constexpr int size() {
551
+ return 64;
552
+ }
553
+ using Vectorizedi::Vectorizedi;
554
+ Vectorized8() {}
555
+ Vectorized8(T v) { values = _mm512_set1_epi8(v); }
556
+ Vectorized8(T val1, T val2, T val3, T val4,
557
+ T val5, T val6, T val7, T val8,
558
+ T val9, T val10, T val11, T val12,
559
+ T val13, T val14, T val15, T val16,
560
+ T val17, T val18, T val19, T val20,
561
+ T val21, T val22, T val23, T val24,
562
+ T val25, T val26, T val27, T val28,
563
+ T val29, T val30, T val31, T val32,
564
+ T val33, T val34, T val35, T val36,
565
+ T val37, T val38, T val39, T val40,
566
+ T val41, T val42, T val43, T val44,
567
+ T val45, T val46, T val47, T val48,
568
+ T val49, T val50, T val51, T val52,
569
+ T val53, T val54, T val55, T val56,
570
+ T val57, T val58, T val59, T val60,
571
+ T val61, T val62, T val63, T val64){
572
+ values = _mm512_set_epi8(val64, val63, val62, val61, val60, val59, val58, val57,
573
+ val56, val55, val54, val53,val52, val51, val50, val49,
574
+ val48, val47, val46, val45, val44, val43, val42, val41,
575
+ val40, val39, val38, val37, val36, val35, val34, val33,
576
+ val32, val31, val30, val29, val28, val27, val26, val25,
577
+ val24, val23, val22, val21, val20, val19, val18, val17,
578
+ val16, val15, val14, val13, val12, val11, val10, val9,
579
+ val8, val7, val6, val5, val4, val3, val2, val1);
580
+ }
581
+ template <int64_t mask>
582
+ static Vectorized<T> blend(Vectorized<T> a, Vectorized<T> b) {
583
+ return _mm512_mask_blend_epi8(mask, a.values, b.values);
584
+ }
585
+ template <typename step_t>
586
+ static Vectorized<T> arange(T base = 0, step_t step = static_cast<step_t>(1)) {
587
+ return Vectorized<T>(
588
+ base, base + step, base + 2 * step, base + 3 * step,
589
+ base + 4 * step, base + 5 * step, base + 6 * step, base + 7 * step,
590
+ base + 8 * step, base + 9 * step, base + 10 * step, base + 11 * step,
591
+ base + 12 * step, base + 13 * step, base + 14 * step, base + 15 * step,
592
+ base + 16 * step, base + 17 * step, base + 18 * step, base + 19 * step,
593
+ base + 20 * step, base + 21 * step, base + 22 * step, base + 23 * step,
594
+ base + 24 * step, base + 25 * step, base + 26 * step, base + 27 * step,
595
+ base + 28 * step, base + 29 * step, base + 30 * step, base + 31 * step,
596
+ base + 32 * step, base + 33 * step, base + 34 * step, base + 35 * step,
597
+ base + 36 * step, base + 37 * step, base + 38 * step, base + 39 * step,
598
+ base + 40 * step, base + 41 * step, base + 42 * step, base + 43 * step,
599
+ base + 44 * step, base + 45 * step, base + 46 * step, base + 47 * step,
600
+ base + 48 * step, base + 49 * step, base + 50 * step, base + 51 * step,
601
+ base + 52 * step, base + 53 * step, base + 54 * step, base + 55 * step,
602
+ base + 56 * step, base + 57 * step, base + 58 * step, base + 59 * step,
603
+ base + 60 * step, base + 61 * step, base + 62 * step, base + 63 * step);
604
+ }
605
+ static Vectorized<T>
606
+ set(Vectorized<T> a, Vectorized<T> b, T count = size()) {
607
+ switch (count) {
608
+ case 0:
609
+ return a;
610
+ case 1:
611
+ return blend<0x1>(a, b);
612
+ case 2:
613
+ return blend<0x3>(a, b);
614
+ case 3:
615
+ return blend<0x7>(a, b);
616
+ case 4:
617
+ return blend<0xF>(a, b);
618
+ case 5:
619
+ return blend<0x1F>(a, b);
620
+ case 6:
621
+ return blend<0x3F>(a, b);
622
+ case 7:
623
+ return blend<0x7F>(a, b);
624
+ case 8:
625
+ return blend<0xFF>(a, b);
626
+ case 9:
627
+ return blend<0x1FF>(a, b);
628
+ case 10:
629
+ return blend<0x3FF>(a, b);
630
+ case 11:
631
+ return blend<0x7FF>(a, b);
632
+ case 12:
633
+ return blend<0xFFF>(a, b);
634
+ case 13:
635
+ return blend<0x1FFF>(a, b);
636
+ case 14:
637
+ return blend<0x3FFF>(a, b);
638
+ case 15:
639
+ return blend<0x7FFF>(a, b);
640
+ case 16:
641
+ return blend<0xFFFF>(a, b);
642
+ case 17:
643
+ return blend<0x1FFFF>(a, b);
644
+ case 18:
645
+ return blend<0x3FFFF>(a, b);
646
+ case 19:
647
+ return blend<0x7FFFF>(a, b);
648
+ case 20:
649
+ return blend<0xFFFFF>(a, b);
650
+ case 21:
651
+ return blend<0x1FFFFF>(a, b);
652
+ case 22:
653
+ return blend<0x3FFFFF>(a, b);
654
+ case 23:
655
+ return blend<0x7FFFFF>(a, b);
656
+ case 24:
657
+ return blend<0xFFFFFF>(a, b);
658
+ case 25:
659
+ return blend<0x1FFFFFF>(a, b);
660
+ case 26:
661
+ return blend<0x3FFFFFF>(a, b);
662
+ case 27:
663
+ return blend<0x7FFFFFF>(a, b);
664
+ case 28:
665
+ return blend<0xFFFFFFF>(a, b);
666
+ case 29:
667
+ return blend<0x1FFFFFFF>(a, b);
668
+ case 30:
669
+ return blend<0x3FFFFFFF>(a, b);
670
+ case 31:
671
+ return blend<0x7FFFFFFF>(a, b);
672
+ case 32:
673
+ return blend<0xFFFFFFFF>(a, b);
674
+ case 33:
675
+ return blend<0x1FFFFFFFF>(a, b);
676
+ case 34:
677
+ return blend<0x3FFFFFFFF>(a, b);
678
+ case 35:
679
+ return blend<0x7FFFFFFFF>(a, b);
680
+ case 36:
681
+ return blend<0xFFFFFFFFF>(a, b);
682
+ case 37:
683
+ return blend<0x1FFFFFFFFF>(a, b);
684
+ case 38:
685
+ return blend<0x3FFFFFFFFF>(a, b);
686
+ case 39:
687
+ return blend<0x7FFFFFFFFF>(a, b);
688
+ case 40:
689
+ return blend<0xFFFFFFFFFF>(a, b);
690
+ case 41:
691
+ return blend<0x1FFFFFFFFFF>(a, b);
692
+ case 42:
693
+ return blend<0x3FFFFFFFFFF>(a, b);
694
+ case 43:
695
+ return blend<0x7FFFFFFFFFF>(a, b);
696
+ case 44:
697
+ return blend<0xFFFFFFFFFFF>(a, b);
698
+ case 45:
699
+ return blend<0x1FFFFFFFFFFF>(a, b);
700
+ case 46:
701
+ return blend<0x3FFFFFFFFFFF>(a, b);
702
+ case 47:
703
+ return blend<0x7FFFFFFFFFFF>(a, b);
704
+ case 48:
705
+ return blend<0xFFFFFFFFFFFF>(a, b);
706
+ case 49:
707
+ return blend<0x1FFFFFFFFFFFF>(a, b);
708
+ case 50:
709
+ return blend<0x3FFFFFFFFFFFF>(a, b);
710
+ case 51:
711
+ return blend<0x7FFFFFFFFFFFF>(a, b);
712
+ case 52:
713
+ return blend<0xFFFFFFFFFFFFF>(a, b);
714
+ case 53:
715
+ return blend<0x1FFFFFFFFFFFFF>(a, b);
716
+ case 54:
717
+ return blend<0x3FFFFFFFFFFFFF>(a, b);
718
+ case 55:
719
+ return blend<0x7FFFFFFFFFFFFF>(a, b);
720
+ case 56:
721
+ return blend<0xFFFFFFFFFFFFFF>(a, b);
722
+ case 57:
723
+ return blend<0x1FFFFFFFFFFFFFF>(a, b);
724
+ case 58:
725
+ return blend<0x3FFFFFFFFFFFFFF>(a, b);
726
+ case 59:
727
+ return blend<0x7FFFFFFFFFFFFFF>(a, b);
728
+ case 60:
729
+ return blend<0xFFFFFFFFFFFFFFF>(a, b);
730
+ case 61:
731
+ return blend<0x1FFFFFFFFFFFFFFF>(a, b);
732
+ case 62:
733
+ return blend<0x3FFFFFFFFFFFFFFF>(a, b);
734
+ case 63:
735
+ return blend<0x7FFFFFFFFFFFFFFF>(a, b);
736
+ }
737
+ return b;
738
+ }
739
+ static Vectorized<T> loadu(const void* ptr) {
740
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
741
+ }
742
+ static Vectorized<T> loadu_one_fourth(const void* ptr) {
743
+ // Fast path if only load element number of 16.
744
+ // Note: We didn't merge it as fast path of loadu(const void* ptr, T count),
745
+ // Because loadu(const void* ptr, T count) requires zero initialization for upper 384 bits.
746
+ // However, by using _mm512_castsi128_si512, the upper 384 bits of the result are undefined.
747
+ // TODO<leslie> We can use _mm512_zextsi128_si512 in the furture,
748
+ // since gcc 9.3 doesn't support it now.
749
+ __m128i input_128 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(ptr));
750
+ return _mm512_castsi128_si512(input_128);
751
+ }
752
+ static Vectorized<T> loadu(const void* ptr, T count) {
753
+ if (count == size()) {
754
+ return _mm512_loadu_si512(reinterpret_cast<const __m512i*>(ptr));
755
+ } else if (count == 16) {
756
+ // Fast path if only load element number of 16
757
+ return loadu_one_fourth(ptr);
758
+ } else {
759
+ __mmask64 mask = (1ULL << count) - 1;
760
+ return _mm512_maskz_loadu_epi8(mask, ptr);
761
+ }
762
+ }
763
+ void store(void* ptr, int count = size()) const {
764
+ if (count == size()) {
765
+ // ptr need not to be aligned here. See
766
+ // https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-for-intel-advanced-vector-extensions/intrinsics-for-load-and-store-operations-1/mm512-storeu-si512.html
767
+ _mm512_storeu_si512(reinterpret_cast<__m512i*>(ptr), values);
768
+ } else if (count > 0) {
769
+ if (count == 16) {
770
+ // Fast path if only store element number of 16
771
+ _mm_storeu_si128(
772
+ reinterpret_cast<__m128i*>(ptr),
773
+ _mm512_castsi512_si128(values));
774
+ } else {
775
+ __mmask64 mask = (1ULL << count) - 1;
776
+ _mm512_mask_storeu_epi8(ptr, mask, values);
777
+ }
778
+ }
779
+ }
780
+ const T& operator[](int idx) const = delete;
781
+ T& operator[](int idx) = delete;
782
+ Vectorized<T> real() const {
783
+ return *this;
784
+ }
785
+ Vectorized<T> imag() const {
786
+ return _mm512_set1_epi8(0);
787
+ }
788
+ Vectorized<T> conj() const {
789
+ return *this;
790
+ }
791
+ };
792
+
793
+ template<>
794
+ class Vectorized<int8_t>: public Vectorized8<int8_t> {
795
+ public:
796
+ using Vectorized8::Vectorized8;
797
+
798
+ static Vectorized<int8_t> blendv(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b,
799
+ const Vectorized<int8_t>& mask) {
800
+ auto msb_one = _mm512_set1_epi8(0xFF);
801
+ auto mask_ = _mm512_cmp_epi8_mask(mask, msb_one, _MM_CMPINT_EQ);
802
+ return _mm512_mask_blend_epi8(mask_, a.values, b.values);
803
+ }
804
+
805
+ Vectorized<int8_t> neg() const;
806
+
807
+ Vectorized<int8_t> abs() const {
808
+ return _mm512_abs_epi8(values);
809
+ }
810
+
811
+ Vectorized<int8_t> operator==(const Vectorized<int8_t>& other) const {
812
+ auto mask = _mm512_cmpeq_epi8_mask(values, other.values);
813
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
814
+ }
815
+ Vectorized<int8_t> operator!=(const Vectorized<int8_t>& other) const {
816
+ auto mask = _mm512_cmpneq_epi8_mask(values, other.values);
817
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
818
+ }
819
+ Vectorized<int8_t> operator<(const Vectorized<int8_t>& other) const {
820
+ auto mask = _mm512_cmplt_epi8_mask(values, other.values);
821
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
822
+ }
823
+ Vectorized<int8_t> operator<=(const Vectorized<int8_t>& other) const {
824
+ auto mask = _mm512_cmple_epi8_mask(values, other.values);
825
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
826
+ }
827
+ Vectorized<int8_t> operator>(const Vectorized<int8_t>& other) const {
828
+ return other < *this;
829
+ }
830
+ Vectorized<int8_t> operator>=(const Vectorized<int8_t>& other) const {
831
+ return other <= *this;
832
+ }
833
+
834
+ Vectorized<int8_t> eq(const Vectorized<int8_t>& other) const;
835
+ Vectorized<int8_t> ne(const Vectorized<int8_t>& other) const;
836
+ Vectorized<int8_t> gt(const Vectorized<int8_t>& other) const;
837
+ Vectorized<int8_t> ge(const Vectorized<int8_t>& other) const;
838
+ Vectorized<int8_t> lt(const Vectorized<int8_t>& other) const;
839
+ Vectorized<int8_t> le(const Vectorized<int8_t>& other) const;
840
+ };
841
+
842
+ template<>
843
+ class Vectorized<uint8_t>: public Vectorized8<uint8_t> {
844
+ public:
845
+ using Vectorized8::Vectorized8;
846
+
847
+ static Vectorized<uint8_t> blendv(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b,
848
+ const Vectorized<uint8_t>& mask) {
849
+ auto msb_one = _mm512_set1_epi8(0xFF);
850
+ auto mask_ = _mm512_cmp_epu8_mask(mask, msb_one, _MM_CMPINT_EQ);
851
+ return _mm512_mask_blend_epi8(mask_, a.values, b.values);
852
+ }
853
+
854
+ Vectorized<uint8_t> neg() const;
855
+
856
+ Vectorized<uint8_t> abs() const {
857
+ return *this;
858
+ }
859
+
860
+ Vectorized<uint8_t> operator==(const Vectorized<uint8_t>& other) const {
861
+ auto mask = _mm512_cmpeq_epu8_mask(values, other.values);
862
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
863
+ }
864
+ Vectorized<uint8_t> operator!=(const Vectorized<uint8_t>& other) const {
865
+ auto mask = _mm512_cmpneq_epu8_mask(values, other.values);
866
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
867
+ }
868
+ Vectorized<uint8_t> operator<(const Vectorized<uint8_t>& other) const {
869
+ auto mask = _mm512_cmplt_epu8_mask(values, other.values);
870
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
871
+ }
872
+ Vectorized<uint8_t> operator<=(const Vectorized<uint8_t>& other) const {
873
+ auto mask = _mm512_cmple_epu8_mask(values, other.values);
874
+ return _mm512_mask_set1_epi8(zero_vector, mask, 0xFF);
875
+ }
876
+ Vectorized<uint8_t> operator>(const Vectorized<uint8_t>& other) const {
877
+ return other < *this;
878
+ }
879
+ Vectorized<uint8_t> operator>=(const Vectorized<uint8_t>& other) const {
880
+ return other <= *this;
881
+ }
882
+
883
+ Vectorized<uint8_t> eq(const Vectorized<uint8_t>& other) const;
884
+ Vectorized<uint8_t> ne(const Vectorized<uint8_t>& other) const;
885
+ Vectorized<uint8_t> gt(const Vectorized<uint8_t>& other) const;
886
+ Vectorized<uint8_t> ge(const Vectorized<uint8_t>& other) const;
887
+ Vectorized<uint8_t> lt(const Vectorized<uint8_t>& other) const;
888
+ Vectorized<uint8_t> le(const Vectorized<uint8_t>& other) const;
889
+ };
890
+
891
+ template <>
892
+ Vectorized<int64_t> inline operator+(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
893
+ return _mm512_add_epi64(a, b);
894
+ }
895
+
896
+ template <>
897
+ Vectorized<int32_t> inline operator+(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
898
+ return _mm512_add_epi32(a, b);
899
+ }
900
+
901
+ template <>
902
+ Vectorized<int16_t> inline operator+(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
903
+ return _mm512_add_epi16(a, b);
904
+ }
905
+
906
+ template <>
907
+ Vectorized<int8_t> inline operator+(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
908
+ return _mm512_add_epi8(a, b);
909
+ }
910
+
911
+ template <>
912
+ Vectorized<uint8_t> inline operator+(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
913
+ return _mm512_add_epi8(a, b);
914
+ }
915
+
916
+ template <>
917
+ Vectorized<int64_t> inline operator-(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
918
+ return _mm512_sub_epi64(a, b);
919
+ }
920
+
921
+ template <>
922
+ Vectorized<int32_t> inline operator-(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
923
+ return _mm512_sub_epi32(a, b);
924
+ }
925
+
926
+ template <>
927
+ Vectorized<int16_t> inline operator-(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
928
+ return _mm512_sub_epi16(a, b);
929
+ }
930
+
931
+ template <>
932
+ Vectorized<int8_t> inline operator-(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
933
+ return _mm512_sub_epi8(a, b);
934
+ }
935
+
936
+ template <>
937
+ Vectorized<uint8_t> inline operator-(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
938
+ return _mm512_sub_epi8(a, b);
939
+ }
940
+
941
+ // Negation. Defined here so we can utilize operator-
942
+ inline Vectorized<int64_t> Vectorized<int64_t>::neg() const {
943
+ return Vectorized<int64_t>(0) - *this;
944
+ }
945
+
946
+ inline Vectorized<int32_t> Vectorized<int32_t>::neg() const {
947
+ return Vectorized<int32_t>(0) - *this;
948
+ }
949
+
950
+ inline Vectorized<int16_t> Vectorized<int16_t>::neg() const {
951
+ return Vectorized<int16_t>(0) - *this;
952
+ }
953
+
954
+ inline Vectorized<int8_t> Vectorized<int8_t>::neg() const {
955
+ return Vectorized<int8_t>(0) - *this;
956
+ }
957
+
958
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::neg() const {
959
+ return Vectorized<uint8_t>(0) - *this;
960
+ }
961
+
962
+ template <>
963
+ Vectorized<int64_t> inline operator*(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
964
+ return _mm512_mullo_epi64(a, b);
965
+ }
966
+
967
+ template <>
968
+ Vectorized<int32_t> inline operator*(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
969
+ return _mm512_mullo_epi32(a, b);
970
+ }
971
+
972
+ template <>
973
+ Vectorized<int16_t> inline operator*(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
974
+ return _mm512_mullo_epi16(a, b);
975
+ }
976
+
977
+ template <typename T, typename Op>
978
+ Vectorized<T> inline int_elementwise_binary_512(const Vectorized<T>& a, const Vectorized<T>& b, Op op) {
979
+ T values_a[Vectorized<T>::size()];
980
+ T values_b[Vectorized<T>::size()];
981
+ a.store(values_a);
982
+ b.store(values_b);
983
+ for (int i = 0; i != Vectorized<T>::size(); i++) {
984
+ values_a[i] = op(values_a[i], values_b[i]);
985
+ }
986
+ return Vectorized<T>::loadu(values_a);
987
+ }
988
+
989
+ template <>
990
+ Vectorized<int8_t> inline operator*(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
991
+ // We don't have an instruction for multiplying int8_t
992
+ #ifndef CPU_CAPABILITY_AVX512
993
+ return int_elementwise_binary_512(a, b, std::multiplies<int8_t>());
994
+ #else
995
+ __m512i mask00FF = _mm512_set1_epi16(0x00FF);
996
+ __m512i a_lo = _mm512_srai_epi16(_mm512_slli_epi16(a, 8), 8);
997
+ __m512i b_lo = _mm512_srai_epi16(_mm512_slli_epi16(b, 8), 8);
998
+ __m512i a_hi = _mm512_srai_epi16(a, 8);
999
+ __m512i b_hi = _mm512_srai_epi16(b, 8);
1000
+ __m512i res_lo = _mm512_and_si512(_mm512_mullo_epi16(a_lo, b_lo), mask00FF);
1001
+ __m512i res_hi = _mm512_slli_epi16(_mm512_mullo_epi16(a_hi, b_hi), 8);
1002
+ __m512i res = _mm512_or_si512(res_hi, res_lo);
1003
+ return res;
1004
+ #endif
1005
+ }
1006
+
1007
+ template <>
1008
+ Vectorized<uint8_t> inline operator*(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1009
+ // We don't have an instruction for multiplying uint8_t
1010
+ #ifndef CPU_CAPABILITY_AVX512
1011
+ return int_elementwise_binary_512(a, b, std::multiplies<uint8_t>());
1012
+ #else
1013
+ __m512i mask00FF = _mm512_set1_epi16(0x00FF);
1014
+ __m512i a_lo = _mm512_and_si512 (a, mask00FF);
1015
+ __m512i b_lo = _mm512_and_si512 (b, mask00FF);
1016
+ __m512i a_hi = _mm512_srli_epi16(a, 8);
1017
+ __m512i b_hi = _mm512_srli_epi16(b, 8);
1018
+ __m512i res_lo = _mm512_and_si512(_mm512_mullo_epi16(a_lo, b_lo), mask00FF);
1019
+ __m512i res_hi = _mm512_slli_epi16(_mm512_mullo_epi16(a_hi, b_hi), 8);
1020
+ __m512i res = _mm512_or_si512(res_hi, res_lo);
1021
+ return res;
1022
+ #endif
1023
+ }
1024
+
1025
+ template <>
1026
+ Vectorized<int64_t> inline minimum(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
1027
+ return _mm512_min_epi64(a, b);
1028
+ }
1029
+
1030
+ template <>
1031
+ Vectorized<int32_t> inline minimum(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
1032
+ return _mm512_min_epi32(a, b);
1033
+ }
1034
+
1035
+ template <>
1036
+ Vectorized<int16_t> inline minimum(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
1037
+ return _mm512_min_epi16(a, b);
1038
+ }
1039
+
1040
+ template <>
1041
+ Vectorized<int8_t> inline minimum(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
1042
+ return _mm512_min_epi8(a, b);
1043
+ }
1044
+
1045
+ template <>
1046
+ Vectorized<uint8_t> inline minimum(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1047
+ return _mm512_min_epu8(a, b);
1048
+ }
1049
+
1050
+ template <>
1051
+ Vectorized<int64_t> inline maximum(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
1052
+ return _mm512_max_epi64(a, b);
1053
+ }
1054
+
1055
+ template <>
1056
+ Vectorized<int32_t> inline maximum(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
1057
+ return _mm512_max_epi32(a, b);
1058
+ }
1059
+
1060
+ template <>
1061
+ Vectorized<int16_t> inline maximum(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
1062
+ return _mm512_max_epi16(a, b);
1063
+ }
1064
+
1065
+ template <>
1066
+ Vectorized<int8_t> inline maximum(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
1067
+ return _mm512_max_epi8(a, b);
1068
+ }
1069
+
1070
+ template <>
1071
+ Vectorized<uint8_t> inline maximum(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1072
+ return _mm512_max_epu8(a, b);
1073
+ }
1074
+
1075
+ template <>
1076
+ Vectorized<int64_t> inline clamp(const Vectorized<int64_t>& a, const Vectorized<int64_t>& min_val, const Vectorized<int64_t>& max_val) {
1077
+ return _mm512_min_epi64(max_val, _mm512_max_epi64(a, min_val));
1078
+ }
1079
+
1080
+ template <>
1081
+ Vectorized<int32_t> inline clamp(const Vectorized<int32_t>& a, const Vectorized<int32_t>& min_val, const Vectorized<int32_t>& max_val) {
1082
+ return _mm512_min_epi32(max_val, _mm512_max_epi32(a, min_val));
1083
+ }
1084
+
1085
+ template <>
1086
+ Vectorized<int16_t> inline clamp(const Vectorized<int16_t>& a, const Vectorized<int16_t>& min_val, const Vectorized<int16_t>& max_val) {
1087
+ return _mm512_min_epi16(max_val, _mm512_max_epi16(a, min_val));
1088
+ }
1089
+
1090
+ template <>
1091
+ Vectorized<int8_t> inline clamp(const Vectorized<int8_t>& a, const Vectorized<int8_t>& min_val, const Vectorized<int8_t>& max_val) {
1092
+ return _mm512_min_epi8(max_val, _mm512_max_epi8(a, min_val));
1093
+ }
1094
+
1095
+ template <>
1096
+ Vectorized<uint8_t> inline clamp(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& min_val, const Vectorized<uint8_t>& max_val) {
1097
+ return _mm512_min_epu8(max_val, _mm512_max_epu8(a, min_val));
1098
+ }
1099
+
1100
+ template <>
1101
+ Vectorized<int64_t> inline clamp_max(const Vectorized<int64_t>& a, const Vectorized<int64_t>& max_val) {
1102
+ return _mm512_min_epi64(max_val, a);
1103
+ }
1104
+
1105
+ template <>
1106
+ Vectorized<int32_t> inline clamp_max(const Vectorized<int32_t>& a, const Vectorized<int32_t>& max_val) {
1107
+ return _mm512_min_epi32(max_val, a);
1108
+ }
1109
+
1110
+ template <>
1111
+ Vectorized<int16_t> inline clamp_max(const Vectorized<int16_t>& a, const Vectorized<int16_t>& max_val) {
1112
+ return _mm512_min_epi16(max_val, a);
1113
+ }
1114
+
1115
+ template <>
1116
+ Vectorized<int8_t> inline clamp_max(const Vectorized<int8_t>& a, const Vectorized<int8_t>& max_val) {
1117
+ return _mm512_min_epi8(max_val, a);
1118
+ }
1119
+
1120
+ template <>
1121
+ Vectorized<uint8_t> inline clamp_max(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& max_val) {
1122
+ return _mm512_min_epu8(max_val, a);
1123
+ }
1124
+
1125
+ template <>
1126
+ Vectorized<int64_t> inline clamp_min(const Vectorized<int64_t>& a, const Vectorized<int64_t>& min_val) {
1127
+ return _mm512_max_epi64(min_val, a);
1128
+ }
1129
+
1130
+ template <>
1131
+ Vectorized<int32_t> inline clamp_min(const Vectorized<int32_t>& a, const Vectorized<int32_t>& min_val) {
1132
+ return _mm512_max_epi32(min_val, a);
1133
+ }
1134
+
1135
+ template <>
1136
+ Vectorized<int16_t> inline clamp_min(const Vectorized<int16_t>& a, const Vectorized<int16_t>& min_val) {
1137
+ return _mm512_max_epi16(min_val, a);
1138
+ }
1139
+
1140
+ template <>
1141
+ Vectorized<int8_t> inline clamp_min(const Vectorized<int8_t>& a, const Vectorized<int8_t>& min_val) {
1142
+ return _mm512_max_epi8(min_val, a);
1143
+ }
1144
+
1145
+ template <>
1146
+ Vectorized<uint8_t> inline clamp_min(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& min_val) {
1147
+ return _mm512_max_epu8(min_val, a);
1148
+ }
1149
+
1150
+ template<typename T>
1151
+ Vectorized<int32_t> inline convert_to_int32(const T* ptr) {
1152
+ return Vectorized<int32_t>::loadu(ptr);
1153
+ }
1154
+
1155
+ template<>
1156
+ Vectorized<int32_t> inline convert_to_int32<int8_t>(const int8_t* ptr) {
1157
+ return _mm512_cvtepi8_epi32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(ptr)));
1158
+ }
1159
+
1160
+ template<>
1161
+ Vectorized<int32_t> inline convert_to_int32<uint8_t>(const uint8_t* ptr) {
1162
+ return _mm512_cvtepu8_epi32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(ptr)));
1163
+ }
1164
+
1165
+ template <>
1166
+ Vectorized<int64_t> inline operator/(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
1167
+ return int_elementwise_binary_512(a, b, std::divides<int64_t>());
1168
+ }
1169
+ template <>
1170
+ Vectorized<int32_t> inline operator/(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
1171
+ return int_elementwise_binary_512(a, b, std::divides<int32_t>());
1172
+ }
1173
+ template <>
1174
+ Vectorized<int16_t> inline operator/(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
1175
+ return int_elementwise_binary_512(a, b, std::divides<int16_t>());
1176
+ }
1177
+ template <>
1178
+ Vectorized<int8_t> inline operator/(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
1179
+ return int_elementwise_binary_512(a, b, std::divides<int8_t>());
1180
+ }
1181
+ template <>
1182
+ Vectorized<uint8_t> inline operator/(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1183
+ return int_elementwise_binary_512(a, b, std::divides<uint8_t>());
1184
+ }
1185
+
1186
+ template<class T, typename std::enable_if_t<std::is_base_of<Vectorizedi, Vectorized<T>>::value, int> = 0>
1187
+ inline Vectorized<T> operator&(const Vectorized<T>& a, const Vectorized<T>& b) {
1188
+ return _mm512_and_si512(a, b);
1189
+ }
1190
+ template<class T, typename std::enable_if_t<std::is_base_of<Vectorizedi, Vectorized<T>>::value, int> = 0>
1191
+ inline Vectorized<T> operator|(const Vectorized<T>& a, const Vectorized<T>& b) {
1192
+ return _mm512_or_si512(a, b);
1193
+ }
1194
+ template<class T, typename std::enable_if_t<std::is_base_of<Vectorizedi, Vectorized<T>>::value, int> = 0>
1195
+ inline Vectorized<T> operator^(const Vectorized<T>& a, const Vectorized<T>& b) {
1196
+ return _mm512_xor_si512(a, b);
1197
+ }
1198
+ template<class T, typename std::enable_if_t<std::is_base_of<Vectorizedi, Vectorized<T>>::value, int> = 0>
1199
+ inline Vectorized<T> operator~(const Vectorized<T>& a) {
1200
+ return _mm512_xor_si512(a, _mm512_set1_epi32(-1));
1201
+ }
1202
+
1203
+ inline Vectorized<int64_t> Vectorized<int64_t>::eq(const Vectorized<int64_t>& other) const {
1204
+ return (*this == other) & Vectorized<int64_t>(1);
1205
+ }
1206
+
1207
+ inline Vectorized<int64_t> Vectorized<int64_t>::ne(const Vectorized<int64_t>& other) const {
1208
+ return (*this != other) & Vectorized<int64_t>(1);
1209
+ }
1210
+
1211
+ inline Vectorized<int64_t> Vectorized<int64_t>::gt(const Vectorized<int64_t>& other) const {
1212
+ return (*this > other) & Vectorized<int64_t>(1);
1213
+ }
1214
+
1215
+ inline Vectorized<int64_t> Vectorized<int64_t>::ge(const Vectorized<int64_t>& other) const {
1216
+ return (*this >= other) & Vectorized<int64_t>(1);
1217
+ }
1218
+
1219
+ inline Vectorized<int64_t> Vectorized<int64_t>::lt(const Vectorized<int64_t>& other) const {
1220
+ return (*this < other) & Vectorized<int64_t>(1);
1221
+ }
1222
+
1223
+ inline Vectorized<int64_t> Vectorized<int64_t>::le(const Vectorized<int64_t>& other) const {
1224
+ return (*this <= other) & Vectorized<int64_t>(1);
1225
+ }
1226
+
1227
+ inline Vectorized<int32_t> Vectorized<int32_t>::eq(const Vectorized<int32_t>& other) const {
1228
+ return (*this == other) & Vectorized<int32_t>(1);
1229
+ }
1230
+
1231
+ inline Vectorized<int32_t> Vectorized<int32_t>::ne(const Vectorized<int32_t>& other) const {
1232
+ return (*this != other) & Vectorized<int32_t>(1);
1233
+ }
1234
+
1235
+ inline Vectorized<int32_t> Vectorized<int32_t>::gt(const Vectorized<int32_t>& other) const {
1236
+ return (*this > other) & Vectorized<int32_t>(1);
1237
+ }
1238
+
1239
+ inline Vectorized<int32_t> Vectorized<int32_t>::ge(const Vectorized<int32_t>& other) const {
1240
+ return (*this >= other) & Vectorized<int32_t>(1);
1241
+ }
1242
+
1243
+ inline Vectorized<int32_t> Vectorized<int32_t>::lt(const Vectorized<int32_t>& other) const {
1244
+ return (*this < other) & Vectorized<int32_t>(1);
1245
+ }
1246
+
1247
+ inline Vectorized<int32_t> Vectorized<int32_t>::le(const Vectorized<int32_t>& other) const {
1248
+ return (*this <= other) & Vectorized<int32_t>(1);
1249
+ }
1250
+
1251
+ inline Vectorized<int16_t> Vectorized<int16_t>::eq(const Vectorized<int16_t>& other) const {
1252
+ return (*this == other) & Vectorized<int16_t>(1);
1253
+ }
1254
+
1255
+ inline Vectorized<int16_t> Vectorized<int16_t>::ne(const Vectorized<int16_t>& other) const {
1256
+ return (*this != other) & Vectorized<int16_t>(1);
1257
+ }
1258
+
1259
+ inline Vectorized<int16_t> Vectorized<int16_t>::gt(const Vectorized<int16_t>& other) const {
1260
+ return (*this > other) & Vectorized<int16_t>(1);
1261
+ }
1262
+
1263
+ inline Vectorized<int16_t> Vectorized<int16_t>::ge(const Vectorized<int16_t>& other) const {
1264
+ return (*this >= other) & Vectorized<int16_t>(1);
1265
+ }
1266
+
1267
+ inline Vectorized<int16_t> Vectorized<int16_t>::lt(const Vectorized<int16_t>& other) const {
1268
+ return (*this < other) & Vectorized<int16_t>(1);
1269
+ }
1270
+
1271
+ inline Vectorized<int16_t> Vectorized<int16_t>::le(const Vectorized<int16_t>& other) const {
1272
+ return (*this <= other) & Vectorized<int16_t>(1);
1273
+ }
1274
+
1275
+ inline Vectorized<int8_t> Vectorized<int8_t>::eq(const Vectorized<int8_t>& other) const {
1276
+ return (*this == other) & Vectorized<int8_t>(1);
1277
+ }
1278
+
1279
+ inline Vectorized<int8_t> Vectorized<int8_t>::ne(const Vectorized<int8_t>& other) const {
1280
+ return (*this != other) & Vectorized<int8_t>(1);
1281
+ }
1282
+
1283
+ inline Vectorized<int8_t> Vectorized<int8_t>::gt(const Vectorized<int8_t>& other) const {
1284
+ return (*this > other) & Vectorized<int8_t>(1);
1285
+ }
1286
+
1287
+ inline Vectorized<int8_t> Vectorized<int8_t>::ge(const Vectorized<int8_t>& other) const {
1288
+ return (*this >= other) & Vectorized<int8_t>(1);
1289
+ }
1290
+
1291
+ inline Vectorized<int8_t> Vectorized<int8_t>::lt(const Vectorized<int8_t>& other) const {
1292
+ return (*this < other) & Vectorized<int8_t>(1);
1293
+ }
1294
+
1295
+ inline Vectorized<int8_t> Vectorized<int8_t>::le(const Vectorized<int8_t>& other) const {
1296
+ return (*this <= other) & Vectorized<int8_t>(1);
1297
+ }
1298
+
1299
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::eq(const Vectorized<uint8_t>& other) const {
1300
+ return (*this == other) & Vectorized<uint8_t>(1);
1301
+ }
1302
+
1303
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::ne(const Vectorized<uint8_t>& other) const {
1304
+ return (*this != other) & Vectorized<uint8_t>(1);
1305
+ }
1306
+
1307
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::gt(const Vectorized<uint8_t>& other) const {
1308
+ return (*this > other) & Vectorized<uint8_t>(1);
1309
+ }
1310
+
1311
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::ge(const Vectorized<uint8_t>& other) const {
1312
+ return (*this >= other) & Vectorized<uint8_t>(1);
1313
+ }
1314
+
1315
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::lt(const Vectorized<uint8_t>& other) const {
1316
+ return (*this < other) & Vectorized<uint8_t>(1);
1317
+ }
1318
+
1319
+ inline Vectorized<uint8_t> Vectorized<uint8_t>::le(const Vectorized<uint8_t>& other) const {
1320
+ return (*this <= other) & Vectorized<uint8_t>(1);
1321
+ }
1322
+
1323
+ template <bool left_shift, typename T, typename std::enable_if_t<std::is_same_v<T, int8_t> || std::is_same_v<T, uint8_t>, int> = 0>
1324
+ Vectorized<T> inline shift_512_8(const Vectorized<T>& a, const Vectorized<T>& b) {
1325
+ // No vector instruction for shifting int8_t/uint8_t, so emulating
1326
+ // it instead.
1327
+
1328
+ // Control masks for shuffle operation, treating 512 bits as an
1329
+ // array of 8-bit elements, and considering pairs of neighboring
1330
+ // elements. Specifially, a mask named "ctl_M_N" (M,N in [0,1], and
1331
+ // M!=N) is set so that shuffle will move element with index M from
1332
+ // input pair into element with index N in output pair, and element
1333
+ // with index M in output pair will be set to all 0s.
1334
+ __m512i ctl_0_1 = _mm512_set_epi8(62, 0x80, 60, 0x80, 58, 0x80, 56, 0x80,
1335
+ 54, 0x80, 52, 0x80, 50, 0x80, 48, 0x80,
1336
+ 46, 0x80, 44, 0x80, 42, 0x80, 40, 0x80,
1337
+ 38, 0x80, 36, 0x80, 34, 0x80, 32, 0x80,
1338
+ 30, 0x80, 28, 0x80, 26, 0x80, 24, 0x80,
1339
+ 22, 0x80, 20, 0x80, 18, 0x80, 16, 0x80,
1340
+ 14, 0x80, 12, 0x80, 10, 0x80, 8, 0x80,
1341
+ 6, 0x80, 4, 0x80, 2, 0x80, 0, 0x80);
1342
+ __m512i ctl_1_0 = _mm512_set_epi8(0x80, 63, 0x80, 61, 0x80, 59, 0x80, 57,
1343
+ 0x80, 55, 0x80, 53, 0x80, 51, 0x80, 49,
1344
+ 0x80, 47, 0x80, 45, 0x80, 43, 0x80, 41,
1345
+ 0x80, 39, 0x80, 37, 0x80, 35, 0x80, 33,
1346
+ 0x80, 31, 0x80, 29, 0x80, 27, 0x80, 25,
1347
+ 0x80, 23, 0x80, 21, 0x80, 19, 0x80, 17,
1348
+ 0x80, 15, 0x80, 13, 0x80, 11, 0x80, 9,
1349
+ 0x80, 7, 0x80, 5, 0x80, 3, 0x80, 1);
1350
+
1351
+ // Masks for bitwise and operation, treating 512 bits as an array of
1352
+ // 8-bit elements, and considering them in pairs of neighboring
1353
+ // elements. A mask named "keep_M" (M in [0,1]) is set so that
1354
+ // bitwise and will copy element with index M from input pair into
1355
+ // element with the same index in output pair, while the other
1356
+ // element in output pair will be set to all 0s.
1357
+ __m512i keep_0 = _mm512_set1_epi16(0xFF);
1358
+ __m512i keep_1 = _mm512_set1_epi16(0xFF00);
1359
+
1360
+ // Take each 8-bit element with idx%2==0 from input array to be
1361
+ // shifted and extend it to 16 bits so that 0s are added to the
1362
+ // right. Then, perform shifting on this 16-bit number. Upper 8
1363
+ // bits will be proper result of shifting original 8-bit number, so
1364
+ // write them to result array, into the same position from which
1365
+ // corresponding input element is taken. Also, make sure that
1366
+ // result array elements with idx%2!=0 are set to all 0s.
1367
+ //
1368
+ // Note that number of bits to shift for is extended to 16 bits by
1369
+ // adding 0s to the left. That means this number is not properly
1370
+ // sign-extended for negative values. However, number of bits to
1371
+ // shift is treated as an unsigned integer by respective shift
1372
+ // intrinsics anyway so if negative then either with or without
1373
+ // proper sign extension, it will be interpreted as a number greater
1374
+ // than 32, and the shifting result will be the same.
1375
+ __m512i a0 = _mm512_shuffle_epi8(a, ctl_0_1);
1376
+ __m512i b0 = _mm512_and_si512(b, keep_0);
1377
+ __m512i c0;
1378
+ if (left_shift)
1379
+ c0 = _mm512_sllv_epi16(a0, b0);
1380
+ else
1381
+ if constexpr (std::is_same_v<T, int8_t>)
1382
+ c0 = _mm512_srav_epi16(a0, b0);
1383
+ else
1384
+ c0 = _mm512_srlv_epi16(a0, b0);
1385
+ c0 = _mm512_shuffle_epi8(c0, ctl_1_0);
1386
+
1387
+ // Peform shifting the same way for input array elements with
1388
+ // idx%2==1.
1389
+ __m512i a1 = _mm512_and_si512(a, keep_1);
1390
+ __m512i b1 = _mm512_shuffle_epi8(b, ctl_1_0);
1391
+ __m512i c1;
1392
+ if (left_shift)
1393
+ c1 = _mm512_sllv_epi16(a1, b1);
1394
+ else
1395
+ if constexpr (std::is_same_v<T, int8_t>)
1396
+ c1 = _mm512_srav_epi16(a1, b1);
1397
+ else
1398
+ c1 = _mm512_srlv_epi16(a1, b1);
1399
+ c1 = _mm512_and_si512(c1, keep_1);
1400
+
1401
+ // Merge partial results into the final result.
1402
+ __m512i c = _mm512_or_si512(c0, c1);
1403
+
1404
+ return c;
1405
+ }
1406
+
1407
+ template <>
1408
+ Vectorized<int64_t> inline operator<<(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
1409
+ return _mm512_sllv_epi64(a, b);
1410
+ }
1411
+
1412
+ template <>
1413
+ Vectorized<int32_t> inline operator<<(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
1414
+ return _mm512_sllv_epi32(a, b);
1415
+ }
1416
+
1417
+ template <>
1418
+ Vectorized<int16_t> inline operator<<(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
1419
+ return _mm512_sllv_epi16(a, b);
1420
+ }
1421
+
1422
+ template <>
1423
+ Vectorized<int8_t> inline operator<<(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
1424
+ return shift_512_8<true>(a, b);
1425
+ }
1426
+
1427
+ template <>
1428
+ Vectorized<uint8_t> inline operator<<(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1429
+ return shift_512_8<true>(a, b);
1430
+ }
1431
+
1432
+ template <>
1433
+ Vectorized<int64_t> inline operator>>(const Vectorized<int64_t>& a, const Vectorized<int64_t>& b) {
1434
+ return _mm512_srav_epi64(a, b);
1435
+ }
1436
+
1437
+ template <>
1438
+ Vectorized<int32_t> inline operator>>(const Vectorized<int32_t>& a, const Vectorized<int32_t>& b) {
1439
+ return _mm512_srav_epi32(a, b);
1440
+ }
1441
+
1442
+ template <>
1443
+ Vectorized<int16_t> inline operator>>(const Vectorized<int16_t>& a, const Vectorized<int16_t>& b) {
1444
+ return _mm512_srav_epi16(a, b);
1445
+ }
1446
+
1447
+ template <>
1448
+ Vectorized<int8_t> inline operator>>(const Vectorized<int8_t>& a, const Vectorized<int8_t>& b) {
1449
+ return shift_512_8<false>(a, b);
1450
+ }
1451
+
1452
+ template <>
1453
+ Vectorized<uint8_t> inline operator>>(const Vectorized<uint8_t>& a, const Vectorized<uint8_t>& b) {
1454
+ return shift_512_8<false>(a, b);
1455
+ }
1456
+
1457
+ #endif
1458
+
1459
+ }}}
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_conj_physical_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor _conj_physical(const at::Tensor & self);
21
+ TORCH_API at::Tensor & _conj_physical_out(at::Tensor & out, const at::Tensor & self);
22
+ TORCH_API at::Tensor & _conj_physical_outf(const at::Tensor & self, at::Tensor & out);
23
+
24
+ } // namespace compositeexplicitautograd
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_ctc_loss_backward_cpu_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API at::Tensor _ctc_loss_backward(const at::Tensor & grad, const at::Tensor & log_probs, const at::Tensor & targets, at::IntArrayRef input_lengths, at::IntArrayRef target_lengths, const at::Tensor & neg_log_likelihood, const at::Tensor & log_alpha, int64_t blank, bool zero_infinity=false);
21
+ TORCH_API at::Tensor _ctc_loss_backward(const at::Tensor & grad, const at::Tensor & log_probs, const at::Tensor & targets, const at::Tensor & input_lengths, const at::Tensor & target_lengths, const at::Tensor & neg_log_likelihood, const at::Tensor & log_alpha, int64_t blank, bool zero_infinity=false);
22
+
23
+ } // namespace cpu
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cufft_get_plan_cache_max_size_native.h ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API int64_t _cufft_get_plan_cache_max_size(at::DeviceIndex device_index);
20
+ } // namespace native
21
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_debug_has_internal_overlap_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API int64_t _debug_has_internal_overlap(const at::Tensor & self);
21
+
22
+ } // namespace compositeimplicitautograd
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_log10_cuda_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cuda {
19
+
20
+ TORCH_API ::std::vector<at::Tensor> _foreach_log10(at::TensorList self);
21
+ TORCH_API void _foreach_log10_(at::TensorList self);
22
+
23
+ } // namespace cuda
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_adam_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API ::std::tuple<::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>> _fused_adam(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, double lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
21
+ TORCH_API void _fused_adam_out(at::TensorList out, at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, double lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
22
+ TORCH_API void _fused_adam_outf(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, double lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale, const ::std::optional<at::Tensor> & found_inf, at::TensorList out);
23
+ TORCH_API ::std::tuple<::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>,::std::vector<at::Tensor>> _fused_adam(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, const at::Tensor & lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
24
+ TORCH_API void _fused_adam_out(at::TensorList out, at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, const at::Tensor & lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
25
+ TORCH_API void _fused_adam_outf(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, const at::Tensor & lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale, const ::std::optional<at::Tensor> & found_inf, at::TensorList out);
26
+
27
+ } // namespace compositeexplicitautograd
28
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_dropout_ops.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _fused_dropout {
18
+ using schema = ::std::tuple<at::Tensor,at::Tensor> (const at::Tensor &, double, ::std::optional<at::Generator>);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_fused_dropout")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_fused_dropout(Tensor self, float p, Generator? generator=None) -> (Tensor, Tensor)")
24
+ static ::std::tuple<at::Tensor,at::Tensor> call(const at::Tensor & self, double p, ::std::optional<at::Generator> generator);
25
+ static ::std::tuple<at::Tensor,at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, double p, ::std::optional<at::Generator> generator);
26
+ };
27
+
28
+ struct TORCH_API _fused_dropout_out {
29
+ using schema = ::std::tuple<at::Tensor &,at::Tensor &> (const at::Tensor &, double, ::std::optional<at::Generator>, at::Tensor &, at::Tensor &);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_fused_dropout")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_fused_dropout.out(Tensor self, float p, Generator? generator=None, *, Tensor(a!) out0, Tensor(b!) out1) -> (Tensor(a!), Tensor(b!))")
35
+ static ::std::tuple<at::Tensor &,at::Tensor &> call(const at::Tensor & self, double p, ::std::optional<at::Generator> generator, at::Tensor & out0, at::Tensor & out1);
36
+ static ::std::tuple<at::Tensor &,at::Tensor &> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, double p, ::std::optional<at::Generator> generator, at::Tensor & out0, at::Tensor & out1);
37
+ };
38
+
39
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_is_all_true.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_is_all_true_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_is_all_true(Tensor self) -> Tensor
26
+ inline at::Tensor _is_all_true(const at::Tensor & self) {
27
+ return at::_ops::_is_all_true::call(self);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_make_per_channel_quantized_tensor_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor & _make_per_channel_quantized_tensor_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis);
21
+ TORCH_API at::Tensor & _make_per_channel_quantized_tensor_outf(const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, at::Tensor & out);
22
+
23
+ } // namespace compositeexplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_from_mask_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor & _nested_tensor_from_mask_out(at::Tensor & out, const at::Tensor & t, const at::Tensor & mask, bool mask_check=true);
21
+ TORCH_API at::Tensor & _nested_tensor_from_mask_outf(const at::Tensor & t, const at::Tensor & mask, bool mask_check, at::Tensor & out);
22
+
23
+ } // namespace compositeexplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_from_tensor_list_native.h ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor _nested_tensor_from_tensor_list(at::TensorList list, ::std::optional<at::ScalarType> dtype=::std::nullopt, ::std::optional<at::Layout> layout=::std::nullopt, ::std::optional<at::Device> device=::std::nullopt, ::std::optional<bool> pin_memory=::std::nullopt);
20
+ TORCH_API at::Tensor & _nested_tensor_from_tensor_list_out(at::TensorList list, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, at::Tensor & out);
21
+ } // namespace native
22
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_pdist_backward.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_pdist_backward_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_pdist_backward(Tensor grad, Tensor self, float p, Tensor pdist) -> Tensor
26
+ inline at::Tensor _pdist_backward(const at::Tensor & grad, const at::Tensor & self, double p, const at::Tensor & pdist) {
27
+ return at::_ops::_pdist_backward::call(grad, self, p, pdist);
28
+ }
29
+
30
+ // aten::_pdist_backward.out(Tensor grad, Tensor self, float p, Tensor pdist, *, Tensor(a!) out) -> Tensor(a!)
31
+ inline at::Tensor & _pdist_backward_out(at::Tensor & out, const at::Tensor & grad, const at::Tensor & self, double p, const at::Tensor & pdist) {
32
+ return at::_ops::_pdist_backward_out::call(grad, self, p, pdist, out);
33
+ }
34
+ // aten::_pdist_backward.out(Tensor grad, Tensor self, float p, Tensor pdist, *, Tensor(a!) out) -> Tensor(a!)
35
+ inline at::Tensor & _pdist_backward_outf(const at::Tensor & grad, const at::Tensor & self, double p, const at::Tensor & pdist, at::Tensor & out) {
36
+ return at::_ops::_pdist_backward_out::call(grad, self, p, pdist, out);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_flash_attention_ops.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _scaled_dot_product_flash_attention {
18
+ using schema = ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor,c10::SymInt,c10::SymInt,at::Tensor,at::Tensor,at::Tensor> (const at::Tensor &, const at::Tensor &, const at::Tensor &, double, bool, bool, ::std::optional<double>);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_scaled_dot_product_flash_attention")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_scaled_dot_product_flash_attention(Tensor query, Tensor key, Tensor value, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask)")
24
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor,c10::SymInt,c10::SymInt,at::Tensor,at::Tensor,at::Tensor> call(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, double dropout_p, bool is_causal, bool return_debug_mask, ::std::optional<double> scale);
25
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor,c10::SymInt,c10::SymInt,at::Tensor,at::Tensor,at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, double dropout_p, bool is_causal, bool return_debug_mask, ::std::optional<double> scale);
26
+ };
27
+
28
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_sparse_sum_backward_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor & _sparse_sum_backward_out(at::Tensor & out, const at::Tensor & grad, const at::Tensor & self, at::IntArrayRef dim);
21
+ TORCH_API at::Tensor & _sparse_sum_backward_outf(const at::Tensor & grad, const at::Tensor & self, at::IntArrayRef dim, at::Tensor & out);
22
+
23
+ } // namespace compositeexplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_test_functorch_fallback.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_test_functorch_fallback_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_test_functorch_fallback(Tensor self, Tensor other) -> Tensor
26
+ inline at::Tensor _test_functorch_fallback(const at::Tensor & self, const at::Tensor & other) {
27
+ return at::_ops::_test_functorch_fallback::call(self, other);
28
+ }
29
+
30
+ // aten::_test_functorch_fallback.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
31
+ inline at::Tensor & _test_functorch_fallback_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other) {
32
+ return at::_ops::_test_functorch_fallback_out::call(self, other, out);
33
+ }
34
+ // aten::_test_functorch_fallback.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
35
+ inline at::Tensor & _test_functorch_fallback_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
36
+ return at::_ops::_test_functorch_fallback_out::call(self, other, out);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_unique2_ops.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _unique2 {
18
+ using schema = ::std::tuple<at::Tensor,at::Tensor,at::Tensor> (const at::Tensor &, bool, bool, bool);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_unique2")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_unique2(Tensor self, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor)")
24
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor> call(const at::Tensor & self, bool sorted, bool return_inverse, bool return_counts);
25
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, bool sorted, bool return_inverse, bool return_counts);
26
+ };
27
+
28
+ struct TORCH_API _unique2_out {
29
+ using schema = ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> (const at::Tensor &, bool, bool, bool, at::Tensor &, at::Tensor &, at::Tensor &);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_unique2")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_unique2.out(Tensor self, bool sorted=True, bool return_inverse=False, bool return_counts=False, *, Tensor(a!) out0, Tensor(b!) out1, Tensor(c!) out2) -> (Tensor(a!), Tensor(b!), Tensor(c!))")
35
+ static ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> call(const at::Tensor & self, bool sorted, bool return_inverse, bool return_counts, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2);
36
+ static ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, bool sorted, bool return_inverse, bool return_counts, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2);
37
+ };
38
+
39
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_unsafe_index_put_ops.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _unsafe_index_put {
18
+ using schema = at::Tensor (const at::Tensor &, const c10::List<::std::optional<at::Tensor>> &, const at::Tensor &, bool);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_unsafe_index_put")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_unsafe_index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor")
24
+ static at::Tensor call(const at::Tensor & self, const c10::List<::std::optional<at::Tensor>> & indices, const at::Tensor & values, bool accumulate);
25
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const c10::List<::std::optional<at::Tensor>> & indices, const at::Tensor & values, bool accumulate);
26
+ };
27
+
28
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_bicubic2d_aa_ops.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _upsample_bicubic2d_aa_vec {
18
+ using schema = at::Tensor (const at::Tensor &, at::OptionalSymIntArrayRef, bool, ::std::optional<at::ArrayRef<double>>);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_upsample_bicubic2d_aa")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "vec")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_upsample_bicubic2d_aa.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor")
24
+ static at::Tensor call(const at::Tensor & input, at::OptionalSymIntArrayRef output_size, bool align_corners, ::std::optional<at::ArrayRef<double>> scale_factors);
25
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & input, at::OptionalSymIntArrayRef output_size, bool align_corners, ::std::optional<at::ArrayRef<double>> scale_factors);
26
+ };
27
+
28
+ struct TORCH_API _upsample_bicubic2d_aa_out {
29
+ using schema = at::Tensor & (const at::Tensor &, c10::SymIntArrayRef, bool, ::std::optional<double>, ::std::optional<double>, at::Tensor &);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_upsample_bicubic2d_aa")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_upsample_bicubic2d_aa.out(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!)")
35
+ static at::Tensor & call(const at::Tensor & self, c10::SymIntArrayRef output_size, bool align_corners, ::std::optional<double> scales_h, ::std::optional<double> scales_w, at::Tensor & out);
36
+ static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, c10::SymIntArrayRef output_size, bool align_corners, ::std::optional<double> scales_h, ::std::optional<double> scales_w, at::Tensor & out);
37
+ };
38
+
39
+ struct TORCH_API _upsample_bicubic2d_aa {
40
+ using schema = at::Tensor (const at::Tensor &, c10::SymIntArrayRef, bool, ::std::optional<double>, ::std::optional<double>);
41
+ using ptr_schema = schema*;
42
+ // See Note [static constexpr char* members for windows NVCC]
43
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_upsample_bicubic2d_aa")
44
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
45
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_upsample_bicubic2d_aa(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor")
46
+ static at::Tensor call(const at::Tensor & self, c10::SymIntArrayRef output_size, bool align_corners, ::std::optional<double> scales_h, ::std::optional<double> scales_w);
47
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, c10::SymIntArrayRef output_size, bool align_corners, ::std::optional<double> scales_h, ::std::optional<double> scales_w);
48
+ };
49
+
50
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_nearest_exact2d_backward_compositeexplicitautogradnonfunctional_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautogradnonfunctional {
19
+
20
+ TORCH_API at::Tensor _upsample_nearest_exact2d_backward(const at::Tensor & grad_output, at::IntArrayRef output_size, at::IntArrayRef input_size, ::std::optional<double> scales_h=::std::nullopt, ::std::optional<double> scales_w=::std::nullopt);
21
+ TORCH_API at::Tensor _upsample_nearest_exact2d_backward_symint(const at::Tensor & grad_output, c10::SymIntArrayRef output_size, c10::SymIntArrayRef input_size, ::std::optional<double> scales_h=::std::nullopt, ::std::optional<double> scales_w=::std::nullopt);
22
+
23
+ } // namespace compositeexplicitautogradnonfunctional
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/align_to.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/align_to_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+
26
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/all_compositeexplicitautogradnonfunctional_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautogradnonfunctional {
19
+
20
+ TORCH_API at::Tensor all(const at::Tensor & self, int64_t dim, bool keepdim=false);
21
+ TORCH_API at::Tensor all(const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim=false);
22
+ TORCH_API at::Tensor all(const at::Tensor & self);
23
+
24
+ } // namespace compositeexplicitautogradnonfunctional
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/argmin_native.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+ #include <ATen/ops/argmin_meta.h>
16
+
17
+ namespace at {
18
+ namespace native {
19
+ struct TORCH_API structured_argmin_out : public at::meta::structured_argmin {
20
+ void impl(const at::Tensor & self, ::std::optional<int64_t> dim, bool keepdim, const at::Tensor & out);
21
+ };
22
+ } // namespace native
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/bitwise_and_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_bitwise_and_Tensor : public TensorIteratorBase {
21
+
22
+
23
+ void meta(const at::Tensor & self, const at::Tensor & other);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cauchy_meta_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace meta {
19
+
20
+ TORCH_API at::Tensor & cauchy_(at::Tensor & self, double median=0, double sigma=1, ::std::optional<at::Generator> generator=::std::nullopt);
21
+
22
+ } // namespace meta
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/constant_pad_nd_native.h ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor constant_pad_nd(const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value=0);
20
+ TORCH_API at::Tensor & constant_pad_nd_out_symint(const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value, at::Tensor & out);
21
+ } // namespace native
22
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/conv_tbc.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/conv_tbc_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::conv_tbc(Tensor self, Tensor weight, Tensor bias, int pad=0) -> Tensor
26
+ inline at::Tensor conv_tbc(const at::Tensor & self, const at::Tensor & weight, const at::Tensor & bias, int64_t pad=0) {
27
+ return at::_ops::conv_tbc::call(self, weight, bias, pad);
28
+ }
29
+
30
+ // aten::conv_tbc.out(Tensor self, Tensor weight, Tensor bias, int pad=0, *, Tensor(a!) out) -> Tensor(a!)
31
+ inline at::Tensor & conv_tbc_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & weight, const at::Tensor & bias, int64_t pad=0) {
32
+ return at::_ops::conv_tbc_out::call(self, weight, bias, pad, out);
33
+ }
34
+ // aten::conv_tbc.out(Tensor self, Tensor weight, Tensor bias, int pad=0, *, Tensor(a!) out) -> Tensor(a!)
35
+ inline at::Tensor & conv_tbc_outf(const at::Tensor & self, const at::Tensor & weight, const at::Tensor & bias, int64_t pad, at::Tensor & out) {
36
+ return at::_ops::conv_tbc_out::call(self, weight, bias, pad, out);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/corrcoef.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/corrcoef_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::corrcoef(Tensor self) -> Tensor
26
+ inline at::Tensor corrcoef(const at::Tensor & self) {
27
+ return at::_ops::corrcoef::call(self);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_convolution_relu_cuda_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cuda {
19
+
20
+ TORCH_API at::Tensor cudnn_convolution_relu(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups);
21
+ TORCH_API at::Tensor cudnn_convolution_relu_symint(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups);
22
+
23
+ } // namespace cuda
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/fake_quantize_per_channel_affine_cachemask_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::fake_quantize_per_channel_affine_cachemask(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> (Tensor output, Tensor mask)
26
+ inline ::std::tuple<at::Tensor,at::Tensor> fake_quantize_per_channel_affine_cachemask(const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, int64_t quant_min, int64_t quant_max) {
27
+ return at::_ops::fake_quantize_per_channel_affine_cachemask::call(self, scale, zero_point, axis, quant_min, quant_max);
28
+ }
29
+
30
+ // aten::fake_quantize_per_channel_affine_cachemask.out(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, *, Tensor(a!) out0, Tensor(b!) out1) -> (Tensor(a!), Tensor(b!))
31
+ inline ::std::tuple<at::Tensor &,at::Tensor &> fake_quantize_per_channel_affine_cachemask_out(at::Tensor & out0, at::Tensor & out1, const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, int64_t quant_min, int64_t quant_max) {
32
+ return at::_ops::fake_quantize_per_channel_affine_cachemask_out::call(self, scale, zero_point, axis, quant_min, quant_max, out0, out1);
33
+ }
34
+ // aten::fake_quantize_per_channel_affine_cachemask.out(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, *, Tensor(a!) out0, Tensor(b!) out1) -> (Tensor(a!), Tensor(b!))
35
+ inline ::std::tuple<at::Tensor &,at::Tensor &> fake_quantize_per_channel_affine_cachemask_outf(const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, int64_t quant_min, int64_t quant_max, at::Tensor & out0, at::Tensor & out1) {
36
+ return at::_ops::fake_quantize_per_channel_affine_cachemask_out::call(self, scale, zero_point, axis, quant_min, quant_max, out0, out1);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fft_hfftn.h ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/fft_hfftn_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::fft_hfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor
26
+ inline at::Tensor fft_hfftn(const at::Tensor & self, at::OptionalIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
27
+ return at::_ops::fft_hfftn::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm);
28
+ }
29
+ namespace symint {
30
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
31
+ at::Tensor fft_hfftn(const at::Tensor & self, at::OptionalIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
32
+ return at::_ops::fft_hfftn::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm);
33
+ }
34
+ }
35
+
36
+ // aten::fft_hfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor
37
+ inline at::Tensor fft_hfftn_symint(const at::Tensor & self, at::OptionalSymIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
38
+ return at::_ops::fft_hfftn::call(self, s, dim, norm);
39
+ }
40
+ namespace symint {
41
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
42
+ at::Tensor fft_hfftn(const at::Tensor & self, at::OptionalSymIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
43
+ return at::_ops::fft_hfftn::call(self, s, dim, norm);
44
+ }
45
+ }
46
+
47
+ // aten::fft_hfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
48
+ inline const at::Tensor & fft_hfftn_out(const at::Tensor & out, const at::Tensor & self, at::OptionalIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
49
+ return at::_ops::fft_hfftn_out::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm, out);
50
+ }
51
+ namespace symint {
52
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
53
+ const at::Tensor & fft_hfftn_out(const at::Tensor & out, const at::Tensor & self, at::OptionalIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
54
+ return at::_ops::fft_hfftn_out::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm, out);
55
+ }
56
+ }
57
+
58
+ // aten::fft_hfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
59
+ inline const at::Tensor & fft_hfftn_outf(const at::Tensor & self, at::OptionalIntArrayRef s, at::OptionalIntArrayRef dim, ::std::optional<c10::string_view> norm, const at::Tensor & out) {
60
+ return at::_ops::fft_hfftn_out::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm, out);
61
+ }
62
+ namespace symint {
63
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
64
+ const at::Tensor & fft_hfftn_outf(const at::Tensor & self, at::OptionalIntArrayRef s, at::OptionalIntArrayRef dim, ::std::optional<c10::string_view> norm, const at::Tensor & out) {
65
+ return at::_ops::fft_hfftn_out::call(self, s.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*s)) : ::std::nullopt, dim, norm, out);
66
+ }
67
+ }
68
+
69
+ // aten::fft_hfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
70
+ inline const at::Tensor & fft_hfftn_symint_out(const at::Tensor & out, const at::Tensor & self, at::OptionalSymIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
71
+ return at::_ops::fft_hfftn_out::call(self, s, dim, norm, out);
72
+ }
73
+ namespace symint {
74
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
75
+ const at::Tensor & fft_hfftn_out(const at::Tensor & out, const at::Tensor & self, at::OptionalSymIntArrayRef s=::std::nullopt, at::OptionalIntArrayRef dim=::std::nullopt, ::std::optional<c10::string_view> norm=::std::nullopt) {
76
+ return at::_ops::fft_hfftn_out::call(self, s, dim, norm, out);
77
+ }
78
+ }
79
+
80
+ // aten::fft_hfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
81
+ inline const at::Tensor & fft_hfftn_symint_outf(const at::Tensor & self, at::OptionalSymIntArrayRef s, at::OptionalIntArrayRef dim, ::std::optional<c10::string_view> norm, const at::Tensor & out) {
82
+ return at::_ops::fft_hfftn_out::call(self, s, dim, norm, out);
83
+ }
84
+ namespace symint {
85
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
86
+ const at::Tensor & fft_hfftn_outf(const at::Tensor & self, at::OptionalSymIntArrayRef s, at::OptionalIntArrayRef dim, ::std::optional<c10::string_view> norm, const at::Tensor & out) {
87
+ return at::_ops::fft_hfftn_out::call(self, s, dim, norm, out);
88
+ }
89
+ }
90
+
91
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fft_ifft.h ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/fft_ifft_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::fft_ifft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor
26
+ inline at::Tensor fft_ifft(const at::Tensor & self, ::std::optional<int64_t> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
27
+ return at::_ops::fft_ifft::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm);
28
+ }
29
+ namespace symint {
30
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
31
+ at::Tensor fft_ifft(const at::Tensor & self, ::std::optional<int64_t> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
32
+ return at::_ops::fft_ifft::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm);
33
+ }
34
+ }
35
+
36
+ // aten::fft_ifft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor
37
+ inline at::Tensor fft_ifft_symint(const at::Tensor & self, ::std::optional<c10::SymInt> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
38
+ return at::_ops::fft_ifft::call(self, n, dim, norm);
39
+ }
40
+ namespace symint {
41
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
42
+ at::Tensor fft_ifft(const at::Tensor & self, ::std::optional<c10::SymInt> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
43
+ return at::_ops::fft_ifft::call(self, n, dim, norm);
44
+ }
45
+ }
46
+
47
+ // aten::fft_ifft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
48
+ inline at::Tensor & fft_ifft_out(at::Tensor & out, const at::Tensor & self, ::std::optional<int64_t> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
49
+ return at::_ops::fft_ifft_out::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm, out);
50
+ }
51
+ namespace symint {
52
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
53
+ at::Tensor & fft_ifft_out(at::Tensor & out, const at::Tensor & self, ::std::optional<int64_t> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
54
+ return at::_ops::fft_ifft_out::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm, out);
55
+ }
56
+ }
57
+
58
+ // aten::fft_ifft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
59
+ inline at::Tensor & fft_ifft_outf(const at::Tensor & self, ::std::optional<int64_t> n, int64_t dim, ::std::optional<c10::string_view> norm, at::Tensor & out) {
60
+ return at::_ops::fft_ifft_out::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm, out);
61
+ }
62
+ namespace symint {
63
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
64
+ at::Tensor & fft_ifft_outf(const at::Tensor & self, ::std::optional<int64_t> n, int64_t dim, ::std::optional<c10::string_view> norm, at::Tensor & out) {
65
+ return at::_ops::fft_ifft_out::call(self, n.has_value() ? ::std::make_optional(c10::SymInt(*n)) : ::std::nullopt, dim, norm, out);
66
+ }
67
+ }
68
+
69
+ // aten::fft_ifft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
70
+ inline at::Tensor & fft_ifft_symint_out(at::Tensor & out, const at::Tensor & self, ::std::optional<c10::SymInt> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
71
+ return at::_ops::fft_ifft_out::call(self, n, dim, norm, out);
72
+ }
73
+ namespace symint {
74
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
75
+ at::Tensor & fft_ifft_out(at::Tensor & out, const at::Tensor & self, ::std::optional<c10::SymInt> n=::std::nullopt, int64_t dim=-1, ::std::optional<c10::string_view> norm=::std::nullopt) {
76
+ return at::_ops::fft_ifft_out::call(self, n, dim, norm, out);
77
+ }
78
+ }
79
+
80
+ // aten::fft_ifft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!)
81
+ inline at::Tensor & fft_ifft_symint_outf(const at::Tensor & self, ::std::optional<c10::SymInt> n, int64_t dim, ::std::optional<c10::string_view> norm, at::Tensor & out) {
82
+ return at::_ops::fft_ifft_out::call(self, n, dim, norm, out);
83
+ }
84
+ namespace symint {
85
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
86
+ at::Tensor & fft_ifft_outf(const at::Tensor & self, ::std::optional<c10::SymInt> n, int64_t dim, ::std::optional<c10::string_view> norm, at::Tensor & out) {
87
+ return at::_ops::fft_ifft_out::call(self, n, dim, norm, out);
88
+ }
89
+ }
90
+
91
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fractional_max_pool3d_native.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+ #include <ATen/ops/fractional_max_pool3d_meta.h>
16
+
17
+ namespace at {
18
+ namespace native {
19
+ struct TORCH_API structured_fractional_max_pool3d_out_cpu : public at::meta::structured_fractional_max_pool3d {
20
+ void impl(const at::Tensor & self, int64_t poolSizeT, int64_t poolSizeH, int64_t poolSizeW, int64_t outputT, int64_t outputH, int64_t outputW, const at::Tensor & random_samples, int64_t numBatch, int64_t numPlanes, int64_t inputT, int64_t inputH, int64_t inputW, const at::Tensor & output, const at::Tensor & indices);
21
+ };
22
+ struct TORCH_API structured_fractional_max_pool3d_out_cuda : public at::meta::structured_fractional_max_pool3d {
23
+ void impl(const at::Tensor & self, int64_t poolSizeT, int64_t poolSizeH, int64_t poolSizeW, int64_t outputT, int64_t outputH, int64_t outputW, const at::Tensor & random_samples, int64_t numBatch, int64_t numPlanes, int64_t inputT, int64_t inputH, int64_t inputW, const at::Tensor & output, const at::Tensor & indices);
24
+ };
25
+ } // namespace native
26
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fused_moving_avg_obs_fake_quant_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor fused_moving_avg_obs_fake_quant(const at::Tensor & self, const at::Tensor & observer_on, const at::Tensor & fake_quant_on, at::Tensor & running_min, at::Tensor & running_max, at::Tensor & scale, at::Tensor & zero_point, double averaging_const, int64_t quant_min, int64_t quant_max, int64_t ch_axis, bool per_row_fake_quant=false, bool symmetric_quant=false);
21
+
22
+ } // namespace compositeimplicitautograd
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/gather_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor gather(const at::Tensor & self, at::Dimname dim, const at::Tensor & index, bool sparse_grad=false);
21
+ TORCH_API at::Tensor & gather_out(at::Tensor & out, const at::Tensor & self, at::Dimname dim, const at::Tensor & index, bool sparse_grad=false);
22
+ TORCH_API at::Tensor & gather_outf(const at::Tensor & self, at::Dimname dim, const at::Tensor & index, bool sparse_grad, at::Tensor & out);
23
+
24
+ } // namespace compositeimplicitautograd
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/hamming_window_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor hamming_window(int64_t window_length, at::TensorOptions options={});
21
+ TORCH_API at::Tensor hamming_window(int64_t window_length, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
22
+ TORCH_API at::Tensor & hamming_window_out(at::Tensor & out, int64_t window_length);
23
+ TORCH_API at::Tensor & hamming_window_outf(int64_t window_length, at::Tensor & out);
24
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, at::TensorOptions options={});
25
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
26
+ TORCH_API at::Tensor & hamming_window_out(at::Tensor & out, int64_t window_length, bool periodic);
27
+ TORCH_API at::Tensor & hamming_window_outf(int64_t window_length, bool periodic, at::Tensor & out);
28
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, double alpha, at::TensorOptions options={});
29
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, double alpha, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
30
+ TORCH_API at::Tensor & hamming_window_out(at::Tensor & out, int64_t window_length, bool periodic, double alpha);
31
+ TORCH_API at::Tensor & hamming_window_outf(int64_t window_length, bool periodic, double alpha, at::Tensor & out);
32
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, double alpha, double beta, at::TensorOptions options={});
33
+ TORCH_API at::Tensor hamming_window(int64_t window_length, bool periodic, double alpha, double beta, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
34
+ TORCH_API at::Tensor & hamming_window_out(at::Tensor & out, int64_t window_length, bool periodic, double alpha, double beta);
35
+ TORCH_API at::Tensor & hamming_window_outf(int64_t window_length, bool periodic, double alpha, double beta, at::Tensor & out);
36
+
37
+ } // namespace compositeexplicitautograd
38
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/hardshrink_compositeexplicitautogradnonfunctional_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautogradnonfunctional {
19
+
20
+ TORCH_API at::Tensor hardshrink(const at::Tensor & self, const at::Scalar & lambd=0.5);
21
+
22
+ } // namespace compositeexplicitautogradnonfunctional
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/index_copy_meta.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_index_copy : public at::impl::MetaBase {
21
+
22
+ template <bool DIM = false>
23
+ struct TORCH_API precompute_out {
24
+
25
+ precompute_out<true> set_dim(int64_t value) {
26
+ static_assert(DIM == false, "dim already set");
27
+ precompute_out<true> ret;
28
+ ret.dim = value;
29
+ return ret;
30
+ }
31
+
32
+ int64_t dim;
33
+ };
34
+ using meta_return_ty = precompute_out <true>;
35
+ meta_return_ty meta(const at::Tensor & self, int64_t dim, const at::Tensor & index, const at::Tensor & source);
36
+ };
37
+
38
+ } // namespace native
39
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/is_set_to_cpu_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API bool is_set_to(const at::Tensor & self, const at::Tensor & tensor);
21
+
22
+ } // namespace cpu
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/less_equal_ops.h ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API less_equal_Scalar_out {
18
+ using schema = at::Tensor & (const at::Tensor &, const at::Scalar &, at::Tensor &);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar_out")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)")
24
+ static at::Tensor & call(const at::Tensor & self, const at::Scalar & other, at::Tensor & out);
25
+ static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Scalar & other, at::Tensor & out);
26
+ };
27
+
28
+ struct TORCH_API less_equal_Scalar {
29
+ using schema = at::Tensor (const at::Tensor &, const at::Scalar &);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal.Scalar(Tensor self, Scalar other) -> Tensor")
35
+ static at::Tensor call(const at::Tensor & self, const at::Scalar & other);
36
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Scalar & other);
37
+ };
38
+
39
+ struct TORCH_API less_equal_Tensor_out {
40
+ using schema = at::Tensor & (const at::Tensor &, const at::Tensor &, at::Tensor &);
41
+ using ptr_schema = schema*;
42
+ // See Note [static constexpr char* members for windows NVCC]
43
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal")
44
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor_out")
45
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)")
46
+ static at::Tensor & call(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
47
+ static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
48
+ };
49
+
50
+ struct TORCH_API less_equal_Tensor {
51
+ using schema = at::Tensor (const at::Tensor &, const at::Tensor &);
52
+ using ptr_schema = schema*;
53
+ // See Note [static constexpr char* members for windows NVCC]
54
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal")
55
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
56
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal.Tensor(Tensor self, Tensor other) -> Tensor")
57
+ static at::Tensor call(const at::Tensor & self, const at::Tensor & other);
58
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & other);
59
+ };
60
+
61
+ struct TORCH_API less_equal__Scalar {
62
+ using schema = at::Tensor & (at::Tensor &, const at::Scalar &);
63
+ using ptr_schema = schema*;
64
+ // See Note [static constexpr char* members for windows NVCC]
65
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal_")
66
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
67
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)")
68
+ static at::Tensor & call(at::Tensor & self, const at::Scalar & other);
69
+ static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, at::Tensor & self, const at::Scalar & other);
70
+ };
71
+
72
+ struct TORCH_API less_equal__Tensor {
73
+ using schema = at::Tensor & (at::Tensor &, const at::Tensor &);
74
+ using ptr_schema = schema*;
75
+ // See Note [static constexpr char* members for windows NVCC]
76
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_equal_")
77
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
78
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_equal_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)")
79
+ static at::Tensor & call(at::Tensor & self, const at::Tensor & other);
80
+ static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, at::Tensor & self, const at::Tensor & other);
81
+ };
82
+
83
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cross_native.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+ #include <ATen/ops/linalg_cross_meta.h>
16
+
17
+ namespace at {
18
+ namespace native {
19
+ struct TORCH_API structured_linalg_cross_out : public at::meta::structured_linalg_cross {
20
+ void impl(const at::Tensor & self, const at::Tensor & other, int64_t dim, const at::Tensor & out);
21
+ };
22
+ TORCH_API at::Tensor linalg_cross_zerotensor(const at::Tensor & self, const at::Tensor & other, int64_t dim=-1);
23
+ } // namespace native
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_lu_factor_ex_cuda_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cuda {
19
+
20
+ TORCH_API ::std::tuple<at::Tensor,at::Tensor,at::Tensor> linalg_lu_factor_ex(const at::Tensor & A, bool pivot=true, bool check_errors=false);
21
+ TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> linalg_lu_factor_ex_out(at::Tensor & LU, at::Tensor & pivots, at::Tensor & info, const at::Tensor & A, bool pivot=true, bool check_errors=false);
22
+ TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> linalg_lu_factor_ex_outf(const at::Tensor & A, bool pivot, bool check_errors, at::Tensor & LU, at::Tensor & pivots, at::Tensor & info);
23
+
24
+ } // namespace cuda
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/matrix_H.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/matrix_H_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+
26
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/max_pool3d.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/max_pool3d_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor
26
+ inline at::Tensor max_pool3d(const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride={}, at::IntArrayRef padding=0, at::IntArrayRef dilation=1, bool ceil_mode=false) {
27
+ return at::_ops::max_pool3d::call(self, kernel_size, stride, padding, dilation, ceil_mode);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/moveaxis_ops.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API moveaxis_intlist {
18
+ using schema = at::Tensor (const at::Tensor &, at::IntArrayRef, at::IntArrayRef);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::moveaxis")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "intlist")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "moveaxis.intlist(Tensor(a) self, int[] source, int[] destination) -> Tensor(a)")
24
+ static at::Tensor call(const at::Tensor & self, at::IntArrayRef source, at::IntArrayRef destination);
25
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, at::IntArrayRef source, at::IntArrayRef destination);
26
+ };
27
+
28
+ struct TORCH_API moveaxis_int {
29
+ using schema = at::Tensor (const at::Tensor &, int64_t, int64_t);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::moveaxis")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "int")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "moveaxis.int(Tensor(a) self, int source, int destination) -> Tensor(a)")
35
+ static at::Tensor call(const at::Tensor & self, int64_t source, int64_t destination);
36
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, int64_t source, int64_t destination);
37
+ };
38
+
39
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/msort.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/msort_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::msort.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
26
+ inline at::Tensor & msort_out(at::Tensor & out, const at::Tensor & self) {
27
+ return at::_ops::msort_out::call(self, out);
28
+ }
29
+ // aten::msort.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
30
+ inline at::Tensor & msort_outf(const at::Tensor & self, at::Tensor & out) {
31
+ return at::_ops::msort_out::call(self, out);
32
+ }
33
+
34
+ // aten::msort(Tensor self) -> Tensor
35
+ inline at::Tensor msort(const at::Tensor & self) {
36
+ return at::_ops::msort::call(self);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/native_batch_norm_backward_cpu_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API ::std::tuple<at::Tensor,at::Tensor,at::Tensor> native_batch_norm_backward(const at::Tensor & grad_out, const at::Tensor & input, const ::std::optional<at::Tensor> & weight, const ::std::optional<at::Tensor> & running_mean, const ::std::optional<at::Tensor> & running_var, const ::std::optional<at::Tensor> & save_mean, const ::std::optional<at::Tensor> & save_invstd, bool train, double eps, ::std::array<bool,3> output_mask);
21
+
22
+ } // namespace cpu
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/new_ones.h ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/new_ones_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ namespace symint {
26
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
27
+ at::Tensor new_ones(const at::Tensor & self, at::IntArrayRef size, at::TensorOptions options={}) {
28
+ return at::_ops::new_ones::call(self, c10::fromIntArrayRefSlow(size), c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
29
+ }
30
+ }
31
+
32
+ namespace symint {
33
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
34
+ at::Tensor new_ones(const at::Tensor & self, at::IntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
35
+ return at::_ops::new_ones::call(self, c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory);
36
+ }
37
+ }
38
+
39
+ namespace symint {
40
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
41
+ at::Tensor new_ones(const at::Tensor & self, c10::SymIntArrayRef size, at::TensorOptions options={}) {
42
+ return at::_ops::new_ones::call(self, size, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
43
+ }
44
+ }
45
+
46
+ namespace symint {
47
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
48
+ at::Tensor new_ones(const at::Tensor & self, c10::SymIntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
49
+ return at::_ops::new_ones::call(self, size, dtype, layout, device, pin_memory);
50
+ }
51
+ }
52
+
53
+ // aten::new_ones.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!)
54
+ inline at::Tensor & new_ones_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size) {
55
+ return at::_ops::new_ones_out::call(self, c10::fromIntArrayRefSlow(size), out);
56
+ }
57
+ namespace symint {
58
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
59
+ at::Tensor & new_ones_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size) {
60
+ return at::_ops::new_ones_out::call(self, c10::fromIntArrayRefSlow(size), out);
61
+ }
62
+ }
63
+
64
+ // aten::new_ones.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!)
65
+ inline at::Tensor & new_ones_outf(const at::Tensor & self, at::IntArrayRef size, at::Tensor & out) {
66
+ return at::_ops::new_ones_out::call(self, c10::fromIntArrayRefSlow(size), out);
67
+ }
68
+ namespace symint {
69
+ template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
70
+ at::Tensor & new_ones_outf(const at::Tensor & self, at::IntArrayRef size, at::Tensor & out) {
71
+ return at::_ops::new_ones_out::call(self, c10::fromIntArrayRefSlow(size), out);
72
+ }
73
+ }
74
+
75
+ // aten::new_ones.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!)
76
+ inline at::Tensor & new_ones_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size) {
77
+ return at::_ops::new_ones_out::call(self, size, out);
78
+ }
79
+ namespace symint {
80
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
81
+ at::Tensor & new_ones_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size) {
82
+ return at::_ops::new_ones_out::call(self, size, out);
83
+ }
84
+ }
85
+
86
+ // aten::new_ones.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!)
87
+ inline at::Tensor & new_ones_symint_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Tensor & out) {
88
+ return at::_ops::new_ones_out::call(self, size, out);
89
+ }
90
+ namespace symint {
91
+ template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
92
+ at::Tensor & new_ones_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Tensor & out) {
93
+ return at::_ops::new_ones_out::call(self, size, out);
94
+ }
95
+ }
96
+
97
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/new_ones_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor new_ones(const at::Tensor & self, at::IntArrayRef size, at::TensorOptions options={});
21
+ TORCH_API at::Tensor new_ones(const at::Tensor & self, at::IntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
22
+ TORCH_API at::Tensor new_ones_symint(const at::Tensor & self, c10::SymIntArrayRef size, at::TensorOptions options={});
23
+ TORCH_API at::Tensor new_ones_symint(const at::Tensor & self, c10::SymIntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory);
24
+ TORCH_API at::Tensor & new_ones_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size);
25
+ TORCH_API at::Tensor & new_ones_outf(const at::Tensor & self, at::IntArrayRef size, at::Tensor & out);
26
+ TORCH_API at::Tensor & new_ones_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size);
27
+ TORCH_API at::Tensor & new_ones_symint_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Tensor & out);
28
+
29
+ } // namespace compositeexplicitautograd
30
+ } // namespace at