Expand description
Runtime-API initialization helpers.
The CUDA Runtime API initializes lazily on first use (typically when you
call cudaSetDevice), so there’s no explicit init() you must call.
The helpers here exist for fail-fast setup: version queries, cudaInitDevice
for pre-warming the primary context without making it current, etc.
Functions§
- device_
synchronize - Block the calling host thread until all work on the current device has
completed. Equivalent to
cudaDeviceSynchronize. - driver_
version - CUDA driver version (latest supported by the installed
libcuda). - get_
device_ flags - Query current device-scheduling flags.
- last_
error - Retrieve and clear the per-thread “sticky” error from the runtime.
- peek_
last_ error - As
last_errorbut doesn’t clear the sticky slot. - runtime_
version - CUDA Runtime version linked via
libcudart. - set_
device_ flags - Set the process’s device-level scheduling/map flags. Typically called
before the first CUDA call on the current thread — the flags bind
when the primary context is created. Passes are flags from
baracuda_cuda_sys::runtime::types::cudaDeviceScheduleFlags.