Cross-vendor f64 scientific GPU computing without CUDA. This page documents
a pure Rust GPU compute pipeline using WebGPU/WGSL that runs on NVIDIA, AMD,
and Intel GPUs โ no vendor SDK, no proprietary dependencies, no cloud.
Last Updated: July 31, 2026
License: CC-BY-SA 4.0
---
The Claim
(compiler), and coral-glowplug (hardware lifecycle) โ together replace the
NVIDIA CUDA toolchain for scientific computing. Not all of it yet. But a
clear, advancing front that already produces paper-parity lattice QCD on a
$500 consumer GPU.
This is not a research prototype. These are production-grade primals with
application code.
---
What's Already Replaced
1. CUDA Runtime โ toadStool + wgpu/Vulkan
| CUDA Component | Replacement | Status | Tests |
cudaGetDeviceProperties() | toadStool hardware discovery (multi-adapter, multi-vendor) | Production | 21,156 |
cudaSetDevice() | Capability-based selection (f64 probe, VRAM, workgroup limits) | Production | โ |
cudaMalloc/cudaFree | wgpu buffer management (BarraCuda GuardedDeviceHandle) | Production | โ |
cudaMemcpy | wgpu buffer map/unmap with staging | Production | โ |
cudaLaunchKernel | queue.submit() with WGSL compute shaders | Production | โ |
cudaDeviceSynchronize() | device.poll(Maintain::Wait) | Production | โ |
| Device enumeration | toadstool-sysmon (pure Rust /proc, no sysinfo crate) | Production | โ |
Key difference: toadStool discovers hardware at runtime by capability,
not by vendor ID. The same code discovers NVIDIA, AMD, Intel, and BrainChip
NPU. There is no concept of \"CUDA device 0\" โ there is \"the device that
supports f64 and has >8GB VRAM.\"
2. cuBLAS / cuFFT / cuDNN โ BarraCuda WGSL Shaders
| Library | BarraCuda Equivalent | Shaders | Parity | Gap |
| cuBLAS (GEMM) | GemmF64, BatchedGemmF64, DF64 GEMM | 40+ | Near parity (3.7ร Kokkos gap, down from 27ร) | Throughput on large matrices |
| cuFFT | 1D/2D/3D FFT, NTT, INTT | 20+ | Full parity for science ops | No cuFFT callback equiv |
| cuDNN (basic) | Conv2D, pooling, attention, softmax, LayerNorm | 30+ | Partial โ science ML ops | No full ML framework |
| cuSPARSE | SpMV, SpMM | 10+ | Science ops | Not general-purpose |
| cuRAND | LCG, Mersenne Twister | 5+ | Full parity | |
| cuSOLVER | Eigensolve, LU, Cholesky | 15+ | Full parity for f64 | |
| Thrust | Reduction, scan, sort | 20+ | Full parity |
DF64 emulation on consumer GPUs). Key domains:
| Domain | Shader Count | Example Operations |
| Linear algebra | 80+ | GEMM, eigensolve, SVD, LU, Cholesky |
| Statistics | 60+ | Welford, Pearson, bootstrap, jackknife |
| Signal processing | 40+ | FFT, convolution, Savitzky-Golay, CWT |
| Bioinformatics | 94+ | Diversity, alignment, phylogeny, DADA2 |
| Physics | 70+ | MD, spectral, Anderson, transport |
| Pharmacometrics | 30+ | Hill, PBPK, PopPK, ODE systems |
| ML primitives | 50+ | Attention, GELU, LayerNorm, softmax |
| Precision | 40+ | DF64 arithmetic, transcendentals |
3. nvcc / ptxas โ coralReef Sovereign Compiler
| nvcc (CUDAโPTX) | naga WGSLโSPIR-V + custom lowering | Production | 2,241 tests |
| ptxas (PTXโSASS) | Pure Rust SPIR-VโSASS codegen | Production | 46/46 shaders compile to SM70/SM86 |
| NVVM (SPIR-VโPTX) | Bypassed โ 12/12 NVVM poisoning patterns solved | Sovereign | f64 transcendentals, DF64, FMA |
| libnvidia-compiler | Zero dependency โ entire compile path is pure Rust | Sovereign | #![forbid(unsafe_code)] on glowplug |
covering every domain (bio, physics, ML, linear algebra) โ compile from WGSL
to native SASS (SM70 Volta, SM86 Ampere) and native RDNA2 (GFX1030) without
ANY vendor toolchain. No nvcc, no ptxas, no ROCm. Pure Rust compiler.
4. NVIDIA Kernel Driver โ coral-glowplug + VFIO
| Driver Layer | Sovereign Replacement | Status |
| nvidia.ko (kernel module) | VFIO-pci (upstream Linux kernel) | Production |
| nvidia-drm (display) | Not needed (compute-only VFIO) | Bypassed |
| libnvidia-glcore | Not needed (Vulkan/wgpu path) | Bypassed |
| nvidia-uvm (unified memory) | Direct VRAM R/W via BAR0 | Validated (24/26 tests) |
| Device lifecycle | coral-glowplug (systemd daemon, JSON-RPC) | Production |
| Boot binding | VFIO-first boot (before display manager) | Production |
| Power management | D3hotโD0 sovereign recovery, HBM2 BIOS-trained VRAM survives | Validated |
| Firmware execution | FECS direct execution from host-loaded IMEM | Proven (Exp 068) |
coral-glowplug is a systemd daemon that manages GPU lifecycle without any
NVIDIA software. It binds GPUs to vfio-pci at boot, provides hot-swap
personality management (VfioPersonality, NouveauPersonality, AmdgpuPersonality),
health monitoring, and graceful shutdown โ all via JSON-RPC 2.0 over Unix socket.
---
Current Performance vs CUDA/Kokkos
| Yukawa MD (N=10K, 80K steps) | ~1 hr (HPC) | 3.66 hrs (RTX 4070) | โ | 3.7ร slower than CUDA |
| Lattice QCD 32โด ฮฒ-scan | โ | 13.6 hrs ($0.58) | โ | First on consumer GPU |
| Nuclear EOS L1 | 184 s (Python) | 2.3 s | โ | Rust vs Python (compiled vs interpreted) |
| f64 throughput | A100 native f64 | 0.35 TFLOPS (native) | 2,130 matmul/sec (measured) | Apples-to-oranges: A100 is native f64, DF64 is emulated ~14-digit |
| Kokkos Verlet stepper | 1.0ร reference | โ | 0.27ร (3.7ร gap) | Active optimization |
improvement over three months. The remaining gap is primarily in DF64
transcendental functions (exp, log, sin, cos) where NVIDIA's NVVM has
Newton-Raphson iteration at slightly higher latency.
---
What's Coming Next (Near-Term, Given Velocity)
Based on the 27-day sprint velocity (architecture/EVOLUTION_TIMELINE), with
patterns per iteration:
3 Months (June 2026)
| Target | What Changes |
| Multi-GPU | toadStool multi-adapter dispatch (RTX 3090 + Titan V in parallel) |
| AMD E2E production | RX 6950 XT full pipeline: compile + dispatch + validate |
6 Months (September 2026)
| Target | What Changes |
| AlphaFold timing parity | ~3 min/sequence on consumer GPU vs ~5 min cloud AlphaFold |
| Kokkos gap โ <1.5ร | Approaching throughput parity on science workloads |
12 Months (March 2027)
| Target | What Changes |
| Full NVVM replacement | All cuBLAS/cuFFT/cuDNN science ops at parity |
| Four-vendor GPU support | NVIDIA, AMD, Intel, Apple (Metal via wgpu) |
---
The Proprietary Cost of What We Replace
| CUDA Toolkit | Free (vendor lock) | wgpu/Vulkan (open standard, cross-vendor) |
| NVIDIA driver | Free (proprietary binary) | coral-glowplug + VFIO (upstream Linux kernel) |
| A100 GPU | ~$10Kโ15K | RTX 3090 (~$500 used), DF64: 2,130 matmul/sec measured |
| HPC allocation | $50โ500/run | $0.044/run (electricity, consumer GPU) |
| MATLAB Parallel | ~$2K/yr + GPU toolbox | toadStool + BarraCuda (AGPL-3.0, free) |
| Kokkos | Free (C++, complex build) | BarraCuda (Rust, cargo build) |
Annual lab savings (conservative): $0 in software licenses (all were
technically free) but ~$50Kโ200K in HPC allocations avoided for a lab
running regular plasma, QCD, or bioinformatics GPU workloads. Plus the
unmeasurable value of zero-queue 24/7 access and data that never leaves
the lab.
---
The Sovereign Stack Diagram
Application Layer
โโโ Springs (wetSpring, hotSpring, neuralSpring, etc.)
โโโ Science experiments: reproduce published papers
Math Layer
โโโ BarraCuda ({{ total_stat(stat=\"wgsl_files\") }} WGSL shaders)
โโโ f64-canonical math: what to compute
Orchestration Layer
โโโ ToadStool S157 (96 JSON-RPC methods, 21,156 tests)
โโโ Hardware discovery: where and how to compute
Compiler Layer
โโโ coralReef Phase 10 Iter 53 (2,241 tests)
โโโ WGSL โ SPIR-V โ native SASS/RDNA2
Hardware Layer
โโโ coral-glowplug (systemd daemon, JSON-RPC)
โโโ VFIO device lifecycle: boot, bind, dispatch, recover
Nothing above depends on:
โ NVIDIA CUDA toolkit
โ nvcc / ptxas / NVVM
โ nvidia.ko kernel module
โ Any C/C++ library
โ Any cloud service
โ Any vendor-specific API
Every layer is pure Rust, AGPL-3.0, and publicly auditable. The entire
scientific computing stack โ from math primitives to GPU binary compilation
to hardware lifecycle management โ belongs to the user.
---
---
Reproduce It
git clone https://github.com/ecoPrimals/barraCuda && cd barraCuda
cargo test --workspace # all tests pass
cargo run --release --bin validate # exit 0 = pass
Hardware tested: NVIDIA RTX 4070, RTX 5090, AMD RDNA2, Intel Arc
Precision: f64 via Vulkan SHADER_F64 extension
Date: July 2026
Author: ecoPrimal (ORCID 0009-0004-2141-0321)
Limitations
- f64 GPU support requires Vulkan
shaderFloat64โ some mobile and integrated GPUs lack this - Shader compilation is pure Rust (coralReef) but currently targets SPIR-V; Metal/DX12 backends are planned
- Performance comparisons to CUDA are indirect โ we benchmark scientific output, not raw FLOPS
- No CUDA interop; this is a clean replacement, not a compatibility layer
*Repositories: