Line data Source code
1 : #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
2 : #pragma once
3 :
4 : // @generated by torchgen/gen.py from Function.h
5 :
6 : #include <ATen/Context.h>
7 : #include <ATen/DeviceGuard.h>
8 : #include <ATen/TensorUtils.h>
9 : #include <ATen/TracerMode.h>
10 : #include <ATen/core/Generator.h>
11 : #include <ATen/core/Reduction.h>
12 : #include <ATen/core/Tensor.h>
13 : #include <c10/core/Scalar.h>
14 : #include <c10/core/Storage.h>
15 : #include <c10/core/TensorOptions.h>
16 : #include <c10/util/Deprecated.h>
17 : #include <optional>
18 : #include <string_view>
19 :
20 :
21 :
22 : #include <ATen/ops/eye_ops.h>
23 :
24 : namespace at {
25 :
26 :
27 : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
28 8 : inline at::Tensor eye(int64_t n, at::TensorOptions options={}) {
29 16 : return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
30 : }
31 : namespace symint {
32 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
33 : at::Tensor eye(int64_t n, at::TensorOptions options={}) {
34 : return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
35 : }
36 : }
37 :
38 : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
39 : inline at::Tensor eye(int64_t n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
40 : return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
41 : }
42 : namespace symint {
43 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
44 : at::Tensor eye(int64_t n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
45 : return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
46 : }
47 : }
48 :
49 : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
50 : inline at::Tensor eye_symint(c10::SymInt n, at::TensorOptions options={}) {
51 : return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
52 : }
53 : namespace symint {
54 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
55 : at::Tensor eye(c10::SymInt n, at::TensorOptions options={}) {
56 : return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
57 : }
58 : }
59 :
60 : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
61 : inline at::Tensor eye_symint(c10::SymInt n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
62 : return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
63 : }
64 : namespace symint {
65 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
66 : at::Tensor eye(c10::SymInt n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
67 : return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
68 : }
69 : }
70 :
71 : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
72 : inline at::Tensor eye(int64_t n, int64_t m, at::TensorOptions options={}) {
73 : return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
74 : }
75 : namespace symint {
76 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
77 : at::Tensor eye(int64_t n, int64_t m, at::TensorOptions options={}) {
78 : return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
79 : }
80 : }
81 :
82 : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
83 : inline at::Tensor eye(int64_t n, int64_t m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
84 : return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
85 : }
86 : namespace symint {
87 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
88 : at::Tensor eye(int64_t n, int64_t m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
89 : return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
90 : }
91 : }
92 :
93 : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
94 : inline at::Tensor eye_symint(c10::SymInt n, c10::SymInt m, at::TensorOptions options={}) {
95 : return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
96 : }
97 : namespace symint {
98 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
99 : at::Tensor eye(c10::SymInt n, c10::SymInt m, at::TensorOptions options={}) {
100 : return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
101 : }
102 : }
103 :
104 : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
105 : inline at::Tensor eye_symint(c10::SymInt n, c10::SymInt m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
106 : return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
107 : }
108 : namespace symint {
109 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
110 : at::Tensor eye(c10::SymInt n, c10::SymInt m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
111 : return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
112 : }
113 : }
114 :
115 : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
116 : inline at::Tensor & eye_out(at::Tensor & out, int64_t n) {
117 : return at::_ops::eye_out::call(n, out);
118 : }
119 : namespace symint {
120 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
121 : at::Tensor & eye_out(at::Tensor & out, int64_t n) {
122 : return at::_ops::eye_out::call(n, out);
123 : }
124 : }
125 :
126 : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
127 : inline at::Tensor & eye_outf(int64_t n, at::Tensor & out) {
128 : return at::_ops::eye_out::call(n, out);
129 : }
130 : namespace symint {
131 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
132 : at::Tensor & eye_outf(int64_t n, at::Tensor & out) {
133 : return at::_ops::eye_out::call(n, out);
134 : }
135 : }
136 :
137 : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
138 : inline at::Tensor & eye_symint_out(at::Tensor & out, c10::SymInt n) {
139 : return at::_ops::eye_out::call(n, out);
140 : }
141 : namespace symint {
142 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
143 : at::Tensor & eye_out(at::Tensor & out, c10::SymInt n) {
144 : return at::_ops::eye_out::call(n, out);
145 : }
146 : }
147 :
148 : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
149 : inline at::Tensor & eye_symint_outf(c10::SymInt n, at::Tensor & out) {
150 : return at::_ops::eye_out::call(n, out);
151 : }
152 : namespace symint {
153 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
154 : at::Tensor & eye_outf(c10::SymInt n, at::Tensor & out) {
155 : return at::_ops::eye_out::call(n, out);
156 : }
157 : }
158 :
159 : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
160 : inline at::Tensor & eye_out(at::Tensor & out, int64_t n, int64_t m) {
161 : return at::_ops::eye_m_out::call(n, m, out);
162 : }
163 : namespace symint {
164 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
165 : at::Tensor & eye_out(at::Tensor & out, int64_t n, int64_t m) {
166 : return at::_ops::eye_m_out::call(n, m, out);
167 : }
168 : }
169 :
170 : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
171 : inline at::Tensor & eye_outf(int64_t n, int64_t m, at::Tensor & out) {
172 : return at::_ops::eye_m_out::call(n, m, out);
173 : }
174 : namespace symint {
175 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
176 : at::Tensor & eye_outf(int64_t n, int64_t m, at::Tensor & out) {
177 : return at::_ops::eye_m_out::call(n, m, out);
178 : }
179 : }
180 :
181 : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
182 : inline at::Tensor & eye_symint_out(at::Tensor & out, c10::SymInt n, c10::SymInt m) {
183 : return at::_ops::eye_m_out::call(n, m, out);
184 : }
185 : namespace symint {
186 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
187 : at::Tensor & eye_out(at::Tensor & out, c10::SymInt n, c10::SymInt m) {
188 : return at::_ops::eye_m_out::call(n, m, out);
189 : }
190 : }
191 :
192 : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
193 : inline at::Tensor & eye_symint_outf(c10::SymInt n, c10::SymInt m, at::Tensor & out) {
194 : return at::_ops::eye_m_out::call(n, m, out);
195 : }
196 : namespace symint {
197 : template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
198 : at::Tensor & eye_outf(c10::SymInt n, c10::SymInt m, at::Tensor & out) {
199 : return at::_ops::eye_m_out::call(n, m, out);
200 : }
201 : }
202 :
203 : }
204 :
205 : #else
206 : #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
207 : #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
|