AMD Radeon GPU Offloading For GCC Still Maturing In 2020
When it comes to Radeon GPU offloading for compute, most of the emphasis placed by AMD has been on Radeon Open eCosystem (ROCm) and now as part of that as well is the AOMP compiler for OpenMP targeting the AMD GPUs. Both ROCm and AOMP along with their other graphics driver components like RadeonSI and AMDVLK target an LLVM-based compiler stack as their principal focus, but they do continue engaging with Mentor Graphics who leads the development work on a Radeon GPU back-end for GCC.
Mentor has been working on this Radeon GPU back-end for the GNU Compiler Collection the past several years though it was only with last year's GCC 9 support that the "AMD GCN" target made its debut. That support though was quite rudimentary in that it just supported C and Fortran languages but a much more severe blocker is that it was limited to single-threaded execution. With the GCC 10 release earlier this year there is now OpenMP and OpenACC offloading as well as having C++ support in tow. Thus GCC 10 is more usable now with AMD Radeon GPUs, but even with this current version of the GCC compiler only Fiji and Vega 10/20 are supported -- not the newer Navi or older GCN GPUs yet.
Andrew Stubbs of Mentor Graphics offered a status update on their AMD GCN work for GCC during this week's GNU Tools Track at the Linux Plumbers Conference 2020.
With the company's latest development code they have expanded the support to now support up to 16 workers per gang (the current GCC 10 limitation is one worker per gang), up to 40 gangs per CU (compared to 2 gangs per CU right now), and better OpenACC support from conformance to performance. Mentor is working to get more of these AMD GCN target improvements upstreamed for GCC 11, but progress is slow particularly in seeking the necessary code review prior to merging the patches.
Also being pursued by Mentor is supporting the Radeon Open eCosystem GDB (ROCgdb) debugger, debug info support, and other features.
Due to the major GCC releases just being annual and the lengthy process often for getting the patches upstreamed, for those interested in potentially using GCC for OpenMP/OpenACC offloading to supported AMD Radeon hardware are encouraged to use Mentor's CodeBench Lite that is built from the GCC sources plus all of their extra patches on top. The next CodeBench release is slated for November with their latest patches.
The LPC2020 presentation in full can be found here.
Mentor has been working on this Radeon GPU back-end for the GNU Compiler Collection the past several years though it was only with last year's GCC 9 support that the "AMD GCN" target made its debut. That support though was quite rudimentary in that it just supported C and Fortran languages but a much more severe blocker is that it was limited to single-threaded execution. With the GCC 10 release earlier this year there is now OpenMP and OpenACC offloading as well as having C++ support in tow. Thus GCC 10 is more usable now with AMD Radeon GPUs, but even with this current version of the GCC compiler only Fiji and Vega 10/20 are supported -- not the newer Navi or older GCN GPUs yet.
Andrew Stubbs of Mentor Graphics offered a status update on their AMD GCN work for GCC during this week's GNU Tools Track at the Linux Plumbers Conference 2020.
With the company's latest development code they have expanded the support to now support up to 16 workers per gang (the current GCC 10 limitation is one worker per gang), up to 40 gangs per CU (compared to 2 gangs per CU right now), and better OpenACC support from conformance to performance. Mentor is working to get more of these AMD GCN target improvements upstreamed for GCC 11, but progress is slow particularly in seeking the necessary code review prior to merging the patches.
Also being pursued by Mentor is supporting the Radeon Open eCosystem GDB (ROCgdb) debugger, debug info support, and other features.
Due to the major GCC releases just being annual and the lengthy process often for getting the patches upstreamed, for those interested in potentially using GCC for OpenMP/OpenACC offloading to supported AMD Radeon hardware are encouraged to use Mentor's CodeBench Lite that is built from the GCC sources plus all of their extra patches on top. The next CodeBench release is slated for November with their latest patches.
The LPC2020 presentation in full can be found here.
4 Comments