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/new_zeros_ops.h> |
21 | |
22 | namespace at { |
23 | |
24 | |
25 | namespace symint { |
26 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
27 | at::Tensor new_zeros(const at::Tensor & self, at::IntArrayRef size, at::TensorOptions options={}) { |
28 | return at::_ops::new_zeros::call(self, c10::fromIntArrayRefSlow(size), optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); |
29 | } |
30 | } |
31 | |
32 | namespace symint { |
33 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
34 | at::Tensor new_zeros(const at::Tensor & self, at::IntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) { |
35 | return at::_ops::new_zeros::call(self, c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory); |
36 | } |
37 | } |
38 | |
39 | namespace symint { |
40 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
41 | at::Tensor new_zeros(const at::Tensor & self, c10::SymIntArrayRef size, at::TensorOptions options={}) { |
42 | return at::_ops::new_zeros::call(self, size, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); |
43 | } |
44 | } |
45 | |
46 | namespace symint { |
47 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
48 | at::Tensor new_zeros(const at::Tensor & self, c10::SymIntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) { |
49 | return at::_ops::new_zeros::call(self, size, dtype, layout, device, pin_memory); |
50 | } |
51 | } |
52 | |
53 | // aten::new_zeros.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) |
54 | inline at::Tensor & new_zeros_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size) { |
55 | return at::_ops::new_zeros_out::call(self, c10::fromIntArrayRefSlow(size), out); |
56 | } |
57 | namespace symint { |
58 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
59 | at::Tensor & new_zeros_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size) { |
60 | return at::_ops::new_zeros_out::call(self, c10::fromIntArrayRefSlow(size), out); |
61 | } |
62 | } |
63 | |
64 | // aten::new_zeros.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) |
65 | inline at::Tensor & new_zeros_outf(const at::Tensor & self, at::IntArrayRef size, at::Tensor & out) { |
66 | return at::_ops::new_zeros_out::call(self, c10::fromIntArrayRefSlow(size), out); |
67 | } |
68 | namespace symint { |
69 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
70 | at::Tensor & new_zeros_outf(const at::Tensor & self, at::IntArrayRef size, at::Tensor & out) { |
71 | return at::_ops::new_zeros_out::call(self, c10::fromIntArrayRefSlow(size), out); |
72 | } |
73 | } |
74 | |
75 | // aten::new_zeros.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) |
76 | inline at::Tensor & new_zeros_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size) { |
77 | return at::_ops::new_zeros_out::call(self, size, out); |
78 | } |
79 | namespace symint { |
80 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
81 | at::Tensor & new_zeros_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size) { |
82 | return at::_ops::new_zeros_out::call(self, size, out); |
83 | } |
84 | } |
85 | |
86 | // aten::new_zeros.out(Tensor self, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) |
87 | inline at::Tensor & new_zeros_symint_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Tensor & out) { |
88 | return at::_ops::new_zeros_out::call(self, size, out); |
89 | } |
90 | namespace symint { |
91 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
92 | at::Tensor & new_zeros_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Tensor & out) { |
93 | return at::_ops::new_zeros_out::call(self, size, out); |
94 | } |
95 | } |
96 | |
97 | } |
98 | |