论可变块行格式中稀疏矩阵的最优划分
On Optimal Partitioning For Sparse Matrices In Variable Block Row Format
AI总结:
本文证明VBR格式的最优行/列分组是NP难的,提出1D-VBR变体及线性时间动态规划算法,并扩展为交替启发式分区器,以最小化内存占用。
摘要:
可变块行(VBR)格式是一种有影响力的块稀疏矩阵格式,专为相邻行和列之间具有共享稀疏结构的矩阵而设计。VBR将相邻的行和列分组,并以密集格式存储包含非零元素的块。这减少了内存占用,并实现了诸如寄存器阻塞和指令级并行等优化。现有方法使用启发式方法来确定应将哪些行和列分组在一起。我们证明,在几种合理的成本模型下,为VBR找到行和列的最优分组是NP难的。鉴于这一发现,我们提出了一种VBR的一维变体,称为1D-VBR,它通过仅对行进行分组,实现了比VBR更好的性能。我们详细描述了运行时和内存消耗的成本模型。然后,我们描述了一种线性时间动态规划解决方案,用于为1D-VBR格式最优地对行进行分组。我们扩展了我们的算法,以产生一种启发式VBR分区器,该分区器在假设列或行分别固定的情况下,交替地对行和列进行最优划分。我们的交替启发式算法产生的VBR矩阵,在我们测试的所有分区器中,具有最小的内存占用。
英文摘要:
The Variable Block Row (VBR) format is an influential blocked sparse matrix format designed for matrices with shared sparsity structure between adjacent rows and columns. VBR groups adjacent rows and columns, storing the resulting blocks that contain nonzeros in a dense format. This reduces the memory footprint and enables optimizations such as register blocking and instruction-level parallelism. Existing approaches use heuristics to determine which rows and columns should be grouped together. We show that finding the optimal grouping of rows and columns for VBR is NP-hard under several reasonable cost models. In light of this finding, we propose a 1-dimensional variant of VBR, called 1D-VBR, which achieves better performance than VBR by only grouping rows. We describe detailed cost models for runtime and memory consumption. Then, we describe a linear time dynamic programming solution for optimally grouping the rows for 1D-VBR format. We extend our algorithm to produce a heuristic VBR partitioner which alternates between optimally partitioning rows and columns, assuming the columns or rows to be fixed, respectively. Our alternating heuristic produces VBR matrices with the smallest memory footprint of any partitioner we tested.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。