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//! cuBLAS, and cuBLASLt entry points at runtime and exports a tensor site only
7//! after that ABI evidence exists. The executor currently accepts dense matmul
8//! for `f32` plus half-family dtypes backed by the validated cuBLASLt path.
9
10mod loader;
11mod site;
12mod storage;
13
14pub use loader::{
15    CudaAbiEvidence, CudaLibrarySet, CudaLoadError, CudaRuntimeLoader, CudaRuntimeProbe,
16    CudaSymbolEvidence, DynamicCudaLoader, FakeCudaLoader, discover_cuda_runtime,
17};
18pub use site::{
19    ComputeCudaLib, CudaTensorExecutor, compute_cuda_capability, compute_cuda_lib_symbol,
20    compute_cuda_site_symbol, cuda_executor_symbol,
21};
22pub use storage::{CudaAllocation, CudaResidentStorage};
23
24/// Cookbook recipes for this lib, embedded at build time.
25pub static RECIPES: sim_cookbook::EmbeddedDir =
26    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
27
28#[cfg(test)]
29mod tests;