-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[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
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 <james.newling@gmail.com>
Thanks. Actually, I was confused when I first saw that a type converter was used there. |
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!
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_elements
op to LLVM by introducing a unrolling pattern.Changes
Add
vector.shape_cast
based flattening pattern forvector.from_elements
This change introduces a new linearization pattern that uses
vector.shape_cast
to flatten multi-dimensionalvector.from_elements
operations. This provides an alternative approach to the unrolling-based method introduced in #151175.Example: