GCC supports OpenACC for both NVIDIA and AMD GPUs. More details can be found on the official wiki page. All major GNU/Linux distributions provide GCC packages with offload-device support in optional packages.

GCC with support for OpenACC on NVIDIA platforms can be installed easily using one of the methods below.

1. Spack

Spack (https://spack.io/) is a package management system for installing a variety of common software packages and libraries. The GCC Spack package supports building with the "nvptx" extension for OpenACC support. To install GCC with offloading to NVIDIA GPUs, use the following command after installing Spack on your system. The "+nvptx" option instructs spack to install with the NVIDIA extensions.

$ spack install gcc+nvptx

2. HPC Container Maker

HPC Container Maker (https://github.com/NVIDIA/hpc-container-maker), hpccm for short, provides a language for creating container recipes for Docker and Singularity. It ships with a variety of building blocks for common compilers and libraries. In particular, the gnu building block, which will install GCC, has an option for building with OpenACC support. For more information, check the documentation (https://github.com/NVIDIA/hpc-container-maker/blob/master/docs/building_blocks.md#gnu).

For installation instructions for OpenACC AMD implementation refer to the wiki page.