cuda.bindings.cufile#
2026-09-24
26 min read time
Advanced Micro Devices, Inc.
cuda.bindings.cufile interop layer implemented on top of hipFILE.
This is a HAND-WRITTEN Cython module (it is NOT emitted by the hip-python code
generator). It mirrors the public cuda.bindings.cufile cpdef surface
(snake_case functions, intptr_t pointer arguments, cuFileError on
failure, and the Descr/IOParams/IOEvents array helpers) so that
cuFile code can run unmodified against AMD’s hipFILE. Every call is forwarded
to the corresponding hipFILE C symbol via the low-level
cuda.bindings.cycufile alias module.
Exceptions#
Raised when a cuFile operation returns a non- |
Classes#
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
Empty-initialize an array of |
|
Empty-initialize an array of |
|
Empty-initialize an array of |
Functions#
|
Initialize the cuFile library and open the driver. |
|
Reset the cuFile library and release the driver. |
|
Return the process-wide cuFile driver use count. |
|
Get the driver session properties. |
|
Set whether the Read/Write APIs use polling to do IO operations. |
|
Set the max direct IO size used to talk to the driver. |
|
Set the max GPU memory reserved per device for internal buffering. |
|
Set the max buffer space that is pinned for |
|
Register an open file for GPU IO. |
|
Release a registered file handle from cuFile. |
|
Register a device/host memory region with cuFile for GPU IO. |
|
Deregister a device/host memory region from cuFile. |
|
Read from a registered file handle into device/host memory. |
|
Write device/host memory to a registered file handle. |
|
Prepare a batch IO operation. |
|
Enqueue a batch of IO requests. |
|
Poll for the status of completed batch IO operations. |
|
Cancel all pending batch IO operations. |
|
Destroy the batch IO handle and free the associated resources. |
|
Enqueue an asynchronous read on |
|
Enqueue an asynchronous write on |
|
Register a stream for asynchronous GPU IO. |
|
Deregister a stream and free the associated resources. |
|
Return the cuFile library version as a packed integer. |
|
Get the value of a |
|
Get the value of a Boolean configuration parameter. |
|
Get the value of a string configuration parameter. |
|
Set the value of a |
|
Set the value of a Boolean configuration parameter. |
|
Set the value of a string configuration parameter. |
|
Return the cuFile status string for |
Module Contents#
- class cuda.bindings.cufile.OpError#
Bases:
enum.IntEnumSee
hipFileOpError.
- class cuda.bindings.cufile.DriverStatusFlags#
Bases:
enum.IntEnumSee
hipFileDriverStatusFlags_t.
- class cuda.bindings.cufile.DriverControlFlags#
Bases:
enum.IntEnumSee
hipFileDriverControlFlags_t.
- class cuda.bindings.cufile.FeatureFlags#
Bases:
enum.IntEnumSee
hipFileFeatureFlags_t.
- class cuda.bindings.cufile.FileHandleType#
Bases:
enum.IntEnumSee
hipFileFileHandleType.
- class cuda.bindings.cufile.Opcode#
Bases:
enum.IntEnumSee
hipFileOpcode_t.
- class cuda.bindings.cufile.Status#
Bases:
enum.IntEnumSee
hipFileStatus_t.
- class cuda.bindings.cufile.BatchMode#
Bases:
enum.IntEnumSee
hipFileBatchMode_t.
- class cuda.bindings.cufile.SizeTConfigParameter#
Bases:
enum.IntEnumSee
hipFileSizeTConfigParameter_t.
- class cuda.bindings.cufile.BoolConfigParameter#
Bases:
enum.IntEnumSee
hipFileBoolConfigParameter_t.
- class cuda.bindings.cufile.StringConfigParameter#
Bases:
enum.IntEnumSee
hipFileStringConfigParameter_t.
- exception cuda.bindings.cufile.cuFileError(status: int, cu_err: int | None = ...)#
Bases:
ExceptionRaised when a cuFile operation returns a non-
SUCCESSstatus.- Args:
- status (
int): the
hipFileOpError/OpErrorstatus code.- cu_err (
int|None): for
OpError.CUDA_DRIVER_ERRORthis carries the underlying HIP driver error code (hipError_t);Noneotherwise.
- status (
- class cuda.bindings.cufile.Descr(size: int = ...)#
Empty-initialize an array of
hipFileDescr_t.A
hipFileDescr_tcarries the OS-neutral file identity handed tohandle_register: atype(aFileHandleType), ahandleunion (the Linuxfdor a Windows handle), and an optionalfs_opstable. Element0is exposed directly through thetype/handle/fs_opsproperties; usedescr[i]to view any other element.ptryields the base C address to hand to the cuFile calls.- Args:
- size (
int): the number of contiguous elements to allocate (default 1).
- size (
- property handle: Any#
- class cuda.bindings.cufile.IOParams(size: int = ...)#
Empty-initialize an array of
hipFileIOParams_t.Each
hipFileIOParams_tdescribes one request in a batch submitted withbatch_io_submit: themode(aBatchMode), the file handlefh, theopcode(aOpcode), an opaquecookie, and the per-requestu.batchfields (device pointer base/offset, file offset and size). Element0is exposed directly through the properties; useparams[i]to view any other element, andptrfor the base C address.- Args:
- size (
int): the number of contiguous elements to allocate (default 1).
- size (
- property u: Any#
- class cuda.bindings.cufile.IOEvents(size: int = ...)#
Empty-initialize an array of
hipFileIOEvents_t.Each
hipFileIOEvents_treceives the outcome of one batch request frombatch_io_get_status: the requestcookie, thestatus(aStatus), andret(the bytes transacted, valid only once the request has completed successfully). Element0is exposed directly through the properties; useevents[i]to view any other element, andptrfor the base C address to hand tobatch_io_get_status.- Args:
- size (
int): the number of contiguous elements to allocate (default 1).
- size (
- cuda.bindings.cufile.driver_open() None#
Initialize the cuFile library and open the driver.
Explicitly opens the cuFile driver session used for the file IO operations. Calling this is optional: driver initialization otherwise happens implicitly on the first use of
handle_register,read,write, orbuf_register.- Raises:
cuFileError:if the driver fails to initialize, e.g.
OpError.DRIVER_NOT_INITIALIZED,OpError.PERMISSION_DENIED,OpError.DRIVER_VERSION_MISMATCH, orOpError.PLATFORM_NOT_SUPPORTED.
- cuda.bindings.cufile.driver_close() None#
Reset the cuFile library and release the driver.
Closes the driver session and frees the associated resources. Any buffers still registered via
buf_registerare implicitly deregistered, and any in-flight IO receives an error. The driver may be reopened afterwards; this cleanup also happens implicitly on process exit.- Raises:
cuFileError:if the driver was not initialized (
OpError.DRIVER_NOT_INITIALIZED).
- cuda.bindings.cufile.use_count() int#
Return the process-wide cuFile driver use count.
- Returns:
int:the number of times the cuFile driver is currently in use by this process at the moment of the call.
- cuda.bindings.cufile.driver_get_properties(props: int) None#
Get the driver session properties.
If the driver is not open, the staged/default properties are returned; otherwise the current properties are returned. The structure reports the driver capabilities (supported filesystems, poll/compat control flags, feature flags, and the IO/cache/pinned-memory size limits).
- Args:
- props (
int): address (as a Python integer) of a caller-allocated
hipFileDriverProps_tstructure to fill in.
- props (
- Raises:
cuFileError:e.g.
OpError.DRIVER_NOT_INITIALIZED,OpError.DRIVER_VERSION_MISMATCH, orOpError.INVALID_VALUEifpropsis invalid.
- cuda.bindings.cufile.driver_set_poll_mode(poll: bool, poll_threshold_size: int) None#
Set whether the Read/Write APIs use polling to do IO operations.
Must be called before the driver is opened. When poll mode is enabled, IO whose size is less than or equal to
poll_threshold_sizeis completed by polling.- Args:
- poll (
bool): whether to enable poll mode.
- poll_threshold_size (
int): the IO size threshold for polling, in KB (must be 4K aligned; the default is 4KB).
- poll (
- Raises:
cuFileError:e.g.
OpError.DRIVER_NOT_INITIALIZEDorOpError.DRIVER_UNSUPPORTED_LIMITfor an invalid threshold.
- cuda.bindings.cufile.driver_set_max_direct_io_size(max_direct_io_size: int) None#
Set the max direct IO size used to talk to the driver.
Must be called before the driver is opened. This is the maximum IO chunk size the driver issues to the underlying filesystem (and, in compatibility mode, the maximum chunk size the library uses for POSIX read/write).
- Args:
- max_direct_io_size (
int): the maximum direct IO size, in KB (must be 4K aligned; the default is 16384KB).
- max_direct_io_size (
- Raises:
cuFileError:e.g.
OpError.DRIVER_NOT_INITIALIZEDorOpError.DRIVER_UNSUPPORTED_LIMITfor an invalid size.
- cuda.bindings.cufile.driver_set_max_cache_size(max_cache_size: int) None#
Set the max GPU memory reserved per device for internal buffering.
Must be called before the driver is opened. This is the per-device GPU buffer space the library uses internally, e.g. to handle unaligned IO and optimal IO path routing; it may be rounded down to the nearest GPU page size.
- Args:
- max_cache_size (
int): the maximum per-device GPU cache size, in KB (must be 4K aligned; the default is 131072KB).
- max_cache_size (
- Raises:
cuFileError:e.g.
OpError.DRIVER_NOT_INITIALIZEDorOpError.DRIVER_UNSUPPORTED_LIMITfor an invalid size.
- cuda.bindings.cufile.driver_set_max_pinned_mem_size(max_pinned_size: int) None#
Set the max buffer space that is pinned for
buf_register.Must be called before the driver is opened. This is the upper limit on GPU memory that can be pinned and mapped for device IO (as used by
buf_register); it may be rounded down to the nearest GPU page size.- Args:
- max_pinned_size (
int): the maximum pinned buffer space, in KB (must be 4K aligned).
UINT64_MAXis equivalent to no enforced limit.
- max_pinned_size (
- Raises:
cuFileError:e.g.
OpError.DRIVER_NOT_INITIALIZEDorOpError.DRIVER_UNSUPPORTED_LIMITfor an invalid size.
- cuda.bindings.cufile.handle_register(descr: int) int#
Register an open file for GPU IO.
Wraps an OS-specific file descriptor in an OS-agnostic
hipFileHandle_tand performs (memoized) checks on IO supportability based on the mount point and how the file was opened. Registration is required before issuing cuFile IO on a file.- Args:
- descr (
int): address (as a Python integer) of a caller-populated
hipFileDescr_t; seeDescr. For Linux this carries the file’sfdand atypeofFileHandleType.OPAQUE_FD.
- descr (
- Returns:
int:an opaque
hipFileHandle_t(as a Python integer) to pass to the read/write/async/batch APIs.
- Raises:
cuFileError:e.g.
OpError.IO_NOT_SUPPORTED,OpError.INVALID_VALUE,OpError.INVALID_FILE_OPEN_FLAG,OpError.INVALID_FILE_TYPE, orOpError.HANDLE_ALREADY_REGISTERED.
- cuda.bindings.cufile.handle_deregister(fh: int) None#
Release a registered file handle from cuFile.
Frees the cuFile resources claimed by
handle_register. Call this only after ensuring no IO is outstanding on the handle (otherwise the behavior is undefined). The underlying file descriptor is not closed; the caller must stillos.closeit.- Args:
- fh (
int): the file handle (as a Python integer) returned by
handle_register.
- fh (
- cuda.bindings.cufile.buf_register(buf_ptr_base: int, length: int, flags: int) None#
Register a device/host memory region with cuFile for GPU IO.
Pins existing device memory (or host memory) for direct file IO. Registration is optional but recommended: it incurs a significant one-time cost that should be amortized off the critical path.
read/writemust use the samebuf_ptr_baseas their base address to benefit from the registration.- Args:
- buf_ptr_base (
int): base address (as a Python integer) of the device or host buffer to register.
- length (
int): the size, in bytes from the start of the buffer, to map.
- flags (
int): reserved for future use; must be 0.
- buf_ptr_base (
- Raises:
cuFileError:e.g.
OpError.MEMORY_ALREADY_REGISTERED,OpError.CUDA_MEMORY_TYPE_INVALID,OpError.CUDA_POINTER_RANGE_ERROR,OpError.INVALID_MAPPING_SIZE, orOpError.GPU_MEMORY_PINNING_FAILED.
- cuda.bindings.cufile.buf_deregister(buf_ptr_base: int) None#
Deregister a device/host memory region from cuFile.
Releases the pinned-memory mappings created by
buf_register.- Args:
- buf_ptr_base (
int): the base address (as a Python integer) that was passed to
buf_register.
- buf_ptr_base (
- Raises:
cuFileError:e.g.
OpError.MEMORY_NOT_REGISTEREDifbuf_ptr_basewas not registered.
- cuda.bindings.cufile.read(fh: int, buf_ptr_base: int, size: int, file_offset: int, buf_ptr_offset: int) int#
Read from a registered file handle into device/host memory.
Synchronously reads
sizebytes from the file atfile_offsetinto the buffer. Works for unaligned offsets and sizes (with a possible performance cost), and blocks until the IO completes.- Args:
- fh (
int): the file handle from
handle_register.- buf_ptr_base (
int): base address of the destination device/host buffer. For registered buffers this must equal the base address passed to
buf_register.- size (
int): the number of bytes to read.
- file_offset (
int): the offset in the file to read from.
- buf_ptr_offset (
int): the offset relative to
buf_ptr_baseto read into (use 0 to read into the very start; only meaningful for registered buffers).
- fh (
- Returns:
int:the number of bytes read.
- Raises:
OSError:on a POSIX/filesystem error (raw return
-1);errnois set accordingly.cuFileError:on any other (cuFile-specific) error.
- cuda.bindings.cufile.write(fh: int, buf_ptr_base: int, size: int, file_offset: int, buf_ptr_offset: int) int#
Write device/host memory to a registered file handle.
Synchronously writes
sizebytes from the buffer to the file atfile_offset. Works for unaligned offsets and sizes (with a possible performance cost), and blocks until the IO completes. Note that the write does not guarantee metadata is flushed; useos.fsync(or open the file withO_SYNC) for durability.- Args:
- fh (
int): the file handle from
handle_register.- buf_ptr_base (
int): base address of the source device/host buffer. For registered buffers this must equal the base address passed to
buf_register.- size (
int): the number of bytes to write.
- file_offset (
int): the offset in the file to write to.
- buf_ptr_offset (
int): the offset relative to
buf_ptr_baseto write from (use 0 to write from the very start; only meaningful for registered buffers).
- fh (
- Returns:
int:the number of bytes written.
- Raises:
OSError:on a POSIX/filesystem error (raw return
-1);errnois set accordingly.cuFileError:on any other (cuFile-specific) error.
- cuda.bindings.cufile.batch_io_set_up(nr: int) int#
Prepare a batch IO operation.
Must be the first call in a batch IO sequence. Reserves capacity for up to
nrbatch entries and returns a handle for the subsequent batch calls.- Args:
- nr (
int): the maximum number of entries (events) the batch will hold; should be at least 1 and within the driver’s supported batch size.
- nr (
- Returns:
int:an opaque
hipFileBatchHandle_t(as a Python integer) for use with the otherbatch_io_*functions.
- Raises:
cuFileError:e.g.
OpError.INTERNAL_ERRORon failure.
- cuda.bindings.cufile.batch_io_submit(batch_idp: int, nr: int, iocbp: int, flags: int) None#
Enqueue a batch of IO requests.
Submits
nrread/write requests described by an array ofhipFileIOParams_t. This is asynchronous with respect to the host thread: monitor progress withbatch_io_get_statusand cancel/destroy withbatch_io_cancel/batch_io_destroy.- Args:
- batch_idp (
int): the batch handle from
batch_io_set_up.- nr (
int): the number of requests to submit; must be > 0 and <= the
nrpassed tobatch_io_set_up.- iocbp (
int): address of a
hipFileIOParams_tarray of lengthnr; seeIOParams.- flags (
int): reserved for future use; must be 0.
- batch_idp (
- Raises:
cuFileError:e.g.
OpError.INTERNAL_ERRORon failure.
- cuda.bindings.cufile.batch_io_get_status(batch_idp: int, min_nr: int, nr: int, iocbp: int, timeout: int) None#
Poll for the status of completed batch IO operations.
Waits for at least
min_nrcompletions (or untiltimeoutelapses), filling an array ofhipFileIOEvents_twith the per-IO status, error and bytes transacted. The bytes-transacted field is valid only for successfully completed IOs.- Args:
- batch_idp (
int): the batch handle from
batch_io_set_up.- min_nr (
int): the minimum number of completed entries to wait for; must be >= 0 and <=
*nr.- nr (
int): address of an
unsigned intused as input/output: on input the maximum number of entries to poll for, on output the number of completed IOs.- iocbp (
int): address of a
hipFileIOEvents_tarray to receive the completed IO statuses; seeIOEvents.- timeout (
int): address of a
struct timespecgiving the maximum time to wait; if it elapses, fewer thanmin_nrentries may be returned.
- batch_idp (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEfor an invalid batch ID. Note that success here refers to the API call itself; inspect the per-IOiocbpentries for the individual IO status.
- cuda.bindings.cufile.batch_io_cancel(batch_idp: int) None#
Cancel all pending batch IO operations.
Attempts to cancel the in-flight IOs for the batch; there is no guarantee an already-executing IO can be canceled. Canceled IOs report
Status.CANCELEDviabatch_io_get_status.- Args:
- batch_idp (
int): the batch handle from
batch_io_set_up.
- batch_idp (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEon failure.
- cuda.bindings.cufile.batch_io_destroy(batch_idp: int) None#
Destroy the batch IO handle and free the associated resources.
Destroys the batch context and the resources allocated by
batch_io_set_up.- Args:
- batch_idp (
int): the batch handle from
batch_io_set_up.
- batch_idp (
- cuda.bindings.cufile.read_async(fh: int, buf_ptr_base: int, size_p: int, file_offset_p: int, buf_ptr_offset_p: int, bytes_read_p: int, stream: int) None#
Enqueue an asynchronous read on
stream.Enqueues a read into device/host memory, FIFO-ordered within the CUDA/HIP stream. The size/offset arguments are passed by pointer because, unless fixed via
stream_register, they are not evaluated until the operation executes;size_pshould be set to the maximum possible IO size at submission time. All of these pointers are caller-allocated (intptr_t) and must outlive the operation.- Args:
- fh (
int): the file handle from
handle_register.- buf_ptr_base (
int): base address of the destination device/host buffer. For registered buffers this must equal the base address passed to
buf_register.- size_p (
int): address of a
size_tholding the number of bytes to read.- file_offset_p (
int): address of an
off_tholding the file offset to read from.- buf_ptr_offset_p (
int): address of an
off_tholding the offset relative tobuf_ptr_base.- bytes_read_p (
int): address of an
ssize_t(initialized to 0) that, after the stream completes, holds the number of bytes read (-1on an IO error, or a negativehipFileOpErrorvalue otherwise).- stream (
int): the CUDA/HIP stream to enqueue on; 0 (NULL) makes the operation synchronous.
- fh (
- Raises:
cuFileError:on a submission error.
- cuda.bindings.cufile.write_async(fh: int, buf_ptr_base: int, size_p: int, file_offset_p: int, buf_ptr_offset_p: int, bytes_written_p: int, stream: int) None#
Enqueue an asynchronous write on
stream.Enqueues a write from device/host memory, FIFO-ordered within the CUDA/HIP stream. The size/offset arguments are passed by pointer because, unless fixed via
stream_register, they are not evaluated until the operation executes;size_pshould be set to the maximum possible IO size at submission time. All of these pointers are caller-allocated (intptr_t) and must outlive the operation.- Args:
- fh (
int): the file handle from
handle_register.- buf_ptr_base (
int): base address of the source device/host buffer. For registered buffers this must equal the base address passed to
buf_register.- size_p (
int): address of a
size_tholding the number of bytes to write.- file_offset_p (
int): address of an
off_tholding the file offset to write to.- buf_ptr_offset_p (
int): address of an
off_tholding the offset relative tobuf_ptr_base.- bytes_written_p (
int): address of an
ssize_t(initialized to 0) that, after the stream completes, holds the number of bytes written (-1on an IO error, or a negativehipFileOpErrorvalue otherwise).- stream (
int): the CUDA/HIP stream to enqueue on; 0 (NULL) makes the operation synchronous.
- fh (
- Raises:
cuFileError:on a submission error.
- cuda.bindings.cufile.stream_register(stream: int, flags: int) None#
Register a stream for asynchronous GPU IO.
Optional API that allocates resources for stream IO and declares which IO parameters are already known at submission time. The call synchronizes on the stream before allocating resources.
- Args:
- stream (
int): the CUDA/HIP stream to register; 0 (NULL) selects the default stream.
- flags (
int): bitmask declaring which inputs are fixed at submission time:
0x1buffer offset,0x2file offset,0x4size,0x8all inputs 4K-aligned;0xfmeans all are aligned and known (best performance).0x0means all parameters are valid only at execution time.
- stream (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEorOpError.PLATFORM_NOT_SUPPORTED.
- cuda.bindings.cufile.stream_deregister(stream: int) None#
Deregister a stream and free the associated resources.
Optional API that frees the resources allocated by
stream_register. The call synchronizes on the stream first. Streams are also deregistered automatically bydriver_close.- Args:
- stream (
int): the stream (as a Python integer) previously passed to
stream_register.
- stream (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEorOpError.PLATFORM_NOT_SUPPORTED.
- cuda.bindings.cufile.get_version() int#
Return the cuFile library version as a packed integer.
The version is packed as
1000 * major + 10 * minor + patch(e.g. cuFile 1.7.0 is1070). hipFILE reports the(major, minor, patch)components separately; this shim packs them to match cuFile’s single-integer format. It can be used to gate on the presence of a specific library feature.- Returns:
int:the packed version number.
- Raises:
cuFileError:e.g.
OpError.DRIVER_VERSION_READ_ERRORif the version is unavailable.
- cuda.bindings.cufile.get_parameter_size_t(param: int) int#
Get the value of a
size_tconfiguration parameter.If the driver is open the current runtime value is returned; otherwise the currently staged value is returned (staged values are cleared when the driver opens).
- Args:
- param (
int): the parameter to read; a
SizeTConfigParametervalue.
- param (
- Returns:
int:the parameter’s value.
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEfor an invalid parameter.
- cuda.bindings.cufile.get_parameter_bool(param: int) bool#
Get the value of a Boolean configuration parameter.
If the driver is open the current runtime value is returned; otherwise the currently staged value is returned (staged values are cleared when the driver opens).
- Args:
- param (
int): the parameter to read; a
BoolConfigParametervalue.
- param (
- Returns:
bool:the parameter’s value.
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEfor an invalid parameter.
- cuda.bindings.cufile.get_parameter_string(param: int, len: int) str#
Get the value of a string configuration parameter.
If the driver is open the current runtime value is returned; otherwise the currently staged value is returned (staged values are cleared when the driver opens).
- Args:
- param (
int): the parameter to read; a
StringConfigParametervalue.- len (
int): the size, in bytes, of the internal buffer to allocate for the returned string.
- param (
- Returns:
str:the parameter’s value.
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEfor an invalid parameter.
- cuda.bindings.cufile.set_parameter_size_t(param: int, value: int) None#
Set the value of a
size_tconfiguration parameter.Must be called before the driver is opened; the value takes effect once the driver opens. If the same parameter is set multiple times, the last value wins. Precedence (highest to lowest) is
set_parameter_*> environment variable > the built-in defaults.- Args:
- param (
int): the parameter to set; a
SizeTConfigParametervalue.- value (
int): the new value.
- param (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEorOpError.DRIVER_ALREADY_OPEN.
- cuda.bindings.cufile.set_parameter_bool(param: int, value: bool) None#
Set the value of a Boolean configuration parameter.
Must be called before the driver is opened; the value takes effect once the driver opens. If the same parameter is set multiple times, the last value wins. Precedence (highest to lowest) is
set_parameter_*> environment variable > the built-in defaults.- Args:
- param (
int): the parameter to set; a
BoolConfigParametervalue.- value (
bool): the new value.
- param (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEorOpError.DRIVER_ALREADY_OPEN.
- cuda.bindings.cufile.set_parameter_string(param: int, desc_str: int) None#
Set the value of a string configuration parameter.
Must be called before the driver is opened; the value takes effect once the driver opens. See
set_parameter_size_tfor the precedence rules.- Args:
- param (
int): the parameter to set; a
StringConfigParametervalue.- desc_str (
int): address of a NUL-terminated C string (
char*) holding the new value.
- param (
- Raises:
cuFileError:e.g.
OpError.INVALID_VALUEorOpError.DRIVER_ALREADY_OPEN.