程序超图:用于几何代数、空间计算和物理感知编译的多重关系结构
The Program Hypergraph: Multi-Way Relational Structure for Geometric Algebra, Spatial Compute, and Physics-Aware Compilation
AI总结:
提出程序超图(PHG)作为程序语义图的泛化,通过超边表示多重关系,解决空间数据流架构中的瓦片共置与路由约束以及几何代数计算中的分级多重积问题,实现几何正确性、内存布局、数值精度和硬件划分的联合推导。
摘要:
先前关于维度类型系统和确定性内存管理的工作中引入的程序语义图(PSG)将编译相关属性编码为计算节点之间的二元边关系。这种表示对于标量和张量计算是足够的,但对于异构计算核心的两类问题在结构上变得不足:空间数据流架构中的瓦片共置和路由约束(本质上是多重的),以及几何代数计算(其中分级多重积不能忠实地表示为二元操作的序列而不损失代数恒等式)。本文引入程序超图(PHG)作为PSG的原则性泛化,将二元边提升为任意元数的超边。我们证明了Clifford代数中的分级是现有DTS阿贝尔群框架内的自然维度轴,分级推理导出几何乘积稀疏性,无需手动特化即可消除对Clifford代数神经网络的主要性能异议,并且网格拓扑的k-单纯形结构是超边形式主义的直接实例。我们评估了现有的几何代数库生态系统,识别出当前系统均未解决的、一致的类型理论缺口,并展示了PHG在Fidelity编译框架内填补了这一缺口。结果是一个编译框架,其中几何正确性、内存放置、数值精度选择和硬件划分都可以从单个图结构中联合推导,并以交互式设计时反馈的形式呈现。
英文摘要:
Source code organizes a program as expressions and declarations, which a compiler can represent as an abstract syntax tree (AST). Some compilers introduce a further abstraction of the computation as a graph. Nodes represent operations, while connections record how values pass between them and how execution proceeds. Yet these connections can leave the full scope of conditions governing a computation implicit. Developers may then need defensive checks, rely on compiler hacks, pragmas, and implementation-specific code to maintain those conditions as the program evolves. Our thesis is that a hypergraph more faithfully represents complex computation across all targets by making joint constraints inherent to its structure, with an overall less burdensome design-time API. Our Program Hypergraph (PHG) extends our Semantic Graph with relations that connect across an operation's participants, their dependencies, and the invariants they must preserve. Joint resolution in the graph guides lowering into standard Multi-Level Intermediate Representation (MLIR). Satisfiability modulo theories (SMT) checks intrinsic to the graph discharge applicable proof obligations. Supporting information remains available until the decisions that require it are complete. As a primary benefit, verification follows from the rules used to construct and transform the graph. For properties established this way before execution, the generated program needs no added runtime checks, no 'boxing' or 'tagging' or other managed runtime support. We develop this account through geometric algebra, shared-memory capacity, and spatial placement, distinguishing structural guarantees from numerical and resource obligations that require further evidence. The proposed integration makes the same information available at design-time, so engineers can inspect the consequences of a choice before it becomes an implementation constraint.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。