Relax:面向端到端动态机器学习的可组合抽象
Relax: Composable Abstractions for End-to-End Dynamic Machine Learning
AI总结:
本文提出编译器抽象Relax,通过跨层级统一表示与一等符号形状标注实现动态形状感知的端到端优化,使大语言模型在多种GPU上达到先进性能并支持更广泛设备部署。
摘要:
动态形状计算在现代机器学习工作负载中已变得至关重要,尤其是在新兴的大语言模型中。这些模型的成功推动了对它们在各种后端环境中普遍部署的需求。在本文中,我们提出了Relax,一种用于优化端到端动态机器学习工作负载的编译器抽象。Relax引入了一种跨层级抽象,将计算图、循环级张量程序以及外部库调用封装在单一表示中。Relax还引入了一等符号形状标注,以在程序全局范围内跟踪动态形状计算,从而实现动态形状感知的跨层级优化。我们使用所提出的方法构建了一个端到端编译框架,以优化动态形状模型。在大语言模型上的实验结果表明,Relax在各种GPU上提供了与最先进系统相竞争的性能,并使得新兴模型能够部署到更广泛的新兴环境中,包括移动电话、嵌入式设备和网页浏览器。
英文摘要:
Dynamic shape computations have become critical in modern machine learning workloads, especially in emerging large language models. The success of these models has driven the demand for their universal deployment across a diverse set of backend environments. In this paper, we present Relax, a compiler abstraction for optimizing end-to-end dynamic machine learning workloads. Relax introduces a cross-level abstraction that encapsulates computational graphs, loop-level tensor programs, and external library calls in a single representation. Relax also introduces first-class symbolic shape annotations to track dynamic shape computations globally across the program, enabling dynamic shape-aware cross-level optimizations. We build an end-to-end compilation framework using the proposed approach to optimize dynamic shape models. Experimental results on LLMs show that Relax delivers performance competitive with state-of-the-art systems across various GPUs and enables deployment of emerging models to a broader set of emerging environments, including mobile phones, embedded devices, and web browsers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。