-
Notifications
You must be signed in to change notification settings - Fork 86
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
[aievec] Add lowering for vector.extract_strided_slice #491
Conversation
e90d5ac
to
9e5589b
Compare
9e5589b
to
e85f4ee
Compare
422b500
to
6fe20bc
Compare
b32514f
to
0179d9b
Compare
ed13e90
to
371021f
Compare
0a9563a
to
b9ec2c0
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.
Hi @jsetoain:
This looks very good. I would like @linay-xsj to go through the changes in lib/Dialect/AIEVec/Transforms/FoldMulAddChainToConvOp.cpp and
lib/Dialect/AIEVec/Transforms/FoldMulAddChainToConvOp.cpp
in detail. Thanks!
printf("%d]\n", buff[nlanes - 1]); | ||
} | ||
|
||
void printv16xi32(v16int32 v) { printv<16, int32_t>(v); } |
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.
The aie_api.h already has a bunch of nice utilities to print vectors, for example, to print a v16int32, I could call:
aie::print(aie::vector<uint32_t,16>(myV16int32),true, "myV16int32: ");
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.
I had forgotten about these. I've switched to aie api to print vectors, and I've also added missing checks for unaligned loads in aieml.
57f18a1
to
77fcf18
Compare
This is part of the canonical lowering of unaligned transfer read ops. For now we only support extracting a contiguous vector of half the size of the source vector.
77fcf18
to
0a5d164
Compare
I think it's best if we do that after landing the patch. It's a bit messy, and it risks becoming even more of a liability. I've already got a couple more patching that will help with clean-up. |
This patch adds the lowering for
vector.extract_strided_slice
as a canonical solution to unaligned loads. This process breaks convolution detection and optimization for AIE-ML, and this patch addresses those as well.