This looks interesting but is above my head.
This project develops a source to source translation tool that is able to convert:
- Fortran+OpenACC and CUDA Fortran → Fortran + OpenMP 4.5+
- Fortran+OpenACC and CUDA Fortran → Fortran + [GCC/AOMP OpenACC/MP runtime calls] + HIP C++
The result of the first translation process, can be compiled with AOMP, which has a Fortran frontend. The result of the second translation process can be compiled with hipfort or a combination of hipcc and gfortran. Note that a OpenACC runtime is only necessary for translating OpenACC code.
- GPUFORT is not a compiler (yet)
GPUFORT is not intended to be a compiler. It’s main purpose is to be a translator that allows an experienced user to fix and tune the outcomes of the translation process. However, we believe GPUFORT can develop into an early-outlining compiler if enough effort is put into the project. Given that all code and especially the grammar is written in python3, GPUFORT can be developed at a quick pace.
- GPUFORT does a bad job in analyzing what code parts can be offloaded and which ones not
- GPUFORT does a bad job in reorganizing loops and assignments in order to maximize the available parallelism
While both would be possible as the translator works with a tree structure, we simply have not started to implement much in this direction yet.
- GPUFORT does not implement the full OpenACC standard (yet)
GPUFORT was developed to translate a number of HPC apps to code formats that are well supported by AMD’s ROCm ecosystem. The development of GPUFORT is steered by the requirements of these applications.