Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/DXIL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3218,6 +3218,7 @@ INSTR.LINALGMATRIXLAYOUTREQSTRIDE Matrix layout '%0' require
INSTR.LINALGMATRIXLOADTHREADREQUIRESBAB Loading matrix with Thread scope requires ByteAddressBuffer.
INSTR.LINALGMATRIXNOTEXACTMATCH Matrix '%0' must exactly match matrix '%1'.
INSTR.LINALGMATRIXOUTPUTBIASVECMISMATCH Output vector element type '%0' must match Bias vector element type '%1'
INSTR.LINALGMATRIXREQUIRESRWBAB %0 requires RWByteAddressBuffer.
INSTR.LINALGMATRIXSCOPEMISMATCH Matrix Scope '%0' does not match expected scope %1.
INSTR.LINALGMATRIXSCOPENOTALLOWED Matrix Scope '%0' not allowed in %1 operation.
INSTR.LINALGMATRIXSCOPEREQLAYOUT2 Matrix scope '%0' requires layout %1 or %2.
Expand Down
82 changes: 82 additions & 0 deletions lib/DxilValidation/DxilValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,88 @@ static void
ValidateLinAlgMatrixAccumulateToDescriptor(CallInst *CI,
ValidationContext &ValCtx) {
ValidateLinAlgOpParameters(CI, ValCtx);

DxilInst_LinAlgMatrixAccumulateToDescriptor Op(CI);
Type *MatTy = Op.get_matrix()->getType();

assert(dxilutil::IsHLSLLinAlgMatrixType(MatTy) && "Must be LinAlg type");
auto MatIt = ValCtx.LinAlgTargetTypeMap.find(MatTy);
if (MatIt == ValCtx.LinAlgTargetTypeMap.end())
return;
Comment thread
bob80905 marked this conversation as resolved.
LinAlgTargetType MatLATT = MatIt->second;

ConstantInt *LayoutCI = dyn_cast<ConstantInt>(Op.get_layout());
if (!LayoutCI) {
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrOpConst,
{"Layout", "LinAlgMatrixAccumulateToDescriptor"});
return;
}
auto Layout = static_cast<DXIL::MatrixLayout>(LayoutCI->getLimitedValue());
bool LayoutIsRowColMajor = (Layout == DXIL::MatrixLayout::RowMajor ||
Layout == DXIL::MatrixLayout::ColumnMajor);

// Thread Matrix must have layout OuterProductOptimal*
if (MatLATT.Scope == DXIL::MatrixScope::Thread &&
(Layout != DXIL::MatrixLayout::OuterProductOptimal &&
Layout != DXIL::MatrixLayout::OuterProductOptimalTranspose))
Comment thread
V-FEXrt marked this conversation as resolved.
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrLinAlgMatrixScopeReqLayout2,
{MatrixScopeToString(MatLATT.Scope), "OuterProductOptimal",
"OuterProductOptimalTranspose"});

// Wave/ThreadGroup matrix must have layout RowMajor/ColMajor
if (MatLATT.Scope != DXIL::MatrixScope::Thread && !LayoutIsRowColMajor)
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrLinAlgMatrixScopeReqLayout2,
{MatrixScopeToString(MatLATT.Scope), "RowMajor", "ColumnMajor"});

// Stride must be an imm 0 if layout is not Row/Col Major
if (!LayoutIsRowColMajor) {
ConstantInt *StrideCI = dyn_cast<ConstantInt>(Op.get_stride());
if (StrideCI) {
if (!StrideCI->isZero())
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrLinAlgMatrixLayoutReqStride,
{MatrixLayoutToString(Layout)});
} else
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrOpConst,
{"Stride", "LinAlgMatrixAccumulateToDescriptor"});
}

// Matrix must have Accumulator use
if (MatLATT.Use != DXIL::MatrixUse::Accumulator)
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrLinAlgMatrixUseMismatch,
{MatrixUseToString(MatLATT.Use), "Accumulator"});

