# LFortran runs Fiats and Formal on GPUs!

**URL:** <https://fortran-lang.discourse.group/t/lfortran-runs-fiats-and-formal-on-gpus/11275>\
**Category:** Announcements\
**Created:** [November 4, 2026, 1:24am UTC](https://fortran-lang.discourse.group/t/lfortran-runs-fiats-and-formal-on-gpus/11275 "2026-11-04T01:24:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rouson](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@rouson](https://fortran-lang.discourse.group/u/rouson)\
**Post date:** [November 4, 2026, 1:24am UTC](https://fortran-lang.discourse.group/t/lfortran-runs-fiats-and-formal-on-gpus/11275/1 "2026-11-04T01:24:58Z")

</div>

Although Fortran compilers from NVIDIA, Intel, HPE, LLVM, and LFortran all offer automatic execution of `do concurrent` on GPUs, LFortran 0.68.0 is the first compiler to support automatic GPU execution for Berkeley Lab’s [Fiats](https://go.lbl.gov/fiats) deep learning library and [Formal](https://go.lbl.gov/formal) partial differential equation solver framework. The significance of this milestone stems from both projects embracing `do concurrent` as the primary mechanism for leveraging GPUs and because of the interactions between this approach and object-oriented programming and functional programming patterns. Work continues on achieving this new milestone with other compilers.

A frequently cited reason for several prominent translations from Fortran to C++ has been to take advantage of performance portability layers such as Kokkos. One goal of the Fiats and Formal projects is to demonstrate that a modern Fortran compiler can be the performance portability layer. To wit, LFortran optionally translates `do concurrent` to the GPU APIs from Apple (Metal), NVIDIA (CUDA), or AMD (HIP) as well as to OpenMP for multithreading on CPUs. Thus, by simply switching compiler flags, one can switch GPUs or switch to multithreading on CPUs.

To date, our collaboration with LFortran has focused on correctness: all Fiats and Formal unit tests pass when running on GPUs. Future work will address GPU-based acceleration.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [November 4, 2026, 3:08am UTC](https://fortran-lang.discourse.group/t/lfortran-runs-fiats-and-formal-on-gpus/11275/2 "2026-11-04T03:08:36Z")

</div>

Thanks @rouson! This is indeed a great milestone for us. For example I just tested Formal and indeed it compiles and passes all tests on single core CPU (tested x86 and Apple M4 / ARM) and GPUs (NVIDIA, AMD and Apple). So correctness is in decent shape. Time to focus on performance now. This is fun!

---

<div class="post-metadata">

**Author:** ![Pranavchiku](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@Pranavchiku](https://fortran-lang.discourse.group/u/Pranavchiku)\
**Post date:** [November 4, 2026, 4:54am UTC](https://fortran-lang.discourse.group/t/lfortran-runs-fiats-and-formal-on-gpus/11275/3 "2026-11-04T04:54:44Z")

</div>

Thank you @rouson! Excited for the future!
