Expand description
Memory-related helpers. Thin safe wrappers around the CUDA driver memory API.
Functions§
- alloc
- Allocate
byte_sizebytes of device memory in the current CUDA context. - alloc_
host - Allocate
n_elemselements ofTin page-locked (pinned) host memory. - copy_
d_ ⚠to_ h - Copy
countelements of typeTfrom device memory to host memory. - copy_
h_ ⚠to_ d - Copy
countelements of typeTfrom host memory to device memory. - copy_
rows_ d_ to_ d - Copy
num_rowsrows ofrow_bytesbytes from a device buffer withsrc_stride_bytesrow stride to a device buffer withdst_stride_bytesrow stride. Used to depad TMA-aligned output tensors back to tight NCHW. - free
- Free a device allocation previously returned by
alloc. - free_
host ⚠ - Free a pinned host allocation returned by
alloc_host.
Type Aliases§
- Device
Ptr - Opaque CUDA device pointer (a virtual address in device memory).