// handle must be a UAV Raw buffer (RWByteAddressBuffer)
DXIL::ComponentType ResCompTy;
DXIL::ResourceClass ResClass;
DXIL::ResourceKind ResKind =
GetResourceKindAndCompTy(Op.get_handle(), ResCompTy, ResClass, ValCtx);
if (ResClass != DXIL::ResourceClass::UAV ||

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in a previous PR, is an RWByteAddressBuffer the only resource type that would avoid this error emission? I would've hoped to somehow do a direct comparison and see if the resource is an RWBAB, but this might be the only way. Just hoping it isn't too lenient of a check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like https://github.com/microsoft/DirectXShaderCompiler/blob/main/tools/clang/lib/Sema/SemaHLSL.cpp#L5283 also matches but I haven't seen/heard of ROVByteAddressBuffer before so maybe its not spellable?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay its certainly spellable! Looking at the Validator, it doesn't seem like we have a good way ATM to determine if its ROV or RWByteAddressBuffer. But since we don't have an ROV overload defined in gen_intrin_main (only RWBAB is defined) the only way to hit the ROV case is to hand construct the DXIL manually to use an ROV.

I think anyone hand constructing DXIL would know well enough that using an ROV is holding it wrong, so my temptation is to say that we just don't fix this for now but I'm open to hear your thoughts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the fact an overload doesn't exist does help the argument to leave things as they are. Given this case is unreachable unless you're really messing around, I would guess it's alright to not fix this, and maybe get back to it later if needed (i.e., an issue to find a way to uniquely express RWBAB over ROVBAB, and maybe coming back to this at a later date, as it's out of scope for now.)
What do you think?

ResKind != DXIL::ResourceKind::RawBuffer)
ValCtx.EmitInstrFormatError(CI,
ValidationRule::InstrLinAlgMatrixRequiresRWBAB,
{"LinAlgMatrixAccumulateToDescriptor"});

// Align must be an immediate constant that is a multiple of 128 greater than
// 0
ConstantInt *AlignCI = dyn_cast<ConstantInt>(Op.get_align());
if (AlignCI) {
unsigned Align = AlignCI->getLimitedValue();
if (Align == 0)
ValCtx.EmitInstrFormatError(CI, ValidationRule::InstrParamMinimumValue,
{"Align", "0", std::to_string(Align)});
if (Align % 128 != 0)
ValCtx.EmitInstrFormatError(CI, ValidationRule::InstrParamMultiple,
{"Align", "128", std::to_string(Align)});
} else
ValCtx.EmitInstrFormatError(
CI, ValidationRule::InstrOpConst,
{"Align", "LinAlgMatrixAccumulateToDescriptor"});
}

