稀疏张量程序自动调度的渐近成本模型
An Asymptotic Cost Model for Autoscheduling Sparse Tensor Programs
AI总结:
本文提出首个稀疏张量程序的自动渐近调度器,通过抽象成本表示和帕累托前沿缩小搜索空间,实验表明其生成内核性能优于TACO默认调度。
摘要:
虽然循环重排序和融合可以对稠密张量程序的常数因子性能产生重大影响,但对稀疏张量程序的影响却是渐近的,在实践中常常导致数量级的性能差异。稀疏张量还引入了压缩存储格式的选择,这可能产生渐近效应。对稀疏张量编译器的研究催生了简化语言来表达这些权衡,但用户需要提供做出决策的调度。这具有挑战性,因为调度器必须预见到稀疏格式、循环结构、潜在稀疏模式以及编译器本身之间的相互作用。自动化这一决策过程有望最终使稀疏张量编译器对最终用户可用。我们提出了,据我们所知,第一个用于稀疏张量程序的自动渐近调度器。我们提供了一种方法,抽象地表示调度的渐近成本并在它们之间进行选择。我们将搜索空间缩小到一个可管理的小型“帕累托前沿”,即渐近上不被支配的内核。我们通过使用TACO稀疏张量编译器编译这些内核,并将其与使用默认TACO调度生成的内核进行比较来测试我们的方法。我们的结果表明,我们的方法将调度空间减少了数量级,并且生成的内核在渐近性能上优于使用默认调度生成的内核。
英文摘要:
While loop reordering and fusion can make big impacts on the constant-factor performance of dense tensor programs, the effects on sparse tensor programs are asymptotic, often leading to orders of magnitude performance differences in practice. Sparse tensors also introduce a choice of compressed storage formats that can have asymptotic effects. Research into sparse tensor compilers has led to simplified languages that express these tradeoffs, but the user is expected to provide a schedule that makes the decisions. This is challenging because schedulers must anticipate the interaction between sparse formats, loop structure, potential sparsity patterns, and the compiler itself. Automating this decision making process stands to finally make sparse tensor compilers accessible to end users. We present, to the best of our knowledge, the first automatic asymptotic scheduler for sparse tensor programs. We provide an approach to abstractly represent the asymptotic cost of schedules and to choose between them. We narrow down the search space to a manageably small "Pareto frontier" of asymptotically undominated kernels. We test our approach by compiling these kernels with the TACO sparse tensor compiler and comparing them with those generated with the default TACO schedules. Our results show that our approach reduces the scheduling space by orders of magnitude and that the generated kernels perform asymptotically better than those generated using the default schedules.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。