diff options
Diffstat (limited to 'tests/cooperative-vector/CoopVec')
58 files changed, 0 insertions, 1971 deletions
diff --git a/tests/cooperative-vector/CoopVec/add.slang b/tests/cooperative-vector/CoopVec/add.slang deleted file mode 100644 index e25cd5449..000000000 --- a/tests/cooperative-vector/CoopVec/add.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 1 -// CHECK-NEXT: 3 -// CHECK-NEXT: 5 -// CHECK-NEXT: 7 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int, 4> vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec<int, 4> vec2 = coopVecLoad<4, int32_t>(input2); - - let result = vec1 + vec2; - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i]; -} diff --git a/tests/cooperative-vector/CoopVec/array.slang b/tests/cooperative-vector/CoopVec/array.slang deleted file mode 100644 index b63ff2f91..000000000 --- a/tests/cooperative-vector/CoopVec/array.slang +++ /dev/null @@ -1,25 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 1.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 5.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 7.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vecArray[2]; - vecArray[0] = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - vecArray[1] = CoopVec<float, 4>(5.0, 6.0, 7.0, 8.0); - - vecArray[0].store(outputBuffer, 0); - vecArray[1].store(outputBuffer, 16); -} diff --git a/tests/cooperative-vector/CoopVec/atan.slang b/tests/cooperative-vector/CoopVec/atan.slang deleted file mode 100644 index 37c0d7233..000000000 --- a/tests/cooperative-vector/CoopVec/atan.slang +++ /dev/null @@ -1,26 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 0.785398 -// CHECK-NEXT: 1.107149 -// CHECK-NEXT: 1.249046 -// CHECK-NEXT: 1.325818 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input); - - CoopVec<float, 4> result = atan(vec); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/clamp.slang b/tests/cooperative-vector/CoopVec/clamp.slang deleted file mode 100644 index 648223907..000000000 --- a/tests/cooperative-vector/CoopVec/clamp.slang +++ /dev/null @@ -1,28 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 2.0 -// CHECK-NEXT: 2.0 -// CHECK-NEXT: 3.0 -// CHECK-NEXT: 4.0 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 5.0], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input); - CoopVec<float, 4> minVal = CoopVec<float, 4>(2.0); - CoopVec<float, 4> maxVal = CoopVec<float, 4>(4.0); - - CoopVec<float, 4> result = clamp(vec, minVal, maxVal); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/comparison.slang b/tests/cooperative-vector/CoopVec/comparison.slang deleted file mode 100644 index 44f60c344..000000000 --- a/tests/cooperative-vector/CoopVec/comparison.slang +++ /dev/null @@ -1,32 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: uint32_t -// CHECK-NEXT: 0 -// CHECK-NEXT: 1 -// CHECK-NEXT: 1 - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[1.0 3.0 2.0 4.0], stride=4),name=input2 -ByteAddressBuffer input2; - -//TEST_INPUT:ubuffer(data=[0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<uint> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec1 = coopVecLoad<4, float>(input1); - CoopVec<float, 4> vec2 = coopVecLoad<4, float>(input2); - - uint32_t equals = vec1 == vec2 ? 1 : 0; - uint32_t lessThan = vec1 < vec2 ? 1 : 0; - uint32_t lessThanOrEquals = vec1 <= vec2 ? 1 : 0; - - outputBuffer[0] = equals; - outputBuffer[1] = lessThan; - outputBuffer[2] = lessThanOrEquals; -} diff --git a/tests/cooperative-vector/CoopVec/conversion.slang b/tests/cooperative-vector/CoopVec/conversion.slang deleted file mode 100644 index a9436b31e..000000000 --- a/tests/cooperative-vector/CoopVec/conversion.slang +++ /dev/null @@ -1,28 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let intVec = coopVecLoad<4, int>(input); - let floatVec = CoopVec<float, 4>(intVec); - let uintVec = CoopVec<uint, 4>(intVec); - let floatVec2 = CoopVec<float, 4>(uintVec); - - let result = floatVec + floatVec2; - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i]; -} diff --git a/tests/cooperative-vector/CoopVec/copyFrom.slang b/tests/cooperative-vector/CoopVec/copyFrom.slang deleted file mode 100644 index da6e77d1f..000000000 --- a/tests/cooperative-vector/CoopVec/copyFrom.slang +++ /dev/null @@ -1,22 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let v = CoopVec<float, 4>(1,2,3,4); - var result : CoopVec<int32_t, 4>; - result.copyFrom(v); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/div.slang b/tests/cooperative-vector/CoopVec/div.slang deleted file mode 100644 index 43773c7bc..000000000 --- a/tests/cooperative-vector/CoopVec/div.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 2 -// CHECK-NEXT: 1 -// CHECK-NEXT: 1 -// CHECK-NEXT: 0 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[4 3 5 2], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[2 3 4 5], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int, 4> vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec<int, 4> vec2 = coopVecLoad<4, int32_t>(input2); - - CoopVec<int, 4> result = vec1 / vec2; - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/exp.slang b/tests/cooperative-vector/CoopVec/exp.slang deleted file mode 100644 index eda6e1c3e..000000000 --- a/tests/cooperative-vector/CoopVec/exp.slang +++ /dev/null @@ -1,27 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 2.7182 -// CHECK-NEXT: 7.3890 -// CHECK-NEXT: 20.0855 -// CHECK-NEXT: 54.5981 - - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input); - - CoopVec<float, 4> result = exp(vec); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/fill.slang b/tests/cooperative-vector/CoopVec/fill.slang deleted file mode 100644 index 6cd37ba7d..000000000 --- a/tests/cooperative-vector/CoopVec/fill.slang +++ /dev/null @@ -1,21 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 10 -// CHECK-NEXT: 10 -// CHECK-NEXT: 10 -// CHECK-NEXT: 10 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - var result : CoopVec<int32_t, 4>; - result.fill(10); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/fma.slang b/tests/cooperative-vector/CoopVec/fma.slang deleted file mode 100644 index 9a5c5311d..000000000 --- a/tests/cooperative-vector/CoopVec/fma.slang +++ /dev/null @@ -1,34 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 5.000000 -// CHECK-NEXT: 10.000000 -// CHECK-NEXT: 17.000000 -// CHECK-NEXT: 26.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[2.0 3.0 4.0 5.0], stride=4),name=input2 -ByteAddressBuffer input2; - -//TEST_INPUT:ubuffer(data=[3.0 4.0 5.0 6.0], stride=4),name=input3 -ByteAddressBuffer input3; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec1 = coopVecLoad<4, float>(input1); - CoopVec<float, 4> vec2 = coopVecLoad<4, float>(input2); - CoopVec<float, 4> vec3 = coopVecLoad<4, float>(input3); - - CoopVec<float, 4> result = fma(vec1, vec2, vec3); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/inout.slang b/tests/cooperative-vector/CoopVec/inout.slang deleted file mode 100644 index 8181a2019..000000000 --- a/tests/cooperative-vector/CoopVec/inout.slang +++ /dev/null @@ -1,23 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -void doubleCoopVec(inout CoopVec<float, 4> vec) -{ - vec = vec * 2.0; -} - -[numthreads(1, 1, 1)] -void computeMain() -{ - var vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - doubleCoopVec(vec); - vec.store(outputBuffer, 0); -} diff --git a/tests/cooperative-vector/CoopVec/load-store-arbitrary-array-vec.slang b/tests/cooperative-vector/CoopVec/load-store-arbitrary-array-vec.slang deleted file mode 100644 index f577ae5f3..000000000 --- a/tests/cooperative-vector/CoopVec/load-store-arbitrary-array-vec.slang +++ /dev/null @@ -1,35 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation - -// CHECK: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 -// CHECK-NEXT: 5 -// CHECK-NEXT: 6 -// CHECK-NEXT: 7 -// CHECK-NEXT: 8 -// CHECK-NEXT: 9 -// CHECK-NEXT: A -// CHECK-NEXT: B -// CHECK-NEXT: C -// CHECK-NEXT: D -// CHECK-NEXT: E -// CHECK-NEXT: F - -//TEST_INPUT:ubuffer(data=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]):name=input -RWByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]):out,name=outputBuffer -RWStructuredBuffer<uint32_t> outputBuffer; - -groupshared float3[5] temp; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<15, uint32_t>(input); - vec.storeAny(temp); - let result = CoopVec<uint32_t, 15>.loadAny(temp); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/load-store-arbitrary-array.slang b/tests/cooperative-vector/CoopVec/load-store-arbitrary-array.slang deleted file mode 100644 index d8353d1c1..000000000 --- a/tests/cooperative-vector/CoopVec/load-store-arbitrary-array.slang +++ /dev/null @@ -1,35 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation - -// CHECK: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 -// CHECK-NEXT: 5 -// CHECK-NEXT: 6 -// CHECK-NEXT: 7 -// CHECK-NEXT: 8 -// CHECK-NEXT: 9 -// CHECK-NEXT: A -// CHECK-NEXT: B -// CHECK-NEXT: C -// CHECK-NEXT: D -// CHECK-NEXT: E -// CHECK-NEXT: F - -//TEST_INPUT:ubuffer(data=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]):name=input -RWByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]):out,name=outputBuffer -RWStructuredBuffer<uint32_t> outputBuffer; - -groupshared float[15] temp; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<15, uint32_t>(input); - vec.storeAny(temp); - let result = CoopVec<uint32_t, 15>.loadAny(temp); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i]; -} diff --git a/tests/cooperative-vector/CoopVec/load-store-groupshared.slang b/tests/cooperative-vector/CoopVec/load-store-groupshared.slang deleted file mode 100644 index 331c12735..000000000 --- a/tests/cooperative-vector/CoopVec/load-store-groupshared.slang +++ /dev/null @@ -1,27 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 -// CHECK-NEXT: 5 - -//TEST_INPUT:ubuffer(data=[1 2 3 4 5]):name=input -RWByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0]):out,name=outputBuffer -RWStructuredBuffer<uint32_t> outputBuffer; - -groupshared uint32_t[5] temp; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<5, uint32_t>(input); - vec.store(temp); - let result = coopVecLoadGroupshared<5>(temp); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/load-store-rwbyteaddressbuffer.slang b/tests/cooperative-vector/CoopVec/load-store-rwbyteaddressbuffer.slang deleted file mode 100644 index 88fed1cd6..000000000 --- a/tests/cooperative-vector/CoopVec/load-store-rwbyteaddressbuffer.slang +++ /dev/null @@ -1,22 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu - -// CHECK: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 -// CHECK-NEXT: 5 - -//TEST_INPUT:ubuffer(data=[1 2 3 4 5]):name=input -RWByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0]):out,name=outputBuffer -RWByteAddressBuffer outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let result = coopVecLoad<5, uint32_t>(input); - result.store(outputBuffer); -} diff --git a/tests/cooperative-vector/CoopVec/load-store-rwstructuredbuffer.slang b/tests/cooperative-vector/CoopVec/load-store-rwstructuredbuffer.slang deleted file mode 100644 index 4b143f5f8..000000000 --- a/tests/cooperative-vector/CoopVec/load-store-rwstructuredbuffer.slang +++ /dev/null @@ -1,30 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// HLSL doesn't support structured buffers for CoopVec -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 5 -// CHECK-NEXT: 6 -// CHECK-NEXT: 7 -// CHECK-NEXT: 8 -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 - -//TEST_INPUT:ubuffer(data=[1 2 3 4 5 6 7 8], stride=4),name=buf -RWStructuredBuffer<int32_t> inputBuffer; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let a = coopVecLoad<4>(inputBuffer, 0); - let b = coopVecLoad<4>(inputBuffer, 4*4); - b.store(outputBuffer, 0); - a.store(outputBuffer, 4*4); -} diff --git a/tests/cooperative-vector/CoopVec/log.slang b/tests/cooperative-vector/CoopVec/log.slang deleted file mode 100644 index c68696706..000000000 --- a/tests/cooperative-vector/CoopVec/log.slang +++ /dev/null @@ -1,26 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 0.000000 -// CHECK-NEXT: 0.693147 -// CHECK-NEXT: 1.098612 -// CHECK-NEXT: 1.386294 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input); - - CoopVec<float, 4> result = log(vec); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-mut.slang deleted file mode 100644 index 798162c8a..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-mut.slang +++ /dev/null @@ -1,48 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 8035 -// CHECK-NEXT: 8076 -// CHECK-NEXT: 8117 -// CHECK-NEXT: 8158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -ByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input); - var result = CoopVec<int32_t, 4>(8000); - result.matMulAddAccum( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang deleted file mode 100644 index 307c4473c..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang +++ /dev/null @@ -1,47 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 8035 -// CHECK-NEXT: 8076 -// CHECK-NEXT: 8117 -// CHECK-NEXT: 8158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -ByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - var result = CoopVec<int32_t, 4>(8000); - result.matMulAddAccumPacked( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang deleted file mode 100644 index 200fa9163..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang +++ /dev/null @@ -1,46 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -ByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - let result = coopVecMatMulAddPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw-packed.slang deleted file mode 100644 index 0cd3fa216..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw-packed.slang +++ /dev/null @@ -1,48 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -RWByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMulAddPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw.slang deleted file mode 100644 index e0b743259..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rw.slang +++ /dev/null @@ -1,47 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -RWByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMulAdd<int32_t, 4, 4>( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rwbyteaddress-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-rwbyteaddress-packed.slang deleted file mode 100644 index d365734c2..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-rwbyteaddress-packed.slang +++ /dev/null @@ -1,49 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -RWByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMulAddPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} - diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-structuredbuffer-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-structuredbuffer-packed.slang deleted file mode 100644 index 7b2cf6ee2..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-structuredbuffer-packed.slang +++ /dev/null @@ -1,47 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// These platforms don't support these operations from structured buffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -StructuredBuffer<int32_t> input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -StructuredBuffer<uint8_t> matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -StructuredBuffer<uint8_t> bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1>(input); - let result = coopVecMatMulAddPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - result.store(outputBuffer); -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias.slang deleted file mode 100644 index c560af3c0..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias.slang +++ /dev/null @@ -1,47 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 35 -// CHECK-NEXT: 76 -// CHECK-NEXT: 117 -// CHECK-NEXT: 158 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -//TEST_INPUT:ubuffer(data=[5 6 7 8], stride=4),name=bias -ByteAddressBuffer bias; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input); - let result = coopVecMatMulAdd<int32_t, 4, 4>( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - bias, - 0, - CoopVecComponentType::SignedInt32, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-byteaddress.slang b/tests/cooperative-vector/CoopVec/matrix-mul-byteaddress.slang deleted file mode 100644 index 4059f458c..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-byteaddress.slang +++ /dev/null @@ -1,40 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input); - let result = coopVecMatMul<int32_t, 4, 4>( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-mut.slang deleted file mode 100644 index 5f7d63b95..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-mut.slang +++ /dev/null @@ -1,41 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 31 -// CHECK-NEXT: 71 -// CHECK-NEXT: 111 -// CHECK-NEXT: 151 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<4, int8_t>(input); - var result = CoopVec<int32_t, 4>(1); - result.matMulAccum( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-packed-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-packed-mut.slang deleted file mode 100644 index c71854467..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-packed-mut.slang +++ /dev/null @@ -1,40 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 31 -// CHECK-NEXT: 71 -// CHECK-NEXT: 111 -// CHECK-NEXT: 151 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - var result = CoopVec<int32_t, 4>(1); - result.matMulAccumPacked( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-packed.slang deleted file mode 100644 index e56660561..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-packed.slang +++ /dev/null @@ -1,39 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - let result = coopVecMatMulPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-rw-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-rw-packed.slang deleted file mode 100644 index 7ff925427..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-rw-packed.slang +++ /dev/null @@ -1,41 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMulPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-rw.slang b/tests/cooperative-vector/CoopVec/matrix-mul-rw.slang deleted file mode 100644 index ddc328580..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-rw.slang +++ /dev/null @@ -1,40 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int8_t, 4> vec = coopVecLoad<4, int8_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMul<int32_t, 4, 4>( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-rwbyteaddress-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-rwbyteaddress-packed.slang deleted file mode 100644 index 7ff925427..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-rwbyteaddress-packed.slang +++ /dev/null @@ -1,41 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -RWByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - CoopVec<int32_t, 4> result = coopVecMatMulPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-structuredbuffer-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-structuredbuffer-packed.slang deleted file mode 100644 index 756f4366a..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul-structuredbuffer-packed.slang +++ /dev/null @@ -1,42 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// These platforms don't support these operations from structured buffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -StructuredBuffer<int32_t> input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -StructuredBuffer<uint8_t> matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<1, int32_t>(input); - let result = coopVecMatMulPacked<int32_t, 4>( - vec, - CoopVecComponentType::SignedInt8Packed, - 4, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/matrix-mul.slang b/tests/cooperative-vector/CoopVec/matrix-mul.slang deleted file mode 100644 index 0d6f3f6a9..000000000 --- a/tests/cooperative-vector/CoopVec/matrix-mul.slang +++ /dev/null @@ -1,40 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: int32_t -// CHECK-NEXT: 30 -// CHECK-NEXT: 70 -// CHECK-NEXT: 110 -// CHECK-NEXT: 150 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; -//TEST_INPUT:ubuffer(data=[67305985], stride=4),name=input -//[1 2 3 4] -ByteAddressBuffer input; - -//TEST_INPUT:ubuffer(data=[67305985 134678021 202050057 269422093], stride=4),name=matrix -//[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] -ByteAddressBuffer matrix; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = coopVecLoad<4, int8_t>(input); - let result = coopVecMatMul<int32_t, 4, 4>( - vec, - CoopVecComponentType::SignedInt8, - matrix, - 0, - CoopVecComponentType::SignedInt8, - CoopVecMatrixLayout::RowMajor, - false, - 4 - ); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/max.slang b/tests/cooperative-vector/CoopVec/max.slang deleted file mode 100644 index 829c1628d..000000000 --- a/tests/cooperative-vector/CoopVec/max.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 5.0 -// CHECK-NEXT: 4.0 -// CHECK-NEXT: 3.0 -// CHECK-NEXT: 4.0 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[5.0 4.0 2.0 1.0], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec1 = coopVecLoad<4, float>(input1); - CoopVec<float, 4> vec2 = coopVecLoad<4, float>(input2); - - CoopVec<float, 4> result = max(vec1, vec2); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/min.slang b/tests/cooperative-vector/CoopVec/min.slang deleted file mode 100644 index 4a5c45deb..000000000 --- a/tests/cooperative-vector/CoopVec/min.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 1.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 2.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[5.0 4.0 3.0 2.0], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec1 = coopVecLoad<4, float>(input1); - CoopVec<float, 4> vec2 = coopVecLoad<4, float>(input2); - - CoopVec<float, 4> result = min(vec1, vec2); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/mod.slang b/tests/cooperative-vector/CoopVec/mod.slang deleted file mode 100644 index bc55eecab..000000000 --- a/tests/cooperative-vector/CoopVec/mod.slang +++ /dev/null @@ -1,46 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu - -// CHECK: 0 -// CHECK-NEXT: 0 -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 0 -// CHECK-NEXT: 0 -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 0 -// CHECK-NEXT: 0 -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer -RWByteAddressBuffer outputBuffer; - -//TEST_INPUT:ubuffer(data=[4 3 5 7], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[2 3 4 5], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec1 = coopVecLoad<4, int32_t>(input1); - let vec2 = coopVecLoad<4, int32_t>(input2); - - let vec3 = CoopVec<float, 4>(vec1); - let vec4 = CoopVec<float, 4>(vec2); - - let vec5 = CoopVec<uint, 4>(vec1); - let vec6 = CoopVec<uint, 4>(vec2); - - let result = vec1 % vec2; - let result2 = CoopVec<int, 4>(vec3 % vec4); - let result3 = CoopVec<int, 4>(vec5 % vec6); - - result.store(outputBuffer); - result2.store(outputBuffer, 16); - result3.store(outputBuffer, 32); -} diff --git a/tests/cooperative-vector/CoopVec/mul.slang b/tests/cooperative-vector/CoopVec/mul.slang deleted file mode 100644 index ba01c224b..000000000 --- a/tests/cooperative-vector/CoopVec/mul.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 2 -// CHECK-NEXT: 6 -// CHECK-NEXT: 12 -// CHECK-NEXT: 20 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[2 3 4 5], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int, 4> vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec<int, 4> vec2 = coopVecLoad<4, int32_t>(input2); - - CoopVec<int, 4> result = vec1 * vec2; - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/out.slang b/tests/cooperative-vector/CoopVec/out.slang deleted file mode 100644 index ec1bd44ac..000000000 --- a/tests/cooperative-vector/CoopVec/out.slang +++ /dev/null @@ -1,24 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -void doubleCoopVec(CoopVec<float, 4> vec, out CoopVec<float, 4> result) -{ - result = vec * 2.0; -} - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - CoopVec<float, 4> result; - doubleCoopVec(vec, result); - result.store(outputBuffer, 0); -} diff --git a/tests/cooperative-vector/CoopVec/outer-product-structuredbuffer.slang b/tests/cooperative-vector/CoopVec/outer-product-structuredbuffer.slang deleted file mode 100644 index f050c80b9..000000000 --- a/tests/cooperative-vector/CoopVec/outer-product-structuredbuffer.slang +++ /dev/null @@ -1,69 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type - -// These platforms don't support these operations into structured buffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: half -// CHECK-NEXT: 112.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 5.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 7.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 10.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 14.000000 -// CHECK-NEXT: 16.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 9.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 15.000000 -// CHECK-NEXT: 18.000000 -// CHECK-NEXT: 21.000000 -// CHECK-NEXT: 24.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 16.000000 -// CHECK-NEXT: 20.000000 -// CHECK-NEXT: 24.000000 -// CHECK-NEXT: 28.000000 -// CHECK-NEXT: 32.000000 - -//TEST_INPUT:ubuffer(data=[ 0x40003C00 0x44004200 ], stride=4),name=inputA -// [1,2,3,4] -StructuredBuffer<half> inputA; - -//TEST_INPUT:ubuffer(data=[ 0x40003C00 0x44004200 0x46004500 0x48004700 ], stride=4),name=inputB -// [1,2,3,4,5,6,7,8] -StructuredBuffer<half> inputB; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=output -RWStructuredBuffer<half> output; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vecA = coopVecLoad<4>(inputA); - let vecB = coopVecLoad<8>(inputB); - - output[0] = half(111); - - coopVecOuterProductAccumulate( - vecA, - vecB, - output, - 0, - 32, - CoopVecMatrixLayout::RowMajor, - CoopVecComponentType::Float16, - ); -} diff --git a/tests/cooperative-vector/CoopVec/outer-product.slang b/tests/cooperative-vector/CoopVec/outer-product.slang deleted file mode 100644 index e59b10e4b..000000000 --- a/tests/cooperative-vector/CoopVec/outer-product.slang +++ /dev/null @@ -1,73 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type - -// HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// Disabled because of some pecularities stemming from our lowering of half to float -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: half -// CHECK-NEXT: 112.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 5.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 7.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 10.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 14.000000 -// CHECK-NEXT: 16.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 9.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 15.000000 -// CHECK-NEXT: 18.000000 -// CHECK-NEXT: 21.000000 -// CHECK-NEXT: 24.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 8.000000 -// CHECK-NEXT: 12.000000 -// CHECK-NEXT: 16.000000 -// CHECK-NEXT: 20.000000 -// CHECK-NEXT: 24.000000 -// CHECK-NEXT: 28.000000 -// CHECK-NEXT: 32.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=2):out,name=outputBuffer -RWStructuredBuffer<half> outputBuffer; - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4),name=output -RWByteAddressBuffer output; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<half, 4> vecA; - CoopVec<half, 8> vecB; - for(int i = 0; i < vecA.getCount(); ++i) - vecA[i] = half(i+1); - for(int i = 0; i < vecB.getCount(); ++i) - vecB[i] = half(i+1); - - output.Store<half>(0, half(111)); - - coopVecOuterProductAccumulate( - vecA, - vecB, - output, - 0, - 32, - CoopVecMatrixLayout::RowMajor, - CoopVecComponentType::Float16, - ); - - for(int i = 0; i < vecA.getCount() * vecB.getCount(); ++i) - outputBuffer[i] = output.Load<half>(i * 2); -} diff --git a/tests/cooperative-vector/CoopVec/parameter.slang b/tests/cooperative-vector/CoopVec/parameter.slang deleted file mode 100644 index 91e405c45..000000000 --- a/tests/cooperative-vector/CoopVec/parameter.slang +++ /dev/null @@ -1,22 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -void processCoopVec(CoopVec<float, 4> vec) -{ - (vec * 2.0).store(outputBuffer, 0); -} - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - processCoopVec(vec); -} diff --git a/tests/cooperative-vector/CoopVec/reduce-sum-accumulate-structuredbuffer.slang b/tests/cooperative-vector/CoopVec/reduce-sum-accumulate-structuredbuffer.slang deleted file mode 100644 index 17c45734e..000000000 --- a/tests/cooperative-vector/CoopVec/reduce-sum-accumulate-structuredbuffer.slang +++ /dev/null @@ -1,41 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -///TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: half -// CHECK-NEXT: 112.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 - - -//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=2):out,name=outputBuffer -RWStructuredBuffer<half> outputBuffer; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=inputA -ByteAddressBuffer inputA; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=output -RWByteAddressBuffer output; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<half, 4> vecA; - for(int i = 0; i < vecA.getCount(); ++i) - vecA[i] = half(i+1); - - output.Store(0, half(111)); - - coopVecReduceSumAccumulate( - vecA, - output, - 0, - ); - - for(int i = 0; i < vecA.getCount(); ++i) - outputBuffer[i] = output.Load<half>(i * 2); -} - diff --git a/tests/cooperative-vector/CoopVec/reduce-sum-accumulate.slang b/tests/cooperative-vector/CoopVec/reduce-sum-accumulate.slang deleted file mode 100644 index 17c45734e..000000000 --- a/tests/cooperative-vector/CoopVec/reduce-sum-accumulate.slang +++ /dev/null @@ -1,41 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -///TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. - -// CHECK: type: half -// CHECK-NEXT: 112.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 - - -//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=2):out,name=outputBuffer -RWStructuredBuffer<half> outputBuffer; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=inputA -ByteAddressBuffer inputA; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=output -RWByteAddressBuffer output; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<half, 4> vecA; - for(int i = 0; i < vecA.getCount(); ++i) - vecA[i] = half(i+1); - - output.Store(0, half(111)); - - coopVecReduceSumAccumulate( - vecA, - output, - 0, - ); - - for(int i = 0; i < vecA.getCount(); ++i) - outputBuffer[i] = output.Load<half>(i * 2); -} - diff --git a/tests/cooperative-vector/CoopVec/return.slang b/tests/cooperative-vector/CoopVec/return.slang deleted file mode 100644 index b5c7b52a7..000000000 --- a/tests/cooperative-vector/CoopVec/return.slang +++ /dev/null @@ -1,23 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -CoopVec<float, 4> doubleCoopVec(CoopVec<float, 4> vec) -{ - return vec * 2.0; -} - -[numthreads(1, 1, 1)] -void computeMain() -{ - let vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - let result = doubleCoopVec(vec); - result.store(outputBuffer, 0); -} diff --git a/tests/cooperative-vector/CoopVec/scalar-mul.slang b/tests/cooperative-vector/CoopVec/scalar-mul.slang deleted file mode 100644 index 03574425c..000000000 --- a/tests/cooperative-vector/CoopVec/scalar-mul.slang +++ /dev/null @@ -1,25 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input1); - CoopVec<float, 4> result = vec * 2.0; - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/simple.slang b/tests/cooperative-vector/CoopVec/simple.slang deleted file mode 100644 index 9450840bc..000000000 --- a/tests/cooperative-vector/CoopVec/simple.slang +++ /dev/null @@ -1,24 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=buf -ByteAddressBuffer inputBuffer; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - var result = coopVecLoad<4, int32_t>(inputBuffer); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/step.slang b/tests/cooperative-vector/CoopVec/step.slang deleted file mode 100644 index cf428f40e..000000000 --- a/tests/cooperative-vector/CoopVec/step.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 0.000000 -// CHECK-NEXT: 0.000000 -// CHECK-NEXT: 1.000000 -// CHECK-NEXT: 1.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[2.0 3.0 4.0 5.0], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 5.0 6.0], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> edge = coopVecLoad<4, float>(input1); - CoopVec<float, 4> x = coopVecLoad<4, float>(input2); - - CoopVec<float, 4> result = step(edge, x); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/struct.slang b/tests/cooperative-vector/CoopVec/struct.slang deleted file mode 100644 index 6f6b8a4f9..000000000 --- a/tests/cooperative-vector/CoopVec/struct.slang +++ /dev/null @@ -1,31 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 1.000000 -// CHECK-NEXT: 2.000000 -// CHECK-NEXT: 3.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 5.000000 -// CHECK-NEXT: 6.000000 -// CHECK-NEXT: 7.000000 -// CHECK-NEXT: 8.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -struct MyStruct -{ - CoopVec<float, 4> vec1; - CoopVec<float, 4> vec2; -}; - -[numthreads(1, 1, 1)] -void computeMain() -{ - MyStruct s; - s.vec1 = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - s.vec2 = CoopVec<float, 4>(5.0, 6.0, 7.0, 8.0); - - s.vec1.store(outputBuffer, 0); - s.vec2.store(outputBuffer, 16); -} diff --git a/tests/cooperative-vector/CoopVec/sub.slang b/tests/cooperative-vector/CoopVec/sub.slang deleted file mode 100644 index c94881c34..000000000 --- a/tests/cooperative-vector/CoopVec/sub.slang +++ /dev/null @@ -1,30 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 1 -// CHECK-NEXT: 1 -// CHECK-NEXT: 1 -// CHECK-NEXT: 1 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -//TEST_INPUT:ubuffer(data=[2 3 4 5], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input2 -ByteAddressBuffer input2; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int, 4> vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec<int, 4> vec2 = coopVecLoad<4, int32_t>(input2); - - CoopVec<int, 4> result = vec1 - vec2; - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/subscript-in-func.slang b/tests/cooperative-vector/CoopVec/subscript-in-func.slang deleted file mode 100644 index 74c7f86c3..000000000 --- a/tests/cooperative-vector/CoopVec/subscript-in-func.slang +++ /dev/null @@ -1,26 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation - -// CHECK: type: float -// CHECK-NEXT: 1.000000 -// CHECK-NEXT: 4.000000 -// CHECK-NEXT: 9.000000 -// CHECK-NEXT: 16.000000 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -void squareCoopVecElements(CoopVec<float, 4> vec) -{ - for (int i = 0; i < 4; ++i) - { - vec[i] = vec[i] * vec[i]; - } - vec.store(outputBuffer, 0); -} - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0); - squareCoopVecElements(vec); -} diff --git a/tests/cooperative-vector/CoopVec/subscript.slang b/tests/cooperative-vector/CoopVec/subscript.slang deleted file mode 100644 index fee3df54e..000000000 --- a/tests/cooperative-vector/CoopVec/subscript.slang +++ /dev/null @@ -1,25 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 2 -// CHECK-NEXT: 4 -// CHECK-NEXT: 6 -// CHECK-NEXT: 8 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int32_t, 4> vec; - vec[0] = 2; - vec[1] = vec[0]+2; - vec[2] = vec[1]+2; - vec[3] = vec[2]+2; - - for(int i = 0; i < vec.getCount(); ++i) - outputBuffer[i] = vec[i];; -} diff --git a/tests/cooperative-vector/CoopVec/tanh.slang b/tests/cooperative-vector/CoopVec/tanh.slang deleted file mode 100644 index 27c547bbf..000000000 --- a/tests/cooperative-vector/CoopVec/tanh.slang +++ /dev/null @@ -1,28 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// Hilariously low precision because the different APIs don't agree (they're -// not specced to of course, so it's ok) -// CHECK: type: float -// CHECK-NEXT: 0.761 -// CHECK-NEXT: 0.964 -// CHECK-NEXT: 0.995 -// CHECK-NEXT: 0.999 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -//TEST_INPUT:ubuffer(data=[1.0 2.0 3.0 4.0], stride=4),name=input -ByteAddressBuffer input; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<float, 4> vec = coopVecLoad<4, float>(input); - - CoopVec<float, 4> result = tanh(vec); - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/unary.slang b/tests/cooperative-vector/CoopVec/unary.slang deleted file mode 100644 index cf4f95342..000000000 --- a/tests/cooperative-vector/CoopVec/unary.slang +++ /dev/null @@ -1,25 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -xslang -skip-spirv-validation -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: -1 -// CHECK-NEXT: -2 -// CHECK-NEXT: -3 -// CHECK-NEXT: -4 - -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input1 -ByteAddressBuffer input1; - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - CoopVec<int32_t, 4> vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec<int32_t, 4> negVec = -vec1; - - for(int i = 0; i < negVec.getCount(); ++i) - outputBuffer[i] = negVec[i];; -} diff --git a/tests/cooperative-vector/CoopVec/variadic-init-bad-length.slang b/tests/cooperative-vector/CoopVec/variadic-init-bad-length.slang deleted file mode 100644 index 1f4c92d29..000000000 --- a/tests/cooperative-vector/CoopVec/variadic-init-bad-length.slang +++ /dev/null @@ -1,14 +0,0 @@ -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let result = CoopVec<int32_t, 4>(1,2,3,4,5); - // CHECK: error 41400: static assertion failed, number of arguments to CoopVec constructor must match number of elements - - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang b/tests/cooperative-vector/CoopVec/variadic-init-cast.slang deleted file mode 100644 index 888568ba1..000000000 --- a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang +++ /dev/null @@ -1,20 +0,0 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: float -// CHECK-NEXT: 1.0 -// CHECK-NEXT: 2.0 -// CHECK-NEXT: 3.0 -// CHECK-NEXT: 4.0 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<float> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let result = CoopVec<float, 4>(int(1),half(2),uint(3),double(4)); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} diff --git a/tests/cooperative-vector/CoopVec/variadic-init.slang b/tests/cooperative-vector/CoopVec/variadic-init.slang deleted file mode 100644 index 6a1f30efc..000000000 --- a/tests/cooperative-vector/CoopVec/variadic-init.slang +++ /dev/null @@ -1,20 +0,0 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type - -// CHECK: type: int32_t -// CHECK-NEXT: 1 -// CHECK-NEXT: 2 -// CHECK-NEXT: 3 -// CHECK-NEXT: 4 - -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -RWStructuredBuffer<int32_t> outputBuffer; - -[numthreads(1, 1, 1)] -void computeMain() -{ - let result = CoopVec<int32_t, 4>(1,2,3,4); - for(int i = 0; i < result.getCount(); ++i) - outputBuffer[i] = result[i];; -} |
