Skip to content

Commit

Permalink
revise
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhuanMeng committed Jul 22, 2024
1 parent 2e064ef commit 1060b79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ATen/native/xpu/ReduceOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,8 @@ Tensor XPUNativeFunctions::prod(
const Tensor& self,
std::optional<ScalarType> opt_dtype) {
auto dtype = at::native::get_dtype_from_self(self, opt_dtype, true);
// auto shape = at::native::meta::get_reduction_shape(self, {}, false);
// Tensor out = at::empty(shape, self.options().dtype(dtype));
Tensor out;
auto shape = at::meta::get_reduction_shape(self, {}, false);
Tensor out = at::empty(shape, self.options().dtype(dtype));
out = prod_meta(self, {}, false, dtype, out);
return out;
}
Expand Down

0 comments on commit 1060b79

Please sign in to comment.