Differentiable Fortran with LFortran and Enzyme
dionhaefner
51 points
17 comments
July 14, 2026
Related Discussions
Found 5 related stories in 1312.0ms across 14,015 title embeddings via pgvector HNSW
- Structural diffing in Emacs; deterministic agent harnesses surprisetalk · 28 pts · June 02, 2026 · 51% similar
- The Isomorphic Labs Drug Design Engine unlocks a new frontier beyond AlphaFold andsoitis · 60 pts · July 17, 2026 · 47% similar
- DiffusionBench: Towards Holistic Evaluation of Generative Diffusion Transformers ilreb · 24 pts · June 24, 2026 · 44% similar
- From Julia to Rust: a differentiable tensor stack for scientific computing postflopclarity · 41 pts · June 30, 2026 · 43% similar
- Lf-lean: The frontier of verified software engineering alpaylan · 18 pts · March 12, 2026 · 42% similar
Discussion Highlights (3 comments)
dionhaefner
Author here — I work on Tesseract at Pasteur Labs, and I wrote this up because the "what if this was possible" was bugging me for way too long :) I was surprised by how well this worked, the LFortran + Enzyme stack seems to be a very clean way to get gradients through Fortran code via LLVM IR transformations. Pretty cool to see a 220-line Fortran heat solver turn into ~6,900-line reverse pass automatically if I dare say so. Would be awesome to see this applied to a real scientific codebase, and I hope that the demo is enough to convince people that it’s worth trying.
new_user55
Really nice work. I love Enzyme, and used it in my project about differentiable atomic descriptors. Idea was that I can quickly gobble up existing C++ and fortran codes alike for atomic descriptors and create a encompassing library what differentiate against hyper-params as well! But at time Enzyme was very early ~0.0.50 version or so. In our observations also Enzyme was fast enough that performance wise it matched the analytical gradients (when embedded inside entire pipeline)  .
certik
Great work, I am glad LFortran worked well for this work. We are very close to beta quality now, many codes just work, pretty much all Fortran features are implemented now, but some codes still don't compile due to various small bugs, so we've been fixing them all in the last couple months.