OpenACC on AMD Radeon with ROCm OpenCL driver


we are trying to use the ROCm OpenCL stack with the PGI Compiler 16.10. The OpenACC code compiles fine, but the execution fails:

Current region was compiled for:
AMD Radeon GPU
Available accelerators:
device[1]: Native X86 (CURRENT DEVICE)
The accelerator does not match the profile for which this program was compiled

With PGI_ACC_DEBUG=1, I see the following:
ACC: detected 1 OpenCL platforms
ACC: OpenCL platform[0] has vendor Advanced Micro Devices, Inc.
ACC: detected 1 AMD OpenCL device(s)
ACC: initialized 0 AMD OpenCL device(s)
ACC: device[1] is PGI native
ACC: device[0] is PGI native

Is there any way to make this work?


Hi Hahnfeld,

Sorry but I’ve never used the ROCm OpenCL driver so don’t have experience with it. Though, this may or may not be the actual issue.

Which Radeon device are you using and what compiler options did you use?

Does the program run with a different OpenCL driver?


Hi Mat,

I’m using an AMD FirePro S1950, Hawaii. The compiler options are -acc -ta=radeon:hawaii. I’d have to check out if there is a different OpenCL driver available that supports this device…

Meanwhile, I found the environment variable PGI_ACC_AMD_ANYDEVICE which makes the program run. However, it then crashes somewhere in the OpenCL library. Maybe the generated code doesn’t match this OpenCL driver…