From d311efd9d6ddc620f5960c6fc10f25daa628df6c Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Sun, 27 Jul 2025 09:57:30 -0700 Subject: 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. --- .../reduce-sum-accumulate-structuredbuffer.slang | 10 ++++++---- tests/cooperative-vector/reduce-sum-accumulate.slang | 10 ++++++---- tests/expected-failure-github.txt | 4 +--- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'tests') 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) -- cgit v1.2.3