arXiv · 2604.22242
Fast GPU Linear Algebra via Compile Time Expression Fusion
Abstract
We describe the Bandicoot GPU linear algebra toolkit for C++, which prioritises ease of use without compromising efficiency. Bandicoot's API aims for compatibility with the popular Armadillo CPU linear algebra library, enabling easy transition for existing CPU-based codebases. Unlike other GPU-focused toolkits, Bandicoot uses template metaprogramming to generate fused GPU kernels directly at compile-time, yielding efficient kernels that can saturate memory bandwidth. This removes the need for run-time overhead or JIT infrastructure. Empirical results show that Bandicoot outperforms (sometimes by considerable margins) commonly-used linear algebra toolkits including PyTorch, TensorFlow, and JAX.
Explore related subjects
Keep this discovery
Ryan R. Curtin, Marcus Edel, Conrad Sanderson. 2026-04-24. Fast GPU Linear Algebra via Compile Time Expression Fusion. https://arxiv.org/abs/2604.22242
Cite the original work for its findings. Save a collection to share your selection of sources.