cufile

The cuda.bindings.cufile Python module wraps the cuFile C APIs. Supported on Linux only.

Currently using this module requires NumPy to be present. Any recent NumPy 1.x or 2.x should work.

Functions

handle_register(intptr_t descr)

cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations.

handle_deregister(intptr_t fh)

releases a registered filehandle from cuFile.

buf_register(intptr_t buf_ptr_base, ...)

register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile.

buf_deregister(intptr_t buf_ptr_base)

deregister an already registered device or host memory from cuFile.

read(intptr_t fh, intptr_t buf_ptr_base, ...)

read data from a registered file handle to a specified device or host memory.

write(intptr_t fh, intptr_t buf_ptr_base, ...)

write data from a specified device or host memory to a registered file handle.

driver_open()

Initialize the cuFile library and open the nvidia-fs driver.

use_count()

returns use count of cufile drivers at that moment by the process.

driver_get_properties(intptr_t props)

Gets the Driver session properties.

driver_set_poll_mode(bool poll, ...)

Sets whether the Read/Write APIs use polling to do IO operations.

driver_set_max_direct_io_size(...)

Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver.

driver_set_max_cache_size(size_t max_cache_size)

Control parameter to set maximum GPU memory reserved per device by the library for internal buffering.

driver_set_max_pinned_mem_size(...)

Sets maximum buffer space that is pinned in KB for use by cuFileBufRegister.

batch_io_set_up(unsigned int nr)

batch_io_submit(intptr_t batch_idp, ...)

batch_io_get_status(intptr_t batch_idp, ...)

batch_io_cancel(intptr_t batch_idp)

batch_io_destroy(intptr_t batch_idp)

read_async(intptr_t fh, ...)

write_async(intptr_t fh, ...)

stream_register(intptr_t stream, ...)

stream_deregister(intptr_t stream)

get_version()

get_parameter_size_t(int param)

get_parameter_bool(int param)

get_parameter_string(int param, int len)

set_parameter_size_t(int param, size_t value)

set_parameter_bool(int param, bool value)

set_parameter_string(int param, ...)

op_status_error(int status)

cufileop status string.

driver_close()

reset the cuFile library and release the nvidia-fs driver

Types

IOEvents([size])

Empty-initialize an array of CUfileIOEvents_t.

Descr([size])

Empty-initialize an array of CUfileDescr_t.

IOParams([size])

Empty-initialize an array of CUfileIOParams_t.

OpError(value[, names, module, qualname, ...])

See CUfileOpError.

DriverStatusFlags(value[, names, module, ...])

See CUfileDriverStatusFlags_t.

DriverControlFlags(value[, names, module, ...])

See CUfileDriverControlFlags_t.

FeatureFlags(value[, names, module, ...])

See CUfileFeatureFlags_t.

FileHandleType(value[, names, module, ...])

See CUfileFileHandleType.

Opcode(value[, names, module, qualname, ...])

See CUfileOpcode_t.

Status(value[, names, module, qualname, ...])

See CUfileStatus_t.

BatchMode(value[, names, module, qualname, ...])

See CUfileBatchMode_t.

SizeTConfigParameter(value[, names, module, ...])

See CUFileSizeTConfigParameter_t.

BoolConfigParameter(value[, names, module, ...])

See CUFileBoolConfigParameter_t.

StringConfigParameter(value[, names, ...])

See CUFileStringConfigParameter_t.

cuFileError(status[, cu_err])