Skip to content

vllm.v1.kv_offload.fs.gds.cufile_bindings

ctypes bindings for the NVIDIA cuFile (GDS) synchronous API.

Classes:

Functions:

CUfileBoolConfigParameter

Bases: IntEnum

CUFileBoolConfigParameter_t from cufile.h.

libcufile reads the numeric value, so these must track the C enum. Values only ever get appended, which is why allow_compat_mode is stable across cuFile releases.

cuFileBufRegister(dev_ptr, size, flags=0)

Register a device memory range for cuFile I/O.

cuFileHandleRegister(fd)

Register a POSIX file descriptor for cuFile I/O.

cuFileRead(handle, dev_ptr, size, file_offset=0, buf_offset=0)

Synchronous read from file to GPU memory. Returns bytes read.

cuFileSetParameterBool(param, value)

Stage a boolean cuFile parameter.

Must be called before cuFileDriverOpen(): staged values are applied at driver load, and the call fails with CU_FILE_DRIVER_ALREADY_OPEN once the driver is open.

cuFileWrite(handle, dev_ptr, size, file_offset=0, buf_offset=0)

Synchronous write from GPU memory to file. Returns bytes written.

open_for_gds(path, flags)

Open a file with O_DIRECT for GDS I/O. Returns the fd.