Expand description
Safe-ish wrappers around the CUDA block/universal packing kernels.
The core ideas:
- A “block” represents the stack of
nl * notensors arranged either as NHD (inner axes[nt, nh, hd]) or HND (inner axes[nh, nt, hd]). - A “universal” tensor is
[nh, nl, no, nt, hd]stored contiguously. - An “operational” tensor is
[nl, no, inner]withinner = nt * nh * hd.
All pointer-list parameters (e.g. universal_ptrs, src_ptrs) must be
device-accessible: allocated via cudaMalloc (device memory) or
cudaMallocHost / cuMemHostRegister (pinned/registered/page-locked host memory).
Host code calls these helpers with flattened pointer tables so a single launch can move many logical blocks in one go.
Enums§
- Memcpy
Batch Mode - Controls how
memcpy_batchdispatches copies.
Functions§
- is_
memcpy_ batch_ available - Check if cudaMemcpyBatchAsync is available.
- is_
using_ stubs - Check if this library was built with stub kernels (no real CUDA).
- memcpy_
batch ⚠ - Batched memcpy using cudaMemcpyBatchAsync (CUDA 12.9+) and/or individual cudaMemcpyAsync.
- vectorized_
copy ⚠ - Launch vectorized copy between arbitrary device-visible pointer pairs.