NVIDIA dominates the parallel computing industry largely thanks to its own solution, CUDA. In response to this domain, AMD has published the source code of GPUFORT , a project that will be under Radeon Open eCosystem (ROCm) and that aims to offer a translation tool so that large code bases in CUDA can work outside of the closed ecosystem. of the green giant.
The domain of CUDA and the fact that it is proprietary and owned by NVIDIA greatly limits the ability of developers to migrate to an alternative, so AMD has been working for a long time on mechanisms that help migrate specific CUDA code to interfaces compatible with its parallel computing stack supported by Radeon technology.
Most of AMD’s efforts so far have focused on code written in C and C ++. GPUFORT, for its part, is to provide support for the translation from source to source ( source to source ) of CUDA Fortran and Fortran code based on OpenACC to OpenMP 4.5+ for execution on GPU or Fortran + HIP C ++ code .
It is important to note that GPUFORT is not a compiler, but a research project with a Python code base that carries out the source-to-source translation process. This means that, at least for the moment, GPUFORT is not an automated and fully functional solution, so it is likely that it will be necessary to perform a manual review and correction process of what is generated from large CUDA code bases.
AMD engineers do not close the door to GPUFORT becoming a compiler, but for now it is not the goal. In its current state, the project and its Python code are only responsible for performing “a small amount of syntax checks” , since those responsible have assumed that the developers will apply it only to “code that can be executed correctly on CUDA devices. ” . The tool is capable of translating some High Performance Computing (HPC) applications into code formats that are correctly supported by AMD’s ROCm ecosystem .
In fact, GPUFORT has some drawbacks in its current state because, as AMD engineers have recognized, it does a poor job of “analyzing which parts of the code can be downloaded and which cannot” and “reorganizing the loops and the assignments to maximize the available parallelism ” , in addition to that at the moment “ it does not implement the complete OpenACC standard ” .
The source code for GPUFORT is published on GitHub under the MIT license, which is what AMD typically uses when deciding to release a project. In the code repository you can also find the installation guide and a slideshow explaining what the project at hand is and what it covers.