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

[aievec] Make transpose lowering more progressive #1574

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsetoain
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@jamestcl-amd jamestcl-amd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

return failure();

rewriter.replaceOpWithNewOp<aievec::ShuffleOp>(
transpOp, resVecTy, adaptor.getMatrix(), nullptr, shuffleMode);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operand name is matrix, interesting.

@@ -2880,6 +2880,67 @@ struct LowerVectorTransposeOpToAIEVecShuffleOpPattern
}
};

// Convert a `vector.flat_transpose` op to an `aievec.shuffle` op for AIEml.
struct LowerVectorFlatTransposeOpToAIEVecShuffleOpPattern
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove the old pattern LowerVectorTransposeOpToAIEVecShuffleOpPattern in the future, to reduce the maintenance cost.

@@ -562,6 +562,54 @@ struct ExtractTransposeFromContractionOp
}
};

// This pattern flattens a `vector.transpose` operation for shapes that can be
// handled by basic AIE shuffle ops.
struct FlattenVectorTransposeOpPattern
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a separate lit test for this pattern? Thanks!

@jsetoain jsetoain force-pushed the lower-transpose-through-flat-transpose branch from 993340c to 7aecaa5 Compare August 2, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants