Skip to main content

sim_lib_compute_cuda/
lib.rs

1#![allow(unsafe_code)]
2#![deny(missing_docs)]
3//! Optional runtime-loaded CUDA/cuBLAS tensor compute provider.
4//!
5//! The CUDA provider has no link-time CUDA dependency. It validates driver,
6//! runtime, cuBLAS, and cuBLASLt entry points at runtime and exports a tensor
7//! site only while the live library handles remain retained. Dense `f32`
8//! matmul executes through cuBLAS and retains the result in device storage.
9//! Half-family requests fail closed until a cuBLASLt execution path exists.
10
11mod loader;
12mod runtime;
13mod site;
14mod storage;
15
16pub use loader::{
17    CudaAbiEvidence, CudaLibrarySet, CudaLoadError, CudaRuntimeLoader, CudaRuntimeProbe,
18    CudaSymbolEvidence, DynamicCudaLoader, FakeCudaLoader, discover_cuda_runtime,
19};
20pub use site::{
21    ComputeCudaLib, CudaTensorExecutor, compute_cuda_capability, compute_cuda_lib_symbol,
22    compute_cuda_site_symbol, cuda_executor_symbol,
23};
24pub use storage::{CudaAllocation, CudaResidentStorage};
25
26/// Cookbook recipes for this lib, embedded at build time.
27pub static RECIPES: sim_cookbook::EmbeddedDir =
28    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
29
30#[cfg(test)]
31mod tests;