You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[REQ] Single-line array/tile matrix extraction with row indexing #1028
Where tile is a 3D tile of matrices and 1 is the second row of the matrix at i,j,k,
and arr is a 2D array of matrices and 0 is the first row of the matrix at i,j.
changed the title [-][REQ] Single-line tile matrix extraction with row indexing[/-][+][REQ] Single-line array/tile matrix extraction with row indexing[/+]on May 14, 2026
Related: #1688 covers the same rank-awareness problem in tile_extract() and chained subscripts for composite-valued tiles. #1688 exercises the rank-2 wp.vec3 case, while this issue covers applying a matrix-row index after extracting an element from a rank-3 tile. They likely share a fix area, but neither is a duplicate of the other.
The change adds rank-aware matrix-row extraction for matrix-dtype tiles, so kernel expressions such as tile[i, j, k][1] now return the selected row vector. It also supports row writes, negative row indices, and adjoints. The array form arr[i, j][0] was already supported and covered by existing matrix-array extraction tests; both forms requested here were reverified against this commit.
Public API behavior
This is kernel-side subscript behavior; no host-side Python API was added.
tile[i, j, k][r] now works for matrix-dtype tiles, with row reads and writes across supported tile ranks, negative row indices, and adjoints.
Existing matrix-valued array expressions such as arr[i, j][r] remain supported.
Test coverage
New warp/tests/tile/test_tile_composite_row.py coverage exercises matrix-row reads and writes for 1Dâ4D tiles, negative row indices, read/write adjoints, and overwrite-gradient clearing; TestTileCompositeRow is registered in the default and debug suites.
Existing warp/tests/matrix/test_mat.py::test_mat_array_extract covers chained row extraction from a 2D matrix-valued array, including gradients.
Behavioral verification
The issue's rank-3 tile expression produced the expected matrix row on CUDA, and the rank-2 array expression produced the expected row on both CPU and CUDA.
Activity
[-][REQ] Single-line tile matrix extraction with row indexing[/-][+][REQ] Single-line array/tile matrix extraction with row indexing[/+]shi-eric commentedon Jul 23, 2026
Related: #1688 covers the same rank-awareness problem in
tile_extract()and chained subscripts for composite-valued tiles. #1688 exercises the rank-2wp.vec3case, while this issue covers applying a matrix-row index after extracting an element from a rank-3 tile. They likely share a fix area, but neither is a duplicate of the other.Add matrix row indexing support (NVIDIAGH-1028)
shi-eric commentedon Aug 20, 2026
This is addressed by 4cd493b.
The change adds rank-aware matrix-row extraction for matrix-dtype tiles, so kernel expressions such as
tile[i, j, k][1]now return the selected row vector. It also supports row writes, negative row indices, and adjoints. The array formarr[i, j][0]was already supported and covered by existing matrix-array extraction tests; both forms requested here were reverified against this commit.Public API behavior
tile[i, j, k][r]now works for matrix-dtype tiles, with row reads and writes across supported tile ranks, negative row indices, and adjoints.arr[i, j][r]remain supported.Test coverage
warp/tests/tile/test_tile_composite_row.pycoverage exercises matrix-row reads and writes for 1Dâ4D tiles, negative row indices, read/write adjoints, and overwrite-gradient clearing;TestTileCompositeRowis registered in the default and debug suites.warp/tests/matrix/test_mat.py::test_mat_array_extractcovers chained row extraction from a 2D matrix-valued array, including gradients.Behavioral verification
The issue's rank-3 tile expression produced the expected matrix row on CUDA, and the rank-2 array expression produced the expected row on both CPU and CUDA.
Add matrix row indexing support (NVIDIAGH-1028)