Myelin-Accelerator
Rust/CUDA acceleration primitives for spiking neural networks (SNN) and neuromorphic workloads: a low-level compute layer of safe Rust wrappers around first-party CUDA kernels for spiking networks, routing, SAT search, and packed ternary GEMV/GEMM. The CUDA path targets and is validated on sm_120 (NVIDIA Blackwell); the default build works without a CUDA toolkit or device. This is a compute layer, not a complete SNN framework or a general model-compatibility layer.
Release status: Cargo.toml is at 0.2.0 as a crates.io candidate (not yet published). Release issue #37 records qualification of an earlier commit; publication is owned by LIM-1460. A newer publication commit requires its own qualification. See the release preparation guide. Cargo/crates.io is the supported distribution path; Docker/container images are not a supported consumer surface. The CI and GPU CI badges reflect main, not this checkout or an open pull request.
Get started
After v0.2.0 publication, add the crate with:
# For GPU launches: cargo add myelin-accelerator --features cuda
Prior to publication, use a source checkout at a reviewed commit (Git dependency or Cargo path dependency). For a local checkout:
[]
= { = "../myelin-accelerator" }
# For GPU launches, add: features = ["cuda"]
Host packing works with the default feature set:
use ;
let values = ;
let packed = pack_ternary;
assert_eq!;
GpuAccelerator::new() may select a CPU backend and records the fallback reason. That backend does not run CPU versions of GPU launch methods; those methods return GpuError::Unavailable. For a GPU-required application, use GpuAccelerator::require_gpu() and handle the error. See architecture and capability policy.
What is available
| Area | Current interface |
|---|---|
| Host utilities | Binary and ternary packing, group scales, reference matmul in bitpacking; scalar test oracles in oracle. |
| Wrapped CUDA launches | Poisson encoding, STDP, SAT result extraction and auxiliary best reduction, ternary GEMV and GEMM through GpuAccelerator. |
| Loaded CUDA kernels | Additional LIF, spike statistics, routing, SAT walker, and reduction symbols are available through KernelModule, but do not all have high-level launch wrappers. |
| Benchmark support | Optional bench example and manifest utilities; see benchmark instructions. |
The architecture guide lists exact wrapper and device symbol coverage. Ternary layout and kernel contracts describe the packed data format. The STDP wrapper launches its weight and trace kernels in stream order so each trace index has one writer.
Build and verify
CPU-safe checks need only the Rust toolchain:
The Rust coverage workflow measures the CPU/stub build and benchmark harness with Qlty. CUDA device validation remains a separate gate.
For the CUDA path, use a CUDA 13.2+ toolkit with nvcc and an sm_120 capable GPU for device execution:
CUDA_NVCC=/usr/local/cuda/bin/nvcc
CUDA_NVCC=/usr/local/cuda/bin/nvcc
The ignored tests require a working CUDA device. CI also compiles and assembles PTX without a GPU, then runs device tests on a self-hosted GPU runner. See REVIEW.md §6–§7 for the full local quality gate.
Citation
A formal citation is optional.
License
Choose either Apache-2.0 or MIT.