Very bad performance on Cycles OpenCL using Ubuntu 18.04 and Radeon VII We've got a new render machine for our Company. Threadripper 1950x + dual Radeon VII + 64 gb of ddr4-3200 RAM. (Only one Radeon installed now for testing)

Our CPU testing went flawless. With great results that easily surpassed any of our (older) Xeon based systems. 

For our GPU testing I installed the latest amdgpu-pro driver using --opencl=rocm but the performance was really bad. I'm talking minutes to render the default cube after kernel compilation was finished.

I also tried the non pro driver and tried to use --opencl=legacy to no avail.

I had more success on another system (ryzen 1500x) and a Radeon VII. My next step is to swap haddrives and rule out any kind of hardware problem. 

All in all I found about 8 of so useful resources about enabling Vega on Ubuntu 18.04 for Blender. But non of them were complete or completely up to date. 

Are there any pointers to a definitive guide to set this up? Or any idea why current performance is so bad?

EDIT:

Back at the office so here it goes. I put on the Barcelona demo with standard settings and it finished in 24 minutes and 10 seconds.

For my installation I used this as my primary resource:
https://linuxconfig.org/how-to-install-the-latest-amd-radeon-drivers-on-ubuntu-18-04-bionic-beaver-linux

Installing both the iobaf/graphics-drivers PPA and the official AMD GPU driver. I stayed clear from including DRI 3 for Xorg as that made my system unresponsive on my first attempt.

Afterwards I read that VEGA II should use the openCL rocm so I tried to install that. Using instructions from the amd website (https://www.amd.com/en/support/kb/faq/gpu-643) I tried to sudo apt install -y rocm-amdgpu-pro but there was no installation candidate. So I grabbed the latest rocm version from github.

I also found that I'm using AMDs driver version 19.10 on the threadripper build. But iirc the Ryzen build used the 18.50 install. I'll try to install that one next and report back with my findings.

EDIT2:

So I installed the same kernel &amp; amdgpu driver version as on the Ryzen build, but performance is not impacted. 

3 sidenotes:
 - the Radeon VII shows up in Blender on Ryzen as, Radeon Vega II while the other one, Threadripper, shows up as Vega II. Which is somewhat odd since they are the exact same cards from the exact same brand ordered within a week from each other.
 - in the ~/.AMD folder on Ryzen I only have a GLCache folder. On Threadripper there also is the CLCache_rocm folder.
 - I suspected that I'm not running as OpenCL=legacy as on the Ryzen build, so I commented the line in /etc/profile.d/rocm.sh that I set as part of the AMD install instructions. Now OpenCL is missing from Blender.

EDIT 3:
Installed AMDGPU-18.50 using --opencl=pal as said in the amd documentation for systems of Vega 10 and newer. I get the same glitches as on the Ryzen build: crashing Gnome shell, being forced to use Wayland and some weird artefacts. Performance however is still not impacted.

For now I' will revert to the newest kernel with the latest AMD driver, but any help is really, really appreciated!

Edit 4: 
Swapped the harddrive, and got instant performance boost. I'm dd'ing the disk now. Does bug me that I'm not able to pinpoint where the root cause lies.
Have you tried updating Ubuntu to 18.04.2 with HWE (4.18 Kernel) and AMD's most recent 19.20 driver?

A few months ago I had issues getting my Dual RX Vega64 setup working (on a Ryzen 1700 system with Ubuntu 18.04): Just a single GPU worked fine, but when I installed both GPUs, Blender refused to use any of them for OpenCL rendering with Cycles. 

Some debugging and writing small test programs later, I figured out the AMD's driver refused to open an OpenCL-context on the Dual-GPU-setup when already an OpenGL-context had been opened before. (With just a single GPU installed this worked fine, though.)

Since then I updated my Ubuntu to 18.04.2 with HWE (Linux 4.18 kernel, instead of 4.15 without the HWE) and updated my driver to the new 19.20 version, and now my Dual-GPU-setup works fine out-of-the-box as if nothing ever happened (with rendering speed-up of 50-100% compared to my single-GPU-setup).