[Mlir-commits] [mlir] [MLIR] fix msan uninitialized value error (PR #71286)
Chengji Yao
llvmlistbot at llvm.org
Sat Nov 4 08:03:53 PDT 2023
https://github.com/yaochengji created https://github.com/llvm/llvm-project/pull/71286
None
>From 25984b0b72948d82fba3e03ce47e52e014ee92dd Mon Sep 17 00:00:00 2001
From: Chengji Yao <yaochengji at hotmail.com>
Date: Sat, 4 Nov 2023 15:02:19 +0000
Subject: [PATCH] [MLIR] fix msan uninitialized value error
---
mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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