flatten_ops.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. // @generated by torchgen/gen.py from Operator.h
  3. #include <tuple>
  4. #include <vector>
  5. // Forward declarations of any types needed in the operator signatures.
  6. // We can't directly include these classes because it will cause circular include dependencies.
  7. // This file is included by TensorBody.h, which defines the Tensor class.
  8. #include <ATen/core/ATen_fwd.h>
  9. namespace at {
  10. namespace _ops {
  11. struct TORCH_API flatten_using_ints {
  12. using schema = at::Tensor (const at::Tensor &, int64_t, int64_t);
  13. using ptr_schema = schema*;
  14. // See Note [static constexpr char* members for windows NVCC]
  15. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::flatten")
  16. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "using_ints")
  17. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "flatten.using_ints(Tensor(a) self, int start_dim=0, int end_dim=-1) -> Tensor(a)")
  18. static at::Tensor call(const at::Tensor & self, int64_t start_dim, int64_t end_dim);
  19. static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, int64_t start_dim, int64_t end_dim);
  20. };
  21. struct TORCH_API flatten_named_out_dim {
  22. using schema = at::Tensor (const at::Tensor &, int64_t, int64_t, at::Dimname);
  23. using ptr_schema = schema*;
  24. // See Note [static constexpr char* members for windows NVCC]
  25. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::flatten")
  26. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "named_out_dim")
  27. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "flatten.named_out_dim(Tensor(a) self, int start_dim, int end_dim, Dimname out_dim) -> Tensor(a)")
  28. static at::Tensor call(const at::Tensor & self, int64_t start_dim, int64_t end_dim, at::Dimname out_dim);
  29. static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, int64_t start_dim, int64_t end_dim, at::Dimname out_dim);
  30. };
  31. struct TORCH_API flatten_using_names {
  32. using schema = at::Tensor (const at::Tensor &, at::Dimname, at::Dimname, at::Dimname);
  33. using ptr_schema = schema*;
  34. // See Note [static constexpr char* members for windows NVCC]
  35. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::flatten")
  36. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "using_names")
  37. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "flatten.using_names(Tensor(a) self, Dimname start_dim, Dimname end_dim, Dimname out_dim) -> Tensor(a)")
  38. static at::Tensor call(const at::Tensor & self, at::Dimname start_dim, at::Dimname end_dim, at::Dimname out_dim);
  39. static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, at::Dimname start_dim, at::Dimname end_dim, at::Dimname out_dim);
  40. };
  41. struct TORCH_API flatten_DimnameList {
  42. using schema = at::Tensor (const at::Tensor &, at::DimnameList, at::Dimname);
  43. using ptr_schema = schema*;
  44. // See Note [static constexpr char* members for windows NVCC]
  45. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::flatten")
  46. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "DimnameList")
  47. STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "flatten.DimnameList(Tensor(a) self, Dimname[] dims, Dimname out_dim) -> Tensor(a)")
  48. static at::Tensor call(const at::Tensor & self, at::DimnameList dims, at::Dimname out_dim);
  49. static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, at::DimnameList dims, at::Dimname out_dim);
  50. };
  51. }} // namespace at::_ops