[Mlir-commits] [mlir] 7d367bc - [MLIR] fix msan uninitialized value error (#71286)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Nov 4 09:12:28 PDT 2023
Author: Chengji Yao
Date: 2023-11-04T09:12:24-07:00
New Revision: 7d367bc92bad9211b5d990b999710f7b25fbd907
URL: https://github.com/llvm/llvm-project/commit/7d367bc92bad9211b5d990b999710f7b25fbd907
DIFF: https://github.com/llvm/llvm-project/commit/7d367bc92bad9211b5d990b999710f7b25fbd907.diff
LOG: [MLIR] fix msan uninitialized value error (#71286)
Added:
Modified:
mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp b/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
index c2e1d1c726816a5..3e0df660d5c46d3 100644
--- a/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
+++ b/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
@@ -423,7 +423,8 @@ static LogicalResult addShardOp(OpBuilder &b, OpResult result,
}
// process the partial axes
- Partial partialType;
+ // partialType will be ignored if partialAxes is empty
+ Partial partialType = Partial::Sum;
for (auto it : llvm::zip(loopTypes, shardingOption.shardingArray)) {
IteratorType iType = std::get<0>(it);
if (isReductionLoop(iType)) {
More information about the Mlir-commits
mailing list