Skip to content

Commit ecb18fb

Browse files
authored
[SM6.10] LinAlg Bugfix: Allow any int in gsmem (#9079)
Fixes: #9071 Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
1 parent 0d6c746 commit ecb18fb

10 files changed

Lines changed: 172 additions & 79 deletions

File tree

‎docs/DXIL.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3249,7 +3249,7 @@ INSTR.LINALGMATRIX2PARTSMUSTMATCH %0 matrix %1 '%2' must mat
32493249
INSTR.LINALGMATRIXBYTEWISEMUSTBEMULTIPLE Parameter '%0' in bytes must be a multiple of %1, got %2 (%3 elements * %4 bytes per element).
32503250
INSTR.LINALGMATRIXDIMKVECKMISMATCH %0 vector size '%1' must be %2 for input matrix with K '%3' and Type '%4'
32513251
INSTR.LINALGMATRIXDIMVECTORMISMATCH %0 vector size '%1' must match input matrix M dimension '%2'
3252-
INSTR.LINALGMATRIXGSMEMMUSTBELARGEENOUGH Groupshared memory holds '%0' scalars but must hold at least '%1' scalars.
3252+
INSTR.LINALGMATRIXGSMEMMUSTBELARGEENOUGH Groupshared memory holds '%0' %1 but must hold at least '%2' %3.
32533253
INSTR.LINALGMATRIXGSMEMTYPEMUSTMATCH Groupshared memory inner type '%0' must match %1 type '%2'.
32543254
INSTR.LINALGMATRIXLAYOUTREQSTRIDE %0 with layout '%1' requires stride 0.
32553255
INSTR.LINALGMATRIXLOADTHREADREQUIRESBAB Loading matrix with Thread scope requires ByteAddressBuffer.

‎lib/DxilValidation/DxilValidation.cpp‎

Lines changed: 34 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,35 @@ static void ValidateLinAlgMatrixStoreToDescriptor(CallInst *CI,
12531253
}
12541254
}
12551255

