arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.15927cs.ARcs.DCcs.PF
收藏

UPMEM 释放:速度的软件秘诀

UPMEM Unleashed: Software Secrets for Speed

Heterogeneous Memory Software Lab Huawei Technologies Warsaw, Poland

Krystian Chmielewski, Jarosław Ławnicki, Uladzislau Lukyanau, Tadeusz Kobus, Maciej Maciejewski

AI总结:

本文针对UPMEM PIM平台,通过修改汇编代码和位串行处理等技术,实现了整数运算和GEMV的显著加速,最高达10倍,并优化了数据传输。

摘要:

为处理中内存(PIM)平台开发内核在数据管理和有限处理单元上的并行编程方面提出了独特的挑战。尽管用于 PIM 的软件开发工具包(SDK),如 UPMEM SDK,提供了必要的工具,但这些新兴平台在性能优化方面仍有显著空间。在本文中,我们揭示了 UPMEM 软件栈中令人惊讶的低效之处,并尝试了非标准的编程技术。通过对 UPMEM 编译器生成的汇编进行简单修改,我们根据数据类型的不同,在整数加法中实现了 1.6-2 倍的加速,在整数乘法中实现了 1.4-5.9 倍的加速。我们还证明了低精度数据的位串行处理是 UPMEM 的一个可行选项:在 INT4 位串行点积计算中,UPMEM 可以实现比基线超过 2.7 倍的加速。针对 PIM 分配的小型 API 扩展,考虑了服务器的非均匀内存访问(NUMA)架构,进一步将主机-PIM 数据传输的一致性和吞吐量提高了最多 2.9 倍。最后,我们展示了当矩阵预加载到 PIM 中时,我们的优化内核在 INT8 广义矩阵-向量乘法(GEMV)中比双插槽 CPU 服务器快超过 3 倍,在 INT4 GEMV 中快 10 倍。我们优化的 INT8 GEMV 内核比基线快 3.5 倍。

英文摘要:

Developing kernels for Processing-In-Memory (PIM) platforms poses unique challenges in data management and parallel programming on limited processing units. Although software development kits (SDKs) for PIM, such as the UPMEM SDK, provide essential tools, these emerging platforms still leave significant room for performance optimization. In this paper, we reveal surprising inefficiencies in UPMEM software stack and play with non-standard programming techniques. By making simple modifications to the assembly generated by the UPMEM compiler, we achieve speedups of 1.6-2x in integer addition and 1.4-5.9x in integer multiplication, depending on the data type. We also demonstrate that bit-serial processing of low precision data is a viable option for UPMEM: in INT4 bit-serial dot-product calculation, UPMEM can achieve over 2.7x speedup over the baseline. Minor API extensions for PIM allocation that account for the non-uniform memory access (NUMA) architecture of the server further improve the consistency and throughput of host-PIM data transfers by up to 2.9x. Finally, we show that, when the matrix is preloaded into PIM, our optimized kernels outperform a dual-socket CPU server by over 3x for INT8 generalized matrix-vector multiplication (GEMV) and by 10x for INT4 GEMV. Our optimized INT8 GEMV kernel outperforms the baseline 3.5x.

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

↑