OpenCL on Fedora 40 with ROCm (AMD) not working

How does that igpu performs after solving the opencl issue?. Is darktable snappy?

TBH I’m still a beginner with photography/editing in general so I haven’t even run into any performance issues yet, so I couldn’t tell you if it make any difference. I was just annoyed that my very capable iGPU couldn’t do OpenCL out of the box.

Please feel free to test and provide feedback for the ROCm 6.1 proposed update.

For me, on Fedora 41, the symptoms were similar but with llvm18/ in the path for opencl-c-base.h. The thing can be debugged pretty quickly with the namei tool (from the util-linux package) pasting the “could not find file …” path:

$ namei /usr/lib64/llvm18/bin/../../../lib/clang/18/include/opencl-c-base.h
f: /usr/lib64/llvm18/bin/../../../lib/clang/18/include/opencl-c-base.h
 d /
 d usr
 d lib64
 d llvm18
    bin - No such file or directory

And a simple dnf install clang18 fixed that for me:

$ namei /usr/lib64/llvm18/bin/../../../lib/clang/18/include/opencl-c-base.h
f: /usr/lib64/llvm18/bin/../../../lib/clang/18/include/opencl-c-base.h
 d /
 d usr
 d lib64
 d llvm18
 d bin
 d ..
 d ..
 d ..
 d lib
 d clang
 d 18
 d include
 - opencl-c-base.h

and

$ darktable-cltest  | grep -E 'FINALLY|opencl_init'
     0.0139 [opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
     0.0607 [opencl_init] found 1 platform
[opencl_init] found 1 device
[opencl_init] OpenCL successfully initialized. internal numbers and names of available devices:
[opencl_init]		0	'AMD Accelerated Parallel Processing gfx1103'
     0.2765 [opencl_init] FINALLY: opencl PREFERENCE=ON is AVAILABLE and ENABLED.
[opencl_init] opencl_scheduling_profile: 'default'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 400

So either someone fixes the clang18-libs RPM to not go through the /usr/lib64/llvm18/bin directory, or adds that as a directory to the clang18-libs RPM, or makes darktable or clang18-libs depend on clang18, whichever is required to get things to work.

1 Like