GPU software startup VectorWare has successfully executed Rust’s Future trait and native async/await syntax directly on GPU hardware. By compiling Rust's compiler-generated state machines into PTX kernels, the approach enables task-based parallel execution without relying on custom domain-specific languages. Developers can now leverage familiar Rust abstractions and memory safety guarantees when building complex GPU applications.
Moving Beyond Uniform Data Parallelism
Traditional GPU programming centers on data parallelism, where thousands of threads execute identical operations across broad datasets. To support sophisticated dynamic control flow, developers traditionally turn to manual warp specialization, assigning different computational tasks to distinct warps on the chip. While this maximizes hardware utilization, it forces programmers to manage synchronization manually, making code brittle and error-prone.
Existing frameworks attempt to solve this concurrency management challenge through distinct abstractions:
- JAX: Formulates programs as computation graphs and optimizes execution using Python-based domain-specific languages.
- Triton: Expresses computation through independent block units processed through multi-level MLIR dialect pipelines.
- CUDA Tile: Uses first-class tile units to expose data dependencies explicitly before lowering to Tile IR.
- Rust Async/Await: Captures state directly in compiler-generated state machines, utilizing standard language ownership rules.
Compiling State Machines to GPU Hardware
VectorWare has successfully compiled and executed Rust's native async/await state machines directly on GPU hardware using PTX kernels. Because Rust compiles futures into self-contained state machines rather than tying them to specific operating system threads, the runtime code can execute on bare-metal accelerator hardware.
To drive these futures on the GPU without a standard operating system, VectorWare adapted the open-source Embassy executor, which is built for #![no_std] embedded environments. Initial testing verified core language features, including chained futures, conditional execution, multi-step workflows, and third-party combinators from crates like futures_util.
Technical Challenges and Ecosystem Limitations
Executing Rust futures on hardware accelerators required fixing compiler backend bugs and working around issues in NVIDIA's ptxas assembler tool. While this proof-of-concept demonstrates functional task scheduling, it remains a conceptual milestone that faces adoption hurdles compared to established ecosystems. Unlike machine learning workloads built explicitly for JAX or Triton, broader adoption depends on proving performance efficiency against hand-tuned CUDA kernels across production applications.