static void ValidateLinAlgMatrixAccumulateToMemory(CallInst *CI,
Expand Down
5 changes: 3 additions & 2 deletions tools/clang/lib/Headers/hlsl/dx/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,13 @@ class Matrix<ComponentTy, M, N, Use, MatrixScope::Thread> {
return Result;
}

template <MatrixUseEnum UseLocal = Use>
template <uint Align = 128, MatrixUseEnum UseLocal = Use>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chris B (@llvm-beanz) This is not in the spec atm but it seems necessary. Does that sound right to you?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Looks right to me!

typename hlsl::enable_if<Use == MatrixUse::Accumulator && UseLocal == Use,
void>::type
InterlockedAccumulate(RWByteAddressBuffer Res, uint StartOffset) {
__builtin_LinAlg_MatrixAccumulateToDescriptor(
__handle, Res, StartOffset, 0, MatrixLayout::OuterProductOptimal, 0);
__handle, Res, StartOffset, 0, MatrixLayout::OuterProductOptimal,
Align);
Comment thread
V-FEXrt marked this conversation as resolved.
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void main(uint ID : SV_GroupID)
//
// CHECK: %[[TSACCUM:.*]] = call %dx.types.LinAlgMatrixC9M4N4U2S0 @dx.op.linAlgMatrixOuterProduct.mC9M4N4U2S0.v4f32.v4f32
// CHECK: call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC9M4N4U2S0(i32 -2147483621,
// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U2S0 %[[TSACCUM]], %dx.types.Handle %{{[0-9]+}}, i32 0, i32 0, i32 4, i32 0)
// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U2S0 %[[TSACCUM]], %dx.types.Handle %{{[0-9]+}}, i32 0, i32 0, i32 4, i32 128)
// CHECK-SAME: ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
vector<float, 4> vec1 = 1.0f;
vector<float, 4> vec2 = 2.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ RWByteAddressBuffer outbuf;
void main() {
// CHECK-LABEL: define void @main()

// CHECK: call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U1S2(i32 -2147483621,
// CHECK-SAME: %dx.types.LinAlgMatrixC4M5N4U1S2 %{{.*}}, %dx.types.Handle %{{.*}}, i32 5, i32 5, i32 5, i32 4)
// CHECK: call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC9M4N4U2S0(i32 -2147483621,
// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U2S0 %{{.*}}, %dx.types.Handle %{{.*}}, i32 0, i32 0, i32 4, i32 128)
// CHECK-SAME: ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)

// CHECK2: call void @"dx.hl.op..void (i32, %dx.types.LinAlgMatrixC4M5N4U1S2, %dx.types.Handle, i32, i32, i32, i32)"
// CHECK2-SAME: (i32 415, %dx.types.LinAlgMatrixC4M5N4U1S2 %{{.*}}, %dx.types.Handle {{.*}}, i32 5, i32 5, i32 5, i32 4)
__builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(4, 5, 4, 1, 2)]] mat;
// CHECK2: call void @"dx.hl.op..void (i32, %dx.types.LinAlgMatrixC9M4N4U2S0, %dx.types.Handle, i32, i32, i32, i32)"
// CHECK2-SAME: (i32 415, %dx.types.LinAlgMatrixC9M4N4U2S0 %{{.*}}, %dx.types.Handle {{.*}}, i32 0, i32 0, i32 4, i32 128)

// Matrix<F16, 4, 4, Accumulator, Thread>
__builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(9, 4, 4, 2, 0)]] mat;
__builtin_LinAlg_FillMatrix(mat, 1);
__builtin_LinAlg_MatrixAccumulateToDescriptor(mat, outbuf, 5, 5, 5, 4);
__builtin_LinAlg_MatrixAccumulateToDescriptor(mat, outbuf, 0, 0, 4, 128);
}
13 changes: 10 additions & 3 deletions tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-as.ll
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ target triple = "dxil-ms-dx"
%dx.types.LinAlgMatrixC4M5N4U0S2 = type { i8* }
%dx.types.LinAlgMatrixC4M4N5U1S2 = type { i8* }
%dx.types.LinAlgMatrixC4M4N4U0S0 = type { i8* }
%dx.types.LinAlgMatrixC4M4N5U2S2 = type { i8* }
%dx.types.ResourceProperties = type { i32, i32 }
%struct.ByteAddressBuffer = type { i32 }
%struct.RWByteAddressBuffer = type { i32 }
Expand All @@ -64,12 +65,14 @@ define void @mainAS() {
%mC4M5N4U0S2 = call %dx.types.LinAlgMatrixC4M5N4U0S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M5N4U0S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 5, B, ThreadGroup>
%mC4M4N5U1S2 = call %dx.types.LinAlgMatrixC4M4N5U1S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U1S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 5, Accumulator, ThreadGroup>
%mC4M4N5U2S2 = call %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U2S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)

; dx.op.linAlgMatrixAccumulate
%v1 = call %dx.types.LinAlgMatrixC4M5N4U2S2 @dx.op.linAlgMatrixAccumulate.mC4M5N4U2S2.mC4M5N4U0S2.mC4M4N5U1S2(i32 -2147483624, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2, %dx.types.LinAlgMatrixC4M4N5U1S2 %mC4M4N5U1S2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)

