-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[mlir][vector] Follow-up improvements for multi-dimensional vector.from_elements support #154664
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
[mlir][vector] Follow-up improvements for multi-dimensional vector.from_elements support #154664
Conversation
|
@llvm/pr-subscribers-mlir-spirv @llvm/pr-subscribers-mlir-vector Author: Yang Bai (yangtetris) ChangesThis PR is a follow-up to #151175 that supported lowering multi-dimensional Changes1. Add
|
3f76a9c to
9471daa
Compare
newling
left a comment
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.
LGTM. FYI we've been discussing converting these patterns to greedy patterns #146030
Co-authored-by: James Newling <[email protected]>
Thanks. Actually, I was confused when I first saw that a type converter was used there. |
dcaballe
left a comment
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.
Awesome, thanks!
banach-space
left a comment
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.
LGTM, thanks!
This PR is a follow-up to #151175 that supported lowering multi-dimensional
vector.from_elementsop to LLVM by introducing a unrolling pattern.Changes
Add
vector.shape_castbased flattening pattern forvector.from_elementsThis change introduces a new linearization pattern that uses
vector.shape_castto flatten multi-dimensionalvector.from_elementsoperations. This provides an alternative approach to the unrolling-based method introduced in #151175.Example: