Expand description
§trueno-gpu: Pure Rust PTX Generation for NVIDIA CUDA
Generate PTX assembly directly from Rust - no LLVM, no nvcc, no external dependencies.
§Philosophy
Own the Stack - Build everything from first principles for complete control, auditability, and reproducibility.
§Quick Start
use trueno_gpu::ptx::{PtxModule, PtxKernel, PtxType};
// Build a vector addition kernel
let module = PtxModule::new()
.version(8, 0)
.target("sm_70")
.address_size(64);
let ptx_source = module.emit();
assert!(ptx_source.contains(".version 8.0"));§Modules
- [
ptx] - PTX code generation (builder pattern) - [
driver] - CUDA driver API (minimal FFI, optional) - [
kernels] - Hand-optimized GPU kernels - [
memory] - GPU memory management backend- Multi-backend abstraction
Re-exports§
pub use error::GpuError;pub use error::Result;pub use monitor::cuda_device_count;pub use monitor::cuda_monitoring_available;pub use monitor::CudaDeviceInfo;pub use monitor::CudaMemoryInfo;
Modules§
- backend
- Multi-Backend Abstraction
- error
- Error types for trueno-gpu operations Error types for trueno-gpu operations
- graph
- PMAT-291: Tensor compute graph for GPU inference (reduces 430 dispatches to ~15) PMAT-291: Tensor Compute Graph for GPU Inference
- monitor
- TUI Compute Mode Flow: CPU, GPU, and Memory Monitoring
- testing
- E2E visual testing framework for GPU kernels E2E Visual Testing Framework for GPU Kernels