Skip to content

Commit f55f669

Browse files
authored
Fix VVL errors on coopvec tests (#8541)
It appears that the inputType of the coopvec-mat-mul cannot be signed int32. It could be floating types or signed int32. Changing the tests to use uint32 instead of int32. The spec guarantees the following combinations and the rest should be queried at the runtime if it is supported by the HW. https://registry.khronos.org/vulkan/specs/latest/man/html/VkCooperativeVectorPropertiesNV.html#_description inputType | inputInterpretation | matrixInterpretation | biasInterpretation | resultType -- | -- | -- | -- | -- FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16 | FLOAT16 UINT32 | SINT8_PACKED | SINT8 | SINT32 | SINT32 SINT8 | SINT8 | SINT8 | SINT32 | SINT32 FLOAT32 | SINT8 | SINT8 | SINT32 | SINT32 FLOAT16 | FLOAT_E4M3 | FLOAT_E4M3 | FLOAT16 | FLOAT16 FLOAT16 | FLOAT_E5M2 | FLOAT_E5M2 | FLOAT16 | FLOAT16
1 parent 2e0fe3d commit f55f669

20 files changed

Lines changed: 89 additions & 41 deletions

tests/cooperative-vector/matrix-mul-bias-mut.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

5-
// Disabled because HLSL doesn't support int8
4+
// Disabled because HLSL doesn't support int8
65
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
76

87
// CHECK: type: int32_t
@@ -28,6 +27,10 @@ ByteAddressBuffer bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
3134
CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input);
3235
var result = CoopVec<int32_t, 4>(8000);
3336
result.matMulAddAccum(

tests/cooperative-vector/matrix-mul-bias-packed-mut.slang

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
43
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
@@ -26,6 +25,10 @@ ByteAddressBuffer bias;
2625
[numthreads(1, 1, 1)]
2726
void computeMain()
2827
{
28+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
29+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
30+
// Tracking the issue in github #7715.
31+
2932
let vec = coopVecLoad<1, uint32_t>(input);
3033
var result = CoopVec<int32_t, 4>(8000);
3134
result.matMulAddAccumPacked(

tests/cooperative-vector/matrix-mul-bias-packed.slang

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
43
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
@@ -26,6 +25,10 @@ ByteAddressBuffer bias;
2625
[numthreads(1, 1, 1)]
2726
void computeMain()
2827
{
28+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
29+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
30+
// Tracking the issue in github #7715.
31+
2932
let vec = coopVecLoad<1, uint32_t>(input);
3033
let result = coopVecMatMulAddPacked<int32_t, 4>(
3134
vec,

tests/cooperative-vector/matrix-mul-bias-rw-packed.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

@@ -28,7 +27,11 @@ RWByteAddressBuffer bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
31-
let vec = coopVecLoad<1, int32_t>(input);
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
34+
let vec = coopVecLoad<1, uint32_t>(input);
3235
CoopVec<int32_t, 4> result = coopVecMatMulAddPacked<int32_t, 4>(
3336
vec,
3437
CoopVecComponentType::SignedInt8Packed,

tests/cooperative-vector/matrix-mul-bias-rw.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

5-
// Disabled because HLSL doesn't support int8
4+
// Disabled because HLSL doesn't support int8
65
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
76

87
// CHECK: type: int32_t
@@ -28,6 +27,10 @@ RWByteAddressBuffer bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
3134
CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input);
3235
CoopVec<int32_t, 4> result = coopVecMatMulAdd<int32_t, 4, 4>(
3336
vec,

tests/cooperative-vector/matrix-mul-bias-rwbyteaddress-packed.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

@@ -28,7 +27,11 @@ RWByteAddressBuffer bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
31-
let vec = coopVecLoad<1, int32_t>(input);
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
34+
let vec = coopVecLoad<1, uint32_t>(input);
3235
CoopVec<int32_t, 4> result = coopVecMatMulAddPacked<int32_t, 4>(
3336
vec,
3437
CoopVecComponentType::SignedInt8Packed,

tests/cooperative-vector/matrix-mul-bias-structuredbuffer-packed.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32

43
// These platforms don't support these operations from structured buffers
@@ -16,7 +15,7 @@ RWStructuredBuffer<int32_t> outputBuffer;
1615

1716
//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input
1817
//[1 2 3 4]
19-
StructuredBuffer<int32_t> input;
18+
StructuredBuffer<uint32_t> input;
2019

2120
//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix
2221
//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
@@ -28,6 +27,10 @@ StructuredBuffer<uint8_t> bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
3134
let vec = coopVecLoad<1>(input);
3235
let result = coopVecMatMulAddPacked<int32_t, 4>(
3336
vec,

tests/cooperative-vector/matrix-mul-bias.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

5-
// Disabled because HLSL doesn't support int8
4+
// Disabled because HLSL doesn't support int8
65
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
76

87
// CHECK: type: int32_t
@@ -28,6 +27,10 @@ ByteAddressBuffer bias;
2827
[numthreads(1, 1, 1)]
2928
void computeMain()
3029
{
30+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
31+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
32+
// Tracking the issue in github #7715.
33+
3134
CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input);
3235
let result = coopVecMatMulAdd<int32_t, 4, 4>(
3336
vec,

tests/cooperative-vector/matrix-mul-byteaddress.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

5-
// Disabled because HLSL doesn't support int8
4+
// Disabled because HLSL doesn't support int8
65
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
76

87
// CHECK: type: int32_t
@@ -24,6 +23,10 @@ ByteAddressBuffer matrix;
2423
[numthreads(1, 1, 1)]
2524
void computeMain()
2625
{
26+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
27+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
28+
// Tracking the issue in github #7715.
29+
2730
CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input);
2831
let result = coopVecMatMul<int32_t, 4, 4>(
2932
vec,

tests/cooperative-vector/matrix-mul-mut.slang

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// Fails because VVL 1.4.313.0 has a bug that sees int32_t as uint32_t in validation layers, issue #7715
21
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
32
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
43

5-
// Disabled because HLSL doesn't support int8
4+
// Disabled because HLSL doesn't support int8
65
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
76

87
// CHECK: type: int32_t
@@ -24,6 +23,10 @@ ByteAddressBuffer matrix;
2423
[numthreads(1, 1, 1)]
2524
void computeMain()
2625
{
26+
// Expected to fail with Vulkan 1.4.313.0 or below due to a bug in the VVL
27+
// The VVL incorrectly reports that the result type in the following command is `VK_COMPONENT_TYPE_UINT32_KHR`.
28+
// Tracking the issue in github #7715.
29+
2730
let vec = coopVecLoad<4, int8_t>(input);
2831
var result = CoopVec<int32_t, 4>(1);
2932
result.matMulAccum(

0 commit comments

Comments
 (0)