Skip to main content

sim_lib_compute_rocm/
lib.rs

1#![allow(unsafe_code)]
2#![deny(missing_docs)]
3//! Optional runtime-loaded ROCm/rocBLAS tensor compute provider.
4//!
5//! The ROCm provider has no link-time ROCm dependency. It validates HIP and
6//! rocBLAS entry points plus an observed AMD `gfx*` target at runtime and
7//! exports a tensor site only after that ABI evidence exists. The executor
8//! accepts dense matmul for `f32` plus half-family dtypes when rocBLASLt evidence
9//! is present.
10
11mod loader;
12mod site;
13mod storage;
14
15pub use loader::{
16    DynamicRocmLoader, FakeRocmLoader, RocmAbiEvidence, RocmLibrarySet, RocmLoadError,
17    RocmRuntimeLoader, RocmRuntimeProbe, RocmSymbolEvidence, discover_rocm_runtime,
18};
19pub use site::{
20    ComputeRocmLib, RocmTensorExecutor, compute_rocm_capability, compute_rocm_lib_symbol,
21    compute_rocm_site_symbol, rocm_executor_symbol,
22};
23pub use storage::{RocmAllocation, RocmResidentStorage};
24
25/// Cookbook recipes for this lib, embedded at build time.
26pub static RECIPES: sim_cookbook::EmbeddedDir =
27    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
28
29#[cfg(test)]
30mod tests;