arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.11158cs.ARcs.PL
收藏

击败堆:AXI4MLIR中的零拷贝数据移动

Defeat the Heap: Zero-Copy Data Movement in AXI4MLIR

University of Glasgow(格拉斯哥大学);Northeastern University(东北大学);Pacific Northwest National Laboratory(太平洋西北国家实验室)

Elam Cohavi, Nicolas Bohm Agostini, Jude Haris, Antonino Tumeo, David Kaeli, José Cano

AI总结:

针对AXI4MLIR框架中非零拷贝数据移动导致的运行时开销,提出通过直接分配DMA映射内存实现零拷贝,消除冗余暂存拷贝,最高可减少2倍主存数据移动并提升加速器利用率。

摘要:

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

英文摘要:

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.

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

↑