summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-07-27 09:57:30 -0700
committerGitHub <noreply@github.com>2025-07-27 16:57:30 +0000
commitd311efd9d6ddc620f5960c6fc10f25daa628df6c (patch)
tree1601a36c21f9a672291421d0e548527f6b437986 /tests
parentc068bdea454f389b7dd7ce38bbb51a16dc6896ab (diff)
Fix failing CoopVec tests (#7937)
CPU tests were invalid because CPU target doesn't support float16_t. CUDA tests were failing due to minor precision error.
Diffstat (limited to 'tests')
-rw-r--r--tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang10
-rw-r--r--tests/cooperative-vector/reduce-sum-accumulate.slang10
-rw-r--r--tests/expected-failure-github.txt4
3 files changed, 13 insertions, 11 deletions
diff --git a/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang b/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang
index 8903d35de..1c47c8152 100644
--- a/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang
+++ b/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang
@@ -1,14 +1,16 @@
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
+
+// CPU target doesn't support float16_t
+//DISABLE_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 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
// CHECK: type: half
// CHECK-NEXT: 112.000000
-// CHECK-NEXT: 2.000000
-// CHECK-NEXT: 3.000000
-// CHECK-NEXT: 4.000000
+// CHECK-NEXT: 2.00
+// CHECK-NEXT: 3.00
+// CHECK-NEXT: 4.0
//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=2):out,name=outputBuffer
diff --git a/tests/cooperative-vector/reduce-sum-accumulate.slang b/tests/cooperative-vector/reduce-sum-accumulate.slang
index 8903d35de..1c47c8152 100644
--- a/tests/cooperative-vector/reduce-sum-accumulate.slang
+++ b/tests/cooperative-vector/reduce-sum-accumulate.slang
@@ -1,14 +1,16 @@
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
+
+// CPU target doesn't support float16_t
+//DISABLE_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 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
// CHECK: type: half
// CHECK-NEXT: 112.000000
-// CHECK-NEXT: 2.000000
-// CHECK-NEXT: 3.000000
-// CHECK-NEXT: 4.000000
+// CHECK-NEXT: 2.00
+// CHECK-NEXT: 3.00
+// CHECK-NEXT: 4.0
//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=2):out,name=outputBuffer
diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt
index fdf324d1b..d647417f2 100644
--- a/tests/expected-failure-github.txt
+++ b/tests/expected-failure-github.txt
@@ -18,8 +18,6 @@ tests/cooperative-vector/matrix-mul-structuredbuffer-packed.slang (vk)
tests/cooperative-vector/matrix-mul.slang (vk)
tests/cooperative-vector/outer-product-structuredbuffer.slang (vk)
tests/cooperative-vector/outer-product.slang (vk)
-tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang.1 (cpu)
-tests/cooperative-vector/reduce-sum-accumulate.slang.1 (cpu)
tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang.3 syn (cuda)
tests/cooperative-vector/reduce-sum-accumulate.slang.3 syn (cuda)
tests/language-feature/saturated-cooperation/simple.slang (vk)
@@ -36,4 +34,4 @@ tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu)
tests/compute/interface-shader-param.slang.5 syn (wgpu)
tests/language-feature/shader-params/interface-shader-param-ordinary.slang.4 syn (wgpu)
tests/glsl-intrinsic/shader-subgroup/shader-subgroup-builtin-variables.slang.8 (mtl)
-tests/glsl-intrinsic/shader-subgroup/shader-subgroup-builtin-variables-2.slang.3 (mtl) \ No newline at end of file
+tests/glsl-intrinsic/shader-subgroup/shader-subgroup-builtin-variables-2.slang.3 (mtl)