mystro256/rocm-opencl

Description

WARNING: REPO IS FOR TESTING PURPOSES ONLY. PLEASE USE AT YOUR OWN RISK.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Installation Instructions

Instructions not filled in by author. Author knows what to do. Everybody else should avoid this repo.

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download Fedora rawhide ppc64le (0)*, x86_64 (0)* Fedora rawhide (0 downloads)

* Total number of packages downloaded in the last seven days.


This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/mystro256/rocm-opencl/

Thanks for doing this. I’d struggled to get a stable OpenCL 2.0 dev environment working for years with lots of sloppy work.

1 Like

I installed Fedora 36 and this repo works nicely with my 6600 XT!

I’m not sure if it’s because of the app I’m using, but I needed to involve a file from Clang 13 and had to install clang13-libs.

sudo mkdir -p '/usr/lib64/clang/13.0.1/include' && sudo ln -s '/usr/lib64/llvm13/lib/clang/13.0.1/include/opencl-c-base.h' '/usr/lib64/clang/13.0.1/include/opencl-c-base.h'

The OpenCL app I’m using works fine after that! I was unable to use Clover, and the instructions to get AMDGPU-PRO on Fedora were messy and fragile. With this repo, all I had to do was install rocm-opencl (and the above clang13).

Firstly: Thanks for your work on this!


I finally bought a new computer last week; it has an AMD GPU (6700xt) and was hoping to use it with darktable and OpenCL. But, unless I’m mistaken… the current build of rocm-opencl for Fedora 36 doesn’t seem to actually contain OpenCL?

$ rpm -ql rocm-opencl
/etc/OpenCL/vendors/amdocl64.icd
/usr/lib/.build-id
/usr/lib/.build-id/03
/usr/lib/.build-id/03/0ca4c95d5b12b624b4571157414936e6080d18
/usr/lib/.build-id/47
/usr/lib/.build-id/47/e9e9968893225a473949a20e160faf6f5749ee
/usr/lib64/libamdocl64.so
/usr/lib64/libcltrace.so.5.1
/usr/lib64/libcltrace.so.5.1.0
/usr/share/licenses/rocm-opencl
/usr/share/licenses/rocm-opencl/LICENSE.txt
$ clinfo 
Number of platforms                               0

Was there a build issue?

I did have OpenCL working a few days ago in some form, but it wouldn’t work with darktable due to headers being in the wrong place (or it looking in the wrong place), as noted above with a symlink (the sudo mkdir -p '/usr/lib64/clang/13.0.1/include' && sudo ln -s '/usr/lib64/llvm13/lib/clang/13.0.1/include/opencl-c-base.h' '/usr/lib64/clang/13.0.1/include/opencl-c-base.h' command)… but it’s impossible to add a symlink like that (in /usr/) on Silverblue, so that was also a problem. But meanwhile, I updated and OpenCL doesn’t even work at all, even outside of darktable.

Something happened with the latest rocm-opencl package update that broke OpenCL. Reverting the update works-around that for now. On F36 for now, I went back to AMDGPU-PRO libraries.

First up, thanks a lot Jeremy Newton (@mystro256) not only for creating and maintaining the ROCm fedora packages, but also for upstreaming all the fixes to the utterly broken build system of all the different ROCm components.

In the process of getting ROCm set up on my Thinkpad P14s with an AMD Ryzen/Radeon Vega 8 APU, I build several libraries from source as well and was amazed by all the unnecessary quirks and hoops one has to jump through to get them even compiled.

On that note, I have OpenCL working now to a certain extent using the official RHEL/CentOS 8 packages, but get various errors using the Fedora packages on a fresh F36 installation. Are there some relevant fixes in the 5.1.1 patch release that I’m using or is it just that the F36 packages are right now broken somehow?