-
Notifications
You must be signed in to change notification settings - Fork 31
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
Unary broadcast lowering #995
base: main
Are you sure you want to change the base?
Conversation
630ce39
to
12cf5a1
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.
You have huge gaps in your testing. You need to make sure the tests are correct (I'm not so sure about that), that they follow the path you expect (linalg-to-vector and vector-to-xsmm), and that the output is correct.
You did some of those things for different integration tests. You need to do all of those things for all integration tests. You also need negative conversion tests (dims that don't match, reducing rank, etc), and a more comprehensive functionality testing (more patterns like 1D to 2D, 2D to 3D, 1D to 3D, etc).
It would also be interesting to have a more elaborate test, where you start adding all of the supported patterns. For now, one that has a transpose followed by a broadcast and another that is the other way round. You should match both patterns on both cases, and create two function calls on both.
#map2 = affine_map<(d0, d1, d2) -> (d2)> | ||
#map3 = affine_map<(d0, d1, d2) -> (d0, d1, d2)> | ||
|
||
func.func @columnBroadcast(%arg0: tensor<8xf32>, %arg1: tensor<2x4x8xf32>) -> tensor<2x4x8xf32> { |
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.
Is this really a 2D column broadcast?
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.
It is a column broadcast, which is what the function is called, the file should probably be renamed broadcast with 2D destination or something, can you please suggest an appropriate name for the test file?
+1 on more test coverage or rather more specific matchers As an example:
This broadcast fails at runtime xsmm JIT step. I'm sure we don't need this variant currently but it'd be best not to open ourselves to new pitfalls. |
As a side note, it could be that our current lowering from linalg is also incomplete. I don't want to feature/scope creep this PR. |
7b8b3d1
to
6b30c76
Compare
6b30c76
to
b0c23cd
Compare
No description provided.