[Mlir-commits] [mlir] [MLIR][mesh] Mesh fixes (PR #124724)

Frank Schlimbach llvmlistbot at llvm.org
Wed Feb 12 01:59:04 PST 2025


================
@@ -608,14 +609,39 @@ class FoldDynamicLists final : public OpRewritePattern<ShardingOp> {
                                     op.getDynamicShardedDimsOffsets(), b);
 
     // No constant operands were folded, just return;
-    if (failed(foldDynamicIndexList(mixedHalos, /*onlyNonNegative=*/true)) &&
-        failed(foldDynamicIndexList(mixedOffs, /*onlyNonNegative=*/true))) {
-      return failure();
-    }
+    bool modified = succeeded(foldDynamicIndexList(mixedHalos, true)) ||
+                    succeeded(foldDynamicIndexList(mixedOffs, true));
 
     auto halos = decomposeMixedValues(mixedHalos);
     auto offs = decomposeMixedValues(mixedOffs);
 
+    if (halos.second.empty() && !halos.first.empty()) {
----------------
fschlimb wrote:

Done (also for `offs`).

https://github.com/llvm/llvm-project/pull/124724


More information about the Mlir-commits mailing list