[论文解读] Rectangular Full Packed Format for Cholesky's Algorithm: Factorization, Solution and Inversion
本文提出了一种新型存储格式——矩形全压缩格式(RFPF),该格式结合了压缩存储的最小内存占用与全存储的高性能,通过支持层级3 BLAS 实现。RFPF 在仅使用一半内存的情况下,性能可与全格式 LAPACK 程序相媲美,在串行系统上相比压缩格式程序最高可实现 43 倍加速,在 SMP 并行系统上最高可达 97 倍加速。
We describe a new data format for storing triangular, symmetric, and Hermitian matrices called RFPF (Rectangular Full Packed Format). The standard two dimensional arrays of Fortran and C (also known as full format) that are used to represent triangular and symmetric matrices waste nearly half of the storage space but provide high performance via the use of Level 3 BLAS. Standard packed format arrays fully utilize storage (array space) but provide low performance as there is no Level 3 packed BLAS. We combine the good features of packed and full storage using RFPF to obtain high performance via using Level 3 BLAS as RFPF is a standard full format representation. Also, RFPF requires exactly the same minimal storage as packed format. Each LAPACK full and/or packed triangular, symmetric, and Hermitian routine becomes a single new RFPF routine based on eight possible data layouts of RFPF. This new RFPF routine usually consists of two calls to the corresponding LAPACK full format routine and two calls to Level 3 BLAS routines. This means {\it no} new software is required. As examples, we present LAPACK routines for Cholesky factorization, Cholesky solution and Cholesky inverse computation in RFPF to illustrate this new work and to describe its performance on several commonly used computer platforms. Performance of LAPACK full routines using RFPF versus LAPACK full routines using standard format for both serial and SMP parallel processing is about the same while using half the storage. Performance gains are roughly one to a factor of 43 for serial and one to a factor of 97 for SMP parallel times faster using vendor LAPACK full routines with RFPF than with using vendor and/or reference packed routines.
研究动机与目标
- 解决存储对称正定矩阵时内存效率与计算性能之间的权衡问题。
- 克服标准压缩格式的局限性,后者因缺乏层级3 BLAS 支持而造成性能浪费。
- 开发一种存储格式,其内存占用与压缩格式相当,但可通过使用层级3 BLAS 程序实现高性能计算。
- 将 RFPF 集成到 LAPACK 中,以支持 Cholesky 分解、求解和求逆,同时保持完整的向后兼容性并获得性能提升。
- 实现与现有 LAPACK 软件栈的无缝集成,无需引入新的算法实现。
提出的方法
- 设计 RFPF 为一种矩形布局,将三角矩阵紧凑地存储在一维连续数组中,同时保持与全格式 LAPACK 程序兼容的数据访问模式。
- 将 RFPF 数据布局映射到八种可能的配置(基于存储顺序、三角形区域和转置),使单个 RFPF 程序可替代多个全格式和压缩格式的 LAPACK 程序。
- 通过两次调用标准 LAPACK 全格式程序和两次调用层级3 BLAS 内核来实现 RFPF 程序,确保高性能且无需编写新内核代码。
- 支持实对称矩阵和复厄米矩阵,复数情况下扩展支持转置和共轭转置操作。
- 提供在标准格式(全格式、压缩格式)与 RFPF 之间转换的程序,以确保向后兼容性和互操作性。
- 将 RFPF 集成到 LAPACK 3.2 中,采用符合 LAPACK 命名规范的新程序名(如 CPFTRF、DPFTRS),支持所有精度和数据类型。
实验结果
研究问题
- RQ1能否设计一种新型矩阵存储格式,使其在利用层级3 BLAS 的同时兼具最小内存占用与高性能?
- RQ2在不编写新内核的情况下,现有 LAPACK 全格式程序在多大程度上可被重用以实现高性能的 RFPF 程序?
- RQ3在串行和 SMP 并行环境中,RFPF 的性能与标准全格式和压缩格式相比如何?
- RQ4在 Cholesky 分解、求解和求逆中,RFPF 相较于传统压缩存储格式可实现的最大性能提升是多少?
- RQ5RFPF 是否能无缝集成到 LAPACK 中,实现向后兼容,并对现有软件基础设施进行最小改动?
主要发现
- RFPF 在仅使用一半内存的情况下,性能可与标准 LAPACK 全格式程序相媲美,其存储效率与压缩格式相当。
- 在串行系统上,RFPF 在 Cholesky 分解和求逆操作中,相较厂商优化版和参考版压缩程序(PPTRF),最高可实现 43 倍性能提升。
- 在 SMP 并行系统上,由于有效利用了层级3 BLAS 和多线程,RFPF 相较压缩程序最高可实现 97 倍加速。
- 使用厂商优化 BLAS 的 RFPF 程序性能与标准全格式 LAPACK 程序几乎完全一致,证实其运行时开销极小。
- LAPACK 3.2 原生支持 44 个 RFPF 程序,涵盖分解、求解、求逆和格式转换,证明其已全面集成到 LAPACK 生态系统中。
- RFPF 方法可在多种架构上实现高性能计算,包括 Intel Tigerton、IBM Power 4 和 SUN UltraSPARC-IV 系统,且在各平台上均保持一致的性能增益。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。