通过编译时表达融合实现快速GPU线性代数
Fast GPU Linear Algebra via Compile Time Expression Fusion
AI总结:
Bandicoot GPU线性代数工具包通过编译时表达融合生成高效GPU内核,兼容Armadillo库,优于PyTorch、TensorFlow等工具。
摘要:
我们描述了Bandicoot GPU线性代数工具包,一个基于C++的库,强调易用性而不牺牲效率。其API兼容流行的Armadillo CPU线性代数库,便于迁移现有CPU代码。不同于其他GPU工具包,Bandicoot使用模板元编程在编译时生成融合的GPU内核,产生高效的内核,常能饱和内存带宽。这消除了运行时开销或JIT基础设施的需求。实验证明,Bandicoot在某些情况下显著优于常用的线性代数工具包,包括PyTorch、TensorFlow和JAX。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。