
A NVIDIA compiler engineer final week laid out the corporate’s plans for implementing OpenACC 3.3 offloading help throughout the LLVM Clang compiler.
Erich Keane with NVIDIA laid out their preliminary plans for a way they hope to upstream OpenACC 3.3 offload help inside Clang. OpenACC is the parallel computing normal developed by NVIDIA with PGI and Cray for C / C++ / Fortran. For a number of years the US Division of Vitality and others have labored on CLACC for supporting OpenACC with Clang and LLVM in addition to “Flacc” as a Fortran OpenACC implementation for Flang. This NVIDIA-led implementation although can be totally different. There’s additionally some code sharing that may happen with LLVM’s OpenMP code.
As for NVIDIA’s OpenACC implementation technique for Clang:
“Quick time period, we’re going to begin the Clang effort by implementing Parsing and Semantic Evaluation of the directives, enabled by the -fopenacc flag, chosen for GCC compatibility. We may also implement a brief flag to manage the __OPENACC macro override (to be eliminated when we now have an entire implementation), which can allow current packages to be compiled with Clang to leverage our semantic evaluation checking.
We consider this to be one of the simplest ways to start out for a couple of causes. First, it permits us to make mandatory progress whereas the Flang design and engineering of the shared elements continues, in order that we might help information that effort, and begin utilizing the infrastructure and implementation when it’s mature. We consider this can shorten the time required to develop OpenACC in Clang.
Second, it permits us to implement the OpenACC semantic evaluation guidelines to the usual, such that Clang can be utilized to validate current packages, thus changing into extra instantly helpful. That is potential as a result of OpenACC directives are handled as superior hints to the compiler, so ignoring them is a compliant implementation mannequin, although we clearly intend so as to add the offload evaluation as quickly as it’s obtainable to take action.
We intend to leverage the prevailing checks from the NVHPC product, and improvement will observe the LLVM conference for lit checks, in addition to use the lit checks written for CLACC.”
NVIDIA says they’re dedicated to this upstream OpenACC help in LLVM/Clang:
“NVIDIA as an organization is devoted to the success of OpenACC, as must be clear from our participation within the OpenACC standardization efforts and our dedication to implementing OpenACC in Flang, and is equally as dedicated to proliferating its use in a number of compilers. We intend to proceed improvement and help of OpenACC in Flang and Clang in perpetuity by way of funding a number of compiler engineering builders. We’re dedicated to this help.
…
Whereas we don’t but have an implementation, we intend to do mentioned implementation utterly ‘upstream’ in Clang, the place it’s topic to intensive assessment and validation by the code house owners and different contributors. Moreover, because the Attributes Code Proprietor (and first reviewer as extra contributors begin serving to), I intend to make sure that each little bit of code contributed meets or exceeds the LLVM and Clang coding requirements and ranges of high quality.”
These desirous to study extra about NVIDIA’s OpenACC offloading hopes/plans for LLVM/Clang can discover their request for feedback on it by way of the LLVM Discourse.
