论文标题

在可变块行格式中稀疏矩阵的最佳分区

On Optimal Partitioning For Sparse Matrices In Variable Block Row Format

论文作者

Ahrens, Willow, Boman, Erik G.

论文摘要

变量块行(VBR)格式是一种影响的障碍稀疏矩阵格式,专为相邻行和列之间具有共享稀疏结构的矩阵而设计。 VBR组相邻的行和列,存储以致密格式包含非齐射的所得块。这减少了内存足迹,并可以进行优化,例如寄存器阻塞和指令级并行性。现有方法使用启发式方法来确定应将哪些行和列分组在一起。我们表明,在几种合理的成本模型下,找到VBR的排行和列的最佳分组为NP。鉴于这一发现,我们提出了一个称为1D-VBR的1维变体,仅通过对行进行分组,它比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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源