VTC: 基于虚拟张量的DNN编译以消除数据移动
VTC: DNN Compilation with Virtual Tensors for Data Movement Elimination
AI总结:
VTC通过引入虚拟张量概念,首次实现消除所有不必要的数据移动,提升DNN编译效率,减少内存占用。
摘要:
随着计算与内存操作延迟之间的差距扩大,数据移动优化在DNN编译中变得越来越重要。当前的优化方法如布局转换和算子融合仅针对部分张量算子,因而错过了现代DNN工作负载中减少数据移动的重要机会,包括大型语言模型。我们引入VTC,一种新的张量编译框架,首次通过针对所有数据移动算子的完整谱系来消除所有不必要的数据移动。VTC提出虚拟张量的概念,通过索引映射来跟踪计算算子之间的数据移动,而不是昂贵的物理数据传输到和从全局内存,这可以无缝互操作于现有的计算内核并处理任意的张量算子组合。我们还引入了一种新的数据移动消除算法,以自动识别有盈利的虚拟张量创建策略。在多种DNN上的评估显示,VTC在NVIDIA GPU上可比现有ML编译器提升高达1.93倍(平均1.28倍),并实现高达60%(平均17.5%)的推理内存节省。
英文摘要:
With the widening gap between compute and memory operation latencies, data movement optimizations have become increasingly important for DNN compilation. Current optimizations such as layout transformations and operator fusion only target a subset of tensor operators and consequently miss important opportunities for reducing data movement in contemporary DNN workloads, including large language models. We introduce VTC, a novel tensor compilation framework that for the first time eliminates all unnecessary data movement by targeting the full spectrum of data movement operators. VTC proposes the concept of virtual tensors to track data movement between compute operators via index mappings rather than expensive physical data transfers to and from global memory, which can seamlessly interoperate with existing computation kernels and handle arbitrary tensor operator compositions. We also introduce a novel data movement elimination algorithm to automatically identify a profitable virtual tensor creation strategy. Evaluation on a variety of DNNs shows that VTC can outperform existing ML compilers by up to 1.93x (1.28x on average) on NVIDIA GPUs with up to 60% (17.5% on average) inference memory savings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。