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/reshape_ops.h>
21
22namespace at {
23
24
25// aten::reshape(Tensor(a) self, SymInt[] shape) -> Tensor(a)
26inline at::Tensor reshape(const at::Tensor & self, at::IntArrayRef shape) {
27 return at::_ops::reshape::call(self, c10::fromIntArrayRefSlow(shape));
28}
29namespace symint {
30 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
31 at::Tensor reshape(const at::Tensor & self, at::IntArrayRef shape) {
32 return at::_ops::reshape::call(self, c10::fromIntArrayRefSlow(shape));
33 }
34}
35
36// aten::reshape(Tensor(a) self, SymInt[] shape) -> Tensor(a)
37inline at::Tensor reshape_symint(const at::Tensor & self, c10::SymIntArrayRef shape) {
38 return at::_ops::reshape::call(self, shape);
39}
40namespace symint {
41 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
42 at::Tensor reshape(const at::Tensor & self, c10::SymIntArrayRef shape) {
43 return at::_ops::reshape::call(self, shape);
44 }
45}
46
47}
48