2

When I follow the official guide for installing the AMDGPU-Pro drivers (I've tried both the 17.30 and the very recent 17.40 releases) everything seems to work but clinfo still returns

Number of platforms 0

Does anyone have any ideas?

2

I just spent the whole day on this too - I couldn't find any working instructions so here's what I came up with for AMD Radeon RX 580 on Ubuntu 16.04 system with no graphical desktop, installed over SSH:

Assume a fresh Ubuntu install system

  1. Get the AMD APP SDK from here - Download, Unpack and then use sudo to run the install script.

  2. Download the most recent linux driver (17.50 at time of writing this answer) from here, extract the .xz file using tar Jxvf <filename> and cd into the directory created after extracting the .xz file.

  3. Now run the installer with sudo:

    sudo ./amdgpu-pro-install --opencl=legacy -y
    
  4. Reboot

  5. Run clinfo again and you should see that you now have OpenCL 1.2 support:

    $ clinfo|grep OpenCL
    
    Platform Version:               OpenCL 2.1 AMD-APP (2527.3)
    Execute OpenCL kernels:         Yes
    Device OpenCL C version:        OpenCL C 1.2
    Version:                        OpenCL 1.2 AMD-APP (2527.3)
    

The reason for this is that specifying --legacy pulls in opencl-amdgpu-pro-icd which is not normally installed.

I think this is because the latest drivers want to do things with ROCm: https://rocm.github.io/ROCmInstall.html

On my own rig, ROCm is unusable because I've got PCI-e 1x slots with risers and a basic Pentium CPU instead of an i7. You check that ROCm was disabled like this:

$ dmesg |grep atomic
[4.885958] kfd kfd: skipped device 1002:67df, PCI rejects atomics

So I guess this is why I had to do legacy to get OpenCL working at all.

I'm not sure what the pros/cons are of OpenCL 1.2 vs OpenCL 2.0 vs ROCm, or even if the ROCm driver presents as OpenCL 2.0 externally - would be great if someone with more insight could comment.

  • This is an old answer.. you can use risers now apparently :) In the meantime I gave up and bought windows 10 – Geoff Williams May 22 at 0:58
0

OpenCL failed because I had issues building the DKMS module, due to my kernel.

Upgrading my kernel to the following version got clinfo reporting OpenCL support on Ubuntu 16.04.4 LTS.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.11/

linux-headers-4.15.11-041511_4.15.11-041511.201803190530_all.deb

linux-headers-4.15.11-041511-generic_4.15.11-041511.201803190530_amd64.deb

linux-image-4.15.11-041511-generic_4.15.11-041511.201803190530_amd64.deb

clinfo|grep OpenCL
  Platform Version          OpenCL 2.0 AMD-APP (2482.3)
  Device Version            OpenCL 1.2 AMD-APP (2482.3)
  Device OpenCL C Version   OpenCL C 1.2 
    Run OpenCL kernels      Yes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.