AI 中文总结
该研究提出DSLHyPE双语领域特定语言,分离双曲型PDE求解器的数值表示与物理实现,经引力波等求解器在x86和H200平台验证,可助力相关数值格式开发。
AI 中文摘要
我们推出一种双语领域特定语言(DSL),用于在通用双曲型偏微分方程(PDE)求解器中对计算内核进行建模。用户可通过熟悉的原生语言(如C或C++)表达PDE项(即底层物理),同时采用嵌入Python的DSL——DSLHyPE来指定数值格式。DSLHyPE的编译器会将Python描述降低至MLIR,并引入一个翻译通道,将其与同样映射到MLIR的原生代码集成。我们的方法尽可能长时间地保持数值表示与物理实现的分离,同时通过现有MLIR优化通道将优化工作委托给编译器。这种关注点分离有利于在现有PDE实现基础上开发数值格式的研究人员,或在涉及非线性系统的应用中开发数值格式的研究人员,这类应用的PDE项自身也必须求解PDE。我们在x86处理器和H200 GPU上,利用引力波求解器和物质演化求解器验证了该方法的可行性。
英文摘要
We introduce a bilingual domain-specific language (DSL) for modelling compute kernels within a generic solver for hyperbolic partial differential equations (PDEs). Users express PDE terms, i.e.~the underlying physics, in a familiar native language such as C or C++, while the numerical scheme is specified in a Python-embedded DSL, DSLHyPE. DSLHyPE's compiler lowers the Python description to MLIR and introduces a translation pass that integrates it with native code likewise mapped to MLIR. Our approach keeps the numerical representation and the physics implementation separate for as long as possible, while delegating optimization to the compiler through existing MLIR optimization passes. This separation of concerns benefits researchers developing numerical schemes on top of existing PDE implementations or with applications involving nonlinear systems whose PDE terms must solve PDEs themselves. We demonstrate the feasibility of the approach using a gravitational-wave solver and a matter-evolution solver on x86 processors and H200 GPUs.