EDIT: My problem with installing gcc-7-multilib (the very next thing in this post) was due to a bad apt mirror, and is now resolved. However, even though ROCm (dkms) is installed, programs that use OpenCL are not working. On the original post, it was suggested that I try installing ROCm runtime from the Github repo, but it has some compiling problems. I'm leaving everything else in this post as-is.

Now, I'm having a problem since rocm-dkms will not install onto Ubuntu 18.04 HWE - there is a version mismatch between gcc-7.4 and gcc-7.5, where Ubuntu will install gcc-7.5 but ROCm requires gcc-7.4:

The following package is a depency of hcc, required by rocm-dev, which is a part of rocm-dkms:

$ sudo apt install gcc-7-multilibReading package lists... DoneBuilding dependency tree Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:

The following packages have unmet dependencies: gcc-7-multilib : Depends: gcc-7-base (= 7.4.0-1ubuntu1~18.04) but 7.5.0-3ubuntu1~18.04 is to be installed Depends: gcc-7 (= 7.4.0-1ubuntu1~18.04) but 7.5.0-3ubuntu1~18.04 is to be installed Depends: lib32gcc-7-dev (= 7.4.0-1ubuntu1~18.04) but it is not going to be installed Depends: libx32gcc-7-dev (= 7.4.0-1ubuntu1~18.04) but it is not going to be installedE: Unable to correct problems, you have held broken packages.

Alright so I've been running two RX 580 8GB GPUs for over a year now using Ubuntu 18 and the amdgpu-pro series driver with OpenCL support and had no major problems aside from some compiling issues for the driver/kernel a while back (which was fixed in the updated support for Ubuntu HWE on amdgpu-pro 20.10).

Now, I've upgraded to a Radeon VII (vega 20 firmware) and have run into a slight issue. It may be related to the fact that I didn't uninstall the proprietary driver first before installing the card. The graphics are absolutely wonderful and it works out of the box, but my Radeon VII is not detected for OpenCL/compute jobs. That's the primary reason I bought the card, and I've been unable to find any real answers for this problem using a variety of search engines and search terms. One of the RX 580 GPUs that I left installed is still detected! So I can use my CPU and my old GPU for opencl-enabled programs like hashcat, boinc, blender, etc. but the new Radeon VII isn't detected for these programs at all. Everywhere I look on the Internet where someone hasn't been able to use OpenCL on a Radeon VII is told to install a few firmware files and install the proprietary driver, which is what I've done.

I've filed a bug report with Ubuntu on their gcc-7 package, since gcc-7-multilib is failing to install on Ubuntu 18.04 HWE. This is a requirement for rocm-dkms under rocm-dev and hcc and does not appear to be the fault of the rocm maintainers at all. Attempting to install gcc-7-multilib results in a version mismatch between gcc 7.4 and 7.5.

So, I'm still having the problem. The fix is (hopefully) installing rocm-dkms which requires this bug to be fixed on Ubuntu's side of things. Otherwise I'll have to wait for an updated amdgpu-pro driver which has OpenCL support for the Radeon VII.

The rocm-dkms problem was due to a bad apt mirror, and is now installed. Now I can show both the cards on ROCm's clinfo. However, no programs that use OpenCL actually work now. An example with hashcat:

Just to update, I still can't get ROCm Runtime to compile. I'm aware that I should post that problem to their github project, and I will when I get time (it's been a busy week). Any work toward getting the Radeon VII OpenCL component working on the amdgpu-pro driver would be tremendously appreciated on my behalf.

-I'll try isolating the device later this week when I get time to open up the device and remove the RX580 card, just to be absolutely sure - I have a lot of important processes running on it the next couple of days, but I'll eventually give it a shot

Confirming that installing amdgpu-pro and trying to export GPU_DEVICE_ORDINAL=0 or export GPU_DEVICE_ORDINAL=1 will only make the RX 580 visible or invisible via software. When I run the clinfo program provided by amdgpu, it only shows the 1 GPU available of the RX 580, where as with ROCM it showed both as available even though I couldn't get the runtime compiled to actually be able to use it. I still haven't tried completely removing the RX 580 card from the device to see if that will force it to recognize my Radeon VII.