Skip to content

Commit 9cd8f30

Browse files
authored
Fix build issue of PR #20 (#32)
1 parent fc686f6 commit 9cd8f30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

torch_ipex/csrc/cpu/DevOPs.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ at::Tensor AtenIpexCPUDev::dil_linear_fuse_relu(
594594
output_size.push_back(weight.size(0));
595595

596596
if (self.dim() > 2) {
597-
return dbl::comm::gen_aten_tensor_by(y).reshape(output_size);
597+
return dbl::comm::gen_aten_tensor_by(std::move(y)).reshape(output_size);
598598
}
599-
return dbl::comm::gen_aten_tensor_by(y);
599+
return dbl::comm::gen_aten_tensor_by(std::move(y));
600600
}
601601

602602
at::Tensor dil_linear_backward_input(
@@ -1036,7 +1036,7 @@ at::Tensor AtenIpexCPUDev::dil_relu_use_dst_for_bwd(const at::Tensor& grad_outpu
10361036
dil::tensor gradx;
10371037
dil::eltwise_backward::compute(y, grady, gradx,
10381038
dil::algorithm::eltwise_relu_use_dst_for_bwd, /*alpha*/ 0.0);
1039-
return dbl::comm::gen_aten_tensor_by(gradx);
1039+
return dbl::comm::gen_aten_tensor_by(std::move(gradx));
10401040
}
10411041

10421042
at::Tensor AtenIpexCPUDev::dil_threshold_backward(const at::Tensor& grad_output, const at::Tensor& input, at::Scalar threshold) {

0 commit comments

Comments
 (0)