Lattice Gauge Theory via LLVM-Level Automatic Differentiation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nagai, Yuki, Tomiya, Akio, Ohno, Hiroshi
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917290914611200
author Nagai, Yuki
Tomiya, Akio
Ohno, Hiroshi
author_facet Nagai, Yuki
Tomiya, Akio
Ohno, Hiroshi
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_20516
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Lattice Gauge Theory via LLVM-Level Automatic Differentiation
Nagai, Yuki
Tomiya, Akio
Ohno, Hiroshi
High Energy Physics - Lattice
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.
title Lattice Gauge Theory via LLVM-Level Automatic Differentiation
topic High Energy Physics - Lattice
url https://arxiv.org/abs/2602.20516