INNER CODE UNIT · Rust
cuda_toolkit_dir
NVlabs/cuda-oxide · cuda-bindings/src/lib.rs:46
pub fn cuda_toolkit_dir() -> String {
env!("CUTILE_RESOLVED_CUDA_TOOLKIT_PATH").to_string()
}
/// Host-task sync modes for [`cu_launch_host_func`], defined as literals so
/// consumers compile against any toolkit: the `CUhostTaskSyncMode` enum only
/// exists in CUDA 13.2+ headers.
pub const CU_HOST_TASK_BLOCKING: ::core::ffi::c_uint = 0;
pub const CU_HOST_TASK_SPINWAIT: ::core::ffi::c_uint = 1;
/// Enqueues a host function on the stream, with a sync mode where the
/// toolkit and the driver support one.
///
/// CUDA 13.2 adds `cuLaunchHostFunc_v2`, whose `sync_mode` selects between
/// the blocking default and a spin-waiting host task (lower callback latency,
/// one busy core). Two degraded cases:
///
/// - **Older toolkit at build time** (`cuda.h` lacks the entry point): the