Kill non-forward, non-backward functions generated from nn.yaml (#15127)
authorVitaly Fedyunin <vitalyf@fb.com>
Thu, 13 Dec 2018 19:32:06 +0000 (11:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 Dec 2018 19:34:50 +0000 (11:34 -0800)
Summary:
Updating binding to legacy functions.
Remove unused declarations.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15127

Differential Revision: D13433405

Pulled By: VitalyFedyunin

fbshipit-source-id: 58544d38affd20818742338c9eb789d9d14ccbaa

aten/src/ATen/native/LegacyNNDefinitions.cpp
aten/src/ATen/nn_parse.py

index 62dac43..2c02746 100644 (file)
@@ -5,10 +5,10 @@
 namespace at { namespace native {
 
 Tensor & binary_cross_entropy_out(Tensor & output, const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) {
-  return at::legacy::th::_thnn_binary_cross_entropy_out(output, self, target, weight, reduction);
+  return at::legacy::th::_thnn_binary_cross_entropy_forward_out(output, self, target, weight, reduction);
 }
 Tensor binary_cross_entropy(const Tensor & self, const Tensor & target, const Tensor & weight, int64_t reduction) {
-  return at::legacy::th::_thnn_binary_cross_entropy(self, target, weight, reduction);
+  return at::legacy::th::_thnn_binary_cross_entropy_forward(self, target, weight, reduction);
 }
 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) {
   return at::legacy::th::_thnn_binary_cross_entropy_backward_out(grad_input, grad_output, self, target, weight, reduction);
@@ -19,11 +19,11 @@ Tensor binary_cross_entropy_backward(const Tensor & grad_output, const Tensor &
 }
 
 Tensor & mse_loss_out(Tensor & output, const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_mse_loss_out(output, self, target, reduction);
+  return at::legacy::th::_thnn_mse_loss_forward_out(output, self, target, reduction);
 }
 
 Tensor mse_loss(const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_mse_loss(self, target, reduction);
+  return at::legacy::th::_thnn_mse_loss_forward(self, target, reduction);
 }
 
 Tensor & mse_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) {
@@ -35,11 +35,11 @@ Tensor mse_loss_backward(const Tensor & grad_output, const Tensor & self, const
 }
 
 Tensor & l1_loss_out(Tensor & output, const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_l1_loss_out(output, self, target, reduction);
+  return at::legacy::th::_thnn_l1_loss_forward_out(output, self, target, reduction);
 }
 
 Tensor l1_loss(const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_l1_loss(self, target, reduction);
+  return at::legacy::th::_thnn_l1_loss_forward(self, target, reduction);
 }
 
 Tensor & l1_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target, int64_t reduction) {
@@ -52,12 +52,12 @@ Tensor l1_loss_backward(const Tensor & grad_output, const Tensor & self, const T
 
 Tensor & multi_margin_loss_out(Tensor & output, const Tensor & self, const Tensor & target,
                                      Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) {
-  return at::legacy::th::_thnn_multi_margin_loss_out(output, self, target, p, margin, weight, reduction);
+  return at::legacy::th::_thnn_multi_margin_loss_forward_out(output, self, target, p, margin, weight, reduction);
 }
 
 Tensor multi_margin_loss(const Tensor & self, const Tensor & target,
                                Scalar p, Scalar margin, const Tensor & weight, int64_t reduction) {
-  return at::legacy::th::_thnn_multi_margin_loss(self, target, p, margin, weight, reduction);
+  return at::legacy::th::_thnn_multi_margin_loss_forward(self, target, p, margin, weight, reduction);
 }
 
 Tensor & multi_margin_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & target,
@@ -146,11 +146,11 @@ Tensor nll_loss2d_backward(const Tensor & grad_output, const Tensor & self, cons
 }
 
 Tensor & smooth_l1_loss_out(Tensor & output, const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_smooth_l1_loss_out(output, self, target, reduction);
+  return at::legacy::th::_thnn_smooth_l1_loss_forward_out(output, self, target, reduction);
 }
 
 Tensor smooth_l1_loss(const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_smooth_l1_loss(self, target, reduction);
+  return at::legacy::th::_thnn_smooth_l1_loss_forward(self, target, reduction);
 }
 
 Tensor & smooth_l1_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self,
@@ -163,11 +163,11 @@ Tensor smooth_l1_loss_backward(const Tensor & grad_output, const Tensor & self,
 }
 
 Tensor & soft_margin_loss_out(Tensor & output, const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_soft_margin_loss_out(output, self, target, reduction);
+  return at::legacy::th::_thnn_soft_margin_loss_forward_out(output, self, target, reduction);
 }
 
 Tensor soft_margin_loss(const Tensor & self, const Tensor & target, int64_t reduction) {
-  return at::legacy::th::_thnn_soft_margin_loss(self, target, reduction);
+  return at::legacy::th::_thnn_soft_margin_loss_forward(self, target, reduction);
 }
 
 Tensor & soft_margin_loss_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self,
@@ -180,11 +180,11 @@ Tensor soft_margin_loss_backward(const Tensor & grad_output, const Tensor & self
 }
 
 Tensor & elu_out(Tensor & output, const Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) {
-  return at::legacy::th::_thnn_elu_out(output, self, alpha, scale, input_scale);
+  return at::legacy::th::_thnn_elu_forward_out(output, self, alpha, scale, input_scale);
 }
 
 Tensor elu(const Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) {
-  return at::legacy::th::_thnn_elu(self, alpha, scale, input_scale);
+  return at::legacy::th::_thnn_elu_forward(self, alpha, scale, input_scale);
 }
 
 Tensor & elu_backward_out(Tensor & grad_input, const Tensor & grad_output, Scalar alpha, Scalar scale, Scalar input_scale, const Tensor & output) {
@@ -196,15 +196,15 @@ Tensor elu_backward(const Tensor & grad_output, Scalar alpha, Scalar scale, Scal
 }
 
 Tensor & elu_(Tensor & self, Scalar alpha, Scalar scale, Scalar input_scale) {
-  return at::legacy::th::_thnn_elu_(self, alpha, scale, input_scale);
+  return at::legacy::th::_thnn_elu_forward_(self, alpha, scale, input_scale);
 }
 
 Tensor & glu_out(Tensor & output, const Tensor & self, int64_t dim) {
-  return at::legacy::th::_thnn_glu_out(output, self, dim);
+  return at::legacy::th::_thnn_glu_forward_out(output, self, dim);
 }
 
 Tensor glu(const Tensor & self, int64_t dim) {
-  return at::legacy::th::_thnn_glu(self, dim);
+  return at::legacy::th::_thnn_glu_forward(self, dim);
 }
 
 Tensor & glu_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, int64_t dim) {
@@ -216,11 +216,11 @@ Tensor glu_backward(const Tensor & grad_output, const Tensor & self, int64_t dim
 }
 
 Tensor & hardtanh_out(Tensor & output, const Tensor & self, Scalar min_val, Scalar max_val) {
-  return at::legacy::th::_thnn_hardtanh_out(output, self, min_val, max_val);
+  return at::legacy::th::_thnn_hardtanh_forward_out(output, self, min_val, max_val);
 }
 
 Tensor hardtanh(const Tensor & self, Scalar min_val, Scalar max_val) {
-  return at::legacy::th::_thnn_hardtanh(self, min_val, max_val);
+  return at::legacy::th::_thnn_hardtanh_forward(self, min_val, max_val);
 }
 
 Tensor & hardtanh_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar min_val, Scalar max_val) {
@@ -232,15 +232,15 @@ Tensor hardtanh_backward(const Tensor & grad_output, const Tensor & self, Scalar
 }
 
 Tensor & hardtanh_(Tensor & self, Scalar min_val, Scalar max_val) {
-  return at::legacy::th::_thnn_hardtanh_(self, min_val, max_val);
+  return at::legacy::th::_thnn_hardtanh_forward_(self, min_val, max_val);
 }
 
 Tensor & leaky_relu_out(Tensor & output, const Tensor & self, Scalar negative_slope) {
-  return at::legacy::th::_thnn_leaky_relu_out(output, self, negative_slope);
+  return at::legacy::th::_thnn_leaky_relu_forward_out(output, self, negative_slope);
 }
 
 Tensor leaky_relu(const Tensor & self, Scalar negative_slope) {
-  return at::legacy::th::_thnn_leaky_relu(self, negative_slope);
+  return at::legacy::th::_thnn_leaky_relu_forward(self, negative_slope);
 }
 
 Tensor & leaky_relu_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar negative_slope) {
@@ -252,7 +252,7 @@ Tensor leaky_relu_backward(const Tensor & grad_output, const Tensor & self, Scal
 }
 
 Tensor & leaky_relu_(Tensor & self, Scalar negative_slope) {
-  return at::legacy::th::_thnn_leaky_relu_(self, negative_slope);
+  return at::legacy::th::_thnn_leaky_relu_forward_(self, negative_slope);
 }
 
 Tensor & log_sigmoid_out(Tensor & output, const Tensor & self) {
@@ -281,11 +281,11 @@ Tensor log_sigmoid_backward(const Tensor & grad_output, const Tensor & self, con
 }
 
 Tensor & rrelu_with_noise_out(Tensor & output, const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) {
-  return at::legacy::th::_thnn_rrelu_with_noise_out(output, self, noise, lower, upper, training, generator);
+  return at::legacy::th::_thnn_rrelu_with_noise_forward_out(output, self, noise, lower, upper, training, generator);
 }
 
 Tensor rrelu_with_noise(const Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) {
-  return at::legacy::th::_thnn_rrelu_with_noise(self, noise, lower, upper, training, generator);
+  return at::legacy::th::_thnn_rrelu_with_noise_forward(self, noise, lower, upper, training, generator);
 }
 
 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) {
@@ -297,15 +297,15 @@ Tensor rrelu_with_noise_backward(const Tensor & grad_output, const Tensor & self
 }
 
 Tensor & rrelu_with_noise_(Tensor & self, const Tensor & noise, Scalar lower, Scalar upper, bool training, Generator * generator) {
-  return at::legacy::th::_thnn_rrelu_with_noise_(self, noise, lower, upper, training, generator);
+  return at::legacy::th::_thnn_rrelu_with_noise_forward_(self, noise, lower, upper, training, generator);
 }
 
 Tensor & softplus_out(Tensor & output, const Tensor & self, Scalar beta, Scalar threshold) {
-  return at::legacy::th::_thnn_softplus_out(output, self, beta, threshold);
+  return at::legacy::th::_thnn_softplus_forward_out(output, self, beta, threshold);
 }
 
 Tensor softplus(const Tensor & self, Scalar beta, Scalar threshold) {
-  return at::legacy::th::_thnn_softplus(self, beta, threshold);
+  return at::legacy::th::_thnn_softplus_forward(self, beta, threshold);
 }
 
 Tensor & softplus_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar beta, Scalar threshold, const Tensor & output) {
@@ -317,11 +317,11 @@ Tensor softplus_backward(const Tensor & grad_output, const Tensor & self, Scalar
 }
 
 Tensor & softshrink_out(Tensor & output, const Tensor & self, Scalar lambd) {
-  return at::legacy::th::_thnn_softshrink_out(output, self, lambd);
+  return at::legacy::th::_thnn_softshrink_forward_out(output, self, lambd);
 }
 
 Tensor softshrink(const Tensor & self, Scalar lambd) {
-  return at::legacy::th::_thnn_softshrink(self, lambd);
+  return at::legacy::th::_thnn_softshrink_forward(self, lambd);
 }
 
 Tensor & softshrink_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, Scalar lambd) {
@@ -333,11 +333,11 @@ Tensor softshrink_backward(const Tensor & grad_output, const Tensor & self, Scal
 }
 
 Tensor & adaptive_avg_pool3d_out(Tensor & output, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_avg_pool3d_out(output, self, output_size);
+  return at::legacy::th::_thnn_adaptive_avg_pool3d_forward_out(output, self, output_size);
 }
 
 Tensor adaptive_avg_pool3d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_avg_pool3d(self, output_size);
+  return at::legacy::th::_thnn_adaptive_avg_pool3d_forward(self, output_size);
 }
 
 Tensor & adaptive_avg_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self) {
@@ -349,11 +349,11 @@ Tensor adaptive_avg_pool3d_backward(const Tensor & grad_output, const Tensor & s
 }
 
 std::tuple<Tensor &,Tensor &> adaptive_max_pool2d_out(Tensor & output, Tensor & indices, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_max_pool2d_out(output, indices, self, output_size);
+  return at::legacy::th::_thnn_adaptive_max_pool2d_forward_out(output, indices, self, output_size);
 }
 
 std::tuple<Tensor,Tensor> adaptive_max_pool2d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_max_pool2d(self, output_size);
+  return at::legacy::th::_thnn_adaptive_max_pool2d_forward(self, output_size);
 }
 
 Tensor & adaptive_max_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices) {
@@ -365,11 +365,11 @@ Tensor adaptive_max_pool2d_backward(const Tensor & grad_output, const Tensor & s
 }
 
 std::tuple<Tensor &,Tensor &> adaptive_max_pool3d_out(Tensor & output, Tensor & indices, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_max_pool3d_out(output, indices, self, output_size);
+  return at::legacy::th::_thnn_adaptive_max_pool3d_forward_out(output, indices, self, output_size);
 }
 
 std::tuple<Tensor,Tensor> adaptive_max_pool3d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_adaptive_max_pool3d(self, output_size);
+  return at::legacy::th::_thnn_adaptive_max_pool3d_forward(self, output_size);
 }
 
 Tensor & adaptive_max_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices) {
@@ -381,11 +381,11 @@ Tensor adaptive_max_pool3d_backward(const Tensor & grad_output, const Tensor & s
 }
 
 Tensor & avg_pool2d_out(Tensor & output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
-  return at::legacy::th::_thnn_avg_pool2d_out(output, self, kernel_size, stride, padding, ceil_mode, count_include_pad);
+  return at::legacy::th::_thnn_avg_pool2d_forward_out(output, self, kernel_size, stride, padding, ceil_mode, count_include_pad);
 }
 
 Tensor avg_pool2d(const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
-  return at::legacy::th::_thnn_avg_pool2d(self, kernel_size, stride, padding, ceil_mode, count_include_pad);
+  return at::legacy::th::_thnn_avg_pool2d_forward(self, kernel_size, stride, padding, ceil_mode, count_include_pad);
 }
 
 Tensor & avg_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
@@ -397,11 +397,11 @@ Tensor avg_pool2d_backward(const Tensor & grad_output, const Tensor & self, IntL
 }
 
 Tensor & avg_pool3d_out(Tensor & output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
-  return at::legacy::th::_thnn_avg_pool3d_out(output, self, kernel_size, stride, padding, ceil_mode, count_include_pad);
+  return at::legacy::th::_thnn_avg_pool3d_forward_out(output, self, kernel_size, stride, padding, ceil_mode, count_include_pad);
 }
 
 Tensor avg_pool3d(const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
-  return at::legacy::th::_thnn_avg_pool3d(self, kernel_size, stride, padding, ceil_mode, count_include_pad);
+  return at::legacy::th::_thnn_avg_pool3d_forward(self, kernel_size, stride, padding, ceil_mode, count_include_pad);
 }
 
 Tensor & avg_pool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, bool ceil_mode, bool count_include_pad) {
@@ -413,11 +413,11 @@ Tensor avg_pool3d_backward(const Tensor & grad_output, const Tensor & self, IntL
 }
 
 std::tuple<Tensor &,Tensor &> fractional_max_pool2d_out(Tensor & output, Tensor & indices, const Tensor & self, IntList kernel_size, IntList output_size, const Tensor & random_samples) {
-  return at::legacy::th::_thnn_fractional_max_pool2d_out(output, indices, self, kernel_size, output_size, random_samples);
+  return at::legacy::th::_thnn_fractional_max_pool2d_forward_out(output, indices, self, kernel_size, output_size, random_samples);
 }
 
 std::tuple<Tensor,Tensor> fractional_max_pool2d(const Tensor & self, IntList kernel_size, IntList output_size, const Tensor & random_samples) {
-  return at::legacy::th::_thnn_fractional_max_pool2d(self, kernel_size, output_size, random_samples);
+  return at::legacy::th::_thnn_fractional_max_pool2d_forward(self, kernel_size, output_size, random_samples);
 }
 
 Tensor & fractional_max_pool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList kernel_size, IntList output_size, const Tensor & indices) {
@@ -429,11 +429,11 @@ Tensor fractional_max_pool2d_backward(const Tensor & grad_output, const Tensor &
 }
 
 std::tuple<Tensor &,Tensor &> max_pool2d_with_indices_out(Tensor & output, Tensor & indices, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode) {
-  return at::legacy::th::_thnn_max_pool2d_with_indices_out(output, indices, self, kernel_size, stride, padding, dilation, ceil_mode);
+  return at::legacy::th::_thnn_max_pool2d_with_indices_forward_out(output, indices, self, kernel_size, stride, padding, dilation, ceil_mode);
 }
 
 std::tuple<Tensor,Tensor> max_pool2d_with_indices(const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode) {
-  return at::legacy::th::_thnn_max_pool2d_with_indices(self, kernel_size, stride, padding, dilation, ceil_mode);
+  return at::legacy::th::_thnn_max_pool2d_with_indices_forward(self, kernel_size, stride, padding, dilation, ceil_mode);
 }
 
 Tensor & max_pool2d_with_indices_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode, const Tensor & indices) {
@@ -445,11 +445,11 @@ Tensor max_pool2d_with_indices_backward(const Tensor & grad_output, const Tensor
 }
 
 std::tuple<Tensor &,Tensor &> max_pool3d_with_indices_out(Tensor & output, Tensor & indices, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode) {
-  return at::legacy::th::_thnn_max_pool3d_with_indices_out(output, indices, self, kernel_size, stride, padding, dilation, ceil_mode);
+  return at::legacy::th::_thnn_max_pool3d_with_indices_forward_out(output, indices, self, kernel_size, stride, padding, dilation, ceil_mode);
 }
 
 std::tuple<Tensor,Tensor> max_pool3d_with_indices(const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode) {
-  return at::legacy::th::_thnn_max_pool3d_with_indices(self, kernel_size, stride, padding, dilation, ceil_mode);
+  return at::legacy::th::_thnn_max_pool3d_with_indices_forward(self, kernel_size, stride, padding, dilation, ceil_mode);
 }
 
 Tensor & max_pool3d_with_indices_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList kernel_size, IntList stride, IntList padding, IntList dilation, bool ceil_mode, const Tensor & indices) {
@@ -461,11 +461,11 @@ Tensor max_pool3d_with_indices_backward(const Tensor & grad_output, const Tensor
 }
 
 Tensor & max_unpool2d_out(Tensor & output, const Tensor & self, const Tensor & indices, IntList output_size) {
-  return at::legacy::th::_thnn_max_unpool2d_out(output, self, indices, output_size);
+  return at::legacy::th::_thnn_max_unpool2d_forward_out(output, self, indices, output_size);
 }
 
 Tensor max_unpool2d(const Tensor & self, const Tensor & indices, IntList output_size) {
-  return at::legacy::th::_thnn_max_unpool2d(self, indices, output_size);
+  return at::legacy::th::_thnn_max_unpool2d_forward(self, indices, output_size);
 }
 
 Tensor & max_unpool2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntList output_size) {
@@ -477,11 +477,11 @@ Tensor max_unpool2d_backward(const Tensor & grad_output, const Tensor & self, co
 }
 
 Tensor & max_unpool3d_out(Tensor & output, const Tensor & self, const Tensor & indices, IntList output_size, IntList stride, IntList padding) {
-  return at::legacy::th::_thnn_max_unpool3d_out(output, self, indices, output_size, stride, padding);
+  return at::legacy::th::_thnn_max_unpool3d_forward_out(output, self, indices, output_size, stride, padding);
 }
 
 Tensor max_unpool3d(const Tensor & self, const Tensor & indices, IntList output_size, IntList stride, IntList padding) {
-  return at::legacy::th::_thnn_max_unpool3d(self, indices, output_size, stride, padding);
+  return at::legacy::th::_thnn_max_unpool3d_forward(self, indices, output_size, stride, padding);
 }
 
 Tensor & max_unpool3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, const Tensor & indices, IntList output_size, IntList stride, IntList padding) {
@@ -493,11 +493,11 @@ Tensor max_unpool3d_backward(const Tensor & grad_output, const Tensor & self, co
 }
 
 Tensor & reflection_pad1d_out(Tensor & output, const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_reflection_pad1d_out(output, self, padding);
+  return at::legacy::th::_thnn_reflection_pad1d_forward_out(output, self, padding);
 }
 
 Tensor reflection_pad1d(const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_reflection_pad1d(self, padding);
+  return at::legacy::th::_thnn_reflection_pad1d_forward(self, padding);
 }
 
 Tensor & reflection_pad1d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList padding) {
@@ -509,11 +509,11 @@ Tensor reflection_pad1d_backward(const Tensor & grad_output, const Tensor & self
 }
 
 Tensor & reflection_pad2d_out(Tensor & output, const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_reflection_pad2d_out(output, self, padding);
+  return at::legacy::th::_thnn_reflection_pad2d_forward_out(output, self, padding);
 }
 
 Tensor reflection_pad2d(const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_reflection_pad2d(self, padding);
+  return at::legacy::th::_thnn_reflection_pad2d_forward(self, padding);
 }
 
 Tensor & reflection_pad2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList padding) {
@@ -525,11 +525,11 @@ Tensor reflection_pad2d_backward(const Tensor & grad_output, const Tensor & self
 }
 
 Tensor & replication_pad1d_out(Tensor & output, const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad1d_out(output, self, padding);
+  return at::legacy::th::_thnn_replication_pad1d_forward_out(output, self, padding);
 }
 
 Tensor replication_pad1d(const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad1d(self, padding);
+  return at::legacy::th::_thnn_replication_pad1d_forward(self, padding);
 }
 
 Tensor & replication_pad1d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList padding) {
@@ -541,11 +541,11 @@ Tensor replication_pad1d_backward(const Tensor & grad_output, const Tensor & sel
 }
 
 Tensor & replication_pad2d_out(Tensor & output, const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad2d_out(output, self, padding);
+  return at::legacy::th::_thnn_replication_pad2d_forward_out(output, self, padding);
 }
 
 Tensor replication_pad2d(const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad2d(self, padding);
+  return at::legacy::th::_thnn_replication_pad2d_forward(self, padding);
 }
 
 Tensor & replication_pad2d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList padding) {
@@ -557,11 +557,11 @@ Tensor replication_pad2d_backward(const Tensor & grad_output, const Tensor & sel
 }
 
 Tensor & replication_pad3d_out(Tensor & output, const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad3d_out(output, self, padding);
+  return at::legacy::th::_thnn_replication_pad3d_forward_out(output, self, padding);
 }
 
 Tensor replication_pad3d(const Tensor & self, IntList padding) {
-  return at::legacy::th::_thnn_replication_pad3d(self, padding);
+  return at::legacy::th::_thnn_replication_pad3d_forward(self, padding);
 }
 
 Tensor & replication_pad3d_backward_out(Tensor & grad_input, const Tensor & grad_output, const Tensor & self, IntList padding) {
@@ -573,11 +573,11 @@ Tensor replication_pad3d_backward(const Tensor & grad_output, const Tensor & sel
 }
 
 Tensor & upsample_linear1d_out(Tensor & output, const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_linear1d_out(output, self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_linear1d_forward_out(output, self, output_size, align_corners);
 }
 
 Tensor upsample_linear1d(const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_linear1d(self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_linear1d_forward(self, output_size, align_corners);
 }
 
 Tensor & upsample_linear1d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size, bool align_corners) {
@@ -589,11 +589,11 @@ Tensor upsample_linear1d_backward(const Tensor & grad_output, IntList output_siz
 }
 
 Tensor & upsample_bilinear2d_out(Tensor & output, const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_bilinear2d_out(output, self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_bilinear2d_forward_out(output, self, output_size, align_corners);
 }
 
 Tensor upsample_bilinear2d(const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_bilinear2d(self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_bilinear2d_forward(self, output_size, align_corners);
 }
 
 Tensor & upsample_bilinear2d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size, bool align_corners) {
@@ -605,11 +605,11 @@ Tensor upsample_bilinear2d_backward(const Tensor & grad_output, IntList output_s
 }
 
 Tensor & upsample_trilinear3d_out(Tensor & output, const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_trilinear3d_out(output, self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_trilinear3d_forward_out(output, self, output_size, align_corners);
 }
 
 Tensor upsample_trilinear3d(const Tensor & self, IntList output_size, bool align_corners) {
-  return at::legacy::th::_thnn_upsample_trilinear3d(self, output_size, align_corners);
+  return at::legacy::th::_thnn_upsample_trilinear3d_forward(self, output_size, align_corners);
 }
 
 Tensor & upsample_trilinear3d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size, bool align_corners) {
@@ -621,11 +621,11 @@ Tensor upsample_trilinear3d_backward(const Tensor & grad_output, IntList output_
 }
 
 Tensor & upsample_nearest1d_out(Tensor & output, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest1d_out(output, self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest1d_forward_out(output, self, output_size);
 }
 
 Tensor upsample_nearest1d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest1d(self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest1d_forward(self, output_size);
 }
 
 Tensor & upsample_nearest1d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size) {
@@ -637,11 +637,11 @@ Tensor upsample_nearest1d_backward(const Tensor & grad_output, IntList output_si
 }
 
 Tensor & upsample_nearest2d_out(Tensor & output, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest2d_out(output, self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest2d_forward_out(output, self, output_size);
 }
 
 Tensor upsample_nearest2d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest2d(self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest2d_forward(self, output_size);
 }
 
 Tensor & upsample_nearest2d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size) {
@@ -653,11 +653,11 @@ Tensor upsample_nearest2d_backward(const Tensor & grad_output, IntList output_si
 }
 
 Tensor & upsample_nearest3d_out(Tensor & output, const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest3d_out(output, self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest3d_forward_out(output, self, output_size);
 }
 
 Tensor upsample_nearest3d(const Tensor & self, IntList output_size) {
-  return at::legacy::th::_thnn_upsample_nearest3d(self, output_size);
+  return at::legacy::th::_thnn_upsample_nearest3d_forward(self, output_size);
 }
 
 Tensor & upsample_nearest3d_backward_out(Tensor & grad_input, const Tensor & grad_output, IntList output_size, IntList input_size) {
index 49e96e7..3930ccc 100644 (file)
@@ -407,7 +407,6 @@ def run(paths):
                     bwd_functions.append(header_functions[cname + suffix])
 
             base = base_declaration(func, fwd_function, backends)
-            declarations.append(base)
             declarations.append(forward_declaration(base, fwd_function))
             declarations.append(backward_declaration(base, bwd_functions))