Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +29 -0
- parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_backend.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_helper.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_real_transforms.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/scipy/fft/tests/test_helper.py +570 -0
- parrot/lib/python3.10/site-packages/scipy/fft/tests/test_multithreading.py +84 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_add_cpu_dispatch.h +30 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_addcdiv_ops.h +116 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_minimum.h +82 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_native_multi_head_attention_cpu_dispatch.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_flash_attention.h +30 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_values_native.h +21 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/acosh_cuda_dispatch.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/arctan_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/argsort_cpu_dispatch.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/block_diag_ops.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/cauchy_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/conv_transpose3d_ops.h +28 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/exponential_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/fractional_max_pool2d_backward_native.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/igammac_cpu_dispatch.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/igammac_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/imag_native.h +21 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/lcm_meta_dispatch.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_diagonal_compositeimplicitautograd_dispatch.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/log_cuda_dispatch.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/logical_or_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/lstm_mps_backward_ops.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/matrix_exp_compositeimplicitautograd_dispatch.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/maximum.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/mvlgamma_cpu_dispatch.h +24 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/native_dropout_backward_compositeexplicitautograd_dispatch.h +24 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/outer_native.h +22 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/pinverse_ops.h +28 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/replication_pad1d.h +91 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/rsqrt.h +44 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/set.h +161 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/set_data.h +26 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/signbit.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/signbit_meta.h +27 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/softmax_native.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sort_compositeexplicitautogradnonfunctional_dispatch.h +23 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sparse_compressed_tensor_native.h +22 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_log_ndtr_ops.h +39 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_native.h +27 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_sinc_compositeimplicitautograd_dispatch.h +25 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/svd_compositeimplicitautograd_dispatch.h +25 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/svd_native.h +22 -0
- videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sym_size_compositeimplicitautograd_dispatch.h +23 -0
.gitattributes
CHANGED
|
@@ -1504,3 +1504,32 @@ vllm/lib/python3.10/site-packages/av.libs/libopus-21bd4123.so.0.10.1 filter=lfs
|
|
| 1504 |
parrot/lib/python3.10/site-packages/scipy/fftpack/convolve.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1505 |
parrot/lib/python3.10/site-packages/scipy/stats/_stats_pythran.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1506 |
parrot/lib/python3.10/site-packages/scipy/stats/tests/__pycache__/test_stats.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1504 |
parrot/lib/python3.10/site-packages/scipy/fftpack/convolve.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1505 |
parrot/lib/python3.10/site-packages/scipy/stats/_stats_pythran.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1506 |
parrot/lib/python3.10/site-packages/scipy/stats/tests/__pycache__/test_stats.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1507 |
+
vllm/lib/python3.10/site-packages/av.libs/libtwolame-72d74ef7.so.0.0.0 filter=lfs diff=lfs merge=lfs -text
|
| 1508 |
+
vllm/lib/python3.10/site-packages/av.libs/libvorbis-f4a9a6fd.so.0.4.9 filter=lfs diff=lfs merge=lfs -text
|
| 1509 |
+
vllm/lib/python3.10/site-packages/av.libs/libxcb-65da195c.so.1.1.0 filter=lfs diff=lfs merge=lfs -text
|
| 1510 |
+
vllm/lib/python3.10/site-packages/av.libs/libpcre-9513aab5.so.1.2.0 filter=lfs diff=lfs merge=lfs -text
|
| 1511 |
+
vllm/lib/python3.10/site-packages/av.libs/libcrypto-d3570994.so.1.0.2k filter=lfs diff=lfs merge=lfs -text
|
| 1512 |
+
vllm/lib/python3.10/site-packages/av.libs/libvorbisenc-0d9d5bdf.so.2.0.12 filter=lfs diff=lfs merge=lfs -text
|
| 1513 |
+
vllm/lib/python3.10/site-packages/av.libs/libkrb5-fcafa220.so.3.3 filter=lfs diff=lfs merge=lfs -text
|
| 1514 |
+
vllm/lib/python3.10/site-packages/av.libs/libwebp-50d90cf8.so.7.1.10 filter=lfs diff=lfs merge=lfs -text
|
| 1515 |
+
vllm/lib/python3.10/site-packages/av.libs/libgmp-a4b719d5.so.10.5.0 filter=lfs diff=lfs merge=lfs -text
|
| 1516 |
+
vllm/lib/python3.10/site-packages/av.libs/libgnutls-b9b94016.so.30.36.0 filter=lfs diff=lfs merge=lfs -text
|
| 1517 |
+
vllm/lib/python3.10/site-packages/av.libs/libx264-ba0b45ac.so.164 filter=lfs diff=lfs merge=lfs -text
|
| 1518 |
+
vllm/lib/python3.10/site-packages/av.libs/libx265-d8690e8d.so.199 filter=lfs diff=lfs merge=lfs -text
|
| 1519 |
+
vllm/lib/python3.10/site-packages/av.libs/libSvtAv1Enc-c4b981b1.so.2.2.0 filter=lfs diff=lfs merge=lfs -text
|
| 1520 |
+
vllm/lib/python3.10/site-packages/av.libs/libspeex-2370356a.so.1.5.2 filter=lfs diff=lfs merge=lfs -text
|
| 1521 |
+
vllm/lib/python3.10/site-packages/av.libs/libk5crypto-b1f99d5c.so.3.1 filter=lfs diff=lfs merge=lfs -text
|
| 1522 |
+
vllm/lib/python3.10/site-packages/av.libs/libssl-cd1d6220.so.1.0.2k filter=lfs diff=lfs merge=lfs -text
|
| 1523 |
+
vllm/lib/python3.10/site-packages/av.libs/libselinux-0922c95c.so.1 filter=lfs diff=lfs merge=lfs -text
|
| 1524 |
+
vllm/lib/python3.10/site-packages/av.libs/libsrt-46d7de04.so.1.5.4 filter=lfs diff=lfs merge=lfs -text
|
| 1525 |
+
vllm/lib/python3.10/site-packages/av.libs/libavformat-6e9fb513.so.61.7.100 filter=lfs diff=lfs merge=lfs -text
|
| 1526 |
+
vllm/lib/python3.10/site-packages/av.libs/libavfilter-5d8d94a7.so.10.4.100 filter=lfs diff=lfs merge=lfs -text
|
| 1527 |
+
vllm/lib/python3.10/site-packages/av.libs/libaom-e738dfbc.so.3.11.0 filter=lfs diff=lfs merge=lfs -text
|
| 1528 |
+
vllm/lib/python3.10/site-packages/av.libs/libswscale-36f7d5d9.so.8.3.100 filter=lfs diff=lfs merge=lfs -text
|
| 1529 |
+
vllm/lib/python3.10/site-packages/av.libs/libvpx-832f6f52.so.9.0.0 filter=lfs diff=lfs merge=lfs -text
|
| 1530 |
+
vllm/lib/python3.10/site-packages/av.libs/libavcodec-1860c7bd.so.61.19.100 filter=lfs diff=lfs merge=lfs -text
|
| 1531 |
+
vllm/lib/python3.10/site-packages/av.libs/libswresample-bac8501a.so.5.3.100 filter=lfs diff=lfs merge=lfs -text
|
| 1532 |
+
vllm/lib/python3.10/site-packages/av.libs/libnettle-14010e9f.so.8.8 filter=lfs diff=lfs merge=lfs -text
|
| 1533 |
+
vllm/lib/python3.10/site-packages/av.libs/liblzma-35d24502.so.5.6.3 filter=lfs diff=lfs merge=lfs -text
|
| 1534 |
+
vllm/lib/python3.10/site-packages/av.libs/libunistring-214e3d6e.so.5.1.0 filter=lfs diff=lfs merge=lfs -text
|
| 1535 |
+
vllm/lib/python3.10/site-packages/av.libs/libhogweed-bdf32d1d.so.6.8 filter=lfs diff=lfs merge=lfs -text
|
parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_backend.cpython-310.pyc
ADDED
|
Binary file (2.65 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_helper.cpython-310.pyc
ADDED
|
Binary file (15.4 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/scipy/fft/tests/__pycache__/test_real_transforms.cpython-310.pyc
ADDED
|
Binary file (6.32 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/scipy/fft/tests/test_helper.py
ADDED
|
@@ -0,0 +1,570 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Includes test functions for fftpack.helper module
|
| 2 |
+
|
| 3 |
+
Copied from fftpack.helper by Pearu Peterson, October 2005
|
| 4 |
+
Modified for Array API, 2023
|
| 5 |
+
|
| 6 |
+
"""
|
| 7 |
+
from scipy.fft._helper import next_fast_len, prev_fast_len, _init_nd_shape_and_axes
|
| 8 |
+
from numpy.testing import assert_equal
|
| 9 |
+
from pytest import raises as assert_raises
|
| 10 |
+
import pytest
|
| 11 |
+
import numpy as np
|
| 12 |
+
import sys
|
| 13 |
+
from scipy.conftest import array_api_compatible
|
| 14 |
+
from scipy._lib._array_api import (
|
| 15 |
+
xp_assert_close, get_xp_devices, device, array_namespace
|
| 16 |
+
)
|
| 17 |
+
from scipy import fft
|
| 18 |
+
|
| 19 |
+
pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends")]
|
| 20 |
+
skip_xp_backends = pytest.mark.skip_xp_backends
|
| 21 |
+
|
| 22 |
+
_5_smooth_numbers = [
|
| 23 |
+
2, 3, 4, 5, 6, 8, 9, 10,
|
| 24 |
+
2 * 3 * 5,
|
| 25 |
+
2**3 * 3**5,
|
| 26 |
+
2**3 * 3**3 * 5**2,
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
def test_next_fast_len():
|
| 30 |
+
for n in _5_smooth_numbers:
|
| 31 |
+
assert_equal(next_fast_len(n), n)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def _assert_n_smooth(x, n):
|
| 35 |
+
x_orig = x
|
| 36 |
+
if n < 2:
|
| 37 |
+
assert False
|
| 38 |
+
|
| 39 |
+
while True:
|
| 40 |
+
q, r = divmod(x, 2)
|
| 41 |
+
if r != 0:
|
| 42 |
+
break
|
| 43 |
+
x = q
|
| 44 |
+
|
| 45 |
+
for d in range(3, n+1, 2):
|
| 46 |
+
while True:
|
| 47 |
+
q, r = divmod(x, d)
|
| 48 |
+
if r != 0:
|
| 49 |
+
break
|
| 50 |
+
x = q
|
| 51 |
+
|
| 52 |
+
assert x == 1, \
|
| 53 |
+
f'x={x_orig} is not {n}-smooth, remainder={x}'
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
@skip_xp_backends(np_only=True)
|
| 57 |
+
class TestNextFastLen:
|
| 58 |
+
|
| 59 |
+
def test_next_fast_len(self):
|
| 60 |
+
np.random.seed(1234)
|
| 61 |
+
|
| 62 |
+
def nums():
|
| 63 |
+
yield from range(1, 1000)
|
| 64 |
+
yield 2**5 * 3**5 * 4**5 + 1
|
| 65 |
+
|
| 66 |
+
for n in nums():
|
| 67 |
+
m = next_fast_len(n)
|
| 68 |
+
_assert_n_smooth(m, 11)
|
| 69 |
+
assert m == next_fast_len(n, False)
|
| 70 |
+
|
| 71 |
+
m = next_fast_len(n, True)
|
| 72 |
+
_assert_n_smooth(m, 5)
|
| 73 |
+
|
| 74 |
+
def test_np_integers(self):
|
| 75 |
+
ITYPES = [np.int16, np.int32, np.int64, np.uint16, np.uint32, np.uint64]
|
| 76 |
+
for ityp in ITYPES:
|
| 77 |
+
x = ityp(12345)
|
| 78 |
+
testN = next_fast_len(x)
|
| 79 |
+
assert_equal(testN, next_fast_len(int(x)))
|
| 80 |
+
|
| 81 |
+
def testnext_fast_len_small(self):
|
| 82 |
+
hams = {
|
| 83 |
+
1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 8, 8: 8, 14: 15, 15: 15,
|
| 84 |
+
16: 16, 17: 18, 1021: 1024, 1536: 1536, 51200000: 51200000
|
| 85 |
+
}
|
| 86 |
+
for x, y in hams.items():
|
| 87 |
+
assert_equal(next_fast_len(x, True), y)
|
| 88 |
+
|
| 89 |
+
@pytest.mark.xfail(sys.maxsize < 2**32,
|
| 90 |
+
reason="Hamming Numbers too large for 32-bit",
|
| 91 |
+
raises=ValueError, strict=True)
|
| 92 |
+
def testnext_fast_len_big(self):
|
| 93 |
+
hams = {
|
| 94 |
+
510183360: 510183360, 510183360 + 1: 512000000,
|
| 95 |
+
511000000: 512000000,
|
| 96 |
+
854296875: 854296875, 854296875 + 1: 859963392,
|
| 97 |
+
196608000000: 196608000000, 196608000000 + 1: 196830000000,
|
| 98 |
+
8789062500000: 8789062500000, 8789062500000 + 1: 8796093022208,
|
| 99 |
+
206391214080000: 206391214080000,
|
| 100 |
+
206391214080000 + 1: 206624260800000,
|
| 101 |
+
470184984576000: 470184984576000,
|
| 102 |
+
470184984576000 + 1: 470715894135000,
|
| 103 |
+
7222041363087360: 7222041363087360,
|
| 104 |
+
7222041363087360 + 1: 7230196133913600,
|
| 105 |
+
# power of 5 5**23
|
| 106 |
+
11920928955078125: 11920928955078125,
|
| 107 |
+
11920928955078125 - 1: 11920928955078125,
|
| 108 |
+
# power of 3 3**34
|
| 109 |
+
16677181699666569: 16677181699666569,
|
| 110 |
+
16677181699666569 - 1: 16677181699666569,
|
| 111 |
+
# power of 2 2**54
|
| 112 |
+
18014398509481984: 18014398509481984,
|
| 113 |
+
18014398509481984 - 1: 18014398509481984,
|
| 114 |
+
# above this, int(ceil(n)) == int(ceil(n+1))
|
| 115 |
+
19200000000000000: 19200000000000000,
|
| 116 |
+
19200000000000000 + 1: 19221679687500000,
|
| 117 |
+
288230376151711744: 288230376151711744,
|
| 118 |
+
288230376151711744 + 1: 288325195312500000,
|
| 119 |
+
288325195312500000 - 1: 288325195312500000,
|
| 120 |
+
288325195312500000: 288325195312500000,
|
| 121 |
+
288325195312500000 + 1: 288555831593533440,
|
| 122 |
+
}
|
| 123 |
+
for x, y in hams.items():
|
| 124 |
+
assert_equal(next_fast_len(x, True), y)
|
| 125 |
+
|
| 126 |
+
def test_keyword_args(self):
|
| 127 |
+
assert next_fast_len(11, real=True) == 12
|
| 128 |
+
assert next_fast_len(target=7, real=False) == 7
|
| 129 |
+
|
| 130 |
+
@skip_xp_backends(np_only=True)
|
| 131 |
+
class TestPrevFastLen:
|
| 132 |
+
|
| 133 |
+
def test_prev_fast_len(self):
|
| 134 |
+
np.random.seed(1234)
|
| 135 |
+
|
| 136 |
+
def nums():
|
| 137 |
+
yield from range(1, 1000)
|
| 138 |
+
yield 2**5 * 3**5 * 4**5 + 1
|
| 139 |
+
|
| 140 |
+
for n in nums():
|
| 141 |
+
m = prev_fast_len(n)
|
| 142 |
+
_assert_n_smooth(m, 11)
|
| 143 |
+
assert m == prev_fast_len(n, False)
|
| 144 |
+
|
| 145 |
+
m = prev_fast_len(n, True)
|
| 146 |
+
_assert_n_smooth(m, 5)
|
| 147 |
+
|
| 148 |
+
def test_np_integers(self):
|
| 149 |
+
ITYPES = [np.int16, np.int32, np.int64, np.uint16, np.uint32,
|
| 150 |
+
np.uint64]
|
| 151 |
+
for ityp in ITYPES:
|
| 152 |
+
x = ityp(12345)
|
| 153 |
+
testN = prev_fast_len(x)
|
| 154 |
+
assert_equal(testN, prev_fast_len(int(x)))
|
| 155 |
+
|
| 156 |
+
testN = prev_fast_len(x, real=True)
|
| 157 |
+
assert_equal(testN, prev_fast_len(int(x), real=True))
|
| 158 |
+
|
| 159 |
+
def testprev_fast_len_small(self):
|
| 160 |
+
hams = {
|
| 161 |
+
1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 6, 8: 8, 14: 12, 15: 15,
|
| 162 |
+
16: 16, 17: 16, 1021: 1000, 1536: 1536, 51200000: 51200000
|
| 163 |
+
}
|
| 164 |
+
for x, y in hams.items():
|
| 165 |
+
assert_equal(prev_fast_len(x, True), y)
|
| 166 |
+
|
| 167 |
+
hams = {
|
| 168 |
+
1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10,
|
| 169 |
+
11: 11, 12: 12, 13: 12, 14: 14, 15: 15, 16: 16, 17: 16, 18: 18,
|
| 170 |
+
19: 18, 20: 20, 21: 21, 22: 22, 120: 120, 121: 121, 122: 121,
|
| 171 |
+
1021: 1008, 1536: 1536, 51200000: 51200000
|
| 172 |
+
}
|
| 173 |
+
for x, y in hams.items():
|
| 174 |
+
assert_equal(prev_fast_len(x, False), y)
|
| 175 |
+
|
| 176 |
+
@pytest.mark.xfail(sys.maxsize < 2**32,
|
| 177 |
+
reason="Hamming Numbers too large for 32-bit",
|
| 178 |
+
raises=ValueError, strict=True)
|
| 179 |
+
def testprev_fast_len_big(self):
|
| 180 |
+
hams = {
|
| 181 |
+
# 2**6 * 3**13 * 5**1
|
| 182 |
+
510183360: 510183360,
|
| 183 |
+
510183360 + 1: 510183360,
|
| 184 |
+
510183360 - 1: 509607936, # 2**21 * 3**5
|
| 185 |
+
# 2**6 * 5**6 * 7**1 * 73**1
|
| 186 |
+
511000000: 510183360,
|
| 187 |
+
511000000 + 1: 510183360,
|
| 188 |
+
511000000 - 1: 510183360, # 2**6 * 3**13 * 5**1
|
| 189 |
+
# 3**7 * 5**8
|
| 190 |
+
854296875: 854296875,
|
| 191 |
+
854296875 + 1: 854296875,
|
| 192 |
+
854296875 - 1: 850305600, # 2**6 * 3**12 * 5**2
|
| 193 |
+
# 2**22 * 3**1 * 5**6
|
| 194 |
+
196608000000: 196608000000,
|
| 195 |
+
196608000000 + 1: 196608000000,
|
| 196 |
+
196608000000 - 1: 195910410240, # 2**13 * 3**14 * 5**1
|
| 197 |
+
# 2**5 * 3**2 * 5**15
|
| 198 |
+
8789062500000: 8789062500000,
|
| 199 |
+
8789062500000 + 1: 8789062500000,
|
| 200 |
+
8789062500000 - 1: 8748000000000, # 2**11 * 3**7 * 5**9
|
| 201 |
+
# 2**24 * 3**9 * 5**4
|
| 202 |
+
206391214080000: 206391214080000,
|
| 203 |
+
206391214080000 + 1: 206391214080000,
|
| 204 |
+
206391214080000 - 1: 206158430208000, # 2**39 * 3**1 * 5**3
|
| 205 |
+
# 2**18 * 3**15 * 5**3
|
| 206 |
+
470184984576000: 470184984576000,
|
| 207 |
+
470184984576000 + 1: 470184984576000,
|
| 208 |
+
470184984576000 - 1: 469654673817600, # 2**33 * 3**7 **5**2
|
| 209 |
+
# 2**25 * 3**16 * 5**1
|
| 210 |
+
7222041363087360: 7222041363087360,
|
| 211 |
+
7222041363087360 + 1: 7222041363087360,
|
| 212 |
+
7222041363087360 - 1: 7213895789838336, # 2**40 * 3**8
|
| 213 |
+
# power of 5 5**23
|
| 214 |
+
11920928955078125: 11920928955078125,
|
| 215 |
+
11920928955078125 + 1: 11920928955078125,
|
| 216 |
+
11920928955078125 - 1: 11901557422080000, # 2**14 * 3**19 * 5**4
|
| 217 |
+
# power of 3 3**34
|
| 218 |
+
16677181699666569: 16677181699666569,
|
| 219 |
+
16677181699666569 + 1: 16677181699666569,
|
| 220 |
+
16677181699666569 - 1: 16607531250000000, # 2**7 * 3**12 * 5**12
|
| 221 |
+
# power of 2 2**54
|
| 222 |
+
18014398509481984: 18014398509481984,
|
| 223 |
+
18014398509481984 + 1: 18014398509481984,
|
| 224 |
+
18014398509481984 - 1: 18000000000000000, # 2**16 * 3**2 * 5**15
|
| 225 |
+
# 2**20 * 3**1 * 5**14
|
| 226 |
+
19200000000000000: 19200000000000000,
|
| 227 |
+
19200000000000000 + 1: 19200000000000000,
|
| 228 |
+
19200000000000000 - 1: 19131876000000000, # 2**11 * 3**14 * 5**9
|
| 229 |
+
# 2**58
|
| 230 |
+
288230376151711744: 288230376151711744,
|
| 231 |
+
288230376151711744 + 1: 288230376151711744,
|
| 232 |
+
288230376151711744 - 1: 288000000000000000, # 2**20 * 3**2 * 5**15
|
| 233 |
+
# 2**5 * 3**10 * 5**16
|
| 234 |
+
288325195312500000: 288325195312500000,
|
| 235 |
+
288325195312500000 + 1: 288325195312500000,
|
| 236 |
+
288325195312500000 - 1: 288230376151711744, # 2**58
|
| 237 |
+
}
|
| 238 |
+
for x, y in hams.items():
|
| 239 |
+
assert_equal(prev_fast_len(x, True), y)
|
| 240 |
+
|
| 241 |
+
def test_keyword_args(self):
|
| 242 |
+
assert prev_fast_len(11, real=True) == 10
|
| 243 |
+
assert prev_fast_len(target=7, real=False) == 7
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
@skip_xp_backends(cpu_only=True)
|
| 247 |
+
class Test_init_nd_shape_and_axes:
|
| 248 |
+
|
| 249 |
+
def test_py_0d_defaults(self, xp):
|
| 250 |
+
x = xp.asarray(4)
|
| 251 |
+
shape = None
|
| 252 |
+
axes = None
|
| 253 |
+
|
| 254 |
+
shape_expected = ()
|
| 255 |
+
axes_expected = []
|
| 256 |
+
|
| 257 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 258 |
+
|
| 259 |
+
assert shape_res == shape_expected
|
| 260 |
+
assert axes_res == axes_expected
|
| 261 |
+
|
| 262 |
+
def test_xp_0d_defaults(self, xp):
|
| 263 |
+
x = xp.asarray(7.)
|
| 264 |
+
shape = None
|
| 265 |
+
axes = None
|
| 266 |
+
|
| 267 |
+
shape_expected = ()
|
| 268 |
+
axes_expected = []
|
| 269 |
+
|
| 270 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 271 |
+
|
| 272 |
+
assert shape_res == shape_expected
|
| 273 |
+
assert axes_res == axes_expected
|
| 274 |
+
|
| 275 |
+
def test_py_1d_defaults(self, xp):
|
| 276 |
+
x = xp.asarray([1, 2, 3])
|
| 277 |
+
shape = None
|
| 278 |
+
axes = None
|
| 279 |
+
|
| 280 |
+
shape_expected = (3,)
|
| 281 |
+
axes_expected = [0]
|
| 282 |
+
|
| 283 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 284 |
+
|
| 285 |
+
assert shape_res == shape_expected
|
| 286 |
+
assert axes_res == axes_expected
|
| 287 |
+
|
| 288 |
+
def test_xp_1d_defaults(self, xp):
|
| 289 |
+
x = xp.arange(0, 1, .1)
|
| 290 |
+
shape = None
|
| 291 |
+
axes = None
|
| 292 |
+
|
| 293 |
+
shape_expected = (10,)
|
| 294 |
+
axes_expected = [0]
|
| 295 |
+
|
| 296 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 297 |
+
|
| 298 |
+
assert shape_res == shape_expected
|
| 299 |
+
assert axes_res == axes_expected
|
| 300 |
+
|
| 301 |
+
def test_py_2d_defaults(self, xp):
|
| 302 |
+
x = xp.asarray([[1, 2, 3, 4],
|
| 303 |
+
[5, 6, 7, 8]])
|
| 304 |
+
shape = None
|
| 305 |
+
axes = None
|
| 306 |
+
|
| 307 |
+
shape_expected = (2, 4)
|
| 308 |
+
axes_expected = [0, 1]
|
| 309 |
+
|
| 310 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 311 |
+
|
| 312 |
+
assert shape_res == shape_expected
|
| 313 |
+
assert axes_res == axes_expected
|
| 314 |
+
|
| 315 |
+
def test_xp_2d_defaults(self, xp):
|
| 316 |
+
x = xp.arange(0, 1, .1)
|
| 317 |
+
x = xp.reshape(x, (5, 2))
|
| 318 |
+
shape = None
|
| 319 |
+
axes = None
|
| 320 |
+
|
| 321 |
+
shape_expected = (5, 2)
|
| 322 |
+
axes_expected = [0, 1]
|
| 323 |
+
|
| 324 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 325 |
+
|
| 326 |
+
assert shape_res == shape_expected
|
| 327 |
+
assert axes_res == axes_expected
|
| 328 |
+
|
| 329 |
+
def test_xp_5d_defaults(self, xp):
|
| 330 |
+
x = xp.zeros([6, 2, 5, 3, 4])
|
| 331 |
+
shape = None
|
| 332 |
+
axes = None
|
| 333 |
+
|
| 334 |
+
shape_expected = (6, 2, 5, 3, 4)
|
| 335 |
+
axes_expected = [0, 1, 2, 3, 4]
|
| 336 |
+
|
| 337 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 338 |
+
|
| 339 |
+
assert shape_res == shape_expected
|
| 340 |
+
assert axes_res == axes_expected
|
| 341 |
+
|
| 342 |
+
def test_xp_5d_set_shape(self, xp):
|
| 343 |
+
x = xp.zeros([6, 2, 5, 3, 4])
|
| 344 |
+
shape = [10, -1, -1, 1, 4]
|
| 345 |
+
axes = None
|
| 346 |
+
|
| 347 |
+
shape_expected = (10, 2, 5, 1, 4)
|
| 348 |
+
axes_expected = [0, 1, 2, 3, 4]
|
| 349 |
+
|
| 350 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 351 |
+
|
| 352 |
+
assert shape_res == shape_expected
|
| 353 |
+
assert axes_res == axes_expected
|
| 354 |
+
|
| 355 |
+
def test_xp_5d_set_axes(self, xp):
|
| 356 |
+
x = xp.zeros([6, 2, 5, 3, 4])
|
| 357 |
+
shape = None
|
| 358 |
+
axes = [4, 1, 2]
|
| 359 |
+
|
| 360 |
+
shape_expected = (4, 2, 5)
|
| 361 |
+
axes_expected = [4, 1, 2]
|
| 362 |
+
|
| 363 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 364 |
+
|
| 365 |
+
assert shape_res == shape_expected
|
| 366 |
+
assert axes_res == axes_expected
|
| 367 |
+
|
| 368 |
+
def test_xp_5d_set_shape_axes(self, xp):
|
| 369 |
+
x = xp.zeros([6, 2, 5, 3, 4])
|
| 370 |
+
shape = [10, -1, 2]
|
| 371 |
+
axes = [1, 0, 3]
|
| 372 |
+
|
| 373 |
+
shape_expected = (10, 6, 2)
|
| 374 |
+
axes_expected = [1, 0, 3]
|
| 375 |
+
|
| 376 |
+
shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
|
| 377 |
+
|
| 378 |
+
assert shape_res == shape_expected
|
| 379 |
+
assert axes_res == axes_expected
|
| 380 |
+
|
| 381 |
+
def test_shape_axes_subset(self, xp):
|
| 382 |
+
x = xp.zeros((2, 3, 4, 5))
|
| 383 |
+
shape, axes = _init_nd_shape_and_axes(x, shape=(5, 5, 5), axes=None)
|
| 384 |
+
|
| 385 |
+
assert shape == (5, 5, 5)
|
| 386 |
+
assert axes == [1, 2, 3]
|
| 387 |
+
|
| 388 |
+
def test_errors(self, xp):
|
| 389 |
+
x = xp.zeros(1)
|
| 390 |
+
with assert_raises(ValueError, match="axes must be a scalar or "
|
| 391 |
+
"iterable of integers"):
|
| 392 |
+
_init_nd_shape_and_axes(x, shape=None, axes=[[1, 2], [3, 4]])
|
| 393 |
+
|
| 394 |
+
with assert_raises(ValueError, match="axes must be a scalar or "
|
| 395 |
+
"iterable of integers"):
|
| 396 |
+
_init_nd_shape_and_axes(x, shape=None, axes=[1., 2., 3., 4.])
|
| 397 |
+
|
| 398 |
+
with assert_raises(ValueError,
|
| 399 |
+
match="axes exceeds dimensionality of input"):
|
| 400 |
+
_init_nd_shape_and_axes(x, shape=None, axes=[1])
|
| 401 |
+
|
| 402 |
+
with assert_raises(ValueError,
|
| 403 |
+
match="axes exceeds dimensionality of input"):
|
| 404 |
+
_init_nd_shape_and_axes(x, shape=None, axes=[-2])
|
| 405 |
+
|
| 406 |
+
with assert_raises(ValueError,
|
| 407 |
+
match="all axes must be unique"):
|
| 408 |
+
_init_nd_shape_and_axes(x, shape=None, axes=[0, 0])
|
| 409 |
+
|
| 410 |
+
with assert_raises(ValueError, match="shape must be a scalar or "
|
| 411 |
+
"iterable of integers"):
|
| 412 |
+
_init_nd_shape_and_axes(x, shape=[[1, 2], [3, 4]], axes=None)
|
| 413 |
+
|
| 414 |
+
with assert_raises(ValueError, match="shape must be a scalar or "
|
| 415 |
+
"iterable of integers"):
|
| 416 |
+
_init_nd_shape_and_axes(x, shape=[1., 2., 3., 4.], axes=None)
|
| 417 |
+
|
| 418 |
+
with assert_raises(ValueError,
|
| 419 |
+
match="when given, axes and shape arguments"
|
| 420 |
+
" have to be of the same length"):
|
| 421 |
+
_init_nd_shape_and_axes(xp.zeros([1, 1, 1, 1]),
|
| 422 |
+
shape=[1, 2, 3], axes=[1])
|
| 423 |
+
|
| 424 |
+
with assert_raises(ValueError,
|
| 425 |
+
match="invalid number of data points"
|
| 426 |
+
r" \(\[0\]\) specified"):
|
| 427 |
+
_init_nd_shape_and_axes(x, shape=[0], axes=None)
|
| 428 |
+
|
| 429 |
+
with assert_raises(ValueError,
|
| 430 |
+
match="invalid number of data points"
|
| 431 |
+
r" \(\[-2\]\) specified"):
|
| 432 |
+
_init_nd_shape_and_axes(x, shape=-2, axes=None)
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
class TestFFTShift:
|
| 436 |
+
|
| 437 |
+
def test_definition(self, xp):
|
| 438 |
+
x = xp.asarray([0., 1, 2, 3, 4, -4, -3, -2, -1])
|
| 439 |
+
y = xp.asarray([-4., -3, -2, -1, 0, 1, 2, 3, 4])
|
| 440 |
+
xp_assert_close(fft.fftshift(x), y)
|
| 441 |
+
xp_assert_close(fft.ifftshift(y), x)
|
| 442 |
+
x = xp.asarray([0., 1, 2, 3, 4, -5, -4, -3, -2, -1])
|
| 443 |
+
y = xp.asarray([-5., -4, -3, -2, -1, 0, 1, 2, 3, 4])
|
| 444 |
+
xp_assert_close(fft.fftshift(x), y)
|
| 445 |
+
xp_assert_close(fft.ifftshift(y), x)
|
| 446 |
+
|
| 447 |
+
def test_inverse(self, xp):
|
| 448 |
+
for n in [1, 4, 9, 100, 211]:
|
| 449 |
+
x = xp.asarray(np.random.random((n,)))
|
| 450 |
+
xp_assert_close(fft.ifftshift(fft.fftshift(x)), x)
|
| 451 |
+
|
| 452 |
+
def test_axes_keyword(self, xp):
|
| 453 |
+
freqs = xp.asarray([[0., 1, 2], [3, 4, -4], [-3, -2, -1]])
|
| 454 |
+
shifted = xp.asarray([[-1., -3, -2], [2, 0, 1], [-4, 3, 4]])
|
| 455 |
+
xp_assert_close(fft.fftshift(freqs, axes=(0, 1)), shifted)
|
| 456 |
+
xp_assert_close(fft.fftshift(freqs, axes=0), fft.fftshift(freqs, axes=(0,)))
|
| 457 |
+
xp_assert_close(fft.ifftshift(shifted, axes=(0, 1)), freqs)
|
| 458 |
+
xp_assert_close(fft.ifftshift(shifted, axes=0),
|
| 459 |
+
fft.ifftshift(shifted, axes=(0,)))
|
| 460 |
+
xp_assert_close(fft.fftshift(freqs), shifted)
|
| 461 |
+
xp_assert_close(fft.ifftshift(shifted), freqs)
|
| 462 |
+
|
| 463 |
+
def test_uneven_dims(self, xp):
|
| 464 |
+
""" Test 2D input, which has uneven dimension sizes """
|
| 465 |
+
freqs = xp.asarray([
|
| 466 |
+
[0, 1],
|
| 467 |
+
[2, 3],
|
| 468 |
+
[4, 5]
|
| 469 |
+
], dtype=xp.float64)
|
| 470 |
+
|
| 471 |
+
# shift in dimension 0
|
| 472 |
+
shift_dim0 = xp.asarray([
|
| 473 |
+
[4, 5],
|
| 474 |
+
[0, 1],
|
| 475 |
+
[2, 3]
|
| 476 |
+
], dtype=xp.float64)
|
| 477 |
+
xp_assert_close(fft.fftshift(freqs, axes=0), shift_dim0)
|
| 478 |
+
xp_assert_close(fft.ifftshift(shift_dim0, axes=0), freqs)
|
| 479 |
+
xp_assert_close(fft.fftshift(freqs, axes=(0,)), shift_dim0)
|
| 480 |
+
xp_assert_close(fft.ifftshift(shift_dim0, axes=[0]), freqs)
|
| 481 |
+
|
| 482 |
+
# shift in dimension 1
|
| 483 |
+
shift_dim1 = xp.asarray([
|
| 484 |
+
[1, 0],
|
| 485 |
+
[3, 2],
|
| 486 |
+
[5, 4]
|
| 487 |
+
], dtype=xp.float64)
|
| 488 |
+
xp_assert_close(fft.fftshift(freqs, axes=1), shift_dim1)
|
| 489 |
+
xp_assert_close(fft.ifftshift(shift_dim1, axes=1), freqs)
|
| 490 |
+
|
| 491 |
+
# shift in both dimensions
|
| 492 |
+
shift_dim_both = xp.asarray([
|
| 493 |
+
[5, 4],
|
| 494 |
+
[1, 0],
|
| 495 |
+
[3, 2]
|
| 496 |
+
], dtype=xp.float64)
|
| 497 |
+
xp_assert_close(fft.fftshift(freqs, axes=(0, 1)), shift_dim_both)
|
| 498 |
+
xp_assert_close(fft.ifftshift(shift_dim_both, axes=(0, 1)), freqs)
|
| 499 |
+
xp_assert_close(fft.fftshift(freqs, axes=[0, 1]), shift_dim_both)
|
| 500 |
+
xp_assert_close(fft.ifftshift(shift_dim_both, axes=[0, 1]), freqs)
|
| 501 |
+
|
| 502 |
+
# axes=None (default) shift in all dimensions
|
| 503 |
+
xp_assert_close(fft.fftshift(freqs, axes=None), shift_dim_both)
|
| 504 |
+
xp_assert_close(fft.ifftshift(shift_dim_both, axes=None), freqs)
|
| 505 |
+
xp_assert_close(fft.fftshift(freqs), shift_dim_both)
|
| 506 |
+
xp_assert_close(fft.ifftshift(shift_dim_both), freqs)
|
| 507 |
+
|
| 508 |
+
|
| 509 |
+
@skip_xp_backends("cupy", "jax.numpy",
|
| 510 |
+
reasons=["CuPy has not implemented the `device` param",
|
| 511 |
+
"JAX has not implemented the `device` param"])
|
| 512 |
+
class TestFFTFreq:
|
| 513 |
+
|
| 514 |
+
def test_definition(self, xp):
|
| 515 |
+
x = xp.asarray([0, 1, 2, 3, 4, -4, -3, -2, -1], dtype=xp.float64)
|
| 516 |
+
x2 = xp.asarray([0, 1, 2, 3, 4, -5, -4, -3, -2, -1], dtype=xp.float64)
|
| 517 |
+
|
| 518 |
+
# default dtype varies across backends
|
| 519 |
+
|
| 520 |
+
y = 9 * fft.fftfreq(9, xp=xp)
|
| 521 |
+
xp_assert_close(y, x, check_dtype=False, check_namespace=True)
|
| 522 |
+
|
| 523 |
+
y = 9 * xp.pi * fft.fftfreq(9, xp.pi, xp=xp)
|
| 524 |
+
xp_assert_close(y, x, check_dtype=False)
|
| 525 |
+
|
| 526 |
+
y = 10 * fft.fftfreq(10, xp=xp)
|
| 527 |
+
xp_assert_close(y, x2, check_dtype=False)
|
| 528 |
+
|
| 529 |
+
y = 10 * xp.pi * fft.fftfreq(10, xp.pi, xp=xp)
|
| 530 |
+
xp_assert_close(y, x2, check_dtype=False)
|
| 531 |
+
|
| 532 |
+
def test_device(self, xp):
|
| 533 |
+
xp_test = array_namespace(xp.empty(0))
|
| 534 |
+
devices = get_xp_devices(xp)
|
| 535 |
+
for d in devices:
|
| 536 |
+
y = fft.fftfreq(9, xp=xp, device=d)
|
| 537 |
+
x = xp_test.empty(0, device=d)
|
| 538 |
+
assert device(y) == device(x)
|
| 539 |
+
|
| 540 |
+
|
| 541 |
+
@skip_xp_backends("cupy", "jax.numpy",
|
| 542 |
+
reasons=["CuPy has not implemented the `device` param",
|
| 543 |
+
"JAX has not implemented the `device` param"])
|
| 544 |
+
class TestRFFTFreq:
|
| 545 |
+
|
| 546 |
+
def test_definition(self, xp):
|
| 547 |
+
x = xp.asarray([0, 1, 2, 3, 4], dtype=xp.float64)
|
| 548 |
+
x2 = xp.asarray([0, 1, 2, 3, 4, 5], dtype=xp.float64)
|
| 549 |
+
|
| 550 |
+
# default dtype varies across backends
|
| 551 |
+
|
| 552 |
+
y = 9 * fft.rfftfreq(9, xp=xp)
|
| 553 |
+
xp_assert_close(y, x, check_dtype=False, check_namespace=True)
|
| 554 |
+
|
| 555 |
+
y = 9 * xp.pi * fft.rfftfreq(9, xp.pi, xp=xp)
|
| 556 |
+
xp_assert_close(y, x, check_dtype=False)
|
| 557 |
+
|
| 558 |
+
y = 10 * fft.rfftfreq(10, xp=xp)
|
| 559 |
+
xp_assert_close(y, x2, check_dtype=False)
|
| 560 |
+
|
| 561 |
+
y = 10 * xp.pi * fft.rfftfreq(10, xp.pi, xp=xp)
|
| 562 |
+
xp_assert_close(y, x2, check_dtype=False)
|
| 563 |
+
|
| 564 |
+
def test_device(self, xp):
|
| 565 |
+
xp_test = array_namespace(xp.empty(0))
|
| 566 |
+
devices = get_xp_devices(xp)
|
| 567 |
+
for d in devices:
|
| 568 |
+
y = fft.rfftfreq(9, xp=xp, device=d)
|
| 569 |
+
x = xp_test.empty(0, device=d)
|
| 570 |
+
assert device(y) == device(x)
|
parrot/lib/python3.10/site-packages/scipy/fft/tests/test_multithreading.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from scipy import fft
|
| 2 |
+
import numpy as np
|
| 3 |
+
import pytest
|
| 4 |
+
from numpy.testing import assert_allclose
|
| 5 |
+
import multiprocessing
|
| 6 |
+
import os
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
@pytest.fixture(scope='module')
|
| 10 |
+
def x():
|
| 11 |
+
return np.random.randn(512, 128) # Must be large enough to qualify for mt
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@pytest.mark.parametrize("func", [
|
| 15 |
+
fft.fft, fft.ifft, fft.fft2, fft.ifft2, fft.fftn, fft.ifftn,
|
| 16 |
+
fft.rfft, fft.irfft, fft.rfft2, fft.irfft2, fft.rfftn, fft.irfftn,
|
| 17 |
+
fft.hfft, fft.ihfft, fft.hfft2, fft.ihfft2, fft.hfftn, fft.ihfftn,
|
| 18 |
+
fft.dct, fft.idct, fft.dctn, fft.idctn,
|
| 19 |
+
fft.dst, fft.idst, fft.dstn, fft.idstn,
|
| 20 |
+
])
|
| 21 |
+
@pytest.mark.parametrize("workers", [2, -1])
|
| 22 |
+
def test_threaded_same(x, func, workers):
|
| 23 |
+
expected = func(x, workers=1)
|
| 24 |
+
actual = func(x, workers=workers)
|
| 25 |
+
assert_allclose(actual, expected)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def _mt_fft(x):
|
| 29 |
+
return fft.fft(x, workers=2)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
@pytest.mark.slow
|
| 33 |
+
def test_mixed_threads_processes(x):
|
| 34 |
+
# Test that the fft threadpool is safe to use before & after fork
|
| 35 |
+
|
| 36 |
+
expect = fft.fft(x, workers=2)
|
| 37 |
+
|
| 38 |
+
with multiprocessing.Pool(2) as p:
|
| 39 |
+
res = p.map(_mt_fft, [x for _ in range(4)])
|
| 40 |
+
|
| 41 |
+
for r in res:
|
| 42 |
+
assert_allclose(r, expect)
|
| 43 |
+
|
| 44 |
+
fft.fft(x, workers=2)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def test_invalid_workers(x):
|
| 48 |
+
cpus = os.cpu_count()
|
| 49 |
+
|
| 50 |
+
fft.ifft([1], workers=-cpus)
|
| 51 |
+
|
| 52 |
+
with pytest.raises(ValueError, match='workers must not be zero'):
|
| 53 |
+
fft.fft(x, workers=0)
|
| 54 |
+
|
| 55 |
+
with pytest.raises(ValueError, match='workers value out of range'):
|
| 56 |
+
fft.ifft(x, workers=-cpus-1)
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def test_set_get_workers():
|
| 60 |
+
cpus = os.cpu_count()
|
| 61 |
+
assert fft.get_workers() == 1
|
| 62 |
+
with fft.set_workers(4):
|
| 63 |
+
assert fft.get_workers() == 4
|
| 64 |
+
|
| 65 |
+
with fft.set_workers(-1):
|
| 66 |
+
assert fft.get_workers() == cpus
|
| 67 |
+
|
| 68 |
+
assert fft.get_workers() == 4
|
| 69 |
+
|
| 70 |
+
assert fft.get_workers() == 1
|
| 71 |
+
|
| 72 |
+
with fft.set_workers(-cpus):
|
| 73 |
+
assert fft.get_workers() == 1
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def test_set_workers_invalid():
|
| 77 |
+
|
| 78 |
+
with pytest.raises(ValueError, match='workers must not be zero'):
|
| 79 |
+
with fft.set_workers(0):
|
| 80 |
+
pass
|
| 81 |
+
|
| 82 |
+
with pytest.raises(ValueError, match='workers value out of range'):
|
| 83 |
+
with fft.set_workers(-os.cpu_count()-1):
|
| 84 |
+
pass
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_fake_quantize_learnable_per_channel_affine.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/_fake_quantize_learnable_per_channel_affine_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::_fake_quantize_learnable_per_channel_affine(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0) -> Tensor
|
| 26 |
+
inline at::Tensor _fake_quantize_learnable_per_channel_affine(const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, int64_t quant_min, int64_t quant_max, double grad_factor=1.0) {
|
| 27 |
+
return at::_ops::_fake_quantize_learnable_per_channel_affine::call(self, scale, zero_point, axis, quant_min, quant_max, grad_factor);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::_fake_quantize_learnable_per_channel_affine.out(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0, *, Tensor(a!) out) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & _fake_quantize_learnable_per_channel_affine_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & scale, const at::Tensor & zero_point, int64_t axis, int64_t quant_min, int64_t quant_max, double grad_factor=1.0) {
|
| 32 |
+
return at::_ops::_fake_quantize_learnable_per_channel_affine_out::call(self, scale, zero_point, axis, quant_min, quant_max, grad_factor, out);
|
| 33 |
+
}
|
| 34 |
+
// aten::_fake_quantize_learnable_per_channel_affine.out(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0, *, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & _fake_quantize_learnable_per_channel_affine_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, double grad_factor, at::Tensor & out) {
|
| 36 |
+
return at::_ops::_fake_quantize_learnable_per_channel_affine_out::call(self, scale, zero_point, axis, quant_min, quant_max, grad_factor, out);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_add_cpu_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 cpu {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_add(at::TensorList self, const at::Scalar & scalar);
|
| 21 |
+
TORCH_API void _foreach_add_(at::TensorList self, const at::Scalar & scalar);
|
| 22 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_add(at::TensorList self, at::TensorList other, const at::Scalar & alpha=1);
|
| 23 |
+
TORCH_API void _foreach_add_(at::TensorList self, at::TensorList other, const at::Scalar & alpha=1);
|
| 24 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_add(at::TensorList self, at::ArrayRef<at::Scalar> scalars);
|
| 25 |
+
TORCH_API void _foreach_add_(at::TensorList self, at::ArrayRef<at::Scalar> scalars);
|
| 26 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_add(at::TensorList self, const at::Tensor & other, const at::Scalar & alpha=1);
|
| 27 |
+
TORCH_API void _foreach_add_(at::TensorList self, const at::Tensor & other, const at::Scalar & alpha=1);
|
| 28 |
+
|
| 29 |
+
} // namespace cpu
|
| 30 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_addcdiv_ops.h
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 _foreach_addcdiv_Scalar {
|
| 18 |
+
using schema = ::std::vector<at::Tensor> (at::TensorList, at::TensorList, at::TensorList, const at::Scalar &);
|
| 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::_foreach_addcdiv")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.Scalar(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> Tensor[]")
|
| 24 |
+
static ::std::vector<at::Tensor> call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value);
|
| 25 |
+
static ::std::vector<at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API _foreach_addcdiv_ScalarList {
|
| 29 |
+
using schema = ::std::vector<at::Tensor> (at::TensorList, at::TensorList, at::TensorList, at::ArrayRef<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::_foreach_addcdiv")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "ScalarList")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.ScalarList(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> Tensor[]")
|
| 35 |
+
static ::std::vector<at::Tensor> call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 36 |
+
static ::std::vector<at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
struct TORCH_API _foreach_addcdiv_Tensor {
|
| 40 |
+
using schema = ::std::vector<at::Tensor> (at::TensorList, at::TensorList, at::TensorList, const 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::_foreach_addcdiv")
|
| 44 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
|
| 45 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.Tensor(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> Tensor[]")
|
| 46 |
+
static ::std::vector<at::Tensor> call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 47 |
+
static ::std::vector<at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
struct TORCH_API _foreach_addcdiv__Scalar {
|
| 51 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, const at::Scalar &);
|
| 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::_foreach_addcdiv_")
|
| 55 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
|
| 56 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv_.Scalar(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> ()")
|
| 57 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value);
|
| 58 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value);
|
| 59 |
+
};
|
| 60 |
+
|
| 61 |
+
struct TORCH_API _foreach_addcdiv__ScalarList {
|
| 62 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, at::ArrayRef<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::_foreach_addcdiv_")
|
| 66 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "ScalarList")
|
| 67 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv_.ScalarList(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> ()")
|
| 68 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 69 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
struct TORCH_API _foreach_addcdiv__Tensor {
|
| 73 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, 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::_foreach_addcdiv_")
|
| 77 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
|
| 78 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv_.Tensor(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> ()")
|
| 79 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 80 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
struct TORCH_API _foreach_addcdiv_Scalar_out {
|
| 84 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, const at::Scalar &, at::TensorList);
|
| 85 |
+
using ptr_schema = schema*;
|
| 86 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 87 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_addcdiv")
|
| 88 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar_out")
|
| 89 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.Scalar_out(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1, *, Tensor(a!)[] out) -> ()")
|
| 90 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value, at::TensorList out);
|
| 91 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value, at::TensorList out);
|
| 92 |
+
};
|
| 93 |
+
|
| 94 |
+
struct TORCH_API _foreach_addcdiv_ScalarList_out {
|
| 95 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, at::ArrayRef<at::Scalar>, at::TensorList);
|
| 96 |
+
using ptr_schema = schema*;
|
| 97 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 98 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_addcdiv")
|
| 99 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "ScalarList_out")
|
| 100 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.ScalarList_out(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars, *, Tensor(a!)[] out) -> ()")
|
| 101 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars, at::TensorList out);
|
| 102 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars, at::TensorList out);
|
| 103 |
+
};
|
| 104 |
+
|
| 105 |
+
struct TORCH_API _foreach_addcdiv_Tensor_out {
|
| 106 |
+
using schema = void (at::TensorList, at::TensorList, at::TensorList, const at::Tensor &, at::TensorList);
|
| 107 |
+
using ptr_schema = schema*;
|
| 108 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 109 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_addcdiv")
|
| 110 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor_out")
|
| 111 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_addcdiv.Tensor_out(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars, *, Tensor(a!)[] out) -> ()")
|
| 112 |
+
static void call(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars, at::TensorList out);
|
| 113 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars, at::TensorList out);
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_minimum.h
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/_foreach_minimum_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::_foreach_minimum.Scalar(Tensor[] self, Scalar scalar) -> Tensor[]
|
| 26 |
+
inline ::std::vector<at::Tensor> _foreach_minimum(at::TensorList self, const at::Scalar & scalar) {
|
| 27 |
+
return at::_ops::_foreach_minimum_Scalar::call(self, scalar);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::_foreach_minimum_.Scalar(Tensor(a!)[] self, Scalar scalar) -> ()
|
| 31 |
+
inline void _foreach_minimum_(at::TensorList self, const at::Scalar & scalar) {
|
| 32 |
+
return at::_ops::_foreach_minimum__Scalar::call(self, scalar);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// aten::_foreach_minimum.List(Tensor[] self, Tensor[] other) -> Tensor[]
|
| 36 |
+
inline ::std::vector<at::Tensor> _foreach_minimum(at::TensorList self, at::TensorList other) {
|
| 37 |
+
return at::_ops::_foreach_minimum_List::call(self, other);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
// aten::_foreach_minimum_.List(Tensor(a!)[] self, Tensor[] other) -> ()
|
| 41 |
+
inline void _foreach_minimum_(at::TensorList self, at::TensorList other) {
|
| 42 |
+
return at::_ops::_foreach_minimum__List::call(self, other);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
// aten::_foreach_minimum.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[]
|
| 46 |
+
inline ::std::vector<at::Tensor> _foreach_minimum(at::TensorList self, at::ArrayRef<at::Scalar> scalars) {
|
| 47 |
+
return at::_ops::_foreach_minimum_ScalarList::call(self, scalars);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
// aten::_foreach_minimum_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> ()
|
| 51 |
+
inline void _foreach_minimum_(at::TensorList self, at::ArrayRef<at::Scalar> scalars) {
|
| 52 |
+
return at::_ops::_foreach_minimum__ScalarList::call(self, scalars);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
// aten::_foreach_minimum.Scalar_out(Tensor[] self, Scalar scalar, *, Tensor(a!)[] out) -> ()
|
| 56 |
+
inline void _foreach_minimum_out(at::TensorList out, at::TensorList self, const at::Scalar & scalar) {
|
| 57 |
+
return at::_ops::_foreach_minimum_Scalar_out::call(self, scalar, out);
|
| 58 |
+
}
|
| 59 |
+
// aten::_foreach_minimum.Scalar_out(Tensor[] self, Scalar scalar, *, Tensor(a!)[] out) -> ()
|
| 60 |
+
inline void _foreach_minimum_outf(at::TensorList self, const at::Scalar & scalar, at::TensorList out) {
|
| 61 |
+
return at::_ops::_foreach_minimum_Scalar_out::call(self, scalar, out);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
// aten::_foreach_minimum.List_out(Tensor[] self, Tensor[] other, *, Tensor(a!)[] out) -> ()
|
| 65 |
+
inline void _foreach_minimum_out(at::TensorList out, at::TensorList self, at::TensorList other) {
|
| 66 |
+
return at::_ops::_foreach_minimum_List_out::call(self, other, out);
|
| 67 |
+
}
|
| 68 |
+
// aten::_foreach_minimum.List_out(Tensor[] self, Tensor[] other, *, Tensor(a!)[] out) -> ()
|
| 69 |
+
inline void _foreach_minimum_outf(at::TensorList self, at::TensorList other, at::TensorList out) {
|
| 70 |
+
return at::_ops::_foreach_minimum_List_out::call(self, other, out);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
// aten::_foreach_minimum.ScalarList_out(Tensor[] self, Scalar[] scalars, *, Tensor(a!)[] out) -> ()
|
| 74 |
+
inline void _foreach_minimum_out(at::TensorList out, at::TensorList self, at::ArrayRef<at::Scalar> scalars) {
|
| 75 |
+
return at::_ops::_foreach_minimum_ScalarList_out::call(self, scalars, out);
|
| 76 |
+
}
|
| 77 |
+
// aten::_foreach_minimum.ScalarList_out(Tensor[] self, Scalar[] scalars, *, Tensor(a!)[] out) -> ()
|
| 78 |
+
inline void _foreach_minimum_outf(at::TensorList self, at::ArrayRef<at::Scalar> scalars, at::TensorList out) {
|
| 79 |
+
return at::_ops::_foreach_minimum_ScalarList_out::call(self, scalars, out);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_native_multi_head_attention_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> _native_multi_head_attention(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, int64_t embed_dim, int64_t num_head, const at::Tensor & qkv_weight, const at::Tensor & qkv_bias, const at::Tensor & proj_weight, const at::Tensor & proj_bias, const c10::optional<at::Tensor> & mask={}, bool need_weights=true, bool average_attn_weights=true, c10::optional<int64_t> mask_type=c10::nullopt);
|
| 21 |
+
|
| 22 |
+
} // namespace cpu
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_flash_attention.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/_scaled_dot_product_flash_attention_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::_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)
|
| 26 |
+
inline ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor,c10::SymInt,c10::SymInt,at::Tensor,at::Tensor,at::Tensor> _scaled_dot_product_flash_attention(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, double dropout_p=0.0, bool is_causal=false, bool return_debug_mask=false, c10::optional<double> scale=c10::nullopt) {
|
| 27 |
+
return at::_ops::_scaled_dot_product_flash_attention::call(query, key, value, dropout_p, is_causal, return_debug_mask, scale);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/_values_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 <c10/util/Optional.h>
|
| 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 _values_sparse(const at::Tensor & self);
|
| 20 |
+
} // namespace native
|
| 21 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/acosh_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 acosh(const at::Tensor & self);
|
| 21 |
+
TORCH_API at::Tensor & acosh_out(at::Tensor & out, const at::Tensor & self);
|
| 22 |
+
TORCH_API at::Tensor & acosh_outf(const at::Tensor & self, at::Tensor & out);
|
| 23 |
+
TORCH_API at::Tensor & acosh_(at::Tensor & self);
|
| 24 |
+
|
| 25 |
+
} // namespace cuda
|
| 26 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/arctan_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 <c10/util/Optional.h>
|
| 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 arctan(const at::Tensor & self);
|
| 20 |
+
TORCH_API at::Tensor & arctan_out(const at::Tensor & self, at::Tensor & out);
|
| 21 |
+
TORCH_API at::Tensor & arctan_(at::Tensor & self);
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/argsort_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 at::Tensor argsort(const at::Tensor & self, bool stable, int64_t dim=-1, bool descending=false);
|
| 21 |
+
|
| 22 |
+
} // namespace cpu
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/block_diag_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 block_diag {
|
| 18 |
+
using schema = at::Tensor (at::TensorList);
|
| 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::block_diag")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "block_diag(Tensor[] tensors) -> Tensor")
|
| 24 |
+
static at::Tensor call(at::TensorList tensors);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList tensors);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API block_diag_out {
|
| 29 |
+
using schema = at::Tensor & (at::TensorList, 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::block_diag")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "block_diag.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!)")
|
| 35 |
+
static at::Tensor & call(at::TensorList tensors, at::Tensor & out);
|
| 36 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList tensors, at::Tensor & out);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/cauchy_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 <c10/util/Optional.h>
|
| 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 cauchy(const at::Tensor & self, double median=0, double sigma=1, c10::optional<at::Generator> generator=c10::nullopt);
|
| 20 |
+
TORCH_API at::Tensor & cauchy_out(const at::Tensor & self, double median, double sigma, c10::optional<at::Generator> generator, at::Tensor & out);
|
| 21 |
+
TORCH_API at::Tensor & cauchy_(at::Tensor & self, double median=0, double sigma=1, c10::optional<at::Generator> generator=c10::nullopt);
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/conv_transpose3d_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 conv_transpose3d_input {
|
| 18 |
+
using schema = at::Tensor (const at::Tensor &, const at::Tensor &, const c10::optional<at::Tensor> &, c10::SymIntArrayRef, c10::SymIntArrayRef, c10::SymIntArrayRef, c10::SymInt, c10::SymIntArrayRef);
|
| 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::conv_transpose3d")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "input")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "conv_transpose3d.input(Tensor input, Tensor weight, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] output_padding=0, SymInt groups=1, SymInt[3] dilation=1) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & input, const at::Tensor & weight, const c10::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef output_padding, c10::SymInt groups, c10::SymIntArrayRef dilation);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & input, const at::Tensor & weight, const c10::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef output_padding, c10::SymInt groups, c10::SymIntArrayRef dilation);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/exponential_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 <c10/util/Optional.h>
|
| 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 exponential(const at::Tensor & self, double lambd=1, c10::optional<at::Generator> generator=c10::nullopt);
|
| 20 |
+
TORCH_API at::Tensor & exponential_out(const at::Tensor & self, double lambd, c10::optional<at::Generator> generator, at::Tensor & out);
|
| 21 |
+
TORCH_API at::Tensor & exponential_(at::Tensor & self, double lambd=1, c10::optional<at::Generator> generator=c10::nullopt);
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/fractional_max_pool2d_backward_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 <c10/util/Optional.h>
|
| 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_pool2d_backward_meta.h>
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
struct TORCH_API structured_fractional_max_pool2d_backward_cpu : public at::meta::structured_fractional_max_pool2d_backward {
|
| 20 |
+
void impl(const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef output_size, const at::Tensor & indices, const at::Tensor & grad_input);
|
| 21 |
+
};
|
| 22 |
+
struct TORCH_API structured_fractional_max_pool2d_backward_cuda : public at::meta::structured_fractional_max_pool2d_backward {
|
| 23 |
+
void impl(const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef output_size, const at::Tensor & indices, const at::Tensor & grad_input);
|
| 24 |
+
};
|
| 25 |
+
} // namespace native
|
| 26 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/igammac_cpu_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 igammac(const at::Tensor & self, const at::Tensor & other);
|
| 21 |
+
TORCH_API at::Tensor & igammac_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other);
|
| 22 |
+
TORCH_API at::Tensor & igammac_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 23 |
+
TORCH_API at::Tensor & igammac_(at::Tensor & self, const at::Tensor & other);
|
| 24 |
+
|
| 25 |
+
} // namespace cpu
|
| 26 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/igammac_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 <c10/util/Optional.h>
|
| 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/igammac_meta.h>
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
struct TORCH_API structured_igammac_out : public at::meta::structured_igammac {
|
| 20 |
+
void impl(const at::Tensor & self, const at::Tensor & other, const at::Tensor & out);
|
| 21 |
+
};
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/imag_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 <c10/util/Optional.h>
|
| 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 imag(const at::Tensor & self);
|
| 20 |
+
} // namespace native
|
| 21 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/lcm_meta_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 lcm(const at::Tensor & self, const at::Tensor & other);
|
| 21 |
+
TORCH_API at::Tensor & lcm_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other);
|
| 22 |
+
TORCH_API at::Tensor & lcm_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 23 |
+
TORCH_API at::Tensor & lcm_(at::Tensor & self, const at::Tensor & other);
|
| 24 |
+
|
| 25 |
+
} // namespace meta
|
| 26 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_diagonal_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 linalg_diagonal(const at::Tensor & A, int64_t offset=0, int64_t dim1=-2, int64_t dim2=-1);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeimplicitautograd
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/log_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 log(const at::Tensor & self);
|
| 21 |
+
TORCH_API at::Tensor & log_out(at::Tensor & out, const at::Tensor & self);
|
| 22 |
+
TORCH_API at::Tensor & log_outf(const at::Tensor & self, at::Tensor & out);
|
| 23 |
+
TORCH_API at::Tensor & log_(at::Tensor & self);
|
| 24 |
+
|
| 25 |
+
} // namespace cuda
|
| 26 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/logical_or_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 <c10/util/Optional.h>
|
| 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 logical_or(const at::Tensor & self, const at::Tensor & other);
|
| 20 |
+
TORCH_API at::Tensor & logical_or_(at::Tensor & self, const at::Tensor & other);
|
| 21 |
+
TORCH_API at::Tensor & logical_or_out(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/lstm_mps_backward_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 lstm_mps_backward {
|
| 18 |
+
using schema = ::std::tuple<at::Tensor,::std::vector<at::Tensor>,::std::vector<at::Tensor>> (const c10::optional<at::Tensor> &, const c10::optional<at::Tensor> &, const c10::optional<at::Tensor> &, const at::Tensor &, const at::Tensor &, const at::Tensor &, const at::Tensor &, at::TensorList, at::TensorList, bool, int64_t, double, 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::lstm_mps_backward")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "lstm_mps_backward(Tensor? grad_y, Tensor? grad_hy, Tensor? grad_cy, Tensor z_state, Tensor cell_state_fwd, Tensor input, Tensor layersOutputs, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor[], Tensor[])")
|
| 24 |
+
static ::std::tuple<at::Tensor,::std::vector<at::Tensor>,::std::vector<at::Tensor>> call(const c10::optional<at::Tensor> & grad_y, const c10::optional<at::Tensor> & grad_hy, const c10::optional<at::Tensor> & grad_cy, const at::Tensor & z_state, const at::Tensor & cell_state_fwd, const at::Tensor & input, const at::Tensor & layersOutputs, at::TensorList hx, at::TensorList params, bool has_biases, int64_t num_layers, double dropout, bool train, bool bidirectional, bool batch_first);
|
| 25 |
+
static ::std::tuple<at::Tensor,::std::vector<at::Tensor>,::std::vector<at::Tensor>> redispatch(c10::DispatchKeySet dispatchKeySet, const c10::optional<at::Tensor> & grad_y, const c10::optional<at::Tensor> & grad_hy, const c10::optional<at::Tensor> & grad_cy, const at::Tensor & z_state, const at::Tensor & cell_state_fwd, const at::Tensor & input, const at::Tensor & layersOutputs, at::TensorList hx, at::TensorList params, bool has_biases, int64_t num_layers, double dropout, bool train, bool bidirectional, bool batch_first);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API lstm_mps_backward_out {
|
| 29 |
+
using schema = void (const c10::optional<at::Tensor> &, const c10::optional<at::Tensor> &, const c10::optional<at::Tensor> &, const at::Tensor &, const at::Tensor &, const at::Tensor &, const at::Tensor &, at::TensorList, at::TensorList, bool, int64_t, double, bool, bool, bool, at::Tensor &, at::TensorList, at::TensorList);
|
| 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::lstm_mps_backward")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "lstm_mps_backward.out(Tensor? grad_y, Tensor? grad_hy, Tensor? grad_cy, Tensor z_state, Tensor cell_state_fwd, Tensor input, Tensor layersOutputs, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, Tensor(a!) out0, Tensor(b!)[] out1, Tensor(c!)[] out2) -> ()")
|
| 35 |
+
static void call(const c10::optional<at::Tensor> & grad_y, const c10::optional<at::Tensor> & grad_hy, const c10::optional<at::Tensor> & grad_cy, const at::Tensor & z_state, const at::Tensor & cell_state_fwd, const at::Tensor & input, const at::Tensor & layersOutputs, at::TensorList hx, at::TensorList params, bool has_biases, int64_t num_layers, double dropout, bool train, bool bidirectional, bool batch_first, at::Tensor & out0, at::TensorList out1, at::TensorList out2);
|
| 36 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, const c10::optional<at::Tensor> & grad_y, const c10::optional<at::Tensor> & grad_hy, const c10::optional<at::Tensor> & grad_cy, const at::Tensor & z_state, const at::Tensor & cell_state_fwd, const at::Tensor & input, const at::Tensor & layersOutputs, at::TensorList hx, at::TensorList params, bool has_biases, int64_t num_layers, double dropout, bool train, bool bidirectional, bool batch_first, at::Tensor & out0, at::TensorList out1, at::TensorList out2);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/matrix_exp_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 matrix_exp(const at::Tensor & self);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeimplicitautograd
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/maximum.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/maximum_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::maximum(Tensor self, Tensor other) -> Tensor
|
| 26 |
+
inline at::Tensor maximum(const at::Tensor & self, const at::Tensor & other) {
|
| 27 |
+
return at::_ops::maximum::call(self, other);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::maximum.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & maximum_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other) {
|
| 32 |
+
return at::_ops::maximum_out::call(self, other, out);
|
| 33 |
+
}
|
| 34 |
+
// aten::maximum.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & maximum_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
|
| 36 |
+
return at::_ops::maximum_out::call(self, other, out);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/mvlgamma_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 & mvlgamma_out(at::Tensor & out, const at::Tensor & self, int64_t p);
|
| 21 |
+
TORCH_API at::Tensor & mvlgamma_outf(const at::Tensor & self, int64_t p, at::Tensor & out);
|
| 22 |
+
|
| 23 |
+
} // namespace cpu
|
| 24 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/native_dropout_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 & native_dropout_backward_out(at::Tensor & out, const at::Tensor & grad_output, const at::Tensor & mask, double scale);
|
| 21 |
+
TORCH_API at::Tensor & native_dropout_backward_outf(const at::Tensor & grad_output, const at::Tensor & mask, double scale, at::Tensor & out);
|
| 22 |
+
|
| 23 |
+
} // namespace compositeexplicitautograd
|
| 24 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/outer_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 <c10/util/Optional.h>
|
| 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 outer(const at::Tensor & self, const at::Tensor & vec2);
|
| 20 |
+
TORCH_API at::Tensor & outer_out(const at::Tensor & self, const at::Tensor & vec2, at::Tensor & out);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/pinverse_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 pinverse {
|
| 18 |
+
using schema = at::Tensor (const at::Tensor &, 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::pinverse")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "pinverse(Tensor self, float rcond=1e-15) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & self, double rcond);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, double rcond);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/replication_pad1d.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/replication_pad1d_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::replication_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!)
|
| 26 |
+
inline at::Tensor & replication_pad1d_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef padding) {
|
| 27 |
+
return at::_ops::replication_pad1d_out::call(self, c10::fromIntArrayRefSlow(padding), out);
|
| 28 |
+
}
|
| 29 |
+
namespace symint {
|
| 30 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 31 |
+
at::Tensor & replication_pad1d_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef padding) {
|
| 32 |
+
return at::_ops::replication_pad1d_out::call(self, c10::fromIntArrayRefSlow(padding), out);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// aten::replication_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!)
|
| 37 |
+
inline at::Tensor & replication_pad1d_outf(const at::Tensor & self, at::IntArrayRef padding, at::Tensor & out) {
|
| 38 |
+
return at::_ops::replication_pad1d_out::call(self, c10::fromIntArrayRefSlow(padding), out);
|
| 39 |
+
}
|
| 40 |
+
namespace symint {
|
| 41 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 42 |
+
at::Tensor & replication_pad1d_outf(const at::Tensor & self, at::IntArrayRef padding, at::Tensor & out) {
|
| 43 |
+
return at::_ops::replication_pad1d_out::call(self, c10::fromIntArrayRefSlow(padding), out);
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
// aten::replication_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!)
|
| 48 |
+
inline at::Tensor & replication_pad1d_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef padding) {
|
| 49 |
+
return at::_ops::replication_pad1d_out::call(self, padding, out);
|
| 50 |
+
}
|
| 51 |
+
namespace symint {
|
| 52 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 53 |
+
at::Tensor & replication_pad1d_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef padding) {
|
| 54 |
+
return at::_ops::replication_pad1d_out::call(self, padding, out);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
// aten::replication_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!)
|
| 59 |
+
inline at::Tensor & replication_pad1d_symint_outf(const at::Tensor & self, c10::SymIntArrayRef padding, at::Tensor & out) {
|
| 60 |
+
return at::_ops::replication_pad1d_out::call(self, padding, out);
|
| 61 |
+
}
|
| 62 |
+
namespace symint {
|
| 63 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 64 |
+
at::Tensor & replication_pad1d_outf(const at::Tensor & self, c10::SymIntArrayRef padding, at::Tensor & out) {
|
| 65 |
+
return at::_ops::replication_pad1d_out::call(self, padding, out);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
// aten::replication_pad1d(Tensor self, SymInt[2] padding) -> Tensor
|
| 70 |
+
inline at::Tensor replication_pad1d(const at::Tensor & self, at::IntArrayRef padding) {
|
| 71 |
+
return at::_ops::replication_pad1d::call(self, c10::fromIntArrayRefSlow(padding));
|
| 72 |
+
}
|
| 73 |
+
namespace symint {
|
| 74 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 75 |
+
at::Tensor replication_pad1d(const at::Tensor & self, at::IntArrayRef padding) {
|
| 76 |
+
return at::_ops::replication_pad1d::call(self, c10::fromIntArrayRefSlow(padding));
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
// aten::replication_pad1d(Tensor self, SymInt[2] padding) -> Tensor
|
| 81 |
+
inline at::Tensor replication_pad1d_symint(const at::Tensor & self, c10::SymIntArrayRef padding) {
|
| 82 |
+
return at::_ops::replication_pad1d::call(self, padding);
|
| 83 |
+
}
|
| 84 |
+
namespace symint {
|
| 85 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 86 |
+
at::Tensor replication_pad1d(const at::Tensor & self, c10::SymIntArrayRef padding) {
|
| 87 |
+
return at::_ops::replication_pad1d::call(self, padding);
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/rsqrt.h
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/rsqrt_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::rsqrt(Tensor self) -> Tensor
|
| 26 |
+
inline at::Tensor rsqrt(const at::Tensor & self) {
|
| 27 |
+
return at::_ops::rsqrt::call(self);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::rsqrt_(Tensor(a!) self) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & rsqrt_(at::Tensor & self) {
|
| 32 |
+
return at::_ops::rsqrt_::call(self);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// aten::rsqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 36 |
+
inline at::Tensor & rsqrt_out(at::Tensor & out, const at::Tensor & self) {
|
| 37 |
+
return at::_ops::rsqrt_out::call(self, out);
|
| 38 |
+
}
|
| 39 |
+
// aten::rsqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 40 |
+
inline at::Tensor & rsqrt_outf(const at::Tensor & self, at::Tensor & out) {
|
| 41 |
+
return at::_ops::rsqrt_out::call(self, out);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/set.h
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/set_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 & set_(at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 28 |
+
return at::_ops::set__source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
namespace symint {
|
| 33 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 34 |
+
at::Tensor & set_(at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 35 |
+
return at::_ops::set__source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
namespace symint {
|
| 40 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 41 |
+
at::Tensor & set_(at::Tensor & self, const at::Tensor & source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 42 |
+
return at::_ops::set__source_Tensor_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
|
| 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 & set_(at::Tensor & self, const at::Tensor & source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 49 |
+
return at::_ops::set__source_Tensor_storage_offset::call(self, source, storage_offset, size, stride);
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
// aten::set.source_Storage_out(Tensor self, Storage source, *, Tensor(a!) out) -> Tensor(a!)
|
| 54 |
+
inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source) {
|
| 55 |
+
return at::_ops::set_source_Storage_out::call(self, source, out);
|
| 56 |
+
}
|
| 57 |
+
// aten::set.source_Storage_out(Tensor self, Storage source, *, Tensor(a!) out) -> Tensor(a!)
|
| 58 |
+
inline at::Tensor & set_outf(const at::Tensor & self, at::Storage source, at::Tensor & out) {
|
| 59 |
+
return at::_ops::set_source_Storage_out::call(self, source, out);
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
// aten::set.source_Storage(Tensor self, Storage source) -> Tensor
|
| 63 |
+
inline at::Tensor set(const at::Tensor & self, at::Storage source) {
|
| 64 |
+
return at::_ops::set_source_Storage::call(self, source);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
// aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
|
| 68 |
+
inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 69 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
|
| 70 |
+
}
|
| 71 |
+
namespace symint {
|
| 72 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 73 |
+
at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 74 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
// aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
|
| 79 |
+
inline at::Tensor & set_outf(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride, at::Tensor & out) {
|
| 80 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
|
| 81 |
+
}
|
| 82 |
+
namespace symint {
|
| 83 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 84 |
+
at::Tensor & set_outf(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride, at::Tensor & out) {
|
| 85 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
// aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
|
| 90 |
+
inline at::Tensor & set_symint_out(at::Tensor & out, const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 91 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
|
| 92 |
+
}
|
| 93 |
+
namespace symint {
|
| 94 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 95 |
+
at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 96 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
// aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
|
| 101 |
+
inline at::Tensor & set_symint_outf(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride, at::Tensor & out) {
|
| 102 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
|
| 103 |
+
}
|
| 104 |
+
namespace symint {
|
| 105 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 106 |
+
at::Tensor & set_outf(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride, at::Tensor & out) {
|
| 107 |
+
return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
// aten::set.source_Storage_storage_offset(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor
|
| 112 |
+
inline at::Tensor set(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 113 |
+
return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
|
| 114 |
+
}
|
| 115 |
+
namespace symint {
|
| 116 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 117 |
+
at::Tensor set(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
|
| 118 |
+
return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
// aten::set.source_Storage_storage_offset(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor
|
| 123 |
+
inline at::Tensor set_symint(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 124 |
+
return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
|
| 125 |
+
}
|
| 126 |
+
namespace symint {
|
| 127 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 128 |
+
at::Tensor set(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
|
| 129 |
+
return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// aten::set.source_Tensor_out(Tensor self, Tensor source, *, Tensor(a!) out) -> Tensor(a!)
|
| 134 |
+
inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & source) {
|
| 135 |
+
return at::_ops::set_source_Tensor_out::call(self, source, out);
|
| 136 |
+
}
|
| 137 |
+
// aten::set.source_Tensor_out(Tensor self, Tensor source, *, Tensor(a!) out) -> Tensor(a!)
|
| 138 |
+
inline at::Tensor & set_outf(const at::Tensor & self, const at::Tensor & source, at::Tensor & out) {
|
| 139 |
+
return at::_ops::set_source_Tensor_out::call(self, source, out);
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
// aten::set.source_Tensor(Tensor self, Tensor source) -> Tensor
|
| 143 |
+
inline at::Tensor set(const at::Tensor & self, const at::Tensor & source) {
|
| 144 |
+
return at::_ops::set_source_Tensor::call(self, source);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
// aten::set.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 148 |
+
inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self) {
|
| 149 |
+
return at::_ops::set_out::call(self, out);
|
| 150 |
+
}
|
| 151 |
+
// aten::set.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 152 |
+
inline at::Tensor & set_outf(const at::Tensor & self, at::Tensor & out) {
|
| 153 |
+
return at::_ops::set_out::call(self, out);
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
// aten::set(Tensor self) -> Tensor
|
| 157 |
+
inline at::Tensor set(const at::Tensor & self) {
|
| 158 |
+
return at::_ops::set::call(self);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/set_data.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/set_data_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/signbit.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 <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/signbit_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::signbit(Tensor self) -> Tensor
|
| 26 |
+
inline at::Tensor signbit(const at::Tensor & self) {
|
| 27 |
+
return at::_ops::signbit::call(self);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::signbit.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & signbit_out(at::Tensor & out, const at::Tensor & self) {
|
| 32 |
+
return at::_ops::signbit_out::call(self, out);
|
| 33 |
+
}
|
| 34 |
+
// aten::signbit.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & signbit_outf(const at::Tensor & self, at::Tensor & out) {
|
| 36 |
+
return at::_ops::signbit_out::call(self, out);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/signbit_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 <c10/util/Optional.h>
|
| 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_signbit : public TensorIteratorBase {
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
void meta(const at::Tensor & self);
|
| 24 |
+
};
|
| 25 |
+
|
| 26 |
+
} // namespace native
|
| 27 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/softmax_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 <c10/util/Optional.h>
|
| 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 softmax(const at::Tensor & self, int64_t dim, c10::optional<at::ScalarType> dtype=c10::nullopt);
|
| 20 |
+
TORCH_API at::Tensor & softmax_out(const at::Tensor & self, int64_t dim, c10::optional<at::ScalarType> dtype, at::Tensor & out);
|
| 21 |
+
TORCH_API at::Tensor softmax(const at::Tensor & self, at::Dimname dim, c10::optional<at::ScalarType> dtype=c10::nullopt);
|
| 22 |
+
} // namespace native
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sort_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 ::std::tuple<at::Tensor,at::Tensor> sort(const at::Tensor & self, c10::optional<bool> stable, int64_t dim=-1, bool descending=false);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeexplicitautogradnonfunctional
|
| 23 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sparse_compressed_tensor_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 <c10/util/Optional.h>
|
| 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 sparse_compressed_tensor(const at::Tensor & compressed_indices, const at::Tensor & plain_indices, const at::Tensor & values, at::IntArrayRef size, c10::optional<at::ScalarType> dtype={}, c10::optional<at::Layout> layout={}, c10::optional<at::Device> device={}, c10::optional<bool> pin_memory={});
|
| 20 |
+
TORCH_API at::Tensor sparse_compressed_tensor(const at::Tensor & compressed_indices, const at::Tensor & plain_indices, const at::Tensor & values, c10::optional<at::ScalarType> dtype={}, c10::optional<at::Layout> layout={}, c10::optional<at::Device> device={}, c10::optional<bool> pin_memory={});
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_log_ndtr_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 special_log_ndtr {
|
| 18 |
+
using schema = at::Tensor (const 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::special_log_ndtr")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "special_log_ndtr(Tensor self) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & self);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API special_log_ndtr_out {
|
| 29 |
+
using schema = at::Tensor & (const 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::special_log_ndtr")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "special_log_ndtr.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)")
|
| 35 |
+
static at::Tensor & call(const at::Tensor & self, at::Tensor & out);
|
| 36 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, at::Tensor & out);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_shifted_chebyshev_polynomial_t_native.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 <c10/util/Optional.h>
|
| 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/special_shifted_chebyshev_polynomial_t_meta.h>
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
struct TORCH_API structured_special_shifted_chebyshev_polynomial_t_out : public at::meta::structured_special_shifted_chebyshev_polynomial_t {
|
| 20 |
+
void impl(const at::Tensor & x, const at::Tensor & n, const at::Tensor & out);
|
| 21 |
+
};
|
| 22 |
+
TORCH_API at::Tensor special_shifted_chebyshev_polynomial_t(const at::Scalar & x, const at::Tensor & n);
|
| 23 |
+
TORCH_API at::Tensor & special_shifted_chebyshev_polynomial_t_out(const at::Scalar & x, const at::Tensor & n, at::Tensor & out);
|
| 24 |
+
TORCH_API at::Tensor special_shifted_chebyshev_polynomial_t(const at::Tensor & x, const at::Scalar & n);
|
| 25 |
+
TORCH_API at::Tensor & special_shifted_chebyshev_polynomial_t_out(const at::Tensor & x, const at::Scalar & n, at::Tensor & out);
|
| 26 |
+
} // namespace native
|
| 27 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/special_sinc_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 special_sinc(const at::Tensor & self);
|
| 21 |
+
TORCH_API at::Tensor & special_sinc_out(at::Tensor & out, const at::Tensor & self);
|
| 22 |
+
TORCH_API at::Tensor & special_sinc_outf(const at::Tensor & self, at::Tensor & out);
|
| 23 |
+
|
| 24 |
+
} // namespace compositeimplicitautograd
|
| 25 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/svd_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 ::std::tuple<at::Tensor,at::Tensor,at::Tensor> svd(const at::Tensor & self, bool some=true, bool compute_uv=true);
|
| 21 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> svd_out(at::Tensor & U, at::Tensor & S, at::Tensor & V, const at::Tensor & self, bool some=true, bool compute_uv=true);
|
| 22 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> svd_outf(const at::Tensor & self, bool some, bool compute_uv, at::Tensor & U, at::Tensor & S, at::Tensor & V);
|
| 23 |
+
|
| 24 |
+
} // namespace compositeimplicitautograd
|
| 25 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/svd_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 <c10/util/Optional.h>
|
| 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 ::std::tuple<at::Tensor,at::Tensor,at::Tensor> svd(const at::Tensor & self, bool some=true, bool compute_uv=true);
|
| 20 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> svd_out(const at::Tensor & self, bool some, bool compute_uv, at::Tensor & U, at::Tensor & S, at::Tensor & V);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
videollama2/lib/python3.10/site-packages/torch/include/ATen/ops/sym_size_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 c10::SymInt sym_size(const at::Tensor & self, int64_t dim);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeimplicitautograd
|
| 23 |
+
} // namespace at
|