Skip to content

Commit f77d76f

Browse files
Use proposed refactor for packed integer type exclusions in runCoopVecMulTestConfig
1 parent 3efd69a commit f77d76f

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

tools/clang/unittests/HLSLExec/ExecutionTest.cpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12317,19 +12317,23 @@ void ExecutionTest::runCoopVecMulTestConfig(
1231712317
continue;
1231812318
}
1231912319

12320-
if (Config.NumLayers > 1 &&
12321-
(MulProps.InputInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_SINT8 ||
12322-
MulProps.InputInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_UINT8 ||
12323-
MulProps.InputInterpretation ==
12324-
D3D12_LINEAR_ALGEBRA_DATATYPE_SINT8_T4_PACKED ||
12325-
MulProps.InputInterpretation ==
12326-
D3D12_LINEAR_ALGEBRA_DATATYPE_UINT8_T4_PACKED) &&
12327-
(MulProps.BiasInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_SINT32 ||
12328-
MulProps.BiasInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_UINT32)) {
12329-
// We do not support multi-layer tests with packed types as input with
12330-
// full-precision integer bias Supporting this in the current framework
12331-
// would require repacking the accumulator vectors
12332-
continue;
12320+
if (Config.NumLayers > 1) {
12321+
const bool IsPackedType =
12322+
MulProps.InputInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_SINT8 ||
12323+
MulProps.InputInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_UINT8 ||
12324+
MulProps.InputInterpretation ==
12325+
D3D12_LINEAR_ALGEBRA_DATATYPE_SINT8_T4_PACKED ||
12326+
MulProps.InputInterpretation ==
12327+
D3D12_LINEAR_ALGEBRA_DATATYPE_UINT8_T4_PACKED;
12328+
12329+
const bool IsFullPrecisionIntegerBias =
12330+
MulProps.BiasInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_SINT32 ||
12331+
MulProps.BiasInterpretation == D3D12_LINEAR_ALGEBRA_DATATYPE_UINT32;
12332+
12333+
if (IsPackedType && IsFullPrecisionIntegerBias)
12334+
// In the current framework this would require repacking the accumulator
12335+
// vectors in HLSL.
12336+
continue;
1233312337
}
1233412338

1233512339
bool IsInFilter = CoopVecHelpers::IsMatrixLayoutInFilter(

0 commit comments

Comments
 (0)