TauLang:面向静态调度加速器的时空编程语言与编译器
TauLang: A Language and Compiler for Space-Time Programming on Statically Scheduled Accelerators
AI总结:
TauLang是将时间作为一等公民的内核语言与编译器,通过显式时间调度、整数线性规划联合求解张量放置与周期调度,在类TSP加速器上实现了1.40倍延迟加速,可扩展至1636个GEMM块。
摘要:
Groq的张量流处理器(TSP)等静态调度加速器通过从芯片中去除动态同步硬件实现低延迟的大语言模型推理,这类加速器没有缓存、仲裁器或硬件调度器,编译器必须确定每个操作的确切切片和发射周期,因此操作的运行时机是正确性的必要条件。现有的内核语言无法适配这类机器,因为它们依赖硬件解决周期时序,而是将调度隐式编码在代码结构中。本文提出TauLang,一种将时间作为程序一等公民的内核语言与编译器,程序员使用带参数的显式时间调度操作、循环和组合内核,因此探索调度只需修改参数值而非重写代码。TauLang在其时序中间表示TauIR中对显式时间进行代数验证,随后在整数线性规划中联合求解张量放置与周期调度,利用显式时间将关联操作分组为时序簇以剪枝搜索空间。在类TSP机器的周期精确模型上,联合搜索在10个内核上实现了比空间优先流高1.40倍的延迟加速;少量显式时间锚点可将延迟保持在未时序调度的1个周期内,并将联合搜索扩展至1636个GEMM块,而未时序调度的搜索在32个GEMM块时无法找到调度方案。
英文摘要:
Statically scheduled accelerators such as Groq's Tensor Streaming Processor (TSP) achieve low-latency large language model inference by stripping dynamic synchronization hardware from the chip. With no caches, arbiters, or hardware schedulers, the compiler must fix the exact slice and issue cycle of every operation, so when an operation runs is a condition for correctness. Existing kernel languages cannot target such machines because they rely on hardware to resolve cycle timing and instead encode schedules implicitly in code structure. We present TauLang, a kernel language and compiler that makes time a first-class citizen of the program. The programmer schedules operations, loops, and composed kernels with parameterized explicit times, so exploring schedules means changing parameter values rather than rewriting code. TauLang validates explicit times algebraically in TauIR, its timed intermediate representation. It then solves tensor placement and cycle scheduling jointly in an integer linear program, using explicit times to group connected operations into timing clusters that prune the search space. On a cycleaccurate model of a TSP-like machine, joint search achieves a $1.40\times$ latency speedup across ten kernels over a space-first flow. A few explicit time pins keep latency within one cycle of the untimed schedules and scale joint search to 1,636 GEMM blocks, whereas untimed search finds no schedule at 32.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。