Differentiable Fortran with LFortran and Enzyme
AI & Machine Learning, Software Development, Other: Scientific Computing(docs.pasteurlabs.ai)view on HackerNews
Enzymeautomatic differentiationLFortranLLVM IRFortranscientific computingmachine learninginverse problemsthermal forensics.
Author: dionhaefner
Date: 7/14/2026
Article Summary:
This article discusses the use of Enzyme, a tool for automatic differentiation, to get gradients out of legacy Fortran code. The author uses LFortran as a frontend to compile the Fortran code to LLVM IR, which can then be differentiated by Enzyme. The resulting differentiated code is used to solve a thermal forensics inverse problem, recovering a 900-element initial temperature field from 100 noisy sensor readings.