LFortran runs POT3D on H200 faster than NVFORTRAN

I just merged the last PR into main, so LFortran now runs the @sumseq’s POT3D code with do concurrent (no other directives or pragmas) on NVIDIA GPU and is faster than NVFORTRAN (both with do concurrent and also with OpenMP target pragmas), all details are at: Tracking: POT3D on CPU and NVIDIA, AMD and Apple GPUs · Issue #17015 · lfortran/lfortran · GitHub. Here is a little table with a few tests from POT3D:

test nvfortran main: wall / Total / POTFLD LFortran: wall / Total / POTFLD
potential_field_source_surface 5.56 / 1.768 / 1.659 4.93 / 1.559 / 1.417
potential_field_current_sheet 6.61 / 3.096 / 2.902 6.39 / 2.795 / 2.555
open_field 7.38 / 3.840 / 3.588 7.38 / 3.492 / 3.211

It also runs the same code on AMD GPUs and also Apple GPU (but you need to use a custom single precision version of it, since Apple GPU doesn’t support 64-bit floating point).

This is obviously very fresh, so LFortran’s performance likely doesn’t translate to all other codes yet, but I would say it’s not a bad start. I am sure that NVIDIA is now hard at work to speedup their Fortran. It took a while, but I think I am finally ready to compete. :slight_smile:

13 Likes

Brilliant, absolutely brilliant!

My “ai assistant”, when queried about codes the LFortran team can immediately try and likely achieve rapid success and complete the march towards their own “official” BETA status, listed the following:

  1. OpenIFS from ECMWF
  2. NWChem
  3. Quantum ESPRESSO
1 Like

Is there any thoughts towards Lfortran and Intel GPUs?

1 Like

Planned. If I add a backend, will you use it?

As soon as I start using LFortran, I would use the Intel GPU backend - we run one of our codes (HipFT) on a B580 GPU now using IFX.

1 Like

Ok, I’ll get HipFT working and also add the Intel backend.

1 Like