I have data in global memory and I want to read them like:
a[0], a[3], a[6], a[9]…
But what I find in load_matrix_sync or in PTX,wmma command is only stride for different rows. What should I do? Thanks!!!
I have data in global memory and I want to read them like:
a[0], a[3], a[6], a[9]…
But what I find in load_matrix_sync or in PTX,wmma command is only stride for different rows. What should I do? Thanks!!!
You can compact the elements in shared memory before using load_matrix from that shared memory.
Well…I think so… No other choice… Thanks!!!
For WMMA/Tensor Core it is not possible to perform a load with an arbitrary stride such as 3.
The wmma.load and load_matrix_sync instructions require contiguous tiles with a regular layout (row‑major or column‑major).
If the data in global memory has a stride that is not compatible with the matrix layout, the only solution is exactly the one already mentioned:
compact the elements in shared memory into a contiguous form and then call load_matrix_sync from shared memory.
This is the expected behavior of the WMMA model.