This driver should iterate until convergence or until the specified op was erased. However, it used to stop when any op was erased.
Depends On: D141920
Paths
| Differential D141921
[mlir] GreedyPatternRewriteDriver: Fix termination criteria in OpPatternRewriteDriver ClosedPublic Authored by springerm on Jan 17 2023, 5:09 AM.
Details Summary This driver should iterate until convergence or until the specified op was erased. However, it used to stop when any op was erased. Depends On: D141920
Diff Detail
Event Timelinespringerm added a parent revision: D141920: [mlir] GreedyPatternRewriteDriver: Keep track of surviving ops.Jan 17 2023, 5:09 AM Comment Actions Note: I found that some downstream project tests (in XLA GPU) fail with this fix. Probably due to broken rewrite patterns. springerm added a child revision: D141945: [mlir] GreedyPatternRewriteDriver: Enqueue ancestors in MultiOpPatternRewriteDriver.Jan 17 2023, 8:41 AM springerm removed a child revision: D141934: [mlir][NFC] GreedyPatternRewriteDriver: Remove OpPatternRewriteDriver. Comment Actions
These were indeed due to broken rewrite patterns that in some cases modified IR without going through the rewriter. mehdi_amini added inline comments.
This revision is now accepted and ready to land.Jan 17 2023, 4:15 PM This revision was landed with ongoing or failed builds.Jan 18 2023, 6:15 AM Closed by commit rG11a9c05bcbbd: [mlir] GreedyPatternRewriteDriver: Fix termination criteria in… (authored by springerm). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 490128 mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
|
Can you move this just before opErasedViaPatternRewrites? These are kind of working together.