Contemporary accelerator designs exhibit a high degree of spatial localization, wherein two-dimensional physical distance determines communication costs between processing elements. This situation presents considerable algorithmic challenges, particularly when managing sparse data, a pivotal component in progressing data science. The spatial computer model quantifies communication locality by weighting processor communication costs by distance, introducing a term named energy. Moreover, it integrates depth, a widely-utilized metric, to promote high parallelism. We propose and analyze a framework for efficient spatial tree algorithms within the spatial computer model. Our primary method constructs a spatial tree layout that optimizes the locality of the neighbors in the compute grid. This approach thereby enables locality-optimized messaging within the tree. Our layout achieves a polynomial factor improvement in energy compared to utilizing a PRAM approach. Using this layout, we develop energy-efficient treefix sum and lowest common ancestor algorithms, which are both fundamental building blocks for other graph algorithms. With high probability, our algorithms exhibit near-linear energy and poly-logarithmic depth. Our contributions augment a growing body of work demonstrating that computations can have both high spatial locality and low depth. Moreover, our work constitutes an advancement in the spatial layout of irregular and sparse computations.
翻译:现代加速器设计呈现出高度的空间局部性特征,其中二维物理距离决定了处理单元间的通信成本。这种情形带来了显著的算法挑战,特别是在管理稀疏数据时——而稀疏数据处理正是推进数据科学的关键要素。空间计算模型通过按距离加权处理器通信成本来量化通信局部性,引入了一个名为“能量”的术语。此外,该模型还整合了广泛使用的深度度量以促进高并行度。我们在空间计算模型框架内提出并分析了一套高效的空间树算法体系。主要方法构建了一种空间树布局,该布局优化了计算网格中邻接节点的局部性,从而实现了树结构内局部性优化的消息传递。与采用PRAM方法相比,我们的布局在能量消耗上实现了多项式量级的改进。基于该布局,我们开发了能效优化的树前缀和与最低公共祖先算法,这两者都是其他图算法的基础构建模块。在大概率条件下,我们的算法展现出近线性的能量消耗和多对数级的深度。本研究成果进一步丰富了关于计算可同时实现高空间局部性与低深度特性的研究工作,同时也在不规则与稀疏计算的空间布局领域取得了新进展。