Dart Gather Kernels#
- void trt_edgellm::kernel::gatherRows(
- void *dst,
- void const *src,
- int32_t const *rowIndices,
- int64_t numRows,
- int64_t rowBytes,
- cudaStream_t stream
Dtype-agnostic row gather: dst[r, :] = src[rowIndices[r], :].
Rows are treated as opaque byte spans of length rowBytes. dst and src must not overlap (gather out-of-place into a scratch buffer, then copy back if compaction in place is desired). Uses 16-byte vectorized copies when rowBytes and both pointers are 16-byte aligned, byte copies otherwise.
- Parameters:
dst – [out] Destination base pointer (device), at least numRows * rowBytes bytes
src – [in] Source base pointer (device)
rowIndices – [in] Device INT32 array of source row indices, length numRows
numRows – [in] Number of rows to gather
rowBytes – [in] Size of one row in bytes
stream – [in] CUDA stream for execution