iron_rocm_sys/lib.rs
1//! ROCm 6.x FFI + dynamic loader — mirror of `iron_cuda_sys` for AMD GPUs.
2//!
3//! Every library is dynamically loaded on first use. Nothing is linked at
4//! build time, so the workspace compiles on any machine with or without
5//! ROCm installed.
6//!
7//! Supported libraries:
8//!
9//! - [`hip`] — HIP runtime (driver + runtime merged, as ROCm ships it)
10//! - [`hipblas`] — hipBLAS dense linear algebra (Level 1/2/3 + batched)
11//! - [`hipblaslt`] — hipBLASLt matmul front-end (FP8 on CDNA3+)
12//! - [`hiprtc`] — HIPRTC runtime kernel compile (the NVRTC analogue)
13//! - [`rccl`] — AMD collective comms
14//!
15//! Everything else (rocFFT, rocSPARSE, rocSOLVER, MIOpen, rocRAND) will
16//! be added as needed. Pattern is identical: add a module, implement
17//! `load_fns`, stash the result in a `LazyLock<Result<Fns, LoadError>>`.
18//!
19//! ## Documentation policy
20//!
21//! Items here mirror the ROCm C headers one-to-one (each `Fns` field is
22//! named after the C symbol it resolves), so they are not documented item
23//! by item — AMD's reference for the same symbol is the authority. The safe
24//! crate (`ironaccelerator-rocm`) is fully documented and enforces
25//! `missing_docs`.
26
27#![allow(non_snake_case)]
28#![allow(non_camel_case_types)]
29#![allow(
30 clippy::missing_safety_doc,
31 clippy::too_many_arguments,
32 clippy::type_complexity
33)]
34
35pub mod loader;
36
37pub mod hip;
38pub mod hipblas;
39pub mod hipblaslt;
40pub mod hiprtc;
41pub mod rccl;