1256+
static void ValidateLinAlgMatrixMemory(CallInst *CI, Value *Memory,
1257+
const LinAlgTargetType &Mat,
1258+
const char *MatrixName,
1259+
ValidationContext &ValCtx) {
1260+
GEPOperator *GSGEP = cast<GEPOperator>(Memory);
1261+
GlobalVariable *GSMem = cast<GlobalVariable>(GSGEP->getPointerOperand());
1262+
Type *GSMemTy = GSMem->getType()->getPointerElementType();
1263+
uint64_t GSByteCount = ValCtx.DL.getTypeAllocSize(GSMemTy);
1264+
Type *GSMemInnerTy = GSMemTy;
1265+
if (ArrayType *GSMemArrTy = dyn_cast<ArrayType>(GSMemInnerTy))
1266+
GSMemInnerTy = GSMemArrTy->getArrayElementType();
1267+
GSMemInnerTy = GSMemInnerTy->getScalarType();
1268+
1269+
if (!GSMemInnerTy->isIntegerTy() &&
1270+
!IsComponentTypeSameNativeType(Mat.Type, GSMemInnerTy))
1271+
ValCtx.EmitInstrFormatError(
1272+
CI, ValidationRule::InstrLinAlgMatrixGSMemTypeMustMatch,
1273+
{TypeToString(GSMemInnerTy), MatrixName,
1274+
ComponentTypeToString(Mat.Type)});
1275+
1276+
uint64_t MinimumByteCount =
1277+
uint64_t(Mat.M) * Mat.N * ComponentTypeByteCount(Mat.Type);
1278+
if (MinimumByteCount > GSByteCount)
1279+
ValCtx.EmitInstrFormatError(
1280+
CI, ValidationRule::InstrLinAlgMatrixGSMemMustBeLargeEnough,
1281+
{std::to_string(GSByteCount), "bytes", std::to_string(MinimumByteCount),
1282+
"bytes"});
1283+
}
1284+
12561285
static void ValidateLinAlgMatrixStoreToMemory(CallInst *CI,
12571286
ValidationContext &ValCtx) {
12581287
ValidateLinAlgOpParameters(CI, ValCtx);
@@ -1269,37 +1298,7 @@ static void ValidateLinAlgMatrixStoreToMemory(CallInst *CI,
12691298
CI, ValidationRule::InstrLinAlgMatrixScopeMismatch2,
12701299
{"Input", MatrixScopeToString(Mat->Scope), "Wave", "ThreadGroup"});
12711300

1272-
GEPOperator *GSGEP = cast<GEPOperator>(Op.get_memory());
1273-
GlobalVariable *GSMem = cast<GlobalVariable>(GSGEP->getPointerOperand());
1274-
Type *GSMemInnerTy = GSMem->getType();
1275-
unsigned GSScalarCount = 1;
1276-
if (PointerType *GSMemPtrTy = dyn_cast<PointerType>(GSMemInnerTy))
1277-
GSMemInnerTy = GSMemPtrTy->getPointerElementType();
1278-
if (ArrayType *GSMemArrTy = dyn_cast<ArrayType>(GSMemInnerTy)) {
1279-
GSMemInnerTy = GSMemArrTy->getArrayElementType();
1280-
GSScalarCount *= GSMemArrTy->getNumElements();
1281-
}
1282-
if (VectorType *GSMemVecTy = dyn_cast<VectorType>(GSMemInnerTy)) {
1283-
GSMemInnerTy = GSMemVecTy->getVectorElementType();
1284-
GSScalarCount *= GSMemVecTy->getNumElements();
1285-
}
1286-
1287-
// if gs memory inner type != i32 then matrix elem type must match it
1288-
if (!GSMemInnerTy->isIntegerTy(32) &&
1289-
!IsComponentTypeSameNativeType(Mat->Type, GSMemInnerTy))
1290-
ValCtx.EmitInstrFormatError(
1291-
CI, ValidationRule::InstrLinAlgMatrixGSMemTypeMustMatch,
1292-
{TypeToString(GSMemInnerTy), "input matrix",
1293-
ComponentTypeToString(Mat->Type)});
1294-
1295-
// gs memory must be large enough for the write
1296-
unsigned ElementsPerScalar = ComponentTypeElementsPerScalar(Mat->Type);
1297-
unsigned ExpectedScalarCount =
1298-
(Mat->N + ElementsPerScalar - 1) / ElementsPerScalar * Mat->M;
1299-
if (ExpectedScalarCount > GSScalarCount)
1300-
ValCtx.EmitInstrFormatError(
1301-
CI, ValidationRule::InstrLinAlgMatrixGSMemMustBeLargeEnough,
1302-
{std::to_string(GSScalarCount), std::to_string(ExpectedScalarCount)});
1301+
ValidateLinAlgMatrixMemory(CI, Op.get_memory(), *Mat, "input matrix", ValCtx);
13031302

13041303
// gs memory ops have the parameter in element count so it must be scaled
13051304
uint64_t ByteCount = ComponentTypeByteCount(Mat->Type);
@@ -1563,7 +1562,8 @@ static void ValidateLinAlgMatrixAccumulateToMemory(CallInst *CI,
15631562
if (ExpectedScalarCount > GSScalarCount)
15641563
ValCtx.EmitInstrFormatError(
15651564
CI, ValidationRule::InstrLinAlgMatrixGSMemMustBeLargeEnough,
1566-
{std::to_string(GSScalarCount), std::to_string(ExpectedScalarCount)});
1565+
{std::to_string(GSScalarCount), "scalars",
1566+
std::to_string(ExpectedScalarCount), "scalars"});
15671567

15681568
// gs memory ops have the parameter in element count so it must be scaled
15691569
uint64_t ByteCount = ComponentTypeByteCount(Mat->Type);
@@ -1742,37 +1742,8 @@ static void ValidateLinAlgMatrixLoadFromMemory(CallInst *CI,
17421742
CI, ValidationRule::InstrLinAlgMatrixScopeMismatch2,
17431743
{"Return", MatrixScopeToString(RetMat->Scope), "Wave", "ThreadGroup"});
17441744

1745-
GEPOperator *GSGEP = cast<GEPOperator>(Op.get_memory());
1746-
GlobalVariable *GSMem = cast<GlobalVariable>(GSGEP->getPointerOperand());
1747-
Type *GSMemInnerTy = GSMem->getType();
1748-
unsigned GSScalarCount = 1;
1749-
if (PointerType *GSMemPtrTy = dyn_cast<PointerType>(GSMemInnerTy))
1750-
GSMemInnerTy = GSMemPtrTy->getPointerElementType();
1751-
if (ArrayType *GSMemArrTy = dyn_cast<ArrayType>(GSMemInnerTy)) {
1752-
GSMemInnerTy = GSMemArrTy->getArrayElementType();
1753-
GSScalarCount *= GSMemArrTy->getNumElements();
1754-
}
1755-
if (VectorType *GSMemVecTy = dyn_cast<VectorType>(GSMemInnerTy)) {
1756-
GSMemInnerTy = GSMemVecTy->getVectorElementType();
1757-
GSScalarCount *= GSMemVecTy->getNumElements();
1758-
}
1759-
1760-
// if gs memory inner type != i32 then matrix elem type must match it
1761-
if (!GSMemInnerTy->isIntegerTy(32) &&
1762-
!IsComponentTypeSameNativeType(RetMat->Type, GSMemInnerTy))
1763-
ValCtx.EmitInstrFormatError(
1764-
CI, ValidationRule::InstrLinAlgMatrixGSMemTypeMustMatch,
1765-
{TypeToString(GSMemInnerTy), "return matrix",
1766-
ComponentTypeToString(RetMat->Type)});
1767-
1768-
// gs memory must be large enough for the read
1769-
unsigned ElementsPerScalar = ComponentTypeElementsPerScalar(RetMat->Type);
1770-
unsigned ExpectedScalarCount =
1771-
(RetMat->N + ElementsPerScalar - 1) / ElementsPerScalar * RetMat->M;
1772-
if (ExpectedScalarCount > GSScalarCount)
1773-
ValCtx.EmitInstrFormatError(
1774-
CI, ValidationRule::InstrLinAlgMatrixGSMemMustBeLargeEnough,
1775-
{std::to_string(GSScalarCount), std::to_string(ExpectedScalarCount)});
1745+
ValidateLinAlgMatrixMemory(CI, Op.get_memory(), *RetMat, "return matrix",
1746+
ValCtx);
17761747

17771748
// gs memory ops have the parameter in element count so it must be scaled
17781749
uint64_t ByteCount = ComponentTypeByteCount(RetMat->Type);

‎tools/clang/lib/Headers/hlsl/dx/linalg.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ class Matrix {
338338
[[nodiscard]] static typename hlsl::enable_if<
339339
(hlsl::is_same<typename hlsl::strip_vector_type<Ty>::type,
340340
ElementType>::value ||
341-
hlsl::is_same<typename hlsl::strip_vector_type<Ty>::type,
342-
uint8_t4_packed>::value),
341+
hlsl::is_integral_or_packed_integral<
342+
typename hlsl::strip_vector_type<Ty>::type>::value),
343343
Matrix>::type
344344
Load(groupshared Ty Arr[Size], uint StartIdx, uint Stride,
345345
MatrixLayoutEnum Layout) {
@@ -386,8 +386,8 @@ class Matrix {
386386
typename hlsl::enable_if<
387387
(hlsl::is_same<typename hlsl::strip_vector_type<Ty>::type,
388388
ElementType>::value ||
389-
hlsl::is_same<typename hlsl::strip_vector_type<Ty>::type,
390-
uint8_t4_packed>::value),
389+
hlsl::is_integral_or_packed_integral<
390+
typename hlsl::strip_vector_type<Ty>::type>::value),
391391
void>::type
392392
Store(groupshared Ty Arr[Size], uint StartIdx, uint Stride,
393393
MatrixLayoutEnum Layout) {

‎tools/clang/lib/Headers/hlsl/type_traits‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,45 @@ __ARITHMETIC_TYPE(double)
4949

5050
#undef __ARITHMETIC_TYPE
5151

52+
template <typename T> struct is_integral {
53+
static const bool value = false;
54+
};
55+
56+
#define __INTEGRAL_TYPE(type) \
57+
template <> struct is_integral<type> { \
58+
static const bool value = true; \
59+
};
60+
61+
#if __HLSL_ENABLE_16_BIT
62+
__INTEGRAL_TYPE(uint16_t)
63+
__INTEGRAL_TYPE(int16_t)
64+
#endif
65+
__INTEGRAL_TYPE(uint)
66+
__INTEGRAL_TYPE(int)
67+
__INTEGRAL_TYPE(uint64_t)
68+
__INTEGRAL_TYPE(int64_t)
69+
70+
#undef __INTEGRAL_TYPE
71+
72+
template <typename T> struct is_packed_integral {
73+
static const bool value = false;
74+
};
75+
76+
#if __hlsl_dx_compiler
77+
template <> struct is_packed_integral<uint8_t4_packed> {
78+
static const bool value = true;
79+
};
80+
81+
template <> struct is_packed_integral<int8_t4_packed> {
82+
static const bool value = true;
83+
};
84+
#endif
85+
86+
template <typename T> struct is_integral_or_packed_integral {
87+
static const bool value =
88+
is_integral<T>::value || is_packed_integral<T>::value;
89+
};
90+
5291
template <typename T> struct is_signed {
5392
static const bool value = true;
5493
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// REQUIRES: dxil-1-10
2+
// RUN: %dxc -T cs_6_10 -enable-16bit-types -D STORAGE=uint16_t -D COUNT=32 %s | FileCheck %s -DTYPE=i16 -DOVERLOAD=i16
3+
// RUN: %dxc -T cs_6_10 -D STORAGE=uint64_t -D COUNT=8 %s | FileCheck %s -DTYPE=i64 -DOVERLOAD=i64
4+
// RUN: %dxc -T cs_6_10 -D STORAGE=int8_t4_packed -D COUNT=16 %s | FileCheck %s -DTYPE=i32 -DOVERLOAD=i32
5+
// RUN: %dxc -T cs_6_10 -enable-16bit-types -D STORAGE=uint16_t2 -D COUNT=16 %s | FileCheck %s -DTYPE="<2 x i16>" -DOVERLOAD=v2i16
6+
// RUN: %dxc -T cs_6_10 -enable-16bit-types -D STORAGE=uint16_t -D COUNT=192 -D COMPONENT=ComponentType::F32 -D OFFSET=4 -D STRIDE=12 %s | FileCheck %s --check-prefix=FLOAT
7+
// RUN: not %dxc -T cs_6_10 -enable-16bit-types -D STORAGE=uint16_t -D COUNT=16 %s 2>&1 | FileCheck %s --check-prefix=SMALL -DBYTES=32 -DREQUIRED=64
8+
9+
// SMALL: error: Groupshared memory holds '[[BYTES]]' bytes but must hold at least '[[REQUIRED]]' bytes.
10+
// SMALL: error: Groupshared memory holds '[[BYTES]]' bytes but must hold at least '[[REQUIRED]]' bytes.
11+
12+
#include <dx/linalg.h>
13+
using namespace dx::linalg;
14+
15+
#ifndef COMPONENT
16+
#define COMPONENT ComponentType::U8
17+
#endif
18+
#ifndef OFFSET
19+
#define OFFSET 0
20+
#endif
21+
#ifndef STRIDE
22+
#define STRIDE 8
23+
#endif
24+
25+
using Mat = Matrix<COMPONENT, 8, 8, MatrixUse::A, MatrixScope::Wave>;
26+
groupshared STORAGE Data[COUNT];
27+
28+
[numthreads(64, 1, 1)]
29+
void main() {
30+
// CHECK: %[[MAT:.*]] = call %dx.types.LinAlgMatrixC20M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC20M8N8U0S1.[[OVERLOAD]](i32 326, [[TYPE]] addrspace(3)*
31+
// CHECK-SAME: i32 0, i32 8, i32 0)
32+
// FLOAT: %[[MAT:.*]] = call %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.i16(i32 326, i16 addrspace(3)*
33+
// FLOAT-SAME: i32 4, i32 12, i32 0)
34+
Mat M = Mat::Load(Data, OFFSET, STRIDE, MatrixLayout::RowMajor);
35+
// CHECK: call void @dx.op.linAlgMatrixStoreToMemory.mC20M8N8U0S1.[[OVERLOAD]](i32 332, %dx.types.LinAlgMatrixC20M8N8U0S1 %[[MAT]], [[TYPE]] addrspace(3)*
36+
// CHECK-SAME: i32 0, i32 8, i32 0)
37+
// FLOAT: call void @dx.op.linAlgMatrixStoreToMemory.mC9M8N8U0S1.i16(i32 332, %dx.types.LinAlgMatrixC9M8N8U0S1 %[[MAT]], i16 addrspace(3)*
38+
// FLOAT-SAME: i32 4, i32 12, i32 0)
39+
M.Store(Data, OFFSET, STRIDE, MatrixLayout::RowMajor);
40+
}

‎tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-groupshared-vector-memory.ll‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@
66

77
; CHECK: Validation succeeded.
88

9-
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
9+
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
1010
target triple = "dxil-ms-dx"
1111

1212
%dx.types.LinAlgMatrixC9M4N4U1S1 = type { i8* }
1313
%dx.types.LinAlgMatrixC9M4N4U2S1 = type { i8* }
1414

1515
@"\01?SharedVecArr@@3PAV?$vector@M$03@@A" = external addrspace(3) global [64 x <4 x float>], align 4
16+
@SharedI16 = external addrspace(3) global [32 x i16], align 4
17+
@SharedI64Vec = external addrspace(3) global [4 x <2 x i64>], align 8
1618

1719
define void @main() {
1820
%1 = call %dx.types.LinAlgMatrixC9M4N4U1S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U1S1.v4f32(i32 326, <4 x float> addrspace(3)* getelementptr inbounds ([64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 0, i32 16, i32 1) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
1921
call void @dx.op.linAlgMatrixStoreToMemory.mC9M4N4U1S1.v4f32(i32 332, %dx.types.LinAlgMatrixC9M4N4U1S1 %1, <4 x float> addrspace(3)* getelementptr inbounds ([64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 0, i32 16, i32 1) ; LinAlgMatrixStoreToMemory(matrix,memory,offset,stride,layout)
2022
%2 = call %dx.types.LinAlgMatrixC9M4N4U2S1 @dx.op.linAlgFillMatrix.mC9M4N4U2S1.i32(i32 323, i1 true, i32 0) ; LinAlgFillMatrix(isInputSigned,value)
2123
call void @dx.op.linAlgMatrixAccumulateToMemory.mC9M4N4U2S1.v4f32(i32 339, %dx.types.LinAlgMatrixC9M4N4U2S1 %2, <4 x float> addrspace(3)* getelementptr inbounds ([64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 0, i32 16, i32 1) ; LinAlgMatrixAccumulateToMemory(matrix,memory,offset,stride,layout)
24+
; Integer storage is unconverted, and each array holds exactly 64 bytes.
25+
%3 = call %dx.types.LinAlgMatrixC9M4N4U1S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U1S1.i16(i32 326, i16 addrspace(3)* getelementptr inbounds ([32 x i16], [32 x i16] addrspace(3)* @SharedI16, i32 0, i32 0), i32 0, i32 4, i32 0)
26+
call void @dx.op.linAlgMatrixStoreToMemory.mC9M4N4U1S1.i16(i32 332, %dx.types.LinAlgMatrixC9M4N4U1S1 %3, i16 addrspace(3)* getelementptr inbounds ([32 x i16], [32 x i16] addrspace(3)* @SharedI16, i32 0, i32 0), i32 0, i32 4, i32 0)
27+
%4 = call %dx.types.LinAlgMatrixC9M4N4U1S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U1S1.v2i64(i32 326, <2 x i64> addrspace(3)* getelementptr inbounds ([4 x <2 x i64>], [4 x <2 x i64>] addrspace(3)* @SharedI64Vec, i32 0, i32 0), i32 0, i32 4, i32 1)
28+
call void @dx.op.linAlgMatrixStoreToMemory.mC9M4N4U1S1.v2i64(i32 332, %dx.types.LinAlgMatrixC9M4N4U1S1 %4, <2 x i64> addrspace(3)* getelementptr inbounds ([4 x <2 x i64>], [4 x <2 x i64>] addrspace(3)* @SharedI64Vec, i32 0, i32 0), i32 0, i32 4, i32 1)
2229
ret void
2330
}
2431

@@ -34,6 +41,11 @@ declare %dx.types.LinAlgMatrixC9M4N4U2S1 @dx.op.linAlgFillMatrix.mC9M4N4U2S1.i32
3441
; Function Attrs: nounwind
3542
declare void @dx.op.linAlgMatrixAccumulateToMemory.mC9M4N4U2S1.v4f32(i32, %dx.types.LinAlgMatrixC9M4N4U2S1, <4 x float> addrspace(3)*, i32, i32, i32) #0
3643

44+
declare %dx.types.LinAlgMatrixC9M4N4U1S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U1S1.i16(i32, i16 addrspace(3)*, i32, i32, i32) #0
45+
declare void @dx.op.linAlgMatrixStoreToMemory.mC9M4N4U1S1.i16(i32, %dx.types.LinAlgMatrixC9M4N4U1S1, i16 addrspace(3)*, i32, i32, i32) #0
46+
declare %dx.types.LinAlgMatrixC9M4N4U1S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U1S1.v2i64(i32, <2 x i64> addrspace(3)*, i32, i32, i32) #0
47+
declare void @dx.op.linAlgMatrixStoreToMemory.mC9M4N4U1S1.v2i64(i32, %dx.types.LinAlgMatrixC9M4N4U1S1, <2 x i64> addrspace(3)*, i32, i32, i32) #0
48+
3749
attributes #0 = { nounwind }
3850

3951
!dx.targetTypes = !{!0, !1}
@@ -49,5 +61,5 @@ attributes #0 = { nounwind }
4961
!3 = !{i32 1, i32 10}
5062
!4 = !{!"cs", i32 6, i32 10}
5163
!5 = !{void ()* @main, !"main", null, null, !6}
52-
!6 = !{i32 0, i64 2199023255552, i32 4, !7}
64+
!6 = !{i32 0, i64 2199031644160, i32 4, !7}
5365
!7 = !{i32 4, i32 4, i32 4}

‎tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixloadfrommemory.ll‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ define void @main() {
3737
; okay
3838
%6 = call %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.f32(i32 326, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
3939

40-
; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars.
40+
; CHECK-NEXT: Function: main: error: Groupshared memory holds '256' bytes but must hold at least '288' bytes.
4141
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.f32
4242
%7 = call %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.f32(i32 326, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
4343

44-
; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars.
44+
; CHECK-NEXT: Function: main: error: Groupshared memory holds '256' bytes but must hold at least '288' bytes.
4545
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.f32
4646
%8 = call %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.f32(i32 326, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
4747

4848
; okay
4949
%9 = call %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.v4f32(i32 326, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
5050

51-
; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars.
51+
; CHECK-NEXT: Function: main: error: Groupshared memory holds '256' bytes but must hold at least '288' bytes.
5252
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.v4f32
5353
%10 = call %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.v4f32(i32 326, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
5454

55-
; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars.
55+
; CHECK-NEXT: Function: main: error: Groupshared memory holds '256' bytes but must hold at least '288' bytes.
5656
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.v4f32
5757
%11 = call %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.v4f32(i32 326, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout)
5858

0 commit comments

Comments
 (0)