#pragma once

// @generated by aten/src/ATen/gen.py

#include <ATen/CPUTypeDefault.h>
#include <ATen/Context.h>
#include <ATen/CheckGenerator.h>



#ifdef _MSC_VER
#ifdef Type
#undef Type
#endif
#endif

namespace at {

struct CPUType final : public CPUTypeDefault {
  explicit CPUType();
  virtual Backend backend() const override;
  virtual const char * toString() const override;
  virtual TypeID ID() const override;

  // example
  // virtual Tensor * add(Tensor & a, Tensor & b) override;
  Tensor & abs_(Tensor & self) const override;
  Tensor & abs_out(Tensor & out, const Tensor & self) const override;
  Tensor & acos_(Tensor & self) const override;
  Tensor & acos_out(Tensor & out, const Tensor & self) const override;
  Tensor add(const Tensor & self, const Tensor & other, Scalar alpha) const override;
  Tensor & add_(Tensor & self, const Tensor & other, Scalar alpha) const override;
  Tensor & add_out(Tensor & out, const Tensor & self, const Tensor & other, Scalar alpha) const override;
  Tensor addmv(const Tensor & self, const Tensor & mat, const Tensor & vec, Scalar beta, Scalar alpha) const override;
  Tensor & addmv_(Tensor & self, const Tensor & mat, const Tensor & vec, Scalar beta, Scalar alpha) const override;
  Tensor & addmv_out(Tensor & out, const Tensor & self, const Tensor & mat, const Tensor & vec, Scalar beta, Scalar alpha) const override;
  Tensor & arange_out(Tensor & out, Scalar start, Scalar end, Scalar step) const override;
  Tensor as_strided(const Tensor & self, IntArrayRef size, IntArrayRef stride, c10::optional<int64_t> storage_offset) const override;
  Tensor & asin_(Tensor & self) const override;
  Tensor & asin_out(Tensor & out, const Tensor & self) const override;
  Tensor & atan_(Tensor & self) const override;
  Tensor & atan_out(Tensor & out, const Tensor & self) const override;
  Tensor baddbmm(const Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor & baddbmm_(Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor & baddbmm_out(Tensor & out, const Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor & bernoulli_(Tensor & self, const Tensor & p, Generator * generator) const override;
  Tensor & bernoulli_(Tensor & self, double p, Generator * generator) const override;
  Tensor bincount(const Tensor & self, const Tensor & weights, int64_t minlength) const override;
  Tensor bmm(const Tensor & self, const Tensor & mat2) const override;
  Tensor & bmm_out(Tensor & out, const Tensor & self, const Tensor & mat2) const override;
  Tensor & ceil_(Tensor & self) const override;
  Tensor & ceil_out(Tensor & out, const Tensor & self) const override;
  Tensor & clamp_(Tensor & self, c10::optional<Scalar> min, c10::optional<Scalar> max) const override;
  Tensor & clamp_out(Tensor & out, const Tensor & self, c10::optional<Scalar> min, c10::optional<Scalar> max) const override;
  Tensor & clamp_max_(Tensor & self, Scalar max) const override;
  Tensor & clamp_max_out(Tensor & out, const Tensor & self, Scalar max) const override;
  Tensor & clamp_min_(Tensor & self, Scalar min) const override;
  Tensor & clamp_min_out(Tensor & out, const Tensor & self, Scalar min) const override;
  Tensor & cos_(Tensor & self) const override;
  Tensor & cos_out(Tensor & out, const Tensor & self) const override;
  Tensor & cosh_(Tensor & self) const override;
  Tensor & cosh_out(Tensor & out, const Tensor & self) const override;
  std::tuple<Tensor,Tensor> _ctc_loss(const Tensor & log_probs, const Tensor & targets, IntArrayRef input_lengths, IntArrayRef target_lengths, int64_t blank, bool zero_infinity) const override;
  Tensor _ctc_loss_backward(const Tensor & grad, const Tensor & log_probs, const Tensor & targets, IntArrayRef input_lengths, IntArrayRef target_lengths, const Tensor & neg_log_likelihood, const Tensor & log_alpha, int64_t blank, bool zero_infinity) const override;
  Tensor dot(const Tensor & self, const Tensor & tensor) const override;
  Tensor embedding_dense_backward(const Tensor & grad_output, const Tensor & indices, int64_t num_weights, int64_t padding_idx, bool scale_grad_by_freq) const override;
  Tensor & embedding_renorm_(Tensor & self, const Tensor & indices, double max_norm, double norm_type) const override;
  std::tuple<Tensor,Tensor,Tensor,Tensor> _embedding_bag(const Tensor & weight, const Tensor & indices, const Tensor & offsets, bool scale_grad_by_freq, int64_t mode, bool sparse, const Tensor & per_sample_weights) const override;
  Tensor _embedding_bag_dense_backward(const Tensor & grad, const Tensor & indices, const Tensor & offsets, const Tensor & offset2bag, const Tensor & bag_size, const Tensor & maximum_indices, int64_t num_weights, bool scale_grad_by_freq, int64_t mode, const Tensor & per_sample_weights) const override;
  Tensor _embedding_bag_per_sample_weights_backward(const Tensor & grad, const Tensor & weight, const Tensor & indices, const Tensor & offsets, const Tensor & offset2bag, int64_t mode) const override;
  Tensor empty(IntArrayRef size, const TensorOptions & options) const override;
  Tensor & resize_(Tensor & self, IntArrayRef size) const override;
  Tensor empty_strided(IntArrayRef size, IntArrayRef stride, const TensorOptions & options) const override;
  Tensor & erf_(Tensor & self) const override;
  Tensor & erf_out(Tensor & out, const Tensor & self) const override;
  Tensor & erfc_(Tensor & self) const override;
  Tensor & erfc_out(Tensor & out, const Tensor & self) const override;
  Tensor & exp_(Tensor & self) const override;
  Tensor & exp_out(Tensor & out, const Tensor & self) const override;
  Tensor & expm1_(Tensor & self) const override;
  Tensor & expm1_out(Tensor & out, const Tensor & self) const override;
  Tensor & eye_out(Tensor & out, int64_t n) const override;
  Tensor & eye_out(Tensor & out, int64_t n, int64_t m) const override;
  Tensor & floor_(Tensor & self) const override;
  Tensor & floor_out(Tensor & out, const Tensor & self) const override;
  Tensor & frac_(Tensor & self) const override;
  Tensor & frac_out(Tensor & out, const Tensor & self) const override;
  Tensor from_file(std::string filename, c10::optional<bool> shared, c10::optional<int64_t> size, const TensorOptions & options) const override;
  Tensor grid_sampler_2d(const Tensor & input, const Tensor & grid, int64_t interpolation_mode, int64_t padding_mode) const override;
  std::tuple<Tensor,Tensor> grid_sampler_2d_backward(const Tensor & grad_output, const Tensor & input, const Tensor & grid, int64_t interpolation_mode, int64_t padding_mode) const override;
  Tensor grid_sampler_3d(const Tensor & input, const Tensor & grid, int64_t interpolation_mode, int64_t padding_mode) const override;
  std::tuple<Tensor,Tensor> grid_sampler_3d_backward(const Tensor & grad_output, const Tensor & input, const Tensor & grid, int64_t interpolation_mode, int64_t padding_mode) const override;
  Tensor ger(const Tensor & self, const Tensor & vec2) const override;
  Tensor & ger_out(Tensor & out, const Tensor & self, const Tensor & vec2) const override;
  Tensor _fft_with_size(const Tensor & self, int64_t signal_ndim, bool complex_input, bool complex_output, bool inverse, IntArrayRef checked_signal_sizes, bool normalized, bool onesided, IntArrayRef output_sizes) const override;
  Tensor _inverse_helper(const Tensor & self) const override;
  Tensor kl_div_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  std::tuple<Tensor &,Tensor &> kthvalue_out(Tensor & values, Tensor & indices, const Tensor & self, int64_t k, int64_t dim, bool keepdim) const override;
  Tensor & linspace_out(Tensor & out, Scalar start, Scalar end, int64_t steps) const override;
  Tensor & log_(Tensor & self) const override;
  Tensor & log_out(Tensor & out, const Tensor & self) const override;
  Tensor & log10_(Tensor & self) const override;
  Tensor & log10_out(Tensor & out, const Tensor & self) const override;
  Tensor & log1p_(Tensor & self) const override;
  Tensor & log1p_out(Tensor & out, const Tensor & self) const override;
  Tensor & log2_(Tensor & self) const override;
  Tensor & log2_out(Tensor & out, const Tensor & self) const override;
  Tensor & logspace_out(Tensor & out, Scalar start, Scalar end, int64_t steps, double base) const override;
  Tensor _log_softmax(const Tensor & self, int64_t dim, bool half_to_float) const override;
  Tensor _log_softmax_backward_data(const Tensor & grad_output, const Tensor & output, int64_t dim, const Tensor & self) const override;
  Tensor mm(const Tensor & self, const Tensor & mat2) const override;
  Tensor & mm_out(Tensor & out, const Tensor & self, const Tensor & mat2) const override;
  Tensor mv(const Tensor & self, const Tensor & vec) const override;
  Tensor & mv_out(Tensor & out, const Tensor & self, const Tensor & vec) const override;
  Tensor narrow_copy(const Tensor & self, int64_t dim, int64_t start, int64_t length) const override;
  std::tuple<Tensor,Tensor,Tensor> native_batch_norm(const Tensor & input, const Tensor & weight, const Tensor & bias, const Tensor & running_mean, const Tensor & running_var, bool training, double momentum, double eps) const override;
  std::tuple<Tensor,Tensor,Tensor> native_batch_norm_backward(const Tensor & grad_out, const Tensor & input, const Tensor & weight, const Tensor & running_mean, const Tensor & running_var, const Tensor & save_mean, const Tensor & save_invstd, bool train, double eps, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor,Tensor> batch_norm_update_stats(const Tensor & input, const Tensor & running_mean, const Tensor & running_var, double momentum) const override;
  Tensor & randperm_out(Tensor & out, int64_t n, Generator * generator) const override;
  Tensor & range_out(Tensor & out, Scalar start, Scalar end, Scalar step) const override;
  Tensor & reciprocal_(Tensor & self) const override;
  Tensor & reciprocal_out(Tensor & out, const Tensor & self) const override;
  Tensor & neg_(Tensor & self) const override;
  Tensor & neg_out(Tensor & out, const Tensor & self) const override;
  Tensor repeat_interleave(const Tensor & repeats) const override;
  Tensor & round_(Tensor & self) const override;
  Tensor & round_out(Tensor & out, const Tensor & self) const override;
  Tensor relu(const Tensor & self) const override;
  Tensor & relu_(Tensor & self) const override;
  Tensor prelu(const Tensor & self, const Tensor & weight) const override;
  std::tuple<Tensor,Tensor> prelu_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight) const override;
  Tensor hardshrink(const Tensor & self, Scalar lambd) const override;
  Tensor hardshrink_backward(const Tensor & grad_out, const Tensor & self, Scalar lambd) const override;
  Tensor & rsqrt_(Tensor & self) const override;
  Tensor & rsqrt_out(Tensor & out, const Tensor & self) const override;
  Tensor sigmoid(const Tensor & self) const override;
  Tensor & sigmoid_(Tensor & self) const override;
  Tensor & sigmoid_out(Tensor & out, const Tensor & self) const override;
  Tensor & sin_(Tensor & self) const override;
  Tensor & sin_out(Tensor & out, const Tensor & self) const override;
  Tensor & sinh_(Tensor & self) const override;
  Tensor & sinh_out(Tensor & out, const Tensor & self) const override;
  Tensor _softmax(const Tensor & self, int64_t dim, bool half_to_float) const override;
  Tensor _softmax_backward_data(const Tensor & grad_output, const Tensor & output, int64_t dim, const Tensor & self) const override;
  Tensor & _sparse_dense_add_out(Tensor & out, const Tensor & self, const Tensor & other, Scalar alpha) const override;
  Tensor & sspaddmm_out(Tensor & out, const Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor & sqrt_(Tensor & self) const override;
  Tensor & sqrt_out(Tensor & out, const Tensor & self) const override;
  Tensor & tan_(Tensor & self) const override;
  Tensor & tan_out(Tensor & out, const Tensor & self) const override;
  Tensor & tanh_(Tensor & self) const override;
  Tensor & tanh_out(Tensor & out, const Tensor & self) const override;
  Tensor flip(const Tensor & self, IntArrayRef dims) const override;
  Tensor roll(const Tensor & self, IntArrayRef shifts, IntArrayRef dims) const override;
  Tensor & trunc_(Tensor & self) const override;
  Tensor & trunc_out(Tensor & out, const Tensor & self) const override;
  std::tuple<Tensor,Tensor> _unique(const Tensor & self, bool sorted, bool return_inverse) const override;
  std::tuple<Tensor,Tensor,Tensor> unique_dim(const Tensor & self, int64_t dim, bool sorted, bool return_inverse, bool return_counts) const override;
  std::tuple<Tensor,Tensor,Tensor> unique_consecutive(const Tensor & self, bool return_inverse, bool return_counts, c10::optional<int64_t> dim) const override;
  std::tuple<Tensor,Tensor,Tensor> unique_dim_consecutive(const Tensor & self, int64_t dim, bool return_inverse, bool return_counts) const override;
  std::tuple<Tensor,Tensor,Tensor> _unique2(const Tensor & self, bool sorted, bool return_inverse, bool return_counts) const override;
  Tensor _s_where(const Tensor & condition, const Tensor & self, const Tensor & other) const override;
  Tensor _standard_gamma_grad(const Tensor & self, const Tensor & output) const override;
  Tensor _standard_gamma(const Tensor & self, Generator * generator) const override;
  Tensor _sample_dirichlet(const Tensor & self, Generator * generator) const override;
  Tensor poisson(const Tensor & self, Generator * generator) const override;
  Tensor clone(const Tensor & self) const override;
  Tensor & resize_as_(Tensor & self, const Tensor & the_template) const override;
  Tensor & pow_out(Tensor & out, const Tensor & self, Scalar exponent) const override;
  Tensor pow(const Tensor & self, Scalar exponent) const override;
  Tensor & zero_(Tensor & self) const override;
  Tensor & s_native_addmm_out(Tensor & out, const Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor s_native_addmm(const Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor & s_native_addmm_(Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor sparse_mask(const Tensor & self, const Tensor & mask) const override;
  Tensor to_sparse(const Tensor & self, int64_t sparse_dim) const override;
  Tensor to_sparse(const Tensor & self) const override;
  Tensor to_mkldnn(const Tensor & self) const override;
  Tensor quantize_linear(const Tensor & self, double scale, int64_t zero_point, ScalarType dtype) const override;
  Tensor quantize_linear_per_channel(const Tensor & self, const Tensor & scales, const Tensor & zero_points, IntArrayRef axis, ScalarType dtype) const override;
  Tensor _dequantize_linear(const Tensor & self, double scale, int64_t zero_point, ScalarType dtype) const override;
  Tensor _per_tensor_affine_qtensor(const Tensor & self, double scale, int64_t zero_point) const override;
  Scalar _local_scalar_dense(const Tensor & self) const override;
  Tensor & set_(Tensor & self, Storage source) const override;
  Tensor & set_(Tensor & self, Storage source, int64_t storage_offset, IntArrayRef size, IntArrayRef stride) const override;
  Tensor & set_(Tensor & self, const Tensor & source) const override;
  Tensor & set_(Tensor & self) const override;
  bool is_set_to(const Tensor & self, const Tensor & tensor) const override;
  Tensor & masked_fill_(Tensor & self, const Tensor & mask, Scalar value) const override;
  Tensor & masked_fill_(Tensor & self, const Tensor & mask, const Tensor & value) const override;
  Tensor & masked_scatter_(Tensor & self, const Tensor & mask, const Tensor & source) const override;
  Tensor view(const Tensor & self, IntArrayRef size) const override;
  Tensor & put_(Tensor & self, const Tensor & index, const Tensor & source, bool accumulate) const override;
  Tensor & index_add_(Tensor & self, int64_t dim, const Tensor & index, const Tensor & source) const override;
  Tensor & index_fill_(Tensor & self, int64_t dim, const Tensor & index, Scalar value) const override;
  Tensor & index_fill_(Tensor & self, int64_t dim, const Tensor & index, const Tensor & value) const override;
  Tensor & scatter_(Tensor & self, int64_t dim, const Tensor & index, const Tensor & src) const override;
  Tensor & scatter_(Tensor & self, int64_t dim, const Tensor & index, Scalar value) const override;
  Tensor & scatter_add_(Tensor & self, int64_t dim, const Tensor & index, const Tensor & src) const override;
  Tensor & lt_(Tensor & self, Scalar other) const override;
  Tensor & lt_(Tensor & self, const Tensor & other) const override;
  Tensor & gt_(Tensor & self, Scalar other) const override;
  Tensor & gt_(Tensor & self, const Tensor & other) const override;
  Tensor & le_(Tensor & self, Scalar other) const override;
  Tensor & le_(Tensor & self, const Tensor & other) const override;
  Tensor & ge_(Tensor & self, Scalar other) const override;
  Tensor & ge_(Tensor & self, const Tensor & other) const override;
  Tensor & eq_(Tensor & self, Scalar other) const override;
  Tensor & eq_(Tensor & self, const Tensor & other) const override;
  Tensor & ne_(Tensor & self, Scalar other) const override;
  Tensor & ne_(Tensor & self, const Tensor & other) const override;
  Tensor __and__(const Tensor & self, Scalar other) const override;
  Tensor __and__(const Tensor & self, const Tensor & other) const override;
  Tensor & __iand__(Tensor & self, Scalar other) const override;
  Tensor & __iand__(Tensor & self, const Tensor & other) const override;
  Tensor __or__(const Tensor & self, Scalar other) const override;
  Tensor __or__(const Tensor & self, const Tensor & other) const override;
  Tensor & __ior__(Tensor & self, Scalar other) const override;
  Tensor & __ior__(Tensor & self, const Tensor & other) const override;
  Tensor __xor__(const Tensor & self, Scalar other) const override;
  Tensor __xor__(const Tensor & self, const Tensor & other) const override;
  Tensor & __ixor__(Tensor & self, Scalar other) const override;
  Tensor & __ixor__(Tensor & self, const Tensor & other) const override;
  Tensor __lshift__(const Tensor & self, Scalar other) const override;
  Tensor __lshift__(const Tensor & self, const Tensor & other) const override;
  Tensor & __ilshift__(Tensor & self, Scalar other) const override;
  Tensor & __ilshift__(Tensor & self, const Tensor & other) const override;
  Tensor __rshift__(const Tensor & self, Scalar other) const override;
  Tensor __rshift__(const Tensor & self, const Tensor & other) const override;
  Tensor & __irshift__(Tensor & self, Scalar other) const override;
  Tensor & __irshift__(Tensor & self, const Tensor & other) const override;
  Tensor & lgamma_(Tensor & self) const override;
  Tensor & atan2_(Tensor & self, const Tensor & other) const override;
  Tensor & tril_(Tensor & self, int64_t diagonal) const override;
  Tensor & triu_(Tensor & self, int64_t diagonal) const override;
  Tensor & digamma_(Tensor & self) const override;
  Tensor & polygamma_(Tensor & self, int64_t n) const override;
  Tensor & erfinv_(Tensor & self) const override;
  Tensor & renorm_(Tensor & self, Scalar p, int64_t dim, Scalar maxnorm) const override;
  Tensor & pow_(Tensor & self, Scalar exponent) const override;
  Tensor & pow_(Tensor & self, const Tensor & exponent) const override;
  Tensor & lerp_(Tensor & self, const Tensor & end, Scalar weight) const override;
  Tensor & lerp_(Tensor & self, const Tensor & end, const Tensor & weight) const override;
  Tensor & sign_(Tensor & self) const override;
  Tensor & fmod_(Tensor & self, Scalar other) const override;
  Tensor & fmod_(Tensor & self, const Tensor & other) const override;
  Tensor & remainder_(Tensor & self, Scalar other) const override;
  Tensor & remainder_(Tensor & self, const Tensor & other) const override;
  Tensor & addbmm_(Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor & addbmm_out(Tensor & out, const Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor addbmm(const Tensor & self, const Tensor & batch1, const Tensor & batch2, Scalar beta, Scalar alpha) const override;
  Tensor & addcmul_(Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  Tensor & addcdiv_(Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  Tensor & random_(Tensor & self, int64_t from, int64_t to, Generator * generator) const override;
  Tensor & random_(Tensor & self, int64_t to, Generator * generator) const override;
  Tensor & random_(Tensor & self, Generator * generator) const override;
  Tensor & uniform_(Tensor & self, double from, double to, Generator * generator) const override;
  Tensor & normal_(Tensor & self, double mean, double std, Generator * generator) const override;
  Tensor & cauchy_(Tensor & self, double median, double sigma, Generator * generator) const override;
  Tensor & log_normal_(Tensor & self, double mean, double std, Generator * generator) const override;
  Tensor & exponential_(Tensor & self, double lambd, Generator * generator) const override;
  Tensor & geometric_(Tensor & self, double p, Generator * generator) const override;
  Tensor & diag_out(Tensor & out, const Tensor & self, int64_t diagonal) const override;
  Tensor diag(const Tensor & self, int64_t diagonal) const override;
  Tensor & triu_out(Tensor & out, const Tensor & self, int64_t diagonal) const override;
  Tensor & tril_out(Tensor & out, const Tensor & self, int64_t diagonal) const override;
  Tensor tril_indices(int64_t row, int64_t col, int64_t offset, const TensorOptions & options) const override;
  Tensor triu_indices(int64_t row, int64_t col, int64_t offset, const TensorOptions & options) const override;
  Tensor trace(const Tensor & self) const override;
  Tensor & ne_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor ne(const Tensor & self, Scalar other) const override;
  Tensor & ne_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor ne(const Tensor & self, const Tensor & other) const override;
  Tensor & eq_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor eq(const Tensor & self, Scalar other) const override;
  Tensor & eq_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor eq(const Tensor & self, const Tensor & other) const override;
  Tensor & ge_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor ge(const Tensor & self, Scalar other) const override;
  Tensor & ge_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor ge(const Tensor & self, const Tensor & other) const override;
  Tensor & le_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor le(const Tensor & self, Scalar other) const override;
  Tensor & le_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor le(const Tensor & self, const Tensor & other) const override;
  Tensor & gt_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor gt(const Tensor & self, Scalar other) const override;
  Tensor & gt_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor gt(const Tensor & self, const Tensor & other) const override;
  Tensor & lt_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor lt(const Tensor & self, Scalar other) const override;
  Tensor & lt_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor lt(const Tensor & self, const Tensor & other) const override;
  Tensor & take_out(Tensor & out, const Tensor & self, const Tensor & index) const override;
  Tensor take(const Tensor & self, const Tensor & index) const override;
  Tensor & index_select_out(Tensor & out, const Tensor & self, int64_t dim, const Tensor & index) const override;
  Tensor index_select(const Tensor & self, int64_t dim, const Tensor & index) const override;
  Tensor & masked_select_out(Tensor & out, const Tensor & self, const Tensor & mask) const override;
  Tensor masked_select(const Tensor & self, const Tensor & mask) const override;
  Tensor & nonzero_out(Tensor & out, const Tensor & self) const override;
  Tensor nonzero(const Tensor & self) const override;
  Tensor & gather_out(Tensor & out, const Tensor & self, int64_t dim, const Tensor & index, bool sparse_grad) const override;
  Tensor gather(const Tensor & self, int64_t dim, const Tensor & index, bool sparse_grad) const override;
  Tensor & addcmul_out(Tensor & out, const Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  Tensor addcmul(const Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  Tensor & addcdiv_out(Tensor & out, const Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  Tensor addcdiv(const Tensor & self, const Tensor & tensor1, const Tensor & tensor2, Scalar value) const override;
  std::tuple<Tensor &,Tensor &> gels_out(Tensor & X, Tensor & qr, const Tensor & self, const Tensor & A) const override;
  std::tuple<Tensor,Tensor> gels(const Tensor & self, const Tensor & A) const override;
  std::tuple<Tensor,Tensor> _triangular_solve_helper(const Tensor & self, const Tensor & A, bool upper, bool transpose, bool unitriangular) const override;
  std::tuple<Tensor &,Tensor &> symeig_out(Tensor & e, Tensor & V, const Tensor & self, bool eigenvectors, bool upper) const override;
  std::tuple<Tensor,Tensor> symeig(const Tensor & self, bool eigenvectors, bool upper) const override;
  std::tuple<Tensor &,Tensor &> eig_out(Tensor & e, Tensor & v, const Tensor & self, bool eigenvectors) const override;
  std::tuple<Tensor,Tensor> eig(const Tensor & self, bool eigenvectors) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> svd_out(Tensor & U, Tensor & S, Tensor & V, const Tensor & self, bool some, bool compute_uv) const override;
  std::tuple<Tensor,Tensor,Tensor> svd(const Tensor & self, bool some, bool compute_uv) const override;
  Tensor _cholesky_helper(const Tensor & self, bool upper) const override;
  Tensor _cholesky_solve_helper(const Tensor & self, const Tensor & A, bool upper) const override;
  std::tuple<Tensor,Tensor> _solve_helper(const Tensor & self, const Tensor & A) const override;
  Tensor & cholesky_inverse_out(Tensor & out, const Tensor & self, bool upper) const override;
  Tensor cholesky_inverse(const Tensor & self, bool upper) const override;
  std::tuple<Tensor &,Tensor &> pstrf_out(Tensor & u, Tensor & pivot, const Tensor & self, bool upper, Scalar tol) const override;
  std::tuple<Tensor,Tensor> pstrf(const Tensor & self, bool upper, Scalar tol) const override;
  std::tuple<Tensor,Tensor> _qr_helper(const Tensor & self, bool some) const override;
  std::tuple<Tensor &,Tensor &> geqrf_out(Tensor & a, Tensor & tau, const Tensor & self) const override;
  std::tuple<Tensor,Tensor> geqrf(const Tensor & self) const override;
  Tensor & orgqr_out(Tensor & out, const Tensor & self, const Tensor & input2) const override;
  Tensor orgqr(const Tensor & self, const Tensor & input2) const override;
  Tensor & ormqr_out(Tensor & out, const Tensor & self, const Tensor & input2, const Tensor & input3, bool left, bool transpose) const override;
  Tensor ormqr(const Tensor & self, const Tensor & input2, const Tensor & input3, bool left, bool transpose) const override;
  std::tuple<Tensor,Tensor,Tensor> _lu_with_info(const Tensor & self, bool pivot, bool check_errors) const override;
  Tensor & lu_solve_out(Tensor & out, const Tensor & self, const Tensor & LU_data, const Tensor & LU_pivots) const override;
  Tensor lu_solve(const Tensor & self, const Tensor & LU_data, const Tensor & LU_pivots) const override;
  Tensor & multinomial_out(Tensor & out, const Tensor & self, int64_t num_samples, bool replacement, Generator * generator) const override;
  Tensor multinomial(const Tensor & self, int64_t num_samples, bool replacement, Generator * generator) const override;
  std::tuple<Tensor,Tensor> _multinomial_alias_setup(const Tensor & probs) const override;
  Tensor _multinomial_alias_draw(const Tensor & J, const Tensor & q, int64_t num_samples, Generator * generator) const override;
  Tensor & lgamma_out(Tensor & out, const Tensor & self) const override;
  Tensor lgamma(const Tensor & self) const override;
  Tensor & digamma_out(Tensor & out, const Tensor & self) const override;
  Tensor digamma(const Tensor & self) const override;
  Tensor & polygamma_out(Tensor & out, int64_t n, const Tensor & self) const override;
  Tensor polygamma(int64_t n, const Tensor & self) const override;
  Tensor & erfinv_out(Tensor & out, const Tensor & self) const override;
  Tensor erfinv(const Tensor & self) const override;
  Tensor dist(const Tensor & self, const Tensor & other, Scalar p) const override;
  Tensor & atan2_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor atan2(const Tensor & self, const Tensor & other) const override;
  Tensor & lerp_out(Tensor & out, const Tensor & self, const Tensor & end, Scalar weight) const override;
  Tensor & lerp_out(Tensor & out, const Tensor & self, const Tensor & end, const Tensor & weight) const override;
  Tensor lerp(const Tensor & self, const Tensor & end, Scalar weight) const override;
  Tensor lerp(const Tensor & self, const Tensor & end, const Tensor & weight) const override;
  Tensor & histc_out(Tensor & out, const Tensor & self, int64_t bins, Scalar min, Scalar max) const override;
  Tensor histc(const Tensor & self, int64_t bins, Scalar min, Scalar max) const override;
  Tensor & sign_out(Tensor & out, const Tensor & self) const override;
  Tensor sign(const Tensor & self) const override;
  Tensor & fmod_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor fmod(const Tensor & self, Scalar other) const override;
  Tensor & fmod_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor fmod(const Tensor & self, const Tensor & other) const override;
  Tensor & remainder_out(Tensor & out, const Tensor & self, Scalar other) const override;
  Tensor remainder(const Tensor & self, Scalar other) const override;
  Tensor & remainder_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor remainder(const Tensor & self, const Tensor & other) const override;
  Tensor & min_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor min(const Tensor & self, const Tensor & other) const override;
  Tensor min(const Tensor & self) const override;
  Tensor & max_out(Tensor & out, const Tensor & self, const Tensor & other) const override;
  Tensor max(const Tensor & self, const Tensor & other) const override;
  Tensor max(const Tensor & self) const override;
  Tensor median(const Tensor & self) const override;
  std::tuple<Tensor &,Tensor &> sort_out(Tensor & values, Tensor & indices, const Tensor & self, int64_t dim, bool descending) const override;
  std::tuple<Tensor,Tensor> sort(const Tensor & self, int64_t dim, bool descending) const override;
  std::tuple<Tensor &,Tensor &> topk_out(Tensor & values, Tensor & indices, const Tensor & self, int64_t k, int64_t dim, bool largest, bool sorted) const override;
  std::tuple<Tensor,Tensor> topk(const Tensor & self, int64_t k, int64_t dim, bool largest, bool sorted) const override;
  Tensor & renorm_out(Tensor & out, const Tensor & self, Scalar p, int64_t dim, Scalar maxnorm) const override;
  Tensor renorm(const Tensor & self, Scalar p, int64_t dim, Scalar maxnorm) const override;
  Tensor unfold(const Tensor & self, int64_t dimension, int64_t size, int64_t step) const override;
  bool equal(const Tensor & self, const Tensor & other) const override;
  Tensor & pow_out(Tensor & out, const Tensor & self, const Tensor & exponent) const override;
  Tensor pow(const Tensor & self, const Tensor & exponent) const override;
  Tensor & pow_out(Tensor & out, Scalar self, const Tensor & exponent) const override;
  Tensor pow(Scalar self, const Tensor & exponent) const override;
  Tensor & normal_out(Tensor & out, const Tensor & mean, double std, Generator * generator) const override;
  Tensor normal(const Tensor & mean, double std, Generator * generator) const override;
  Tensor & normal_out(Tensor & out, double mean, const Tensor & std, Generator * generator) const override;
  Tensor normal(double mean, const Tensor & std, Generator * generator) const override;
  Tensor & normal_out(Tensor & out, const Tensor & mean, const Tensor & std, Generator * generator) const override;
  Tensor normal(const Tensor & mean, const Tensor & std, Generator * generator) const override;
  Tensor alias(const Tensor & self) const override;
  Tensor & _dirichlet_grad_out(Tensor & out, const Tensor & x, const Tensor & alpha, const Tensor & total) const override;
  Tensor _dirichlet_grad(const Tensor & x, const Tensor & alpha, const Tensor & total) const override;
  Tensor _addr(const Tensor & self, const Tensor & vec1, const Tensor & vec2, Scalar beta, Scalar alpha) const override;
  Tensor & _addr_(Tensor & self, const Tensor & vec1, const Tensor & vec2, Scalar beta, Scalar alpha) const override;
  Tensor & _addr_out(Tensor & out, const Tensor & self, const Tensor & vec1, const Tensor & vec2, Scalar beta, Scalar alpha) const override;
  Tensor & _index_copy_(Tensor & self, int64_t dim, const Tensor & index, const Tensor & source) const override;
  Tensor _cumsum(const Tensor & self, int64_t dim) const override;
  Tensor & _cumsum_out(Tensor & out, const Tensor & self, int64_t dim) const override;
  Tensor _cumprod(const Tensor & self, int64_t dim) const override;
  Tensor & _cumprod_out(Tensor & out, const Tensor & self, int64_t dim) const override;
  Tensor _var(const Tensor & self, bool unbiased) const override;
  Tensor _std(const Tensor & self, bool unbiased) const override;
  Tensor & _addmm_out(Tensor & out, const Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor _addmm(const Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor & _addmm_(Tensor & self, const Tensor & mat1, const Tensor & mat2, Scalar beta, Scalar alpha) const override;
  Tensor _cat(TensorList tensors, int64_t dim) const override;
  Tensor & _cat_out(Tensor & out, TensorList tensors, int64_t dim) const override;
  std::tuple<Tensor,Tensor> _mode(const Tensor & self, int64_t dim, bool keepdim) const override;
  std::tuple<Tensor &,Tensor &> _mode_out(Tensor & values, Tensor & indices, const Tensor & self, int64_t dim, bool keepdim) const override;
  std::tuple<Tensor,Tensor> _max(const Tensor & self, int64_t dim, bool keepdim) const override;
  std::tuple<Tensor &,Tensor &> _max_out(Tensor & max, Tensor & max_indices, const Tensor & self, int64_t dim, bool keepdim) const override;
  std::tuple<Tensor,Tensor> _min(const Tensor & self, int64_t dim, bool keepdim) const override;
  std::tuple<Tensor &,Tensor &> _min_out(Tensor & min, Tensor & min_indices, const Tensor & self, int64_t dim, bool keepdim) const override;
  Tensor & binary_cross_entropy_out(Tensor & out, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) const override;
  Tensor binary_cross_entropy(const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) const override;
  Tensor & binary_cross_entropy_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) const override;
  Tensor binary_cross_entropy_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) const override;
  Tensor & mse_loss_out(Tensor & out, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor mse_loss(const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & mse_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor mse_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & l1_loss_out(Tensor & out, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor l1_loss(const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & l1_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor l1_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & multi_margin_loss_out(Tensor & out, const Tensor & self, const Tensor & target, Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) const override;
  Tensor multi_margin_loss(const Tensor & self, const Tensor & target, Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) const override;
  Tensor & multi_margin_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) const override;
  Tensor multi_margin_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) const override;
  std::tuple<Tensor &,Tensor &> multilabel_margin_loss_forward_out(Tensor & output, Tensor & is_target, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  std::tuple<Tensor,Tensor> multilabel_margin_loss_forward(const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & multilabel_margin_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction, const Tensor & is_target) const override;
  Tensor multilabel_margin_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction, const Tensor & is_target) const override;
  std::tuple<Tensor &,Tensor &> nll_loss_forward_out(Tensor & output, Tensor & total_weight, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index) const override;
  std::tuple<Tensor,Tensor> nll_loss_forward(const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index) const override;
  Tensor & nll_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index, const Tensor & total_weight) const override;
  Tensor nll_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index, const Tensor & total_weight) const override;
  std::tuple<Tensor &,Tensor &> nll_loss2d_forward_out(Tensor & output, Tensor & total_weight, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index) const override;
  std::tuple<Tensor,Tensor> nll_loss2d_forward(const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index) const override;
  Tensor & nll_loss2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index, const Tensor & total_weight) const override;
  Tensor nll_loss2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction, int64_t ignore_index, const Tensor & total_weight) const override;
  Tensor & smooth_l1_loss_out(Tensor & out, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor smooth_l1_loss(const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & smooth_l1_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor smooth_l1_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & soft_margin_loss_out(Tensor & out, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor soft_margin_loss(const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & soft_margin_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor soft_margin_loss_backward(const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) const override;
  Tensor & elu_out(Tensor & out, const Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) const override;
  Tensor elu(const Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) const override;
  Tensor & elu_backward_out(Tensor & grad_input, const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, const Tensor & output) const override;
  Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, const Tensor & output) const override;
  Tensor & elu_(Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) const override;
  Tensor & glu_out(Tensor & out, const Tensor & self, int64_t dim) const override;
  Tensor glu(const Tensor & self, int64_t dim) const override;
  Tensor & glu_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, int64_t dim) const override;
  Tensor glu_backward(const Tensor & grad_output, const Tensor & self, int64_t dim) const override;
  Tensor & hardtanh_out(Tensor & out, const Tensor & self, Scalar min_val, Scalar max_val) const override;
  Tensor hardtanh(const Tensor & self, Scalar min_val, Scalar max_val) const override;
  Tensor & hardtanh_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar min_val, Scalar max_val) const override;
  Tensor hardtanh_backward(const Tensor & grad_output, const Tensor & self, Scalar min_val, Scalar max_val) const override;
  Tensor & hardtanh_(Tensor & self, Scalar min_val, Scalar max_val) const override;
  Tensor & leaky_relu_out(Tensor & out, const Tensor & self, Scalar negative_slope) const override;
  Tensor leaky_relu(const Tensor & self, Scalar negative_slope) const override;
  Tensor & leaky_relu_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar negative_slope) const override;
  Tensor leaky_relu_backward(const Tensor & grad_output, const Tensor & self, Scalar negative_slope) const override;
  Tensor & leaky_relu_(Tensor & self, Scalar negative_slope) const override;
  std::tuple<Tensor &,Tensor &> log_sigmoid_forward_out(Tensor & output, Tensor & buffer, const Tensor & self) const override;
  std::tuple<Tensor,Tensor> log_sigmoid_forward(const Tensor & self) const override;
  Tensor & log_sigmoid_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & buffer) const override;
  Tensor log_sigmoid_backward(const Tensor & grad_output, const Tensor & self, const Tensor & buffer) const override;
  Tensor & rrelu_with_noise_out(Tensor & out, const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) const override;
  Tensor rrelu_with_noise(const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) const override;
  Tensor & rrelu_with_noise_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training) const override;
  Tensor rrelu_with_noise_backward(const Tensor & grad_output, const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training) const override;
  Tensor & rrelu_with_noise_(Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) const override;
  Tensor & softplus_out(Tensor & out, const Tensor & self, Scalar beta, Scalar threshold) const override;
  Tensor softplus(const Tensor & self, Scalar beta, Scalar threshold) const override;
  Tensor & softplus_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar beta, Scalar threshold, const Tensor & output) const override;
  Tensor softplus_backward(const Tensor & grad_output, const Tensor & self, Scalar beta, Scalar threshold, const Tensor & output) const override;
  Tensor & softshrink_out(Tensor & out, const Tensor & self, Scalar lambd) const override;
  Tensor softshrink(const Tensor & self, Scalar lambd) const override;
  Tensor & softshrink_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar lambd) const override;
  Tensor softshrink_backward(const Tensor & grad_output, const Tensor & self, Scalar lambd) const override;
  Tensor & adaptive_avg_pool2d_out(Tensor & out, const Tensor & self, IntArrayRef output_size) const override;
  Tensor _adaptive_avg_pool2d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor _adaptive_avg_pool2d_backward(const Tensor & grad_output, const Tensor & self) const override;
  Tensor & adaptive_avg_pool3d_out(Tensor & out, const Tensor & self, IntArrayRef output_size) const override;
  Tensor adaptive_avg_pool3d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & adaptive_avg_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self) const override;
  Tensor adaptive_avg_pool3d_backward(const Tensor & grad_output, const Tensor & self) const override;
  std::tuple<Tensor &,Tensor &> adaptive_max_pool2d_out(Tensor & out, Tensor & indices, const Tensor & self, IntArrayRef output_size) const override;
  std::tuple<Tensor,Tensor> adaptive_max_pool2d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & adaptive_max_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices) const override;
  Tensor adaptive_max_pool2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & indices) const override;
  std::tuple<Tensor &,Tensor &> adaptive_max_pool3d_out(Tensor & out, Tensor & indices, const Tensor & self, IntArrayRef output_size) const override;
  std::tuple<Tensor,Tensor> adaptive_max_pool3d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & adaptive_max_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices) const override;
  Tensor adaptive_max_pool3d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & indices) const override;
  Tensor & avg_pool2d_out(Tensor & out, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor avg_pool2d(const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor & avg_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor avg_pool2d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor & avg_pool3d_out(Tensor & out, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor avg_pool3d(const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor & avg_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  Tensor avg_pool3d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, bool ceil_mode, bool count_include_pad) const override;
  std::tuple<Tensor &,Tensor &> fractional_max_pool2d_out(Tensor & output, Tensor & indices, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & random_samples) const override;
  std::tuple<Tensor,Tensor> fractional_max_pool2d(const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & random_samples) const override;
  Tensor & fractional_max_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & indices) const override;
  Tensor fractional_max_pool2d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & indices) const override;
  std::tuple<Tensor &,Tensor &> fractional_max_pool3d_out(Tensor & output, Tensor & indices, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & random_samples) const override;
  std::tuple<Tensor,Tensor> fractional_max_pool3d(const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & random_samples) const override;
  Tensor & fractional_max_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & indices) const override;
  Tensor fractional_max_pool3d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef output_size, const Tensor & indices) const override;
  std::tuple<Tensor &,Tensor &> max_pool2d_with_indices_out(Tensor & out, Tensor & indices, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode) const override;
  std::tuple<Tensor,Tensor> max_pool2d_with_indices(const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode) const override;
  Tensor & max_pool2d_with_indices_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode, const Tensor & indices) const override;
  Tensor max_pool2d_with_indices_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode, const Tensor & indices) const override;
  std::tuple<Tensor &,Tensor &> max_pool3d_with_indices_out(Tensor & out, Tensor & indices, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode) const override;
  std::tuple<Tensor,Tensor> max_pool3d_with_indices(const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode) const override;
  Tensor & max_pool3d_with_indices_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode, const Tensor & indices) const override;
  Tensor max_pool3d_with_indices_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, bool ceil_mode, const Tensor & indices) const override;
  Tensor & max_unpool2d_out(Tensor & out, const Tensor & self, const Tensor & indices, IntArrayRef output_size) const override;
  Tensor max_unpool2d(const Tensor & self, const Tensor & indices, IntArrayRef output_size) const override;
  Tensor & max_unpool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntArrayRef output_size) const override;
  Tensor max_unpool2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntArrayRef output_size) const override;
  Tensor & max_unpool3d_out(Tensor & out, const Tensor & self, const Tensor & indices, IntArrayRef output_size, IntArrayRef stride, IntArrayRef padding) const override;
  Tensor max_unpool3d(const Tensor & self, const Tensor & indices, IntArrayRef output_size, IntArrayRef stride, IntArrayRef padding) const override;
  Tensor & max_unpool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntArrayRef output_size, IntArrayRef stride, IntArrayRef padding) const override;
  Tensor max_unpool3d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntArrayRef output_size, IntArrayRef stride, IntArrayRef padding) const override;
  Tensor & reflection_pad1d_out(Tensor & out, const Tensor & self, IntArrayRef padding) const override;
  Tensor reflection_pad1d(const Tensor & self, IntArrayRef padding) const override;
  Tensor & reflection_pad1d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor reflection_pad1d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor & reflection_pad2d_out(Tensor & out, const Tensor & self, IntArrayRef padding) const override;
  Tensor reflection_pad2d(const Tensor & self, IntArrayRef padding) const override;
  Tensor & reflection_pad2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor reflection_pad2d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad1d_out(Tensor & out, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad1d(const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad1d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad1d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad2d_out(Tensor & out, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad2d(const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad2d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad3d_out(Tensor & out, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad3d(const Tensor & self, IntArrayRef padding) const override;
  Tensor & replication_pad3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor replication_pad3d_backward(const Tensor & grad_output, const Tensor & self, IntArrayRef padding) const override;
  Tensor & upsample_linear1d_out(Tensor & out, const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor upsample_linear1d(const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor & upsample_linear1d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor upsample_linear1d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor & upsample_bilinear2d_out(Tensor & out, const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor upsample_bilinear2d(const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor & upsample_bilinear2d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor upsample_bilinear2d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor & upsample_bicubic2d_out(Tensor & out, const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor upsample_bicubic2d(const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor & upsample_bicubic2d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor upsample_bicubic2d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor & upsample_trilinear3d_out(Tensor & out, const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor upsample_trilinear3d(const Tensor & self, IntArrayRef output_size, bool align_corners) const override;
  Tensor & upsample_trilinear3d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor upsample_trilinear3d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size, bool align_corners) const override;
  Tensor & upsample_nearest1d_out(Tensor & out, const Tensor & self, IntArrayRef output_size) const override;
  Tensor upsample_nearest1d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & upsample_nearest1d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor upsample_nearest1d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor & upsample_nearest2d_out(Tensor & out, const Tensor & self, IntArrayRef output_size) const override;
  Tensor upsample_nearest2d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & upsample_nearest2d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor upsample_nearest2d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor & upsample_nearest3d_out(Tensor & out, const Tensor & self, IntArrayRef output_size) const override;
  Tensor upsample_nearest3d(const Tensor & self, IntArrayRef output_size) const override;
  Tensor & upsample_nearest3d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor upsample_nearest3d_backward(const Tensor & grad_output, IntArrayRef output_size, IntArrayRef input_size) const override;
  Tensor & sigmoid_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & output) const override;
  Tensor sigmoid_backward(const Tensor & grad_output, const Tensor & output) const override;
  Tensor & tanh_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & output) const override;
  Tensor tanh_backward(const Tensor & grad_output, const Tensor & output) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_transpose2d_forward_out(Tensor & output, Tensor & columns, Tensor & ones, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_transpose2d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_transpose2d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_transpose2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_transpose3d_forward_out(Tensor & output, Tensor & finput, Tensor & fgrad_input, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_transpose3d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_transpose3d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation, const Tensor & finput, const Tensor & fgrad_input) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_transpose3d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef output_padding, IntArrayRef dilation, const Tensor & finput, const Tensor & fgrad_input, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv2d_forward_out(Tensor & output, Tensor & finput, Tensor & fgrad_input, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv2d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv2d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, const Tensor & finput, const Tensor & fgrad_input) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, const Tensor & finput, const Tensor & fgrad_input, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv3d_forward_out(Tensor & output, Tensor & finput, Tensor & fgrad_input, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv3d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv3d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, const Tensor & finput, const Tensor & fgrad_input) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv3d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, const Tensor & finput, const Tensor & fgrad_input, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_dilated2d_forward_out(Tensor & output, Tensor & columns, Tensor & ones, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_dilated2d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_dilated2d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_dilated2d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones, std::array<bool,3> output_mask) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_dilated3d_forward_out(Tensor & output, Tensor & columns, Tensor & ones, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_dilated3d_forward(const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, const Tensor & bias, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation) const override;
  std::tuple<Tensor &,Tensor &,Tensor &> thnn_conv_dilated3d_backward_out(Tensor & grad_input, Tensor & grad_weight, Tensor & grad_bias, const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones) const override;
  std::tuple<Tensor,Tensor,Tensor> thnn_conv_dilated3d_backward(const Tensor & grad_output, const Tensor & self, const Tensor & weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, IntArrayRef dilation, const Tensor & columns, const Tensor & ones, std::array<bool,3> output_mask) const override;
  Tensor thnn_col2im(const Tensor & self, IntArrayRef output_size, IntArrayRef kernel_size, IntArrayRef dilation, IntArrayRef padding, IntArrayRef stride) const override;
  Tensor thnn_col2im_backward(const Tensor & grad_output, IntArrayRef kernel_size, IntArrayRef dilation, IntArrayRef padding, IntArrayRef stride) const override;
  Tensor thnn_im2col(const Tensor & self, IntArrayRef kernel_size, IntArrayRef dilation, IntArrayRef padding, IntArrayRef stride) const override;
  Tensor thnn_im2col_backward(const Tensor & grad_output, IntArrayRef input_size, IntArrayRef kernel_size, IntArrayRef dilation, IntArrayRef padding, IntArrayRef stride) const override;

 private:
  ScalarType infer_scalar_type(const Tensor & t) const {
    return t.scalar_type();
  }
  ScalarType infer_scalar_type(const TensorList & tl) const {
    TORCH_CHECK(tl.size() > 0, "expected a non-empty list of Tensors");
    return tl[0].scalar_type();
  }
};

} // namespace at