; dx.op.linAlgMatrixAccumulateToDescriptor
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 3, i32 4) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M4N5U2S2 %mC4M4N5U2S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 0, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)

; dx.op.linAlgMatrixLength
%v2 = call i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32 -2147483632, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2) ; LinAlgMatrixLength(matrix)
Expand Down Expand Up @@ -148,7 +151,7 @@ declare %dx.types.LinAlgMatrixC4M5N4U2S2 @dx.op.linAlgMatrixAccumulate.mC4M5N4U2
declare void @dx.op.linAlgMatrixStoreToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32, %dx.types.LinAlgMatrixC4M4N5U2S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2) #0
Expand All @@ -162,6 +165,9 @@ declare %dx.types.LinAlgMatrixC4M4N5U1S2 @dx.op.linAlgMatrixLoadFromDescriptor.m
; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M4N4U0S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N4U0S0(i32, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U2S2(i32, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M5N4U0S2 @dx.op.linAlgMatrixOuterProduct.mC4M5N4U0S2.v4i32.v4i32(i32, <4 x i32>, <4 x i32>) #0

Expand Down Expand Up @@ -219,7 +225,7 @@ declare void @dx.op.dispatchMesh.struct.AmpPayload.0(i32, i32, i32, i32, %struct
attributes #0 = { nounwind }
attributes #1 = { nounwind readnone }

!dx.targetTypes = !{!0, !1, !2, !13}
!dx.targetTypes = !{!0, !1, !2, !13, !16}
!llvm.ident = !{!3}
!dx.version = !{!4}
!dx.valver = !{!4}
Expand All @@ -243,3 +249,4 @@ attributes #1 = { nounwind readnone }
!13 = !{%dx.types.LinAlgMatrixC4M4N4U0S0 undef, i32 4, i32 4, i32 4, i32 0, i32 0}
!14 = !{!15}
!15 = !{i32 0, %struct.ByteAddressBuffer* undef, !"", i32 0, i32 0, i32 1, i32 11, i32 0, null}
!16 = !{%dx.types.LinAlgMatrixC4M4N5U2S2 undef, i32 4, i32 4, i32 5, i32 2, i32 2}
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ define void @mainCS() {
%mC4M5N4U0S2 = call %dx.types.LinAlgMatrixC4M5N4U0S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M5N4U0S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 5, B, ThreadGroup>
%mC4M4N5U1S2 = call %dx.types.LinAlgMatrixC4M4N5U1S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U1S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 4, Accumulator, ThreadGroup>
; Matrix<I32, 4, 5, Accumulator, ThreadGroup>
%mC4M4N5U2S2 = call %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U2S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)

; dx.op.linAlgMatrixAccumulate
%v1 = call %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixAccumulate.mC4M4N5U2S2.mC4M4N5U2S2.mC4M4N5U1S2(i32 -2147483624, %dx.types.LinAlgMatrixC4M4N5U2S2 %mC4M4N5U2S2, %dx.types.LinAlgMatrixC4M4N5U1S2 %mC4M4N5U1S2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)

; dx.op.linAlgMatrixAccumulateToDescriptor
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 3, i32 4) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M4N5U2S2 %mC4M4N5U2S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 0, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)

; dx.op.linAlgMatrixLength
%v2 = call i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32 -2147483632, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2) ; LinAlgMatrixLength(matrix)
Expand Down Expand Up @@ -119,7 +119,7 @@ declare %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixAccumulate.mC4M4N5U2
declare void @dx.op.linAlgMatrixStoreToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32, %dx.types.LinAlgMatrixC4M4N5U2S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2) #0
Expand Down
13 changes: 10 additions & 3 deletions tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ds.ll
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ target triple = "dxil-ms-dx"
%dx.types.LinAlgMatrixC4M5N4U0S2 = type { i8* }
%dx.types.LinAlgMatrixC4M4N5U1S2 = type { i8* }
%dx.types.LinAlgMatrixC4M4N4U0S0 = type { i8* }
%dx.types.LinAlgMatrixC4M4N5U2S2 = type { i8* }
%dx.types.ResourceProperties = type { i32, i32 }
%struct.ByteAddressBuffer = type { i32 }
%struct.RWByteAddressBuffer = type { i32 }
Expand All @@ -65,12 +66,14 @@ define void @MainDS() {
%mC4M5N4U0S2 = call %dx.types.LinAlgMatrixC4M5N4U0S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M5N4U0S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 5, B, ThreadGroup>
%mC4M4N5U1S2 = call %dx.types.LinAlgMatrixC4M4N5U1S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U1S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)
; Matrix<I32, 4, 5, Accumulator, ThreadGroup>
%mC4M4N5U2S2 = call %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U2S2(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128)

