-
Notifications
You must be signed in to change notification settings - Fork 173
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
[examples][MLIRSparseTensor] Add example to show how sparse vectoriza… #179
Conversation
I am writing a blog post to describe how MLIR vectorizes sparse operation: https://blog.sh1mar.in/post/mlir/sparse-vectorization/. It is still WIP, but I think it can explain some of the rewrite details for this PR. |
1d244da
to
6113171
Compare
func.func @sparse_mul(%arga: tensor<1024xf32, #SparseVector>, | ||
%argb: tensor<1024xf32>, | ||
%argx: tensor<1024xf32>) -> tensor<1024xf32> { | ||
%0 = linalg.generic #trait_mul |
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.
%arga
,%argb
, %argx
should be aligned.
// Example for reduction loop vectorization | ||
func.func @sparse_reduction(%arga: tensor<1024xf32, #SparseVector>, | ||
%argb: tensor<1024xf32>, | ||
%argx: tensor<f32>) -> tensor<f32> { |
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.
Same as above
@Avimitin Please modify the format according to the comments above. |
…tion rewrite ForOp Signed-off-by: Avimitin <[email protected]>
6113171
to
b7fbe2b
Compare
Fixed and rebased. |
Thanks! |
…tion rewrite ForOp (buddy-compiler#179) Signed-off-by: Avimitin <[email protected]>
…tion rewrite ForOp