summaryrefslogtreecommitdiff
path: root/tests/cooperative-matrix/diagnostics
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-05-15 03:47:43 +0000
committerGitHub <noreply@github.com>2025-05-14 20:47:43 -0700
commit2580bb02f7a079ab1c0106b5960a21ed1627bca0 (patch)
treec4fe31e6314f514c9bb079d0fa15ee53adf7396f /tests/cooperative-matrix/diagnostics
parentb4d3d3017640581c21b52a12413d3f074ab1c5c1 (diff)
Add new coopmat2 functions: Reduce and Transpose (#7027)
This commit adds three new functions for CoopMat as described in the proposal document, Cooperative matrix 2 proposal spec#12 The new functions are: CoopMat<T,S,M,N,R>::Transpose CoopMat<T,S,M,N,R>::ReduceRow CoopMat<T,S,M,N,R>::ReduceColumn CoopMat<T,S,M,N,R>::ReduceRowAndColumn CoopMat<T,S,M,N,R>::Reduce2x2
Diffstat (limited to 'tests/cooperative-matrix/diagnostics')
-rw-r--r--tests/cooperative-matrix/diagnostics/mat-mul-add-different-scope.slang20
-rw-r--r--tests/cooperative-matrix/diagnostics/mat-mul-add-incorrect-matrix-use.slang20
2 files changed, 0 insertions, 40 deletions
diff --git a/tests/cooperative-matrix/diagnostics/mat-mul-add-different-scope.slang b/tests/cooperative-matrix/diagnostics/mat-mul-add-different-scope.slang
deleted file mode 100644
index 0c4308308..000000000
--- a/tests/cooperative-matrix/diagnostics/mat-mul-add-different-scope.slang
+++ /dev/null
@@ -1,20 +0,0 @@
-//DIAGNOSTIC_TEST(compute):SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv
-
-RWStructuredBuffer<float> outputBuffer;
-
-typealias CoopMatAType = CoopMat<float16_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixA>;
-typealias CoopMatBType = CoopMat<float16_t, CoopMatScope::Workgroup, 16, 16, CoopMatMatrixUse::MatrixB>;
-typealias CoopMatCType = CoopMat<float32_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>;
-
-// CHECK: error 39999: could not specialize generic for arguments of type
-
-[numthreads(32, 1, 1)]
-void computeMain()
-{
- let matA = CoopMatAType(3.0);
- let matB = CoopMatBType(5.0);
- let matC = CoopMatCType(1.0);
-
- const let result = coopMatMulAdd(matA, matB, matC, CoopMatMatrixOperands::None);
- result.store(outputBuffer, 0, 16, CoopMatMatrixLayout::RowMajor);
-}
diff --git a/tests/cooperative-matrix/diagnostics/mat-mul-add-incorrect-matrix-use.slang b/tests/cooperative-matrix/diagnostics/mat-mul-add-incorrect-matrix-use.slang
deleted file mode 100644
index 5b7dc7a5b..000000000
--- a/tests/cooperative-matrix/diagnostics/mat-mul-add-incorrect-matrix-use.slang
+++ /dev/null
@@ -1,20 +0,0 @@
-//DIAGNOSTIC_TEST(compute):SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv
-
-RWStructuredBuffer<float> outputBuffer;
-
-typealias CoopMatAType = CoopMat<float16_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixA>;
-typealias CoopMatBType = CoopMat<float16_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixA>;
-typealias CoopMatCType = CoopMat<float32_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>;
-
-// CHECK: error 41400: static assertion failed, matrix uses for `coopMatMulAdd` matrix parameters must be `MatrixA`, `MatrixB` and `MatrixAccumulator`
-
-[numthreads(32, 1, 1)]
-void computeMain()
-{
- let matA = CoopMatAType(3.0);
- let matB = CoopMatBType(5.0);
- let matC = CoopMatCType(1.0);
-
- let result = coopMatMulAdd(matA, matB, matC, CoopMatMatrixOperands::None);
- result.store(outputBuffer, 0, 16, CoopMatMatrixLayout::RowMajor);
-}