Expand description
Safe Rust wrappers for NVIDIA cuFile (GPUDirect Storage).
cuFile is Linux-only and requires a GDS-capable filesystem (ext4
/ XFS on NVMe with the NVIDIA GDS kernel driver). On Windows and
macOS every API returns
baracuda_core::LoaderError::UnsupportedPlatform.
§Workflow
Driver::open— initialize the driver (do this once per process).FileHandle::registeran open file descriptor.BufRegistration::registera CUDA device buffer (optional but strongly recommended for performance).FileHandle::read/FileHandle::writedirectly between the file and the device buffer — no bounce through host memory.
Modules§
- CUfile
Opcode - Opcode selector for
CUfileIOParams_t.
Structs§
- BatchIO
- RAII handle for a cuFile batch-I/O request group. Supports up to
capacityentries per submission cycle. - BufRegistration
- A registered device-buffer region. Registration is optional — cuFile works without it — but it unlocks the fastest DMA path.
- CUfileIO
Events_ t CUfileIOEvents_t— status for a single batched-I/O entry.- CUfileIO
Params_ t CUfileIOParams_t— 1 entry in a batched-IO request.- Driver
- RAII handle for the cuFile driver lifecycle.
- File
Handle - A registered file descriptor.
- Stream
Registration - A cuFile-aware CUDA stream. Register a stream once to use it with
FileHandle::read_async/FileHandle::write_async— cuFile will queue the I/O behind prior stream work and signal completion as another stream op.
Functions§
- op_
status_ error_ string - Human-readable string describing a
CUfileOpErrorcode. - probe
- Verify cuFile is loadable on this host. Fails on non-Linux platforms.
- version
- cuFile runtime version as reported by
cuFileGetVersion.
Type Aliases§
- CUfile
Batch Handle_ t - Opaque batch-handle (maps to
CUfileBatchHandle_t). - Error
- Error type for cuFile operations.
- Result
- Result alias.