[Mlir-commits] [mlir] [MLIR][XeGPU] Extend propagation and sg_to_lane distribution pass support broadcast with low rank and scalar source input (PR #170409)
Charitha Saumya
llvmlistbot at llvm.org
Wed Dec 3 15:27:25 PST 2025
================
@@ -511,6 +518,20 @@ bool SliceAttr::isSliceOf(const xegpu::DistributeLayoutAttr &other) {
[&](int64_t dim) { return thisDims.contains(dim); });
}
+bool SliceAttr::isIdentical(const xegpu::DistributeLayoutAttr &other) {
+ if (dyn_cast<xegpu::LayoutAttr>(other))
+ return false;
+
+ auto flattenedThis = flatten();
+ auto flattenedOther = dyn_cast<xegpu::SliceAttr>(other).flatten();
+
+ if ((flattenedThis.getParent() == flattenedOther.getParent()) &&
+ (flattenedThis.getDims() == flattenedOther.getDims())) {
+ return true;
+ }
+ return false;
----------------
charithaintc wrote:
```suggestion
return (flattenedThis.getParent() == flattenedOther.getParent()) &&
(flattenedThis.getDims() == flattenedOther.getDims());
```
https://github.com/llvm/llvm-project/pull/170409
More information about the Mlir-commits
mailing list