arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.06665cs.DCcs.CLcs.PF
收藏

PolyTOPS:可重构且灵活的多面体调度器

PolyTOPS: Reconfigurable and Flexible Polyhedral Scheduler

Huawei Technologies France(华为技术法国有限公司);Huawei Technologies Co., Ltd.(华为技术有限公司);Mines-Paris PSL University(巴黎高科矿业学院)
Gianpietro Consolaro, Zhen Zhang, Harenome Razanajato, Nelson Lossing, Nassim Tchoulak, Adilla Susungi, Artur Cesar Araujo Alves, Renwei Zhang, Denis Barthou, C… 展开作者

Gianpietro Consolaro, Zhen Zhang, Harenome Razanajato, Nelson Lossing, Nassim Tchoulak, Adilla Susungi, Artur Cesar Araujo Alves, Renwei Zhang, Denis Barthou, Corinne Ancourt, Cedric Bastoul

AI总结:

本文提出可配置多面体调度器 PolyTOPS,通过高层配置适配不同架构与编译场景,打破一刀切调度器思路,并在 MindSpore NPU、PolyBench 多核及 PolyMage 场景中取得显著加速效果。

摘要:

多面体技术已被广泛用于底层编译器和高层流程中的自动代码优化。循环优化是这一技术的核心,目前已经提出了多种多面体调度器,如 Feautrier、Pluto、isl 和 Tensor Scheduler,它们各自面向不同的架构、并行模型或应用场景。由于架构的异构性,针对特定场景进行优化的需求正在不断增长。最具代表性的情况之一就是用于人工智能的 NPU(神经处理单元),它们可能需要以不同目标进行循环优化。另一个需要考虑的因素是多面体优化所处的框架或编译器。根据目标架构、编译环境和应用领域的不同,不同场景可能需要不同类型的优化,以最好地发挥架构特性集的作用。我们引入了一种新的可配置多面体调度器 PolyTOPS,它可以通过直观的高层配置适配各种场景。该调度器允许创建多样化的调度策略,既可以针对特定场景(类似于最先进的调度器),也可以针对特定内核,从而打破了“一刀切”调度器方法的概念。PolyTOPS 已与 isl 和 CLooG 作为代码生成器一起使用,并已集成到 MindSpore AKG 深度学习编译器中。不同场景下的实验结果表明其性能良好:在 MindSpore(针对 NPU Ascend 架构)混合自定义算子中,相比 isl 调度实现了 7.66 倍的几何平均加速;在 PolyBench 上,在不同多核架构中相比 Pluto 调度实现了最高 1.80 倍的几何平均加速。最后,在 PolyMage 场景中展示了与不同最先进工具的一些比较结果。

英文摘要:

Polyhedral techniques have been widely used for automatic code optimization in low-level compilers and higher-level processes. Loop optimization is central to this technique, and several polyhedral schedulers like Feautrier, Pluto, isl and Tensor Scheduler have been proposed, each of them targeting a different architecture, parallelism model, or application scenario. The need for scenario-specific optimization is growing due to the heterogeneity of architectures. One of the most critical cases is represented by NPUs (Neural Processing Units) used for AI, which may require loop optimization with different objectives. Another factor to be considered is the framework or compiler in which polyhedral optimization takes place. Different scenarios, depending on the target architecture, compilation environment, and application domain, may require different kinds of optimization to best exploit the architecture feature set. We introduce a new configurable polyhedral scheduler, PolyTOPS, that can be adjusted to various scenarios with straightforward, high-level configurations. This scheduler allows the creation of diverse scheduling strategies that can be both scenario-specific (like state-of-the-art schedulers) and kernel-specific, breaking the concept of a one-size-fits-all scheduler approach. PolyTOPS has been used with isl and CLooG as code generators and has been integrated in MindSpore AKG deep learning compiler. Experimental results in different scenarios show good performance: a geomean speedup of 7.66x on MindSpore (for the NPU Ascend architecture) hybrid custom operators over isl scheduling, a geomean speedup up to 1.80x on PolyBench on different multicore architectures over Pluto scheduling. Finally, some comparisons with different state-of-the-art tools are presented in the PolyMage scenario.

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

↑