1 | #pragma once |
2 | |
3 | namespace at { |
4 | // views and their in-place version ops |
5 | #define TORCH_VIEW_FNS(m) \ |
6 | m.impl("as_strided_", torch::CppFunction::makeFallthrough()); \ |
7 | m.impl("detach", torch::CppFunction::makeFallthrough()); \ |
8 | m.impl("detach_", torch::CppFunction::makeFallthrough()); \ |
9 | m.impl("diagonal", torch::CppFunction::makeFallthrough()); \ |
10 | m.impl("expand", torch::CppFunction::makeFallthrough()); \ |
11 | m.impl("expand_as", torch::CppFunction::makeFallthrough()); \ |
12 | m.impl("movedim.int", torch::CppFunction::makeFallthrough()); \ |
13 | m.impl("movedim.intlist", torch::CppFunction::makeFallthrough()); \ |
14 | m.impl("narrow", torch::CppFunction::makeFallthrough()); \ |
15 | m.impl("permute", torch::CppFunction::makeFallthrough()); \ |
16 | m.impl("select.Dimname", torch::CppFunction::makeFallthrough()); \ |
17 | m.impl("select.int", torch::CppFunction::makeFallthrough()); \ |
18 | m.impl("squeeze", torch::CppFunction::makeFallthrough()); \ |
19 | m.impl("squeeze_", torch::CppFunction::makeFallthrough()); \ |
20 | m.impl("transpose.int", torch::CppFunction::makeFallthrough()); \ |
21 | m.impl("transpose.Dimname", torch::CppFunction::makeFallthrough()); \ |
22 | m.impl("transpose_", torch::CppFunction::makeFallthrough()); \ |
23 | m.impl("t", torch::CppFunction::makeFallthrough()); \ |
24 | m.impl("t_", torch::CppFunction::makeFallthrough()); \ |
25 | m.impl("real", torch::CppFunction::makeFallthrough()); \ |
26 | m.impl("imag", torch::CppFunction::makeFallthrough()); \ |
27 | m.impl("view_as_real", torch::CppFunction::makeFallthrough()); \ |
28 | m.impl("unflatten.int", torch::CppFunction::makeFallthrough()); \ |
29 | m.impl("unflatten.Dimname", torch::CppFunction::makeFallthrough()); \ |
30 | m.impl("unfold", torch::CppFunction::makeFallthrough()); \ |
31 | m.impl("unsqueeze", torch::CppFunction::makeFallthrough()); \ |
32 | m.impl("unsqueeze_", torch::CppFunction::makeFallthrough()); \ |
33 | m.impl("view_as", torch::CppFunction::makeFallthrough()); \ |
34 | m.impl("unbind.int", torch::CppFunction::makeFallthrough()); \ |
35 | m.impl("unbind.Dimname", torch::CppFunction::makeFallthrough()); \ |
36 | m.impl("split.Tensor", torch::CppFunction::makeFallthrough()); \ |
37 | m.impl("split_with_sizes", torch::CppFunction::makeFallthrough()); \ |
38 | m.impl("swapaxes", torch::CppFunction::makeFallthrough()); \ |
39 | m.impl("swapdims", torch::CppFunction::makeFallthrough()); \ |
40 | m.impl("chunk", torch::CppFunction::makeFallthrough()); \ |
41 | m.impl("reshape", torch::CppFunction::makeFallthrough()); \ |
42 | m.impl("alias", torch::CppFunction::makeFallthrough()); \ |
43 | m.impl("hsplit.int", torch::CppFunction::makeFallthrough()); \ |
44 | m.impl("hsplit.array", torch::CppFunction::makeFallthrough()); \ |
45 | m.impl("dsplit.int", torch::CppFunction::makeFallthrough()); \ |
46 | m.impl("dsplit.array", torch::CppFunction::makeFallthrough()); \ |
47 | m.impl("vsplit.int", torch::CppFunction::makeFallthrough()); \ |
48 | m.impl("vsplit.array", torch::CppFunction::makeFallthrough()); \ |
49 | m.impl("conj", torch::CppFunction::makeFallthrough()); \ |
50 | m.impl("_conj", torch::CppFunction::makeFallthrough()); \ |
51 | m.impl("_unsafe_view", torch::CppFunction::makeFallthrough()); \ |
52 | m.impl("resize_", torch::CppFunction::makeFallthrough()); |
53 | |
54 | #define TENSOR_UTILITIES_AND_CONSTRUCTORS(m) \ |
55 | m.impl("empty_like", torch::CppFunction::makeFallthrough()); \ |
56 | m.impl("empty.memory_format", torch::CppFunction::makeFallthrough()); \ |
57 | m.impl("empty.out", torch::CppFunction::makeFallthrough()); \ |
58 | m.impl("empty_strided", torch::CppFunction::makeFallthrough()); \ |
59 | m.impl("full_like", torch::CppFunction::makeFallthrough()); \ |
60 | m.impl("stride.int", torch::CppFunction::makeFallthrough()); \ |
61 | m.impl("stride.Dimname", torch::CppFunction::makeFallthrough()); \ |
62 | m.impl("size.int", torch::CppFunction::makeFallthrough()); \ |
63 | m.impl("size.Dimname", torch::CppFunction::makeFallthrough()); \ |
64 | m.impl("is_complex", torch::CppFunction::makeFallthrough()); \ |
65 | m.impl("is_floating_point", torch::CppFunction::makeFallthrough()); \ |
66 | m.impl("requires_grad_", torch::CppFunction::makeFallthrough()); |
67 | } |
68 | |
69 | #define TORCH_VIEW_FNS_NATIVE_FN_REGISTRATION(m) \ |
70 | m.impl("as_strided", torch::CppFunction::makeFallthrough()); \ |
71 | m.impl("view", torch::CppFunction::makeFallthrough()); |
72 | |