diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-05-15 03:47:43 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-14 20:47:43 -0700 |
| commit | 2580bb02f7a079ab1c0106b5960a21ed1627bca0 (patch) | |
| tree | c4fe31e6314f514c9bb079d0fa15ee53adf7396f /tests/cooperative-matrix/subscript.slang | |
| parent | b4d3d3017640581c21b52a12413d3f074ab1c5c1 (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/subscript.slang')
| -rw-r--r-- | tests/cooperative-matrix/subscript.slang | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/cooperative-matrix/subscript.slang b/tests/cooperative-matrix/subscript.slang index cfe164f04..0d765b6b3 100644 --- a/tests/cooperative-matrix/subscript.slang +++ b/tests/cooperative-matrix/subscript.slang @@ -9,7 +9,9 @@ //TEST_INPUT:ubuffer(stride=4, count=256):out,name=outputBuffer RWStructuredBuffer<int32_t> outputBuffer; -typealias CoopMatType = CoopMat<int32_t, CoopMatScope::Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>; +using namespace linalg; + +typealias CoopMatType = CoopMat<int32_t, MemoryScope.Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>; [numthreads(32, 1, 1)] void computeMain() @@ -19,5 +21,5 @@ void computeMain() mat[1] = mat[0]+2; mat[2] = mat[1]+3; mat[3] = mat[2]+4; - mat.store(outputBuffer, 0, 16, CoopMatMatrixLayout::RowMajor); + mat.Store<CoopMatMatrixLayout::RowMajor>(outputBuffer, 0, 16); } |
