-
Notifications
You must be signed in to change notification settings - Fork 246
Start preparing for TypeJointMatrixINTEL switch #1935
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
The patch adds TypeJointMatrixINTELv2 which maps to new type OpCode 6184. Under new OpCode matrix type no longer has Layout parameter. The patch also moved 'scope' to optional matrix muladd instruction. The changes are done only in the consumer part to prepare the switch and make E2E switch backward compatible by preparing consumers ahead of time. Unfortunately there is no way to add a test foe this unless it's binary test, but it seems to be a bit unsafe to add this, so the patch was tested localy. Spec change: intel/llvm#8175 Signed-off-by: Sidorov, Dmitry <[email protected]>
@asudarsa @maksimsab @jgstarIntel please take a look |
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 see in the patch description that scope is moved to optional matrix muladd instruction
.
Could you please clarify where is it done? Unfortunately, not obvious for me :(
lib/SPIRV/libSPIRV/SPIRVType.cpp
Outdated
SPIRVModule *M, SPIRVId TheId, SPIRVType *CompType, | ||
std::vector<SPIRVValue *> Args) | ||
: SPIRVType(M, FixedWC + Args.size(), internal::OpTypeJointMatrixINTEL, | ||
TheId), CompType(CompType), Args(Args) {} |
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 would suggest Args(std::move(Args))
here. Although this is a copy of previous constructor, I wouldn't copy small flaws.
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.
Thanks! We probably should also scan other places in the translator to embrace this optimization
return Args[2]; | ||
return nullptr; | ||
} | ||
SPIRVValue *getScope() const { |
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 please separate this methods by blank lines?
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.
Applied
_SPIRV_OP(JointMatrixMad, true, 6, true) | ||
_SPIRV_OP(JointMatrixSUMad, true, 6, true) | ||
_SPIRV_OP(JointMatrixUSMad, true, 6, true) | ||
_SPIRV_OP(JointMatrixUUMad, true, 6, 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.
@maksimsab move of scope parameter happens here (see the second 'true').
Note, that 'scope' according to old spec is mandatory parameter and per new spec is removed at all. So to balance it here making both representations translatable we have to add is as optional for a while.
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.
Ok.
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
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! Thank you
…onosGroup#1935) The patch adds TypeJointMatrixINTELv2 which maps to new type OpCode 6184. Under new OpCode matrix type no longer has Layout parameter. The patch also moved 'scope' to optional matrix muladd instruction. The changes are done only in the consumer part to prepare the switch and make E2E switch backward compatible by preparing consumers ahead of time. Unfortunately there is no way to add a test foe this unless it's binary test, but it seems to be a bit unsafe to add this, so the patch was tested locally. Spec change: intel/llvm#8175 Signed-off-by: Sidorov, Dmitry <[email protected]> (cherry picked from commit a6fcade)
…tch (KhronosGroup#1935)" This reverts commit e781a91.
…tch (KhronosGroup#1935)" This reverts commit e781a91.
The patch adds TypeJointMatrixINTELv2 which maps to new type OpCode
6184. Under new OpCode matrix type no longer has Layout parameter. The patch also moved 'scope' to optional matrix muladd instruction.
The changes are done only in the consumer part to prepare the switch and make E2E switch backward compatible by preparing consumers ahead of time.
Unfortunately there is no way to add a test foe this unless it's binary test, but it seems to be a bit unsafe to add this, so the patch was tested localy.
Spec change:
intel/llvm#8175