-
Notifications
You must be signed in to change notification settings - Fork 29
[AIE2P] Implemented VST.PACK combine #280
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
Conversation
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.
nit: VST.PACK
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.
Oh, this crPackSize usage is very subtle in the documentation.
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.
true
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.
This is not the only place were we have to set a control register. Can we create a function for this in AIEBaseInstructionSelector.cpp, as we did with setUnsetCtrlRegister?
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.
nit: const.
2df64ac to
cb2fa84
Compare
llvm/test/CodeGen/AIE/aie2p/GlobalIsel/inst-select-postinc-2d-vst_pack.mir
Outdated
Show resolved
Hide resolved
cb2fa84 to
81ada5d
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.
Curious: We have two packSign registers in AIE2p? I assume both are addressible, and here this is just an arbitrary choice to use packsign0 for the dynamic case?
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.
yes, we have two packSign registers in AIE2p, packSign0 and packSign1. We have the same situation for vaddSign, unpackSign, upsSign, srsSign. In all cases for the dynamic case we just use the instruction with the xxxSign0.
gbossu
left a comment
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, I couldn't spot something wrong. I have checked about half of the tests, and trust the rest are correct as well. Up to you if you want to seek another review from AIE2p core team :)
Before merging, maybe have a QoR run to check those combines are used in practice and do not introduce new failures.
117c802 to
f2e1b63
Compare
mludevid
left a comment
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.
Please go through all test files and fix the types and sizes of all vectors involved.
aie2p_pack_I512_I8_I16: the input vector should be<32 x s16>and the output one<32 x s8>aie2p_pack_I512_I4_I8: the input vector should be<64 x s8>and the output one<64 x s4>aie2p_pack_I1024_I8_I16: the input vector should be<64 x s16>and the output one<64 x s8>aie2p_pack_I1024_I4_I8: the input vector should be<128 x s8>and the output one<128 x s4>
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.
Could you update the header of this file to 2024-2025?
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.
Please update this header as well: 2023-2025
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.
This check is duplicated, we also check this in getCombinedOpcodePACK. I would prefer to just keep it in getCombinedOpcodePACK.
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.
In AIE2P the store size can be 512 bits if the source register size is 1024. I would suggest updating the assert to:
assert((MemOpLoadStoreSize == 256 && SrcRegSize == 512) || (MemOpLoadStoreSize == 512 && SrcRegSize == 1024))
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.
As mentioned in another comment the memory size can either be 256 or 512 in AIE2P.
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.
This is not the only place were we have to set a control register. Can we create a function for this in AIEBaseInstructionSelector.cpp, as we did with setUnsetCtrlRegister?
f2e1b63 to
2535058
Compare
2535058 to
a9c1fc9
Compare
[AutoBump] Merge with 17642c7 (23)
No description provided.