How to enable opencl for amdgpu-pro in Ubuntu Linux?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Locked
saulkarl
Posts: 1
Joined: 2020-02-12T15:59:16-07:00
Authentication code: 1152

How to enable opencl for amdgpu-pro in Ubuntu Linux?

Post by saulkarl »

I am trying to build ImageMagick 7.0.9-22 under Ubuntu Linux 18.04.4 with opencl enabled. I have already installed the AMDgpu-pro drivers with all the opencl libraries and header files from the AMD deb packages. They reside in /opt/amdgpu-pro/lib/x86_64-linux-gnu and /opt/amdgpu-pro/include. I created a symlink in /usr/local/include/CL pointing to /opt/amdgpu-pro/include/CL.

I ran the configure as follows:
% LIBS=-L/opt/amdgpu-pro/lib/x86_64-linux-gnu ./configure --enable-opencl

...
checking CL/cl.h usability... yes
checking CL/cl.h presence... yes
checking for CL/cl.h... yes
...
checking for OpenCL library... (cached) no
...
FEATURES = DPC HDRI Cipher OpenMP
...

But configure still cannot find the AMD OpenCL library.

How can I enable opencl for the ImageMagick build for AMD (I have a RX 580)?

Locked