How shuqi2077/ruda works
Ruda is a Rust HPC stack spanning tensor data, compilation, device execution, numerical libraries, distributed collectives, and model/data tooling. Its principal workflow is an application submitting tensor or kernel work to the runtime, which selects a compilation path and dispatches execution to a hardware backend, producing results accessible to the application. The README documents the broader library capabilities and backend paths; sampled source confirms tensor storage, compiler argument handling, CUDA execution, WGPU pipelines/storage, and tuning behavior, but not every subsystem’s internal wiring.
Main entry points: engine.rs Runtime Tuning · storage.rs Tensor Data · args_manager.rs Kernel Arguments · pipeline.rs CUDA Pipeline IR
Components 19
Core Runtime
- Tensor Data
ruda-core/src/tensor/data/storage.rs - Host Storage
ruda-core/src/tensor/host/storage.rs - Runtime Tuning
ruda/src/runtime/tune/stack/engine.rs
Compilation
- Kernel Arguments
ruda-compiler/src/mlir/visitor/args_manager.rs - CUDA Pipeline IR
ruda-compiler/src/cpp/shared/pipeline.rs
Execution Backends
- CUDA Execution
ruda-driver-cuda/src/execution/server.rs - WGPU Pipeline
ruda-driver-wgpu/src/backend/base/pipeline.rs - WGPU Storage
ruda-driver-wgpu/src/memory/storage.rs
Compute Libraries
- Linear Algebra
ruBLAS/src/tensor_matmul/mod.rs - Attention
ruDNN/src/attention/mod.rs - Convolution
ruDNN/src/convolution/mod.rs - Primitives
Higher-Level Systems
- Collectives
ruCCL/src/api.rs - LLM Inference
- Dataset Storage
ruda-dataset/src/dataset/sqlite/storage.rs
Other components
- Application
- SQLite
- NVIDIA Driver
- WGPU Device
Connections 20
- Application → Runtime Tuning: submits work
- Application → Tensor Data: uses tensors
- Tensor Data → Host Storage: stores data
- Runtime Tuning → Kernel Arguments: selects kernels
- Kernel Arguments → CUDA Pipeline IR: builds arguments
- CUDA Pipeline IR → CUDA Execution: generates execution
- CUDA Execution → NVIDIA Driver: dispatches to
- Runtime Tuning → WGPU Pipeline: selects kernels
- WGPU Pipeline → WGPU Device: creates pipelines
- WGPU Storage → WGPU Device: allocates buffers
- Application → Linear Algebra: requests operations
- Application → Attention: requests attention
- Application → Convolution: requests convolution
- Application → Primitives: uses primitives
- Application → Collectives: requests collectives
- Application → LLM Inference: runs inference
- LLM Inference → Linear Algebra: uses matrix operations
- LLM Inference → Attention: uses attention
- Application → Dataset Storage: reads or writes
- Dataset Storage → SQLite: stores records