arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2009.10924cs.DCcs.LG
收藏

FusionStitching:提升深度学习工作负载的内存密集型计算

FusionStitching: Boosting Memory Intensive Computations for Deep Learning Workloads

Alibaba Group(阿里巴巴集团)

Zhen Zheng, Pengzhan Zhao, Guoping Long, Feiwen Zhu, Kai Zhu, Wenyi Zhao, Lansong Diao, Jun Yang, Wei Lin

摘要:

我们在这项工作中表明,内存密集型计算可能会导致严重的性能问题,由于片外内存访问和CPU-GPU上下文切换开销在广泛的深度学习模型。针对这一问题,现有的JIT(Just-in-time)内核融合和代码生成技术存在融合计划探索策略粗糙、代码生成能力有限等缺陷。我们提出了FusionStitching,一个深度学习编译器,能够将具有不同数据依赖性和非均匀并行性的内存密集型运算符融合到大型GPU内核中,以自动减少全局内存访问和上下文切换开销。FusionStitching通过引入中间值的数据重用,扩大了融合可以针对的操作组合范围,超越了以前的JIT工作。它探索大的融合空间,以决定最佳的融合计划,考虑内存访问成本,内核调用和资源使用限制。FusionStitching使用特定于域的成本模型有效地调整最佳拼接方案。实验结果表明,FusionStitching可以达到2.21倍的加速比相比,最先进的,平均1.45倍。除了这些实验结果,我们还将我们的方法集成到编译器产品中,并将其部署到具有数千个GPU的AI工作负载的生产集群中。该系统已经运行了4个多月,平均每月为大约30,000个任务节省了7,000个GPU小时。

英文摘要:

We show in this work that memory intensive computations can result in severe performance problems due to off-chip memory access and CPU-GPU context switch overheads in a wide range of deep learning models. For this problem, current just-in-time (JIT) kernel fusion and code generation techniques have limitations, such as rough fusion plan exploration strategies and limited code generation ability. We propose FusionStitching, a deep learning compiler capable of fusing memory intensive operators, with varied data dependencies and non-homogeneous parallelism, into large GPU kernels to reduce global memory access and context switch overhead automatically. FusionStitching widens the range of operation combinations that fusion can target beyond previous JIT works by introducing data reuse of intermediate values. It explores large fusion spaces to decide optimal fusion plans with considerations of memory access costs, kernel calls and resource usage constraints. FusionStitching tunes the optimal stitching scheme with a domain-specific cost model efficiently. Experimental results show that FusionStitching can reach up to 2.21x speedup compared to state-of-the-art, with 1.45x on average. Besides these experimental results, we integrated our approach into a compiler product and deployed it onto a production cluster for AI workloads with thousands of GPUs. The system has been in operation for more than 4 months and saves 7,000 GPU hours on average for approximately 30,000 tasks per month.

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

↑