diff options
| author | Yong He <yonghe@outlook.com> | 2024-11-06 18:58:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-07 10:58:26 +0800 |
| commit | 7c195d3b31c85d8b53ad5848b7730bb2be6c6a89 (patch) | |
| tree | 118b6ab79c2af45281d40b2ada9dcc85c98d8e65 /tests/cuda | |
| parent | 65de5452b71a311d66169ea16334e84d7e6465c1 (diff) | |
Fix CUDA prelude for makeMatrix (#5509)
* Fix CUDA prelude for makeMatrix
* Add regression test.
Diffstat (limited to 'tests/cuda')
| -rw-r--r-- | tests/cuda/make-matrix.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/cuda/make-matrix.slang b/tests/cuda/make-matrix.slang new file mode 100644 index 000000000..ef6358620 --- /dev/null +++ b/tests/cuda/make-matrix.slang @@ -0,0 +1,14 @@ +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -compute +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda -compute + +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<uint4x3> outputBuffer : register(u0); + +[numthreads(1, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + uint idx = dispatchThreadID.x + 1; + uint4x3 mat1 = uint4x3(idx, idx, idx, idx, idx, idx, idx, idx, idx, idx, idx, idx); + outputBuffer[0] = mat1; + // CHECK: 1 +}
\ No newline at end of file |
