arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.13854cs.PF
收藏

面向数组应用的静态重用分布估计

Static Reuse Profile Estimation for Array Applications

Abdur Razzak, Atanu Barai, Nandakishore Santhi, Abdel-Hameed A. Badawy

AI总结:

本文提出一种基于LLVM IR的静态重用分布估计方法,通过括号格式内存访问表示、递归算法和小规模循环展开外推,在编译时预测缓存命中率,平均准确率达95%。

摘要:

重用距离分析是一种被广泛认可的用于刻画应用特征并揭示缓存局部性的方法。尽管已有多种技术可以从动态内存轨迹计算重用分布,但由于需要在运行时收集动态内存轨迹,这些方法在时间和空间上都开销很大。相比之下,静态分析重用分布估计是一种更有前景且速度更快的方法,因为它在编译时即可完成计算,无需运行程序或收集内存轨迹。本文提出了一种静态分析技术,用于估计基于循环的程序的重用分布。对于输入程序,我们通过分析程序的LLVM IR生成基本块级控制流图和执行次数。我们将应用内核的内存访问表示为一种紧凑的括号格式,并使用递归算法预测重用距离直方图。我们部署了一个独立的预测器,该预测器对较小边界展开循环,并为这些小规模情况生成临时重用距离分布。利用这些较小的分布,我们针对实际循环边界外推重用分布。我们使用该重用分布来预测缓存命中率。结果表明,相对于动态重用分布方法,我们的模型能够以平均95%的准确率预测缓存命中率。

英文摘要:

Reuse distance analysis is a widely recognized method for application characterization that illustrates cache locality. Although there are various techniques to calculate the reuse profile from dynamic memory traces, it is both time and space-consuming due to the requirement to collect dynamic memory traces at runtime. In contrast, static analysis reuse profile estimation is a promisingly faster approach since it is calculated at compile time without running the program or collecting memory traces. This work presents a static analysis technique to estimate the reuse profile of loop-based programs. For an input program, we generate a basic block-level control flow graph and the execution count by analyzing the LLVM IR of the program. We present the memory accesses of the application kernel in a compact bracketed format and use a recursive algorithm to predict the reuse distance histogram. We deploy a separate predictor that unrolls the loop(s) for smaller bounds and generates a temporary reuse distance profile for those small cases. Using these smaller profiles, the reuse profile is extrapolated for the actual loop bound(s). We use this reuse profile to predict the cache hit rate. Results show that our model can predict cache hit rates with an average accuracy of 95% relative to the dynamic reuse profile methods.

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

↑