-
Notifications
You must be signed in to change notification settings - Fork 246
[Backport to 16] Add multiple missing Cooperative Matrix commits #3184
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
base: llvm_release_160
Are you sure you want to change the base?
Changes from all commits
dea14c5
7a457b6
b6061e3
1d8c9b1
40cceec
08a6af3
e781a91
16c0d72
5c09881
4d98fa9
9d8262d
8a3917e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -472,15 +472,26 @@ Type *SPIRVToLLVM::transType(SPIRVType *T, bool UseTPT) { | |
| auto *MT = static_cast<SPIRVTypeJointMatrixINTEL *>(T); | ||
| auto R = static_cast<SPIRVConstant *>(MT->getRows())->getZExtIntValue(); | ||
| auto C = static_cast<SPIRVConstant *>(MT->getColumns())->getZExtIntValue(); | ||
| auto L = static_cast<SPIRVConstant *>(MT->getLayout())->getZExtIntValue(); | ||
| auto S = static_cast<SPIRVConstant *>(MT->getScope())->getZExtIntValue(); | ||
| SmallVector<unsigned, 5> Params = {(unsigned)R, (unsigned)C, (unsigned)L, | ||
| (unsigned)S}; | ||
| std::vector<unsigned> Params = {(unsigned)R, (unsigned)C}; | ||
| if (auto *Layout = MT->getLayout()) | ||
| Params.push_back(static_cast<SPIRVConstant *>(Layout)->getZExtIntValue()); | ||
| Params.push_back( | ||
| static_cast<SPIRVConstant *>(MT->getScope())->getZExtIntValue()); | ||
| if (auto *Use = MT->getUse()) | ||
| Params.push_back(static_cast<SPIRVConstant *>(Use)->getZExtIntValue()); | ||
| return mapType(T, getSPIRVType(internal::OpTypeJointMatrixINTEL, | ||
| transTypeToOCLTypeName(MT->getCompType()), | ||
| Params, !UseTPT)); | ||
| auto *CTI = MT->getComponentTypeInterpretation(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This patch contradicts current SPV_INTEL_joint_matrix specification, where type interpretation is a part of MulAdd. Note, IGC also expects type interpretation be a part of MulAdd and not a part of the type. Feel free to IM me to discuss this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mateuszchudyk please follow up with @vmaksimo about this comment (I'm OOO for the next 2 weeks), she will point out on spec changes and IGC patch, that adds type interpretation support. |
||
| if (!CTI) | ||
| return mapType( | ||
| T, llvm::TargetExtType::get(*Context, "spirv.JointMatrixINTEL", | ||
| transType(MT->getCompType()), Params)); | ||
| const unsigned CTIValue = | ||
| static_cast<SPIRVConstant *>(CTI)->getZExtIntValue(); | ||
| assert(CTIValue <= internal::InternalJointMatrixCTI::PackedInt4 && | ||
| "Unknown matrix component type interpretation"); | ||
| Params.push_back(CTIValue); | ||
| return mapType( | ||
| T, llvm::TargetExtType::get(*Context, "spirv.JointMatrixINTEL", | ||
| transType(MT->getCompType()), Params)); | ||
| } | ||
| case OpTypeCooperativeMatrixKHR: { | ||
| auto *MT = static_cast<SPIRVTypeCooperativeMatrixKHR *>(T); | ||
|
|
||
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.
@sarnex @vmustya please correct me if I'm wrong - this is being deprecated, right?
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.
@sarnex @vmustya any updates on this?
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.
Sorry, yes as far as I know it's being deprecated but @vmustya should confirm.
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.
AFAIK, the
BufferSurfaceINTELstateful raw buffers are still used for some workloads.