[Mlir-commits] [mlir] 4143756 - [mlir][Shard] Compare all-reduce properties when simplifying (#217783)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Aug 20 15:48:35 PDT 2026
Author: Mehdi Amini
Date: 2026-08-20T22:48:31Z
New Revision: 414375661162aa279a329ae7856b6bd06de7625c
URL: https://github.com/llvm/llvm-project/commit/414375661162aa279a329ae7856b6bd06de7625c
DIFF: https://github.com/llvm/llvm-project/commit/414375661162aa279a329ae7856b6bd06de7625c.diff
LOG: [mlir][Shard] Compare all-reduce properties when simplifying (#217783)
Compare the generated properties structs instead of listing each
inherent attribute individually. This preserves the original equality
semantics when new properties are added.
Follow-up to #217233
Assisted-by: Codex
Added:
Modified:
mlir/include/mlir/Dialect/Shard/Transforms/Simplify.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Shard/Transforms/Simplify.h b/mlir/include/mlir/Dialect/Shard/Transforms/Simplify.h
index 24dac85a1e5ca..7d415ba36332d 100644
--- a/mlir/include/mlir/Dialect/Shard/Transforms/Simplify.h
+++ b/mlir/include/mlir/Dialect/Shard/Transforms/Simplify.h
@@ -82,10 +82,7 @@ void populateAllReduceEndomorphismSimplifyPatterns(RewritePatternSet &patterns,
auto refAllReduceOp = llvm::dyn_cast<AllReduceOp>(referenceOp.value());
auto refType = cast<ShapedType>(refAllReduceOp.getResult().getType());
- return refAllReduceOp.getGridAttr() == allReduceOp.getGridAttr() &&
- refAllReduceOp.getGridAxesAttr() == allReduceOp.getGridAxesAttr() &&
- refAllReduceOp.getReductionAttr() ==
- allReduceOp.getReductionAttr() &&
+ return refAllReduceOp.getProperties() == allReduceOp.getProperties() &&
refAllReduceOp->getDiscardableAttrDictionary() ==
allReduceOp->getDiscardableAttrDictionary() &&
inType.getElementType() == refType.getElementType();
More information about the Mlir-commits
mailing list