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. ![]()