You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
It doesn't look like there is a way to apply a specific rewrite pattern in isolation, i.e., without triggering folding and dead code elimination everywhere in the op (its regions), which would include processing ops that don't match and have nothing to do with the specified pattern rewrites. Would it be meaningful to have a flag on applyPatternsGreedily or another version of it that instead will not perform any unrelated folding and dead code elimination? (It can of course remove any ops that become dead as a result of the specified pattern rewrites). The issue here is really the logic of GreedyPatternRewriteDriver::simplify(...).
Having such a version is necessary to easily write test cases for specific patterns, and to be more efficient with the rewriting (not rewrite large parts of the IR unrelated to the pattern rewrites that have been supplied to the driver) -- this is especially the case when called on the function ops (most common) or ops with regions.
The text was updated successfully, but these errors were encountered:
If you have a use-case for it, what about adding a flag/option on the GreedyPatternRewriteDriver to not fold?
We actually want it to fold (and eliminate dead ops), but only in conjunction with the matched patterns. The issue is that it adds all ops (under the supplied op) to the worklist irrespective of whether they'll be matched.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It doesn't look like there is a way to apply a specific rewrite pattern in isolation, i.e., without triggering folding and dead code elimination everywhere in the op (its regions), which would include processing ops that don't match and have nothing to do with the specified pattern rewrites. Would it be meaningful to have a flag on applyPatternsGreedily or another version of it that instead will not perform any unrelated folding and dead code elimination? (It can of course remove any ops that become dead as a result of the specified pattern rewrites). The issue here is really the logic of GreedyPatternRewriteDriver::simplify(...).
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Line 149 in 51a9eb0
Having such a version is necessary to easily write test cases for specific patterns, and to be more efficient with the rewriting (not rewrite large parts of the IR unrelated to the pattern rewrites that have been supplied to the driver) -- this is especially the case when called on the function ops (most common) or ops with regions.
The text was updated successfully, but these errors were encountered: