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

MPK:一种用于将张量程序转化为巨型内核的编译器和运行时系统

MPK: A Compiler and Runtime for Mega-Kernelizing Tensor Programs

Carnegie Mellon University(卡内基梅隆大学);Tsinghua University(清华大学);NVIDIA;University of Michigan(密歇根大学);Independent Researcher(独立研究者);Peking University(北京大学)
Xinhao Cheng, Zhihao Zhang, Yu Zhou, Jianan Ji, Jinchen Jiang, Zepeng Zhao, Ziruo Xiao, Zihao Ye, Yingyi Huang, Ruihang Lai, Hongyi Jin, Bohan Hou, Mengdi Wu, Y… 展开作者

Xinhao Cheng, Zhihao Zhang, Yu Zhou, Jianan Ji, Jinchen Jiang, Zepeng Zhao, Ziruo Xiao, Zihao Ye, Yingyi Huang, Ruihang Lai, Hongyi Jin, Bohan Hou, Mengdi Wu, Yixin Dong, Anthony Yip, Zihao Ye, Songting Wang, Wenqin Yang, Xupeng Miao, Tianqi Chen, Zhihao Jia

AI总结:

提出MPK,首个自动将多GPU模型推理转化为单个高性能巨型内核的编译器和运行时系统,通过SM级图表示实现跨算子软件流水线和细粒度计算通信重叠,显著降低推理延迟。

摘要:

我们介绍了Mirage Persistent Kernel (MPK),这是首个自动将多GPU模型推理转化为单个高性能巨型内核的编译器和运行时系统。MPK引入了一种SM级图表示,该表示在单个流式多处理器(SM)的粒度上捕获数据依赖关系,从而实现跨算子软件流水线、计算与通信的细粒度重叠,以及在传统每算子内核执行模型下不可行的其他优化。MPK编译器将张量程序降级为优化的SM级任务图,并为每个任务生成快速的CUDA实现,而MPK内核内并行运行时则通过跨SM的分散调度在单个持久巨型内核内执行这些任务。这些组件共同提供了端到端的内核融合,且开发工作量极小,同时保留了现有编程模型的灵活性。我们的评估表明,MPK显著优于现有的每算子内核LLM服务系统,实现了高达1.7倍的端到端推理延迟降低,并将LLM推理性能推近底层硬件的极限。MPK在此https URL公开可用。

英文摘要:

We introduce Mirage Persistent Kernel (MPK), the first compiler and runtime system that automatically transforms multi-GPU model inference into a single high-performance mega-kernel. MPK introduces an SM-level graph representation that captures data dependencies at the granularity of individual streaming multiprocessors (SMs), enabling cross-operator software pipelining, \rev{fine-grained overlap of computation and communication, and other optimizations that are infeasible under the conventional kernel-per-operator execution model}. The MPK compiler lowers tensor programs into optimized SM-level task graphs and generates fast CUDA implementations for each task, while the MPK in-kernel parallel runtime executes these tasks within a single persistent mega-kernel using decentralized scheduling across SMs. Together, these components provide end-to-end kernel fusion with minimal developer effort, while preserving the flexibility of existing programming models. Our evaluation shows that MPK significantly outperforms existing kernel-per-operator LLM serving systems, achieving up to 1.7$\times$ lower end-to-end inference latency and pushing LLM inference performance close to the limits of the underlying hardware. MPK is publicly available at https://github.com/mirage-project/mirage.

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

↑