1 comments

  • dionhaefner2 hours ago
    Author here — I work on Tesseract at Pasteur Labs, and I wrote this up because the &quot;what if this was possible&quot; was bugging me for way too long :)<p>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.<p>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.
    • srean1 hour ago
      Very interesting. Does LFortran have the same internal array layout as the standard C runtime ?<p>A shared layout and a shared calling convention would be very nice.<p>Sorry about my naive question. Haven&#x27;t touched Fortran directly in three decades I think.<p>EDIT: thanks for your reply. For some reason it has been flagged dead. So am responding here. You can mail dang hn at ycombinator dot co m about the flagging. He is very nice.
      • wombatpm41 minutes ago
        Lots of scientific code in Fortran has sparse arrays, so a NxN array that only has values on 5 diagonals will store that as 5xN array to save memory allowing you to run a larger problem.
        • srean36 minutes ago
          That&#x27;s a very orthogonal issue.<p>Sparse arrays are supported on C libraries too. I have done my time with CSC and CSR even inside Python that called out to C libraries.
      • dionhaefner39 minutes ago
        [dead]
      • dionhaefner45 minutes ago
        [flagged]