Skip to main content

Crate baracuda_cufile

Crate baracuda_cufile 

Source
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

  1. Driver::open — initialize the driver (do this once per process).
  2. FileHandle::register an open file descriptor.
  3. BufRegistration::register a CUDA device buffer (optional but strongly recommended for performance).
  4. FileHandle::read / FileHandle::write directly between the file and the device buffer — no bounce through host memory.

Modules§

CUfileOpcode
Opcode selector for CUfileIOParams_t.

Structs§

BatchIO
RAII handle for a cuFile batch-I/O request group. Supports up to capacity entries per submission cycle.
BufRegistration
A registered device-buffer region. Registration is optional — cuFile works without it — but it unlocks the fastest DMA path.
CUfileIOEvents_t
CUfileIOEvents_t — status for a single batched-I/O entry.
CUfileIOParams_t
CUfileIOParams_t — 1 entry in a batched-IO request.
Driver
RAII handle for the cuFile driver lifecycle.
FileHandle
A registered file descriptor.
StreamRegistration
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 CUfileOpError code.
probe
Verify cuFile is loadable on this host. Fails on non-Linux platforms.
version
cuFile runtime version as reported by cuFileGetVersion.

Type Aliases§

CUfileBatchHandle_t
Opaque batch-handle (maps to CUfileBatchHandle_t).
Error
Error type for cuFile operations.
Result
Result alias.