Tilus:一种面向低精度计算的瓦片级GPGPU编程语言
Tilus: A Tile-Level GPGPU Programming Language for Low-Precision Computation
AI总结:
针对现有低精度GPU内核生成方法位宽受限、性能不足的问题,提出支持1-8比特任意位宽低精度计算的瓦片级GPGPU语言Tilus,经编译优化后性能优于多款主流编译器与手工优化内核。
摘要:
大语言模型(LLM)服务对AI驱动的应用至关重要,但其需要大量计算资源,尤其是内存带宽和计算吞吐量。低精度计算已成为在降低资源消耗的同时提升效率的关键技术。现有生成低精度内核的方法仅限于2的幂次权值位宽,且由于高层GPU编程抽象的存在,性能欠佳。这些抽象限制了细粒度寄存器管理、优化内存访问模式等关键优化,而这些优化对高效低精度计算至关重要。本文提出Tilus,一种专为通用GPU(GPGPU)计算设计的领域特定语言,支持1到8比特任意位宽的低精度数据类型,同时保留GPU可编程性。Tilus具备线程块级编程模型、分层内存空间、新型代数布局系统,并广泛支持各类低精度数据类型。Tilus程序通过自动向量化和指令选择编译为高效GPU程序。大量实验表明,Tilus可高效支持全谱系低精度数据类型,性能优于当前最优的低精度内核。与Triton、Ladder等现有编译器,以及QuantLLM、Marlin等手工优化内核相比,Tilus的性能提升分别为1.75倍、2.61倍、1.29倍和1.03倍。我们已在https://github.com/NVIDIA/tilus开源Tilus。
英文摘要:
Serving Large Language Models (LLMs) is critical for AI-powered applications, yet it demands substantial computational resources, particularly in memory bandwidth and computational throughput. Low-precision computation has emerged as a key technique to improve efficiency while reducing resource consumption. Existing approaches for generating low-precision kernels are limited to weight bit widths that are powers of two and suffer from suboptimal performance because of high-level GPU programming abstractions. These abstractions restrict critical optimizations, such as fine-grained register management and optimized memory access patterns, that are essential for efficient low-precision computations. In this paper, we introduce Tilus, a domain-specific language designed for General-Purpose GPU (GPGPU) computing that supports low-precision data types with arbitrary bit widths from 1 to 8 while maintaining GPU programmability. Tilus features a thread-block-level programming model, a hierarchical memory space, a novel algebraic layout system, and extensive support for diverse low-precision data types. Tilus programs are compiled into highly efficient GPU programs through automatic vectorization and instruction selection. Extensive experiments demonstrate that Tilus efficiently supports a full spectrum of low-precision data types, and outperforms state-of-the-art low-precision kernels. Compared to existing compilers such as Triton and Ladder, as well as hand-optimized kernels such as QuantLLM and Marlin, Tilus achieves performance improvements of: $1.75\times$, $2.61\times$, $1.29\times$ and $1.03\times$, respectively. We open-source Tilus at https://github.com/NVIDIA/tilus.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。