arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2103.05288cs.DC
收藏

DISC:一种面向机器学习工作负载的动态形状标注器

DISC: A Dynamic Shape Compiler for Machine Learning Workloads

Kai Zhu, Wenyi Zhao, Zhen Zheng, Tianyou Guo, Pengzhan Zhao, Feiwen Zhu, Junjie Bai, Jun Yang, Xiaoyong Liu, Lansong Diao, Wei Lin

摘要:

许多最近的机器学习模型显示动态形状特征。然而,现有的人工智能编译器优化系统受到动态形状模型带来的问题的影响,包括编译开销,内存使用,优化管道和部署复杂度。本文提供了一个编译器系统,本机支持动态形状工作负载的优化,命名为DISC。DISC丰富了一组IR,形成一个完全动态的形状表示。它在编译时生成运行时流以支持处理基于动态形状的逻辑,这避免了运行时的解释开销,并扩大了主机-设备协同优化的机会。采用形状传播和约束收集方法解决动态形状的核融合问题。这是第一个工作,以展示如何建立一个端到端的动态形状编译器的基础上MLIR基础设施。实验表明,DISC的加速比是TensorFlow/PyTorch的3.3倍,是Nimble的1.8倍。

英文摘要:

Many recent machine learning models show dynamic shape characteristics. However, existing AI compiler optimization systems suffer a lot from problems brought by dynamic shape models, including compilation overhead, memory usage, optimization pipeline and deployment complexity. This paper provides a compiler system to natively support optimization for dynamic shape workloads, named DISC. DISC enriches a set of IR to form a fully dynamic shape representation. It generates the runtime flow at compile time to support processing dynamic shape based logic, which avoids the interpretation overhead at runtime and enlarges the opportunity of host-device co-optimization. It addresses the kernel fusion problem of dynamic shapes with shape propagation and constraints collecting methods. This is the first work to demonstrate how to build an end-to-end dynamic shape compiler based on MLIR infrastructure. Experiments show that DISC achieves up to 3.3x speedup than TensorFlow/PyTorch, and 1.8x than Nimble.

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

↑