Skip to content

Commit 830d8dd

Browse files
mbelickipszymich
authored andcommitted
Add support for new JointMatrix PackedLayout.
This change adds support for the JointMatrix packed layout from the current version of the specification. The new layout is mostly compatible with legacy layout combinations. However there is one case that needed a slight addjustment.
1 parent 97f7cb8 commit 830d8dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

IGC/Compiler/Optimizer/OpenCLPasses/JointMatrixFuncsResolutionPass.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ std::string JointMatrixFuncsResolutionPass::GetLoadStoreMatrixFuncName
139139
IGC_ASSERT_MESSAGE(false, "Unexpected matrix layout.");
140140
}
141141

142+
/* New version of the JointMatrix specification uses single value to
143+
* represent PackedA and PackedB layouts, named simply; 'Packed'. The value
144+
* of 'Paccked' is equal to the value of legacy 'PackedA'. If we meet
145+
* load/store that tries to load/store packedA data into B matrix, we can
146+
* assume that the intended layout was PackedB (load of A into B would be illegal).
147+
* This should be removed when we stop to support the legacy version of the spec. */
148+
if (matrixLayout == LayoutPackedB && operationLayout == LayoutPackedA) {
149+
operationLayout = LayoutPackedB;
150+
}
151+
142152
switch (operationLayout) {
143153
case LayoutRowMajor:
144154
name += "RowMajor_";

0 commit comments

Comments
 (0)