Radeon GCN Compiler Backend Merged Into GCC 9 - To Allow OpenMP/OpenACC Offloading
Written by Michael Larabel in Radeon on 17 January 2019 at 08:25 AM EST. 5 Comments
RADEON --
The long-in-development AMD "GCN" back-end for the GNU Compiler Collection that allows targeting recent generations of Radeon GPUs for compute offloading has been merged into the upcoming GCC 9 release.

This AMD Radeon GCN back-end is what has been in development for many months by Code Sourcery / Mentor Graphics with the ultimate goal of allowing Fortran/C/C++ compute work to be offloaded Radeon graphics processors via the OpenMP and OpenACC APIs, similar to the NVPTX offload support within GCC already for NVIDIA GPUs as well as Xeon Phi offloading on the Intel front.

While GCC 9 feature development is over, this back-end was allowed to be added late since introducing this GCN target doesn't introduce the possibility of regressing other targets.

While this Radeon GCN code was merged today into GCC, not merged are the middle-end and libgomp patches needed for a fully working stack with OpenACC/OpenMP offloading to the Radeon GPUs. It doesn't look like those bits will be merged for the GCC 9 release but may end up waiting until GCC 10. But for those wanting GCC-based Radeon GPU compute offloading today, this code is already in use via Mentor's CodeBench Lite software.

Besides this code within GCC, this offloading support also depends upon AMD's ROCm "Radeon Open Compute" driver stack and the HSA run-time libraries, with this back-end just being for the code generation of GCN 1.2+ instructions. Included with this back-end is a gcn-run tool to allow for executing basic GCN programs on the GPU when all of these components are in place.


The code merged include the changes to libgfortran, libgcc, GCN machine description, the actual back-end, and back-end configuration.

Adding this GCN back-end to GCC is more than 15,000 lines of new code. GCC 9.1 as the first stable GCC9 release is expected to debut around April with this and many other changes.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Radeon News
Popular News This Week