arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.14480cs.DC
收藏

面向多核处理器的稠密线性代数软件栈协同设计

Co-Design of the Dense Linear AlgebravSoftware Stack for Multicore Processors

Héctor Martínez, Sandra Catalán, Francisco D. Igual, José R. Herrero, Rafael Rodríguez-Sánchez, Enrique S. Quintana-Ortí

AI总结:

本研究提出稠密线性代数软件栈协同设计方法,通过定制GEMM内核、动态适配缓存参数及开发架构专用微内核,在ARM与x86平台提升了缓存利用率与性能,同时揭示了多线程并行与缓存优化的平衡关系。

摘要:

本文倡导对稠密线性代数软件栈进行交织式设计,打破LAPACK(线性代数软件包)中高层分块算法与BLAS(基础线性代数子程序)中底层架构相关内核之间的严格壁垒。具体而言,我们提出定制GEMM(通用矩阵乘法)内核——该内核由LAPACK中相关矩阵分解的分块算法调用——以提升采用分层缓存的现代多核处理器的性能。为此,我们利用分析模型,根据矩阵操作数的形状动态调整GEMM的缓存配置参数。此外,我们支持灵活开发架构专用微内核,以进一步提升缓存层级的利用率。我们在搭载ARM(NVIDIA Carmel,Neon)和x86(AMD EPYC,AVX2)多核处理器的两个平台上开展实验,结果表明该方法在缓存利用率更优及整体性能更高方面具备优势。不过,实验也揭示了多线程并行优化与缓存使用之间的微妙平衡。

英文摘要:

This paper advocates for an intertwined design of the dense linear algebra software stack that breaks down the strict barriers between the high-level, blocked algorithms in LAPACK (Linear Algebra PACKage) and the low-level, architecture-dependent kernels in BLAS (Basic Linear Algebra Subprograms). Specifically, we propose customizing the GEMM (general matrix multiplication) kernel, which is invoked from the blocked algorithms for relevant matrix factorizations in LAPACK, to improve performance on modern multicore processors with hierarchical cache memories. To achieve this, we leverage an analytical model to dynamically adapt the cache configuration parameters of the GEMM to the shape of the matrix operands. Additionally, we accommodate a flexible development of architecture-specific micro-kernels that allow us to further improve the utilization of the cache hierarchy. Our experiments on two platforms, equipped with ARM (NVIDIA Carmel, Neon) and x86 (AMD EPYC, AVX2) multi-core processors, demonstrate the benefits of this approach in terms of better cache utilization and, in general, higher performance. However, they also reveal the delicate balance between optimizing for multi-threaded parallelism versus cache usage.

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

↑