[论文解读] Automated Derivation of Parametric Data Movement Lower Bounds for Affine Programs
该论文提出了 IOLB,这是首个完全自动化的工具,通过分析仿射程序的计算依赖图和调度约束,推导出非渐近、参数化的数据移动下界。该工具实现了精确且可扩展的下界,包含缩放常数,优于以往仅依赖人工或渐近分析的方法,在 PolyBench 套件上的实验表明,对多个算法的下界比以往发表的结果更紧致。
For most relevant computation, the energy and time needed for data movement dominates that for performing arithmetic operations on all computing systems today. Hence it is of critical importance to understand the minimal total data movement achievable during the execution of an algorithm. The achieved total data movement for different schedules of an algorithm can vary widely depending on how efficiently the cache is used, e.g., untiled versus effectively tiled matrix-matrix multiplication. A significant current challenge is that no existing tool is able to meaningfully quantify the potential reduction to the data movement of a computation that can be achieved by more effective use of the cache through operation rescheduling. Asymptotic parametric expressions of data movement lower bounds have previously been manually derived for a limited number of algorithms, often without scaling constants. In this paper, we present the first compile-time approach for deriving non-asymptotic parametric expressions of data movement lower bounds for arbitrary affine computations. The approach has been implemented in a fully automatic tool (IOLB) that can generate these lower bounds for input affine programs. IOLB's use is demonstrated by exercising it on all the benchmarks of the PolyBench suite. The advantages of IOLB are many: (1) IOLB enables us to derive bounds for few dozens of algorithms for which these lower bounds have never been derived. This reflects an increase of productivity by automation. (2) Anyone is able to obtain these lower bounds through IOLB, no expertise is required. (3) For some of the most well-studied algorithms, the lower bounds obtained by \ ool are higher than any previously reported manually derived lower bounds.
研究动机与目标
- 为解决缺乏自动量化仿射程序中通过调度可实现的理论最小数据移动量的工具的问题。
- 通过实现自动推导非渐近、参数化 I/O 下界并包含缩放常数,弥合性能分析中的差距。
- 提供一种可扩展的基于工具的方法,替代复杂算法中手动推导数据移动下界的繁琐过程。
- 使研究人员和实践者能够评估给定实现与基于操作强度的理论性能极限之间的接近程度。
- 通过生成比以往报道更紧致的下界,提升性能建模的准确性,尤其针对矩阵乘法和稀疏核等知名内核。
提出的方法
- 该方法采用计算依赖图(CDAG)上的 Brascamp-Lieb 不等式变体来建模数据移动。
- 基于重用模式和数据访问模式,将 CDAG 分解为子图,以实现精确的下界计算。
- 该方法采用基于波前的分析和 2S 划分技术,以建模数据重用并最小化跨内存层次的冗余数据移动。
- 将下界公式化为缓存大小 $ S $ 和程序参数(包括循环边界和数组维度)的函数。
- 该工具整合了维度化循环参数化和干扰建模,以处理如 Floyd-Warshall 和 adi 内核中的复杂重用模式。
- 该算法完全自动化,可在编译时运行,生成可形式化验证的、严格有效的下界。
实验结果
研究问题
- RQ1是否能够通过完全自动化的工具,为任意仿射程序推导出包含缩放常数的非渐近、参数化数据移动下界?
- RQ2与人工推导的下界相比,自动推导的下界在紧致性和准确性方面表现如何?
- RQ3该工具能否识别出以往发表的下界存在次优或错误的情况?
- RQ4所推导的下界在多大程度上能准确预测给定算法在操作强度方面的性能上限?
- RQ5该方法能否以可扩展且精确的方式处理复杂的重用模式以及如分块和分裂等循环变换?
主要发现
- IOLB 在标准机器上对每个 PolyBench 基准测试程序的处理时间均在一秒以内,自动推导出 30 个基准测试的非平凡、参数化数据移动下界。
- 对于包括矩阵乘法和稀疏核在内的多个广泛研究的算法,IOLB 推导出的下界高于以往任何人工推导的已发表结果。
- 在 11 个案例中,推导出的下界恰好等于手动优化的通信避免调度的实际数据移动量,证实了该下界的紧致性和最优性。
- 该工具成功处理了 Floyd-Warshall 和 adi 内核等复杂重用模式,而以往方法因干扰和分解限制而失效。
- IOLB 的下界包含缩放常数,可直接用于屋顶图(roofline)性能建模,以判断代码是否受内存带宽限制。
- 该方法优于以往的自动化方法,支持维度分解、干扰建模和基于波前的分析,从而显著提升了下界紧致性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。