-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flow] Add pattern to canonicalize consecutive pads #17878
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: do we move the pattern to GlobalOpt?
compiler/src/iree/compiler/Dialect/Flow/Transforms/Canonicalizer.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Dialect/Flow/Transforms/Canonicalizer.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Dialect/Flow/Transforms/test/flow_canonicalize.mlir
Show resolved
Hide resolved
Currently GlobalOpt and Flow are sharing the same "CanonicalizeExt" pass, so this is the place that makes the most sense (other than upstream, this pattern should probably go upstream). To move it to GlobalOpt would require making a GlobalOpt specific canonicalization pass, and this pattern fits well in both places. |
Would this canonicalization pass be used in the planned dispatch partitioning/preprocessing "phase" #18099? |
I would assume so, yes. Flow could potentially just use a default canonicalization pass after that split also. |
compiler/src/iree/compiler/Dialect/Flow/Transforms/test/flow_canonicalize.mlir
Outdated
Show resolved
Hide resolved
This allows fusing `pad(pad)` into a single pad with the same padding value. This is added here due to the inclusion of the Affine dialect and upstream tensor not depending on Affine.
This allows fusing
pad(pad)
into a single pad with the same paddingvalue. This is added here due to the inclusion of the Affine dialect and
upstream tensor not depending on Affine.