Skip to main content
QUICK REVIEW

[论文解读] Pebbles, Graphs, and a Pinch of Combinatorics: Towards Tight I/O Lower Bounds for Statically Analyzable Programs

Grzegorz Kwaśniewski, Tal Ben‐Nun|arXiv (Cornell University)|May 15, 2021
Parallel Computing and Optimization TechniquesComputer Science参考文献 61被引用 14
一句话总结

本文提出了一种新颖的组合方法,利用简单重叠访问程序(SOAP)模型与符号有向图(SDG)对静态可分析程序中的紧致I/O下界进行推导。通过使用红蓝 Pebbling 和参数化CDAG对数据访问模式与依赖关系进行建模,该方法实现了比以往工作更精确的下界——在各类模板程序中最高提升14倍,在Cholesky分解中提升2倍,从而实现通信避免型代码生成的最优分块与调度。

ABSTRACT

Determining I/O lower bounds is a crucial step in obtaining communication-efficient parallel algorithms, both across the memory hierarchy and between processors. Current approaches either study specific algorithms individually, disallow programmatic motifs such as recomputation, or produce asymptotic bounds that exclude important constants. We propose a novel approach for obtaining precise I/O lower bounds on a general class of programs, which we call Simple Overlap Access Programs (SOAP). SOAP analysis covers a wide variety of algorithms, from ubiquitous computational kernels to full scientific computing applications. Using the red-blue pebble game and combinatorial methods, we are able to bound the I/O of the SOAP-induced Computational Directed Acyclic Graph (CDAG), taking into account multiple statements, input/output reuse, and optimal tiling. To deal with programs that are outside of our representation (e.g., non-injective access functions), we describe methods to approximate them with SOAP. To demonstrate our method, we analyze 38 different applications, including kernels from the Polybench benchmark suite, deep learning operators, and -- for the first time -- applications in unstructured physics simulations, numerical weather prediction stencil compositions, and full deep neural networks. We derive tight I/O bounds for several linear algebra kernels, such as Cholesky decomposition, improving the existing reported bounds by a factor of two. For stencil applications, we improve the existing bounds by a factor of up to 14. We implement our method as an open-source tool, which can derive lower bounds directly from provided C code.

研究动机与目标

  • 通过开发一种能够捕捉重用、重新计算以及复杂数据依赖关系的方法,弥合复杂多语句科学程序中I/O下界分析的差距。
  • 超越多面体模型,通过SOAP投影实现对非仿射和非单射数据访问模式的分析。
  • 推导精确的、非渐近的I/O下界,以指导通信避免型并行代码生成中的最优分块与循环融合。
  • 在38个多样化应用(包括深度学习模型与非结构化物理模拟)上验证该方法,此前这些应用的下界或缺失或过松。
  • 提供一个开源工具,可自动从C和Python代码推导符号化的I/O下界。

提出的方法

  • 提出简单重叠访问程序(SOAP)类,其定义为具有常数偏移重叠的单射数据访问函数,从而实现参数化CDAG中顶点数的精确计数。
  • 引入符号有向图(SDG)以建模语句间数据流,捕捉输入/输出重用,支持多语句程序的分析。
  • 以红蓝 Pebble 游戏为基础,通过X-划分将其松弛为图划分问题,以支持可扩展分析。
  • 应用组合技术以对最优X-划分的大小进行上界估计,其对应于最优分块配置。
  • 在既定假设下,为非SOAP程序(具有非单射或复杂访问函数)构造SOAP投影,以扩展方法适用范围。
  • 自动化分析流程:从C/Python代码到SDG构建、符号化下界推导,以及最优分块建议生成。

实验结果

研究问题

  • RQ1我们能否为包含重用、重新计算和复杂数据访问模式的广泛科学程序类,推导出紧致的、非渐近的I/O下界?
  • RQ2我们如何超越多面体模型,以分析具有非仿射或非单射数据访问函数的程序?
  • RQ3在常数因子方面,组合方法相较于现有基于投影的下界(如HBL或Loomis-Whitney)能提升多少?
  • RQ4我们能否为完整的深度神经网络以及如数值天气预报等复杂科学工作负载推导出I/O下界,而此前这些下界是缺失的?
  • RQ5所推导的下界能否用于指导编译器优化,如分块与循环融合,以实现通信避免执行?

主要发现

  • 该方法将Cholesky分解的已知I/O下界提高了两倍,达到了比以往方法更紧致的下界。
  • 对于FDTD2D和heat3d等模板程序,该方法将现有下界提高了最多14倍,显著收紧了理论通信下限。
  • 该方法首次为完整的深度神经网络(包括LeNet-5和BERT编码器)以及Transformer架构的核心组件建立了已知的I/O下界。
  • 该方法为非结构化物理模拟(包括COSMO天气模型中的垂直平流与水平扩散)推导出新的下界。
  • 该核心方法在未进行应用特定调优的情况下,相较于先前最先进的工具IOLB,最高提升达6√6倍(fdtd2d),且仅使用单一通用框架。
  • 开源实现可直接从C代码生成符号化I/O下界与最优分块参数,支持直接集成到编译器流水线中。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。