arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.07211cs.PL
收藏

Exo 2:发展一种调度语言

Exo 2: Growing a Scheduling Language

Yuka Ikarashi, Kevin Qian, Samir Droubi, Alex Reinking, Gilbert Bernstein, Jonathan Ragan-Kelley

AI总结:

Exo 2是一种可发展的用户可调度语言,通过Cursors机制允许用户在编译器外部定义调度操作,组合细粒度原语构建调度库,在80多个高性能内核上减少了一个数量级的调度代码并保持竞争力。

摘要:

用户可调度语言(USLs)通过提供安全的程序转换手段,帮助程序员高效地优化程序。当前的 USLs 旨在为程序员提供他们想要的精确控制,同时自动化所有其他关注点。然而,对于注重性能的程序员想要控制什么、如何控制以及想要自动化什么,并没有统一的答案,即使在相对狭窄的领域也是如此。我们主张 USLs 应该被设计成可发展的。我们提出了 Exo 2,一种调度语言,允许用户在编译器外部定义新的调度操作。通过组合一组可信的、细粒度的原语,用户可以安全地编写自己的调度库,以构建所需的自动化。我们将动作(修改代码的方式)、检查(查询代码的方式)和引用(指向代码的方式)确定为任何用户可扩展的 USL 所必需的。我们将这些思想融合到一个称为 Cursors 的新机制中,该机制允许在用户代码中创建调度库。我们展示了在超过 80 个高性能内核上摊销调度工作量的库,将总调度代码减少了一个数量级,并在三个不同平台上提供了与最先进实现相媲美的性能。

英文摘要:

User-schedulable languages (USLs) help programmers productively optimize programs by providing safe means of transforming them. Current USLs are designed to give programmers exactly the control they want, while automating all other concerns. However, there is no universal answer for what performance-conscious programmers want to control, how they want to control it, and what they want to automate, even in relatively narrow domains. We claim that USLs should, instead, be designed to grow. We present Exo 2, a scheduling language that enables users to define new scheduling operations externally to the compiler. By composing a set of trusted, fine-grained primitives, users can safely write their own scheduling library to build up desired automation. We identify actions (ways of modifying code), inspection (ways of interrogating code), and references (ways of pointing to code) as essential for any user-extensible USL. We fuse these ideas into a new mechanism called Cursors that enables the creation of scheduling libraries in user code. We demonstrate libraries that amortize scheduling effort across more than 80 high-performance kernels, reducing total scheduling code by an order of magnitude and delivering performance competitive with state-of-the-art implementations on three different platforms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