Skip to main content

Module cuda_driver

Module cuda_driver 

Source
Expand description

Thin, panic-safe wrappers around CUDA driver-API entry points that cudarc 0.19 only exposes at the sys level.

Every function in this module wraps the raw unsafe extern "C" call in std::panic::catch_unwind, because cudarc’s dynamic-loader path panics if libcuda.so isn’t present at runtime. The wrappers convert “library not loadable” panics into crate::error::GpuError::Unrecoverable so kernel actors stay alive on no-GPU hosts.

All pointer / handle arguments are forwarded as-is — the caller is responsible for validity.

Functions§

ipc_close_mem_handle
ipc_get_event_handle
ipc_get_mem_handle
ipc_open_event_handle
ipc_open_mem_handle_v2
launch_cooperative_kernel
launch_kernel
mem_advise_v2
Apply a memory advisory hint to a managed-memory range. Wraps cuMemAdvise_v2 (the v2 shape that takes a CUmemLocation).
mem_prefetch_async_v2
Prefetch [dev_ptr .. dev_ptr+count) to a target memory location on stream. Wraps cuMemPrefetchAsync_v2 (the v2 shape that takes a CUmemLocation).
module_get_function
module_load_data
Load a cubin/fatbin/PTX image from a memory buffer. The buffer must outlive the returned CUmodule for the duration of any pending kernel launch — the driver may keep references to embedded strings.
module_unload
runtime_ipc_get_mem_handle