Skip to content
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

[DispatchCreation] Run preprocessing before elementwise fusion #18920

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/src/iree/compiler/DispatchCreation/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void addDispatchRegionCreationPreprocessingPasses(OpPassManager &passManager) {
// 1. Do some simple elementwise op fusion. This could be skipped,
// but could reduce the surface area of ops to handle later.
FunctionLikeNest(passManager)
.addPass(DispatchCreation::createFusionPreprocessingPass)
.addPass([]() {
return DispatchCreation::createElementwiseOpFusionPass(
ElementwiseOpFusionPassOptions{
Expand All @@ -148,6 +149,7 @@ void addDispatchRegionCreationPreprocessingPasses(OpPassManager &passManager) {

// 3. Perform elementwise operation fusion again (now with higher
// dimensionality).
.addPass(DispatchCreation::createFusionPreprocessingPass)
.addPass([]() {
return DispatchCreation::createElementwiseOpFusionPass(
ElementwiseOpFusionPassOptions{
Expand Down
Loading