Skip to main content

copy_rows_d_to_d

Function copy_rows_d_to_d 

Source
pub fn copy_rows_d_to_d(
    dst: DevicePtr,
    dst_stride_bytes: usize,
    src: DevicePtr,
    src_stride_bytes: usize,
    row_bytes: usize,
    num_rows: usize,
) -> Result<()>
Expand description

Copy num_rows rows of row_bytes bytes from a device buffer with src_stride_bytes row stride to a device buffer with dst_stride_bytes row stride. Used to depad TMA-aligned output tensors back to tight NCHW.

Issues a single cuMemcpy2D rather than one cuMemcpyDtoD per row, letting the driver schedule the whole transfer as one unit.