repeat.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #pragma once
  2. // @generated by torchgen/gen.py from Function.h
  3. #include <ATen/Context.h>
  4. #include <ATen/DeviceGuard.h>
  5. #include <ATen/TensorUtils.h>
  6. #include <ATen/TracerMode.h>
  7. #include <ATen/core/Generator.h>
  8. #include <ATen/core/Reduction.h>
  9. #include <ATen/core/Tensor.h>
  10. #include <c10/core/Scalar.h>
  11. #include <c10/core/Storage.h>
  12. #include <c10/core/TensorOptions.h>
  13. #include <c10/util/Deprecated.h>
  14. #include <c10/util/Optional.h>
  15. #include <ATen/ops/repeat_ops.h>
  16. namespace at {
  17. namespace symint {
  18. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  19. at::Tensor repeat(const at::Tensor & self, at::IntArrayRef repeats) {
  20. return at::_ops::repeat::call(self, c10::fromIntArrayRefSlow(repeats));
  21. }
  22. }
  23. namespace symint {
  24. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  25. at::Tensor repeat(const at::Tensor & self, c10::SymIntArrayRef repeats) {
  26. return at::_ops::repeat::call(self, repeats);
  27. }
  28. }
  29. // aten::repeat.out(Tensor self, SymInt[] repeats, *, Tensor(a!) out) -> Tensor(a!)
  30. inline at::Tensor & repeat_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef repeats) {
  31. return at::_ops::repeat_out::call(self, c10::fromIntArrayRefSlow(repeats), out);
  32. }
  33. namespace symint {
  34. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  35. at::Tensor & repeat_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef repeats) {
  36. return at::_ops::repeat_out::call(self, c10::fromIntArrayRefSlow(repeats), out);
  37. }
  38. }
  39. // aten::repeat.out(Tensor self, SymInt[] repeats, *, Tensor(a!) out) -> Tensor(a!)
  40. inline at::Tensor & repeat_outf(const at::Tensor & self, at::IntArrayRef repeats, at::Tensor & out) {
  41. return at::_ops::repeat_out::call(self, c10::fromIntArrayRefSlow(repeats), out);
  42. }
  43. namespace symint {
  44. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  45. at::Tensor & repeat_outf(const at::Tensor & self, at::IntArrayRef repeats, at::Tensor & out) {
  46. return at::_ops::repeat_out::call(self, c10::fromIntArrayRefSlow(repeats), out);
  47. }
  48. }
  49. // aten::repeat.out(Tensor self, SymInt[] repeats, *, Tensor(a!) out) -> Tensor(a!)
  50. inline at::Tensor & repeat_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef repeats) {
  51. return at::_ops::repeat_out::call(self, repeats, out);
  52. }
  53. namespace symint {
  54. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  55. at::Tensor & repeat_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef repeats) {
  56. return at::_ops::repeat_out::call(self, repeats, out);
  57. }
  58. }
  59. // aten::repeat.out(Tensor self, SymInt[] repeats, *, Tensor(a!) out) -> Tensor(a!)
  60. inline at::Tensor & repeat_symint_outf(const at::Tensor & self, c10::SymIntArrayRef repeats, at::Tensor & out) {
  61. return at::_ops::repeat_out::call(self, repeats, out);
  62. }
  63. namespace symint {
  64. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  65. at::Tensor & repeat_outf(const at::Tensor & self, c10::SymIntArrayRef repeats, at::Tensor & out) {
  66. return at::_ops::repeat_out::call(self, repeats, out);
  67. }
  68. }
  69. }