blob: 3551a2597b47007399e29e248cb12ce150549c66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly
// CHECK: type: int32_t
// CHECK-COUNT-256: 4
//TEST_INPUT:ubuffer(stride=4, count = 256):out,name=outputBuffer
RWStructuredBuffer<int32_t> outputBuffer;
using namespace linalg;
[numthreads(32, 1, 1)]
void computeMain()
{
let mat = CoopMat<float, MemoryScope.Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>(4.0);
var result = CoopMat<int32_t, MemoryScope.Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>(0);
result.copyFrom(mat);
result.Store<CoopMatMatrixLayout::RowMajor>(outputBuffer, 0, 16);
}
|