; dx.op.linAlgMatrixAccumulate
%v1 = call %dx.types.LinAlgMatrixC4M5N4U2S2 @dx.op.linAlgMatrixAccumulate.mC4M5N4U2S2.mC4M5N4U0S2.mC4M4N5U1S2(i32 -2147483624, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2, %dx.types.LinAlgMatrixC4M4N5U1S2 %mC4M4N5U1S2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)

; dx.op.linAlgMatrixAccumulateToDescriptor
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 3, i32 4) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32 -2147483621, %dx.types.LinAlgMatrixC4M4N5U2S2 %mC4M4N5U2S2, %dx.types.Handle %rwbab, i32 1, i32 2, i32 0, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)

; dx.op.linAlgMatrixLength
%v2 = call i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32 -2147483632, %dx.types.LinAlgMatrixC4M5N4U0S2 %mC4M5N4U0S2) ; LinAlgMatrixLength(matrix)
Expand Down Expand Up @@ -154,7 +157,7 @@ declare %dx.types.LinAlgMatrixC4M5N4U2S2 @dx.op.linAlgMatrixAccumulate.mC4M5N4U2
declare void @dx.op.linAlgMatrixStoreToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2, %dx.types.Handle, i32, i32, i32, i32) #0
declare void @dx.op.linAlgMatrixAccumulateToDescriptor.mC4M4N5U2S2(i32, %dx.types.LinAlgMatrixC4M4N5U2S2, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare i32 @dx.op.linAlgMatrixLength.mC4M5N4U0S2(i32, %dx.types.LinAlgMatrixC4M5N4U0S2) #0
Expand All @@ -168,6 +171,9 @@ declare %dx.types.LinAlgMatrixC4M4N5U1S2 @dx.op.linAlgMatrixLoadFromDescriptor.m
; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M4N4U0S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N4U0S0(i32, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M4N5U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC4M4N5U2S2(i32, %dx.types.Handle, i32, i32, i32, i32) #0

; Function Attrs: nounwind
declare %dx.types.LinAlgMatrixC4M5N4U0S2 @dx.op.linAlgMatrixOuterProduct.mC4M5N4U0S2.v4i32.v4i32(i32, <4 x i32>, <4 x i32>) #0

Expand Down Expand Up @@ -228,7 +234,7 @@ declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
attributes #0 = { nounwind }
attributes #1 = { nounwind readnone }

!dx.targetTypes = !{!0, !1, !2, !18}
!dx.targetTypes = !{!0, !1, !2, !18, !21}
!llvm.ident = !{!3}
!dx.version = !{!4}
!dx.valver = !{!4}
Expand Down Expand Up @@ -258,3 +264,4 @@ attributes #1 = { nounwind readnone }
!18 = !{%dx.types.LinAlgMatrixC4M4N4U0S0 undef, i32 4, i32 4, i32 4, i32 0, i32 0}
!19 = !{!20}
!20 = !{i32 0, %struct.ByteAddressBuffer* undef, !"", i32 0, i32 0, i32 1, i32 11, i32 0, null}
!21 = !{%dx.types.LinAlgMatrixC4M4N5U2S2 undef, i32 4, i32 4, i32 5, i32 2, i32 2}
Loading
Loading