As custom hardware accelerators become increasingly central to machine learning workloads, efficient data transfer is critical for maximizing accelerator performance on linear algebra kernels. AXI4MLIR, an extension of the Multi-Level Intermediate Representation (MLIR) compiler framework for automated generation of host-accelerator driver code, incurs significant runtime overhead due to non-zero-copy CPU-accelerator data movement. During transfers from the host to the accelerator, data is copied from heap-allocated memory buffers into contiguous Direct Memory Access (DMA)-mapped buffers. This work identifies this copy as a redundant staging operation and eliminates it through zero-copy data movement. The optimization extends accel, an MLIR dialect introduced by AXI4MLIR, and implements lowering support that allocates buffers directly within DMA-mapped memory, thereby omitting the staging copy. We evaluate the proposed scheme using a configurable matrix-matrix multiplication accelerator and show that the zero-copy optimization reduces main memory data movement by up to 2x, increasing overall accelerator utilization.


翻译:随着定制硬件加速器在机器学习工作负载中日益核心,高效的数据传输对于最大化线性代数内核上的加速器性能至关重要。AXI4MLIR是多级中间表示(MLIR)编译器框架的扩展,用于自动生成主机-加速器驱动代码,但由于非零拷贝的CPU-加速器数据移动而引入显著的运行时开销。在从主机到加速器的传输过程中,数据从堆分配的缓冲区复制到连续的DMA映射缓冲区。本研究将此复制操作识别为冗余的分阶段操作,并通过零拷贝数据移动消除它。该优化扩展了AXI4MLIR引入的MLIR方言accel,并实现了降低支持,直接在DMA映射内存中分配缓冲区,从而省略了分阶段复制。我们使用可配置的矩阵-矩阵乘法加速器评估所提出的方案,并表明零拷贝优化将主内存数据移动减少多达2倍,提高了整体加速器利用率。

0
下载
关闭预览

相关内容

【ICML 2024】零阶优化器微调大模型,大幅降低内存
专知会员服务
32+阅读 · 2024年7月8日
TensorFlow Lite指南实战《TensorFlow Lite A primer》,附48页PPT
专知会员服务
70+阅读 · 2020年1月17日
概述自动机器学习(AutoML)
人工智能学家
19+阅读 · 2019年8月11日
如何给你PyTorch里的Dataloader打鸡血
极市平台
15+阅读 · 2019年5月21日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月25日
VIP会员
最新内容
印度精确打击与指挥架构的断层
专知会员服务
0+阅读 · 45分钟前
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
2+阅读 · 今天14:13
深入Project Maven:为何人工智能在战场上依然失灵
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
7+阅读 · 7月19日
《无人机蜂群通信技术研究》50页
专知会员服务
8+阅读 · 7月19日
相关VIP内容
【ICML 2024】零阶优化器微调大模型,大幅降低内存
专知会员服务
32+阅读 · 2024年7月8日
TensorFlow Lite指南实战《TensorFlow Lite A primer》,附48页PPT
专知会员服务
70+阅读 · 2020年1月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员