Skip to main content

Crate iron_rocm_sys

Crate iron_rocm_sys 

Source
Expand description

ROCm 6.x FFI + dynamic loader — mirror of iron_cuda_sys for AMD GPUs.

Every library is dynamically loaded on first use. Nothing is linked at build time, so the workspace compiles on any machine with or without ROCm installed.

Supported libraries:

  • hip — HIP runtime (driver + runtime merged, as ROCm ships it)
  • hipblas — hipBLAS dense linear algebra (Level 1/2/3 + batched)
  • hipblaslt — hipBLASLt matmul front-end (FP8 on CDNA3+)
  • hiprtc — HIPRTC runtime kernel compile (the NVRTC analogue)
  • rccl — AMD collective comms

Everything else (rocFFT, rocSPARSE, rocSOLVER, MIOpen, rocRAND) will be added as needed. Pattern is identical: add a module, implement load_fns, stash the result in a LazyLock<Result<Fns, LoadError>>.

§Documentation policy

Items here mirror the ROCm C headers one-to-one (each Fns field is named after the C symbol it resolves), so they are not documented item by item — AMD’s reference for the same symbol is the authority. The safe crate (ironaccelerator-rocm) is fully documented and enforces missing_docs.

Modules§

hip
HIP runtime FFI. ROCm ships HIP as a single library (libamdhip64) that unifies driver- and runtime-scoped entry points, unlike CUDA’s split.
hipblas
hipBLAS — dense Level 3 matmul. We bind the legacy handle API because that’s what’s stable across rocm 6.x; hipBLASLt (the FP8-era front-end) lives in crate::hipblaslt.
hipblaslt
hipBLASLt — the Lt front-end used for FP8 matmul on CDNA3+ (gfx942).
hiprtc
HIPRTC — runtime compilation of HIP C++ to a device code object.
loader
Dynamic library loader. Identical contract to the CUDA sys crate.
rccl
RCCL — AMD collective comms. API parity with NCCL.