一句话:提出可扩展的调度语言 Exo 2,通过 Cursors 机制让用户定义调度操作并构建调度库,在 80 多个高性能内核上大幅减少调度代码且保持竞争力性能。
用户可调度语言(USL)通过安全的程序变换帮助程序员高效优化程序,但现有设计假定编译器已知程序员想控制什么、自动化什么,这一假设在现实中并不普适。本文主张 USL 应当可生长,并提出 Exo 2:用户可以在编译器外部定义新的调度操作,通过组合一组可信的细粒度原语,安全地编写自己的调度库以实现所需自动化。作者提炼出 actions(修改代码)、inspection(查询代码)和 references(指向代码)三个对可扩展 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.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2411-07211,
title = {Exo 2: Growing a Scheduling Language},
author = {Yuka Ikarashi and Kevin Qian and Samir Droubi and Alex Reinking and Gilbert Louis Bernstein and Jonathan Ragan-Kelley},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3669940.3707218}
}