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/empty_ops.h>
21
22namespace at {
23
24
25// aten::empty.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
26inline at::Tensor empty(at::IntArrayRef size, c10::optional<at::DimnameList> names, at::TensorOptions options={}, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
27 return at::_ops::empty_names::call(size, names, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
28}
29// aten::empty.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
30inline at::Tensor empty(at::IntArrayRef size, c10::optional<at::DimnameList> names, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory, c10::optional<at::MemoryFormat> memory_format) {
31 return at::_ops::empty_names::call(size, names, dtype, layout, device, pin_memory, memory_format);
32}
33
34// aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
35inline at::Tensor empty(at::IntArrayRef size, at::TensorOptions options={}, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
36 return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
37}
38namespace symint {
39 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
40 at::Tensor empty(at::IntArrayRef size, at::TensorOptions options={}, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
41 return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
42 }
43}
44
45// aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
46inline at::Tensor empty(at::IntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory, c10::optional<at::MemoryFormat> memory_format) {
47 return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory, memory_format);
48}
49namespace symint {
50 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
51 at::Tensor empty(at::IntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory, c10::optional<at::MemoryFormat> memory_format) {
52 return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory, memory_format);
53 }
54}
55
56// aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
57inline at::Tensor empty_symint(c10::SymIntArrayRef size, at::TensorOptions options={}, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
58 return at::_ops::empty_memory_format::call(size, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
59}
60namespace symint {
61 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
62 at::Tensor empty(c10::SymIntArrayRef size, at::TensorOptions options={}, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
63 return at::_ops::empty_memory_format::call(size, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
64 }
65}
66
67// aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
68inline at::Tensor empty_symint(c10::SymIntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory, c10::optional<at::MemoryFormat> memory_format) {
69 return at::_ops::empty_memory_format::call(size, dtype, layout, device, pin_memory, memory_format);
70}
71namespace symint {
72 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
73 at::Tensor empty(c10::SymIntArrayRef size, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory, c10::optional<at::MemoryFormat> memory_format) {
74 return at::_ops::empty_memory_format::call(size, dtype, layout, device, pin_memory, memory_format);
75 }
76}
77
78// aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
79inline at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
80 return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
81}
82namespace symint {
83 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
84 at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
85 return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
86 }
87}
88
89// aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
90inline at::Tensor & empty_outf(at::IntArrayRef size, c10::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
91 return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
92}
93namespace symint {
94 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
95 at::Tensor & empty_outf(at::IntArrayRef size, c10::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
96 return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
97 }
98}
99
100// aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
101inline at::Tensor & empty_symint_out(at::Tensor & out, c10::SymIntArrayRef size, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
102 return at::_ops::empty_out::call(size, memory_format, out);
103}
104namespace symint {
105 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
106 at::Tensor & empty_out(at::Tensor & out, c10::SymIntArrayRef size, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
107 return at::_ops::empty_out::call(size, memory_format, out);
108 }
109}
110
111// aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
112inline at::Tensor & empty_symint_outf(c10::SymIntArrayRef size, c10::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
113 return at::_ops::empty_out::call(size, memory_format, out);
114}
115namespace symint {
116 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
117 at::Tensor & empty_outf(c10::SymIntArrayRef size, c10::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
118 return at::_ops::empty_out::call(size, memory_format, out);
119 }
120}
121
122// aten::empty.names_out(int[] size, *, Dimname[]? names, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
123inline at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, c10::optional<at::DimnameList> names, c10::optional<at::MemoryFormat> memory_format=c10::nullopt) {
124 return at::_ops::empty_names_out::call(size, names, memory_format, out);
125}
126// aten::empty.names_out(int[] size, *, Dimname[]? names, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
127inline at::Tensor & empty_outf(at::IntArrayRef size, c10::optional<at::DimnameList> names, c10::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
128 return at::_ops::empty_names_out::call(size, names, memory_format, out);
129}
130
131}
132