[Common] Update CombineSourceLayoutTransform pass to fold broadcast#23511
[Common] Update CombineSourceLayoutTransform pass to fold broadcast#23511Abhishek-Varma merged 5 commits intoiree-org:mainfrom
Conversation
b78b73c to
8ee1970
Compare
|
Ping for review. |
8ee1970 to
a5e2708
Compare
I'll take a look later today. I need to catch up context from the issue. |
hanhanW
left a comment
There was a problem hiding this comment.
High-overview question:
This is done to prevent creating MapLoadOp for simple primitives
like tensor.extract_slice since it unneccesarily ends up creating an
empty tensor for MapLoad's destination -> which in turn leads to
creation of big memref.alloca ops later in the pipeline causing stack
size limit issue.
Do we really need the folding for extract_slice op? The implementation is looking for chained relayout op, should we explicitly match the case to reflect what you're saying here?
I approved the previous PR that allows extract_slice op because it is a mirror of the destionatino folding, but I wonder if we need it for source folding.
Max191
left a comment
There was a problem hiding this comment.
A couple of quick comments
a5e2708 to
6f205c9
Compare
6f205c9 to
0247e31
Compare
0247e31 to
b79312a
Compare
Max191
left a comment
There was a problem hiding this comment.
Nice! It looks good now (% some nits) aside from the testing. I think we just need a pass option to test non-complex chains and then testing will be much easier.
|
Also, please update the description to be consistent with the new changes. It is still referring to the old implementation. |
6c23c9b to
9cc29f4
Compare
Max191
left a comment
There was a problem hiding this comment.
Nice work, it LGTM now. Just make sure to address the comments about the tests before landing.
|
Also, let's wait for @hanhanW to give one more review before landing. |
hanhanW
left a comment
There was a problem hiding this comment.
Just one question for op collection and one nit for implementation.
ac7423c to
0a8a751
Compare
Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Abhishek Varma <abhvarma@amd.com>
Signed-off-by: Abhishek Varma <abhvarma@amd.com>
Signed-off-by: Abhishek Varma <abhvarma@amd.com>
Signed-off-by: Abhishek Varma <abhvarma@amd.com>
Signed-off-by: Abhishek Varma <abhvarma@amd.com>
0a8a751 to
bdc55ae
Compare
This commit makes following updates :-
test-combine-non-complex-chainsfor lit-testing each op in isolation.