arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1807.10852cs.PL
收藏

稀疏矩阵代码依赖分析在编译时的简化

Sparse Matrix Code Dependence Analysis Simplification at Compile Time

Mahdi Soltan Mohammadi, Kazem Cheshmi, Ganesh Gopalakrishnan, Mary Hall, Maryam Mehri Dehnavi, Anand Venkat, Tomofumi Yuki, Michelle Mills Strout

摘要:

分析基于阵列的计算以确定数据依赖性对于许多应用是有用的,包括自动并行化、竞争检测、计算和通信重叠、验证和形状分析。对于稀疏矩阵码,通过使用索引阵列使得阵列数据依赖性分析变得更加困难,索引阵列使得可以仅存储矩阵的非零条目(例如,在A[B[i]]中,B是索引数组)。在这里,由于索引数组的值在编译时不可用,因此这种间接数组访问经常阻碍依赖分析。因此,许多依赖关系直到运行时才能被证明是不可满足的或确定的。尽管如此,稀疏矩阵代码中的索引数组通常具有诸如索引数组元素的单调性之类的属性,这些属性可以用来减少所需的运行时分析量。在本文中,我们贡献了一个公式的数组数据依赖分析,包括编码索引数组属性作为普遍量化的约束。这使得可以利用现有的SMT求解器来确定这种依赖是否是不可满足的,并显着减少了在一组八个稀疏矩阵内核中需要运行时分析的依赖的数量。另一个贡献是通过发现等式和/或子集关系来简化剩余的可满足数据依赖的算法。这些简化对于使基于运行时检查的方法可行是必不可少的。

英文摘要:

Analyzing array-based computations to determine data dependences is useful for many applications including automatic parallelization, race detection, computation and communication overlap, verification, and shape analysis. For sparse matrix codes, array data dependence analysis is made more difficult by the use of index arrays that make it possible to store only the nonzero entries of the matrix (e.g., in A[B[i]], B is an index array). Here, dependence analysis is often stymied by such indirect array accesses due to the values of the index array not being available at compile time. Consequently, many dependences cannot be proven unsatisfiable or determined until runtime. Nonetheless, index arrays in sparse matrix codes often have properties such as monotonicity of index array elements that can be exploited to reduce the amount of runtime analysis needed. In this paper, we contribute a formulation of array data dependence analysis that includes encoding index array properties as universally quantified constraints. This makes it possible to leverage existing SMT solvers to determine whether such dependences are unsatisfiable and significantly reduces the number of dependences that require runtime analysis in a set of eight sparse matrix kernels. Another contribution is an algorithm for simplifying the remaining satisfiable data dependences by discovering equalities and/or subset relationships. These simplifications are essential to make a runtime-inspection-based approach feasible.

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

↑