Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
atria-gpu-rs
CUDA-required GPU build of the Ablatio Triadum (ATria) centrality algorithm, packaged as a PluMA plugin.
Relationship to atria-rs
The upstream atria-rs crate ships
three computational backends — CPU, wgpu, and CUDA — selected at runtime
via ComputeBackend. This crate is a thin wrapper that:
- Depends on
atria-rswith thecudafeature compiled in. - Forces
ComputeBackend::Cudaat construction time and never exposes a setter that could switch it back to CPU. - Exports a different PluMA-FFI prefix (
ATriaGPU_plugin_*) so it can coexist with the canonicalATriaplugin in the same PluMA tree underplugins/ATriaGPU/libATriaGPUPlugin.so. - Emits a
log::warn!if the CUDA runtime is unavailable and the underlyingatria-rssilently degrades to CPU — surfacing the fallback rather than letting users be surprised by slower-than-expected wall clock.
Algorithm + output semantics are byte-for-byte identical to
atria-rs >= 1.4.0. The same corrP.never.csv reference run through
ATriaGPU produces output sort-identical to the upstream C++ ATria
plugin's corrP.never.ATria.noa.expected reference file, including the
tie-handling at ranks #4 / #4 / #4 / #7.
Requirements
- An NVIDIA GPU exposed to the host (visible via
nvidia-smi). - CUDA toolkit installed and
nvccreachable through$CUDA_PATH/$CUDA_ROOT. The cudarc build script auto-detects the toolkit version (CUDA 11.4 through 13.x are supported). - PluMA built with
--with-rust(see FIUBioRG/PluMA#13) for the loader to be active.
Build
CUDA_PATH=/opt/cuda
# → target/release/libATriaGPUPlugin.so
Install into PluMA
Pipeline config
Prefix plugins/ATriaGPU/example/
Plugin ATriaGPU inputfile corrP.never.csv outputfile corrP.never.ATriaGPU.noa
Test against PluMA's harness
# Testing ATriaGPU... [PASS]
# Passing Rate: 100.0%
The bundled example/corrP.never.csv is the canonical 126-node
oral-microbiome correlation network from the upstream ATria fixture;
example/corrP.never.ATriaGPU.noa.expected is the upstream C++ ATria
plugin's actual output. A passing test certifies that the CUDA backend
produces the same ranks (including ties) as the C++ original.
Performance notes
The Floyd-Warshall step is dominated by n³ work where n = 2 * GSIZE
(GSIZE is the number of nodes; the split-vertex expansion doubles it).
On the reference 126-node network, that's 126·2 = 252-wide matrix —
small enough that PCIe transfer overhead can dominate. CUDA payoff is
expected on larger networks where the n³ cubic factor dwarfs the
fixed transfer cost.
License
MIT — see LICENSE.md.
References
- Cickovski, T. et al. (2015, 2017). The Ablatio Triadum (ATria) centrality algorithm.
- Upstream Rust implementation: https://github.com/quinnjr/ATria-rs.
- Original C++ implementation: https://github.com/movingpictures83/ATria.