基于LLVM级自动微分的晶格规范理论
Lattice Gauge Theory via LLVM-Level Automatic Differentiation
AI总结:
基于LLVM级自动微分实现晶格规范理论中HMC力的自动构造,提升性能可移植性与代码效率。
摘要:
我们通过在优化的LLVM中间表示层面执行反向模式自动微分,实现了晶格规范理论中混合蒙特卡洛(HMC)力的自动构造。这种方法适用于任何将晶格作用代码降至LLVM的语言。实际上,这意味着一旦作用评估程序被实现,相应的HMC力就可以从同一代码路径自动生成,而无需推导或维护单独的力程序。该方法保留了传统的命令式、原地实现,并使单源工作流成为可能,在此工作流中,力直接从作用代码生成,同时继承编译器优化。我们对 gauge 和 Wilson 费米作用进行了端到端的反向模式微分。对于 Wilson 费米情况,我们发现自动微分生成的力在性能上与传统手工编写费米力实现相当。相同的微分管道针对CPU和GPU后端,为组合晶格作用提供了实用的性能可移植力构造路径。
英文摘要:
We enable the automatic construction of Hybrid Monte Carlo (HMC) forces in lattice gauge theory by performing reverse-mode automatic differentiation at the level of optimized LLVM intermediate representation, making the approach applicable to any language that lowers lattice action code to LLVM. In practice, this means that once the action evaluation routine is implemented, the corresponding HMC force can be generated automatically from the same code path, without deriving or maintaining a separate force routine. The method preserves conventional imperative, in-place implementations and enables a single-source workflow in which forces are generated directly from the action code while inheriting compiler optimizations. We perform end-to-end reverse-mode differentiation of both gauge and Wilson fermion actions. For the Wilson fermion case, we find that the force generated by automatic differentiation achieves performance comparable to a conventional hand-written fermion force implementation. The same differentiation pipeline targets both CPU and GPU backends, providing a practical route to performance-portable force construction for compositional lattice actions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。