From fb052bf4674b55933e6dd9f991c99000c049d216 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 30 Jan 2025 13:19:13 -0800 Subject: Support cooperative vector including Vulkan-Header (#6228) * Support cooperative vector including Vulkan-Header Adding a Slang support for cooperative vector with vulkan-header update. --- tests/cooperative-vector/CoopVec/add.slang | 2 +- tests/cooperative-vector/CoopVec/atan.slang | 2 +- tests/cooperative-vector/CoopVec/clamp.slang | 2 +- tests/cooperative-vector/CoopVec/comparison.slang | 2 +- tests/cooperative-vector/CoopVec/conversion.slang | 2 +- tests/cooperative-vector/CoopVec/copyFrom.slang | 2 +- tests/cooperative-vector/CoopVec/div.slang | 2 +- tests/cooperative-vector/CoopVec/exp.slang | 2 +- tests/cooperative-vector/CoopVec/fill.slang | 2 +- tests/cooperative-vector/CoopVec/fma.slang | 2 +- tests/cooperative-vector/CoopVec/log.slang | 2 +- .../CoopVec/matrix-mul-bias-packed-mut.slang | 2 +- .../CoopVec/matrix-mul-bias-packed.slang | 2 +- tests/cooperative-vector/CoopVec/max.slang | 2 +- tests/cooperative-vector/CoopVec/min.slang | 2 +- tests/cooperative-vector/CoopVec/mod.slang | 2 +- tests/cooperative-vector/CoopVec/mul.slang | 2 +- tests/cooperative-vector/CoopVec/scalar-mul.slang | 2 +- tests/cooperative-vector/CoopVec/simple.slang | 2 +- tests/cooperative-vector/CoopVec/step.slang | 2 +- tests/cooperative-vector/CoopVec/sub.slang | 2 +- tests/cooperative-vector/CoopVec/subscript.slang | 2 +- tests/cooperative-vector/CoopVec/tanh.slang | 2 +- tests/cooperative-vector/CoopVec/unary.slang | 2 +- .../CoopVec/variadic-init-cast.slang | 2 +- tests/cooperative-vector/cast.slang | 30 ----------------- tests/cooperative-vector/cast.slang.glsl | 23 ------------- tests/cooperative-vector/glsl/cast.slang | 30 +++++++++++++++++ tests/cooperative-vector/glsl/cast.slang.glsl | 23 +++++++++++++ .../glsl/groupshared-sized.slang | 37 +++++++++++++++++++++ .../glsl/groupshared-sized.slang.glsl | 38 ++++++++++++++++++++++ tests/cooperative-vector/glsl/load-store.slang | 13 ++++++++ .../cooperative-vector/glsl/load-store.slang.glsl | 20 ++++++++++++ tests/cooperative-vector/glsl/only-arith.slang | 18 ++++++++++ .../cooperative-vector/glsl/only-arith.slang.glsl | 16 +++++++++ .../glsl/outer-product-accumulate.slang | 19 +++++++++++ .../glsl/outer-product-accumulate.slang.glsl | 17 ++++++++++ tests/cooperative-vector/glsl/simple.slang | 35 ++++++++++++++++++++ tests/cooperative-vector/glsl/simple.slang.glsl | 20 ++++++++++++ tests/cooperative-vector/groupshared-sized.slang | 37 --------------------- .../groupshared-sized.slang.glsl | 38 ---------------------- tests/cooperative-vector/load-store.slang | 13 -------- tests/cooperative-vector/load-store.slang.glsl | 20 ------------ tests/cooperative-vector/only-arith.slang | 18 ---------- tests/cooperative-vector/only-arith.slang.glsl | 16 --------- .../outer-product-accumulate.slang | 19 ----------- .../outer-product-accumulate.slang.glsl | 17 ---------- tests/cooperative-vector/simple.slang | 35 -------------------- tests/cooperative-vector/simple.slang.glsl | 20 ------------ tests/expected-failure-github.txt | 1 + tests/expected-failure.txt | 1 + 51 files changed, 313 insertions(+), 311 deletions(-) delete mode 100644 tests/cooperative-vector/cast.slang delete mode 100644 tests/cooperative-vector/cast.slang.glsl create mode 100644 tests/cooperative-vector/glsl/cast.slang create mode 100644 tests/cooperative-vector/glsl/cast.slang.glsl create mode 100644 tests/cooperative-vector/glsl/groupshared-sized.slang create mode 100644 tests/cooperative-vector/glsl/groupshared-sized.slang.glsl create mode 100644 tests/cooperative-vector/glsl/load-store.slang create mode 100644 tests/cooperative-vector/glsl/load-store.slang.glsl create mode 100644 tests/cooperative-vector/glsl/only-arith.slang create mode 100644 tests/cooperative-vector/glsl/only-arith.slang.glsl create mode 100644 tests/cooperative-vector/glsl/outer-product-accumulate.slang create mode 100644 tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl create mode 100644 tests/cooperative-vector/glsl/simple.slang create mode 100644 tests/cooperative-vector/glsl/simple.slang.glsl delete mode 100644 tests/cooperative-vector/groupshared-sized.slang delete mode 100644 tests/cooperative-vector/groupshared-sized.slang.glsl delete mode 100644 tests/cooperative-vector/load-store.slang delete mode 100644 tests/cooperative-vector/load-store.slang.glsl delete mode 100644 tests/cooperative-vector/only-arith.slang delete mode 100644 tests/cooperative-vector/only-arith.slang.glsl delete mode 100644 tests/cooperative-vector/outer-product-accumulate.slang delete mode 100644 tests/cooperative-vector/outer-product-accumulate.slang.glsl delete mode 100644 tests/cooperative-vector/simple.slang delete mode 100644 tests/cooperative-vector/simple.slang.glsl (limited to 'tests') diff --git a/tests/cooperative-vector/CoopVec/add.slang b/tests/cooperative-vector/CoopVec/add.slang index 082d19468..e25cd5449 100644 --- a/tests/cooperative-vector/CoopVec/add.slang +++ b/tests/cooperative-vector/CoopVec/add.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/atan.slang b/tests/cooperative-vector/CoopVec/atan.slang index 1dfd62986..37c0d7233 100644 --- a/tests/cooperative-vector/CoopVec/atan.slang +++ b/tests/cooperative-vector/CoopVec/atan.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/clamp.slang b/tests/cooperative-vector/CoopVec/clamp.slang index b5639eeb4..648223907 100644 --- a/tests/cooperative-vector/CoopVec/clamp.slang +++ b/tests/cooperative-vector/CoopVec/clamp.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/comparison.slang b/tests/cooperative-vector/CoopVec/comparison.slang index b410176bc..44f60c344 100644 --- a/tests/cooperative-vector/CoopVec/comparison.slang +++ b/tests/cooperative-vector/CoopVec/comparison.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/conversion.slang b/tests/cooperative-vector/CoopVec/conversion.slang index 02d125f58..a9436b31e 100644 --- a/tests/cooperative-vector/CoopVec/conversion.slang +++ b/tests/cooperative-vector/CoopVec/conversion.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/copyFrom.slang b/tests/cooperative-vector/CoopVec/copyFrom.slang index eb8697d33..da6e77d1f 100644 --- a/tests/cooperative-vector/CoopVec/copyFrom.slang +++ b/tests/cooperative-vector/CoopVec/copyFrom.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//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 diff --git a/tests/cooperative-vector/CoopVec/div.slang b/tests/cooperative-vector/CoopVec/div.slang index 6708a54f1..43773c7bc 100644 --- a/tests/cooperative-vector/CoopVec/div.slang +++ b/tests/cooperative-vector/CoopVec/div.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/exp.slang b/tests/cooperative-vector/CoopVec/exp.slang index f2d3fe716..eda6e1c3e 100644 --- a/tests/cooperative-vector/CoopVec/exp.slang +++ b/tests/cooperative-vector/CoopVec/exp.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/fill.slang b/tests/cooperative-vector/CoopVec/fill.slang index fe36b4ed6..6cd37ba7d 100644 --- a/tests/cooperative-vector/CoopVec/fill.slang +++ b/tests/cooperative-vector/CoopVec/fill.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//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 diff --git a/tests/cooperative-vector/CoopVec/fma.slang b/tests/cooperative-vector/CoopVec/fma.slang index 434cdef32..9a5c5311d 100644 --- a/tests/cooperative-vector/CoopVec/fma.slang +++ b/tests/cooperative-vector/CoopVec/fma.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/log.slang b/tests/cooperative-vector/CoopVec/log.slang index 6428799d1..c68696706 100644 --- a/tests/cooperative-vector/CoopVec/log.slang +++ b/tests/cooperative-vector/CoopVec/log.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang index fdb10703c..307c4473c 100644 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang +++ b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed-mut.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang index 325a106af..200fa9163 100644 --- a/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang +++ b/tests/cooperative-vector/CoopVec/matrix-mul-bias-packed.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/max.slang b/tests/cooperative-vector/CoopVec/max.slang index 3b18f7782..829c1628d 100644 --- a/tests/cooperative-vector/CoopVec/max.slang +++ b/tests/cooperative-vector/CoopVec/max.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/min.slang b/tests/cooperative-vector/CoopVec/min.slang index ed4e5e7aa..4a5c45deb 100644 --- a/tests/cooperative-vector/CoopVec/min.slang +++ b/tests/cooperative-vector/CoopVec/min.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/mod.slang b/tests/cooperative-vector/CoopVec/mod.slang index a25516d1a..bc55eecab 100644 --- a/tests/cooperative-vector/CoopVec/mod.slang +++ b/tests/cooperative-vector/CoopVec/mod.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/mul.slang b/tests/cooperative-vector/CoopVec/mul.slang index 232421c0d..ba01c224b 100644 --- a/tests/cooperative-vector/CoopVec/mul.slang +++ b/tests/cooperative-vector/CoopVec/mul.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/scalar-mul.slang b/tests/cooperative-vector/CoopVec/scalar-mul.slang index b15654be2..03574425c 100644 --- a/tests/cooperative-vector/CoopVec/scalar-mul.slang +++ b/tests/cooperative-vector/CoopVec/scalar-mul.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/simple.slang b/tests/cooperative-vector/CoopVec/simple.slang index 3b65b7c8c..9450840bc 100644 --- a/tests/cooperative-vector/CoopVec/simple.slang +++ b/tests/cooperative-vector/CoopVec/simple.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/step.slang b/tests/cooperative-vector/CoopVec/step.slang index cfa86df28..cf428f40e 100644 --- a/tests/cooperative-vector/CoopVec/step.slang +++ b/tests/cooperative-vector/CoopVec/step.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/sub.slang b/tests/cooperative-vector/CoopVec/sub.slang index ffb4944ed..c94881c34 100644 --- a/tests/cooperative-vector/CoopVec/sub.slang +++ b/tests/cooperative-vector/CoopVec/sub.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/subscript.slang b/tests/cooperative-vector/CoopVec/subscript.slang index c4df93e72..fee3df54e 100644 --- a/tests/cooperative-vector/CoopVec/subscript.slang +++ b/tests/cooperative-vector/CoopVec/subscript.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/tanh.slang b/tests/cooperative-vector/CoopVec/tanh.slang index ed698df6b..27c547bbf 100644 --- a/tests/cooperative-vector/CoopVec/tanh.slang +++ b/tests/cooperative-vector/CoopVec/tanh.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/unary.slang b/tests/cooperative-vector/CoopVec/unary.slang index 1f577afff..cf4f95342 100644 --- a/tests/cooperative-vector/CoopVec/unary.slang +++ b/tests/cooperative-vector/CoopVec/unary.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -xslang -skip-spirv-validation -xslang -skip-spirv-validation +//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 diff --git a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang b/tests/cooperative-vector/CoopVec/variadic-init-cast.slang index 36af7bcd7..888568ba1 100644 --- a/tests/cooperative-vector/CoopVec/variadic-init-cast.slang +++ b/tests/cooperative-vector/CoopVec/variadic-init-cast.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//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 diff --git a/tests/cooperative-vector/cast.slang b/tests/cooperative-vector/cast.slang deleted file mode 100644 index 263ad5026..000000000 --- a/tests/cooperative-vector/cast.slang +++ /dev/null @@ -1,30 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly - -RWStructuredBuffer outputBuffer; - -StructuredBuffer buf; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - coopvecNV r_int; - coopvecNV r = coopvecNV(r_int); - coopvecNV v = coopvecNV(1); - int offset = 0; - int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; - bool transpose = false; - int matrixStride = 4; - coopVecMatMulNV( - r, - v, - gl_ComponentTypeFloat32NV, - buf, - offset, - gl_ComponentTypeFloat32NV, - 8, - 16, - layout, - transpose, - matrixStride); - outputBuffer[dispatchThreadID.x] = r[0]; -} diff --git a/tests/cooperative-vector/cast.slang.glsl b/tests/cooperative-vector/cast.slang.glsl deleted file mode 100644 index 7194c02fc..000000000 --- a/tests/cooperative-vector/cast.slang.glsl +++ /dev/null @@ -1,23 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_0 { - float _data[]; -} buf_0; -layout(std430, binding = 0) buffer StructuredBuffer_float_t_1 { - float _data[]; -} outputBuffer_0; -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - coopvecNV r_int_0; - coopvecNV _S1 = (coopvecNV((r_int_0))); - coopvecNV r_0 = _S1; - coopvecNV _S2 = (coopvecNV((1))); - coopVecMatMulNV((r_0), (_S2), (1), (buf_0)._data, (0U), (1), (8U), (16U), (0), (false), (4U)); - float _S3 = r_0[0U]; - outputBuffer_0._data[gl_GlobalInvocationID.x] = _S3; - return; -} - diff --git a/tests/cooperative-vector/glsl/cast.slang b/tests/cooperative-vector/glsl/cast.slang new file mode 100644 index 000000000..263ad5026 --- /dev/null +++ b/tests/cooperative-vector/glsl/cast.slang @@ -0,0 +1,30 @@ +//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly + +RWStructuredBuffer outputBuffer; + +StructuredBuffer buf; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + coopvecNV r_int; + coopvecNV r = coopvecNV(r_int); + coopvecNV v = coopvecNV(1); + int offset = 0; + int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; + bool transpose = false; + int matrixStride = 4; + coopVecMatMulNV( + r, + v, + gl_ComponentTypeFloat32NV, + buf, + offset, + gl_ComponentTypeFloat32NV, + 8, + 16, + layout, + transpose, + matrixStride); + outputBuffer[dispatchThreadID.x] = r[0]; +} diff --git a/tests/cooperative-vector/glsl/cast.slang.glsl b/tests/cooperative-vector/glsl/cast.slang.glsl new file mode 100644 index 000000000..7194c02fc --- /dev/null +++ b/tests/cooperative-vector/glsl/cast.slang.glsl @@ -0,0 +1,23 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_0 { + float _data[]; +} buf_0; +layout(std430, binding = 0) buffer StructuredBuffer_float_t_1 { + float _data[]; +} outputBuffer_0; +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + coopvecNV r_int_0; + coopvecNV _S1 = (coopvecNV((r_int_0))); + coopvecNV r_0 = _S1; + coopvecNV _S2 = (coopvecNV((1))); + coopVecMatMulNV((r_0), (_S2), (1), (buf_0)._data, (0U), (1), (8U), (16U), (0), (false), (4U)); + float _S3 = r_0[0U]; + outputBuffer_0._data[gl_GlobalInvocationID.x] = _S3; + return; +} + diff --git a/tests/cooperative-vector/glsl/groupshared-sized.slang b/tests/cooperative-vector/glsl/groupshared-sized.slang new file mode 100644 index 000000000..74ccac6a2 --- /dev/null +++ b/tests/cooperative-vector/glsl/groupshared-sized.slang @@ -0,0 +1,37 @@ +//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly + +RWStructuredBuffer outputBuffer; + +groupshared float buf[100]; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + coopvecNV r; + coopvecNV v; + if(dispatchThreadID.x == 0) + { + for(int i = 0; i < 100; ++i) + { + buf[i] = float(i); + } + } + coopVecLoadNV(v, buf, 0); + int offset = 0; + int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; + bool transpose = false; + int matrixStride = 4; + coopVecMatMulNV( + r, + v, + gl_ComponentTypeFloat32NV, + buf, + offset, + gl_ComponentTypeFloat32NV, + 8, + 16, + layout, + transpose, + matrixStride); + outputBuffer[dispatchThreadID.x] = r[0]; +} diff --git a/tests/cooperative-vector/glsl/groupshared-sized.slang.glsl b/tests/cooperative-vector/glsl/groupshared-sized.slang.glsl new file mode 100644 index 000000000..f1f4b5a27 --- /dev/null +++ b/tests/cooperative-vector/glsl/groupshared-sized.slang.glsl @@ -0,0 +1,38 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 0) buffer StructuredBuffer_float_t_0 { + float _data[]; +} outputBuffer_0; +shared float buf_0[100]; + +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + coopvecNV r_0; + coopvecNV v_0; + uint _S1 = gl_GlobalInvocationID.x; + if(_S1 == 0U) + { + int i_0 = 0; + for(;;) + { + if(i_0 < 100) + { + } + else + { + break; + } + buf_0[i_0] = float(i_0); + i_0 = i_0 + 1; + } + } + coopVecLoadNV((v_0), (buf_0), (0U)); + coopvecNV _S2 = v_0; + coopVecMatMulNV((r_0), (_S2), (1), (buf_0), (0U), (1), (8U), (16U), (0), (false), (4U)); + float _S3 = r_0[0U]; + outputBuffer_0._data[uint(_S1)] = _S3; + return; +} diff --git a/tests/cooperative-vector/glsl/load-store.slang b/tests/cooperative-vector/glsl/load-store.slang new file mode 100644 index 000000000..04a0cd585 --- /dev/null +++ b/tests/cooperative-vector/glsl/load-store.slang @@ -0,0 +1,13 @@ +//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly + +RWStructuredBuffer rwBuf; +StructuredBuffer buf; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + coopvecNV r; + coopVecLoadNV(r, rwBuf, 0); + coopVecLoadNV(r, buf, 1); + coopVecStoreNV(r, rwBuf, 2); +} diff --git a/tests/cooperative-vector/glsl/load-store.slang.glsl b/tests/cooperative-vector/glsl/load-store.slang.glsl new file mode 100644 index 000000000..3844e2ff0 --- /dev/null +++ b/tests/cooperative-vector/glsl/load-store.slang.glsl @@ -0,0 +1,20 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 0) buffer StructuredBuffer_float_t_0 { + float _data[]; +} rwBuf_0; +layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_1 { + float _data[]; +} buf_0; +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + coopvecNV r_0; + coopVecLoadNV((r_0), (rwBuf_0)._data, (0U)); + coopVecLoadNV((r_0), (buf_0)._data, (1U)); + coopVecStoreNV((r_0), (rwBuf_0)._data, (2U)); + return; +} + diff --git a/tests/cooperative-vector/glsl/only-arith.slang b/tests/cooperative-vector/glsl/only-arith.slang new file mode 100644 index 000000000..8a6d3d0d9 --- /dev/null +++ b/tests/cooperative-vector/glsl/only-arith.slang @@ -0,0 +1,18 @@ +//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly + +// Disabled because we don't output the extension because although the +// coopvecNV type is used, it isn't *declared* here (and we don't attach +// requirements to the add operations); + +RWStructuredBuffer outputBuffer; + +StructuredBuffer buf; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + coopvecNV r; + coopvecNV v = coopvecNV(1); + r = v + v; + outputBuffer[dispatchThreadID.x] = r[0]; +} diff --git a/tests/cooperative-vector/glsl/only-arith.slang.glsl b/tests/cooperative-vector/glsl/only-arith.slang.glsl new file mode 100644 index 000000000..db3372d70 --- /dev/null +++ b/tests/cooperative-vector/glsl/only-arith.slang.glsl @@ -0,0 +1,16 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 0) buffer _S1 { + float _data[]; +} outputBuffer_0; +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + const coopvecNV v_0 = coopvecNV(1.0); + const coopvecNV r_0 = v_0 + v_0; + float _S2 = r_0[0U]; + ((outputBuffer_0)._data[(gl_GlobalInvocationID.x)]) = _S2; + return; +} diff --git a/tests/cooperative-vector/glsl/outer-product-accumulate.slang b/tests/cooperative-vector/glsl/outer-product-accumulate.slang new file mode 100644 index 000000000..1db30cb0d --- /dev/null +++ b/tests/cooperative-vector/glsl/outer-product-accumulate.slang @@ -0,0 +1,19 @@ +//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly -emit-spirv-via-glsl + +RWByteAddressBuffer buf; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + coopvecNV op0 = coopvecNV(1); + coopvecNV op1 = coopvecNV(2); + + coopVecOuterProductAccumulateNV( + op0, + op1, + buf, + 0, // firstElement + 4, // matrixStride + gl_CooperativeVectorMatrixLayoutRowMajorNV, + gl_ComponentTypeFloat32NV); +} diff --git a/tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl b/tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl new file mode 100644 index 000000000..09d781824 --- /dev/null +++ b/tests/cooperative-vector/glsl/outer-product-accumulate.slang.glsl @@ -0,0 +1,17 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 0) buffer _S1 +{ + uint _data[]; +} buf_0; +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + coopvecNV _S2 = (coopvecNV((1.0))); + coopvecNV _S3 = (coopvecNV((2.0))); + coopVecOuterProductAccumulateNV((_S2), (_S3), (buf_0)._data, (0U), (4U), (0), (1)); + return; +} + diff --git a/tests/cooperative-vector/glsl/simple.slang b/tests/cooperative-vector/glsl/simple.slang new file mode 100644 index 000000000..4128f6827 --- /dev/null +++ b/tests/cooperative-vector/glsl/simple.slang @@ -0,0 +1,35 @@ +//DISABLE_TEST:CROSS_COMPILE(filecheck=CHECK): -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly -emit-spirv-via-glsl + +RWStructuredBuffer outputBuffer; + +StructuredBuffer buf; + +[numthreads(4, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + // CHECK: %[[VAR1:[a-zA-Z0-9_]+]] = OpTypeCooperativeVectorNV %int %uint_16 + // CHECK: OpConstantCompositeReplicateEXT %9 %int_1 + coopvecNV v = coopvecNV(1); + + // CHECK: %[[VAR2:[a-zA-Z0-9_]+]] = OpTypeCooperativeVectorNV %int %uint_8 + coopvecNV r; + int offset = 0; + int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; + bool transpose = false; + int matrixStride = 4; + + // CHECK: OpCooperativeVectorMatrixMulNV %[[VAR2]] %{{.*}} %int_1 %{{.*}} %uint_0 %int_1 %uint_8 %uint_16 %int_0 %false %uint_4 MatrixBSignedComponentsKHR|MatrixResultSignedComponentsKHR + coopVecMatMulNV( + r, + v, + gl_ComponentTypeFloat32NV, + buf, + offset, + gl_ComponentTypeFloat32NV, + 8, + 16, + layout, + transpose, + matrixStride); + outputBuffer[dispatchThreadID.x] = r[0]; +} diff --git a/tests/cooperative-vector/glsl/simple.slang.glsl b/tests/cooperative-vector/glsl/simple.slang.glsl new file mode 100644 index 000000000..cf5f0566e --- /dev/null +++ b/tests/cooperative-vector/glsl/simple.slang.glsl @@ -0,0 +1,20 @@ +#version 450 +#extension GL_NV_cooperative_vector : require +layout(row_major) uniform; +layout(row_major) buffer; +layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_0 { + float _data[]; +} buf_0; +layout(std430, binding = 0) buffer StructuredBuffer_float_t_1 { + float _data[]; +} outputBuffer_0; +layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; +void main() +{ + coopvecNV _S1 = (coopvecNV((1))); + coopvecNV r_0; + coopVecMatMulNV((r_0), (_S1), (1), (buf_0)._data, (0U), (1), (8U), (16U), (0), (false), (4U)); + float _S2 = r_0[0U]; + outputBuffer_0._data[gl_GlobalInvocationID.x] = _S2; + return; +} diff --git a/tests/cooperative-vector/groupshared-sized.slang b/tests/cooperative-vector/groupshared-sized.slang deleted file mode 100644 index 74ccac6a2..000000000 --- a/tests/cooperative-vector/groupshared-sized.slang +++ /dev/null @@ -1,37 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly - -RWStructuredBuffer outputBuffer; - -groupshared float buf[100]; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - coopvecNV r; - coopvecNV v; - if(dispatchThreadID.x == 0) - { - for(int i = 0; i < 100; ++i) - { - buf[i] = float(i); - } - } - coopVecLoadNV(v, buf, 0); - int offset = 0; - int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; - bool transpose = false; - int matrixStride = 4; - coopVecMatMulNV( - r, - v, - gl_ComponentTypeFloat32NV, - buf, - offset, - gl_ComponentTypeFloat32NV, - 8, - 16, - layout, - transpose, - matrixStride); - outputBuffer[dispatchThreadID.x] = r[0]; -} diff --git a/tests/cooperative-vector/groupshared-sized.slang.glsl b/tests/cooperative-vector/groupshared-sized.slang.glsl deleted file mode 100644 index f1f4b5a27..000000000 --- a/tests/cooperative-vector/groupshared-sized.slang.glsl +++ /dev/null @@ -1,38 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 0) buffer StructuredBuffer_float_t_0 { - float _data[]; -} outputBuffer_0; -shared float buf_0[100]; - -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - coopvecNV r_0; - coopvecNV v_0; - uint _S1 = gl_GlobalInvocationID.x; - if(_S1 == 0U) - { - int i_0 = 0; - for(;;) - { - if(i_0 < 100) - { - } - else - { - break; - } - buf_0[i_0] = float(i_0); - i_0 = i_0 + 1; - } - } - coopVecLoadNV((v_0), (buf_0), (0U)); - coopvecNV _S2 = v_0; - coopVecMatMulNV((r_0), (_S2), (1), (buf_0), (0U), (1), (8U), (16U), (0), (false), (4U)); - float _S3 = r_0[0U]; - outputBuffer_0._data[uint(_S1)] = _S3; - return; -} diff --git a/tests/cooperative-vector/load-store.slang b/tests/cooperative-vector/load-store.slang deleted file mode 100644 index 04a0cd585..000000000 --- a/tests/cooperative-vector/load-store.slang +++ /dev/null @@ -1,13 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly - -RWStructuredBuffer rwBuf; -StructuredBuffer buf; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - coopvecNV r; - coopVecLoadNV(r, rwBuf, 0); - coopVecLoadNV(r, buf, 1); - coopVecStoreNV(r, rwBuf, 2); -} diff --git a/tests/cooperative-vector/load-store.slang.glsl b/tests/cooperative-vector/load-store.slang.glsl deleted file mode 100644 index 3844e2ff0..000000000 --- a/tests/cooperative-vector/load-store.slang.glsl +++ /dev/null @@ -1,20 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 0) buffer StructuredBuffer_float_t_0 { - float _data[]; -} rwBuf_0; -layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_1 { - float _data[]; -} buf_0; -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - coopvecNV r_0; - coopVecLoadNV((r_0), (rwBuf_0)._data, (0U)); - coopVecLoadNV((r_0), (buf_0)._data, (1U)); - coopVecStoreNV((r_0), (rwBuf_0)._data, (2U)); - return; -} - diff --git a/tests/cooperative-vector/only-arith.slang b/tests/cooperative-vector/only-arith.slang deleted file mode 100644 index 8a6d3d0d9..000000000 --- a/tests/cooperative-vector/only-arith.slang +++ /dev/null @@ -1,18 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly - -// Disabled because we don't output the extension because although the -// coopvecNV type is used, it isn't *declared* here (and we don't attach -// requirements to the add operations); - -RWStructuredBuffer outputBuffer; - -StructuredBuffer buf; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - coopvecNV r; - coopvecNV v = coopvecNV(1); - r = v + v; - outputBuffer[dispatchThreadID.x] = r[0]; -} diff --git a/tests/cooperative-vector/only-arith.slang.glsl b/tests/cooperative-vector/only-arith.slang.glsl deleted file mode 100644 index db3372d70..000000000 --- a/tests/cooperative-vector/only-arith.slang.glsl +++ /dev/null @@ -1,16 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 0) buffer _S1 { - float _data[]; -} outputBuffer_0; -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - const coopvecNV v_0 = coopvecNV(1.0); - const coopvecNV r_0 = v_0 + v_0; - float _S2 = r_0[0U]; - ((outputBuffer_0)._data[(gl_GlobalInvocationID.x)]) = _S2; - return; -} diff --git a/tests/cooperative-vector/outer-product-accumulate.slang b/tests/cooperative-vector/outer-product-accumulate.slang deleted file mode 100644 index 1db30cb0d..000000000 --- a/tests/cooperative-vector/outer-product-accumulate.slang +++ /dev/null @@ -1,19 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE: -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly -emit-spirv-via-glsl - -RWByteAddressBuffer buf; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - coopvecNV op0 = coopvecNV(1); - coopvecNV op1 = coopvecNV(2); - - coopVecOuterProductAccumulateNV( - op0, - op1, - buf, - 0, // firstElement - 4, // matrixStride - gl_CooperativeVectorMatrixLayoutRowMajorNV, - gl_ComponentTypeFloat32NV); -} diff --git a/tests/cooperative-vector/outer-product-accumulate.slang.glsl b/tests/cooperative-vector/outer-product-accumulate.slang.glsl deleted file mode 100644 index 09d781824..000000000 --- a/tests/cooperative-vector/outer-product-accumulate.slang.glsl +++ /dev/null @@ -1,17 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 0) buffer _S1 -{ - uint _data[]; -} buf_0; -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - coopvecNV _S2 = (coopvecNV((1.0))); - coopvecNV _S3 = (coopvecNV((2.0))); - coopVecOuterProductAccumulateNV((_S2), (_S3), (buf_0)._data, (0U), (4U), (0), (1)); - return; -} - diff --git a/tests/cooperative-vector/simple.slang b/tests/cooperative-vector/simple.slang deleted file mode 100644 index 4128f6827..000000000 --- a/tests/cooperative-vector/simple.slang +++ /dev/null @@ -1,35 +0,0 @@ -//DISABLE_TEST:CROSS_COMPILE(filecheck=CHECK): -profile glsl_450+spirv_1_4 -stage compute -entry computeMain -target spirv-assembly -emit-spirv-via-glsl - -RWStructuredBuffer outputBuffer; - -StructuredBuffer buf; - -[numthreads(4, 1, 1)] -void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) -{ - // CHECK: %[[VAR1:[a-zA-Z0-9_]+]] = OpTypeCooperativeVectorNV %int %uint_16 - // CHECK: OpConstantCompositeReplicateEXT %9 %int_1 - coopvecNV v = coopvecNV(1); - - // CHECK: %[[VAR2:[a-zA-Z0-9_]+]] = OpTypeCooperativeVectorNV %int %uint_8 - coopvecNV r; - int offset = 0; - int layout = gl_CooperativeVectorMatrixLayoutRowMajorNV; - bool transpose = false; - int matrixStride = 4; - - // CHECK: OpCooperativeVectorMatrixMulNV %[[VAR2]] %{{.*}} %int_1 %{{.*}} %uint_0 %int_1 %uint_8 %uint_16 %int_0 %false %uint_4 MatrixBSignedComponentsKHR|MatrixResultSignedComponentsKHR - coopVecMatMulNV( - r, - v, - gl_ComponentTypeFloat32NV, - buf, - offset, - gl_ComponentTypeFloat32NV, - 8, - 16, - layout, - transpose, - matrixStride); - outputBuffer[dispatchThreadID.x] = r[0]; -} diff --git a/tests/cooperative-vector/simple.slang.glsl b/tests/cooperative-vector/simple.slang.glsl deleted file mode 100644 index cf5f0566e..000000000 --- a/tests/cooperative-vector/simple.slang.glsl +++ /dev/null @@ -1,20 +0,0 @@ -#version 450 -#extension GL_NV_cooperative_vector : require -layout(row_major) uniform; -layout(row_major) buffer; -layout(std430, binding = 1) readonly buffer StructuredBuffer_float_t_0 { - float _data[]; -} buf_0; -layout(std430, binding = 0) buffer StructuredBuffer_float_t_1 { - float _data[]; -} outputBuffer_0; -layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in; -void main() -{ - coopvecNV _S1 = (coopvecNV((1))); - coopvecNV r_0; - coopVecMatMulNV((r_0), (_S1), (1), (buf_0)._data, (0U), (1), (8U), (16U), (0), (false), (4U)); - float _S2 = r_0[0U]; - outputBuffer_0._data[gl_GlobalInvocationID.x] = _S2; - return; -} diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index e7298312b..6bf4f041d 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -15,3 +15,4 @@ tests/compute/interface-shader-param.slang.5 syn (wgpu) tests/language-feature/shader-params/interface-shader-param-ordinary.slang.4 syn (wgpu) gfx-unit-test-tool/RayTracingTestAD3D12.internal gfx-unit-test-tool/RayTracingTestBD3D12.internal +gfx-unit-test-tool/precompiledTargetModule2Vulkan.internal diff --git a/tests/expected-failure.txt b/tests/expected-failure.txt index 7283c8d97..2d95734cc 100644 --- a/tests/expected-failure.txt +++ b/tests/expected-failure.txt @@ -5,3 +5,4 @@ tests/language-feature/saturated-cooperation/fuse.slang (vk) tests/bugs/byte-address-buffer-interlocked-add-f32.slang (vk) tests/ir/loop-unroll-0.slang.1 (vk) tests/hlsl-intrinsic/texture/float-atomics.slang (vk) +gfx-unit-test-tool/precompiledTargetModule2Vulkan.internal -- cgit v1.2.3