You don’t need the newest ROCm to get OpenCL working with old hardware. For instance, with RX Vega 56/64 (Vega 10, GCN5.0) you can use ROCm 4.5 (4.5.2 is the latest). ROCm 5.0 needs some changes to run on GCN5.0 hardware because it uses new instructions from GCN5.1.
I also had to install AMD’s amdgpu-install drivers, default drivers would not work for me. I gave up trying to get it working with Leap as I already got it working in an Arch distrobox.