Skip to content

Commit 7d367bc

Browse files
authored
[MLIR] fix msan uninitialized value error (#71286)
1 parent 1085b70 commit 7d367bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ static LogicalResult addShardOp(OpBuilder &b, OpResult result,
423423
}
424424

425425
// process the partial axes
426-
Partial partialType;
426+
// partialType will be ignored if partialAxes is empty
427+
Partial partialType = Partial::Sum;
427428
for (auto it : llvm::zip(loopTypes, shardingOption.shardingArray)) {
428429
IteratorType iType = std::get<0>(it);
429430
if (isReductionLoop(iType)) {

0 commit comments

Comments
 (0)