Skip to content

Commit be2eadb

Browse files
authored
[MLU] Fix reduce_mean bug (#1349)
1 parent c1be08e commit be2eadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/mlu/kernels/funcs/reduce_op.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void MLUReduceOp(const Context& dev_ctx,
3838
const auto& input_dim_size = x.dims().size();
3939
std::vector<int> reduce_dims;
4040
VLOG(3) << "ReduceOp keep_dim " << keep_dim;
41-
if (!keep_dim && dims.size() == 0) reduce_all = true;
41+
if (dims.size() == 0) reduce_all = true;
4242
if (reduce_all) {
4343
for (size_t i = 0; i < input_dims.size(); i++) {
4444
reduce_dims.push_back(static_cast<int>(i));

0 commit comments

Comments
 (0)