did you follow the instructions in my previous post? which driver version you are trying to install?can you give me some more detail about your system? what do you mean by After resolving all dependencies problems amdgpu-dkms now impedes installation of the amdgpu driver
I had / I am having the same issues. I suppose it’s related to the kernel version you have installed on your system. I am on 5.17.x and amdgpu-kdms cannot be installed with that kernel version. I am still hoping that kernel 6.1 with Rust support will be available soon so one can try to install the rusticl drivers. Unfortunately 6.0 doesn’t support Rust yet.
Cannot directly help on your issue since I’m using arch linux but you don’t really need any additional kernel module, the kernel vanilla amdgpu module is enough. You only need the amd rocm opencl user space part.
Rusticl is a new mesa rust based user space opencl implementation that could/will replace the current opencl mesa implementation (clover). It’s completely unrelated to the linux kernel support for rust and will work also with current kernels.
My observations and solution. In my case I was able to install 22.20.50204-1 driver and everything was working except when I would tired to upgrade software with apt upgrade it will try to rebuild the driver driver (dkms) and give errors. So as suggested in the error report I examined the make.log file which is as follows
DKMS make.log for amdgpu-5.16.9.22.20-1462318~22.04 for kernel 5.15.0-53-generic (x86_64)
Sunday 20 November 2022 11:45:26 AM IST
make: Entering directory ‘/usr/src/linux-headers-5.15.0-53-generic’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/Makefile:26: “Local GCC version 110303 does not match kernel compiler GCC version 110200”
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/Makefile:27: “This may cause unexpected and hard-to-isolate compiler-related issues”
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/drm_gem_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_execbuf_util.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_common.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_range_manager.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_kernel_params.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amddrm_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_resource.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_pool.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/dma-buf/dma-resv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_sys_manager.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_agp_backend.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_backlight.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_ioctl.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_device.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.c:28: warning: “pr_fmt” redefined
28 | #define pr_fmt(fmt) "[TTM DEVICE] " fmt
|
In file included from ./include/linux/kernel.h:19,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:55,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/backport/backport.h:6,
from :
./include/linux/printk.h:340: note: this is the location of the previous definition
340 | #define pr_fmt(fmt) fmt
|
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_kms.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_atombios.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_kthread.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_io.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/amd-sched.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/atombios_crtc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_perf_event.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_seq_file.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_suspend.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.c:28: warning: “pr_fmt” redefined
28 | #define pr_fmt(fmt) "[TTM DEVICE] " fmt
|
In file included from ./include/linux/kernel.h:19,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:55,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/backport/backport.h:6,
from :
./include/linux/printk.h:340: note: this is the location of the previous definition
340 | #define pr_fmt(fmt) fmt
|
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_pci.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_memory.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_sched.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fence.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/amdttm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_reservation.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_auth.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_fb.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_print.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fbmem.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_crtc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_connector.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_atomic_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_connectors.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/atom.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mn.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_fence.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_modes.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_time.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_ftrace.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_acpi_table.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_page_alloc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_numa.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fs_read_write.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_aperture.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_drv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_simple_kms_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_bitmap.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_vmscan.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_dma_fence_chain.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mce_amd.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_hdcp.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_debugfs_inode.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_sysfs_emit.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_encoders.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_display.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_i2c.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_fb.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_gem.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/amdkcl.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ring.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_cs.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ssg_init’:
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.c:2313:31: error: incompatible types when assigning to type ‘struct percpu_ref’ from type ‘struct percpu_ref *’
2313 | adev->ssg.pgmap.ref = &adev->ssg.ref;
| ^
make[2]: *** [scripts/Makefile.build:297: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [scripts/Makefile.build:560: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu] Error 2
make: *** [Makefile:1903: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build] Error 2
make: Leaving directory ‘/usr/src/linux-headers-5.15.0-53-generic’
I saw that the mismatch of gcc version was a warning and Not an error, the actual error was in amdgpu_ttm.c at line 2313. I searched for this file and found 2 such file on my system, I removed the “&” from “&adev->ssg.ref” line from both files . Now when I gave the apt upgrade command it properly build the amd dkms and now there are no errors.
Please refer to my earlier posts for information about my Ubuntu, kernel and driver version.
Hope it helps someone.
Finally I got opencl working with the integrated gpu of my Ryzen 9 5900hx processor using the mesa rusticl driver. Darktable now recognizes 2 GPUs (nVidia and AMD):
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init] 0 'AMD Radeon Graphics (renoir, LLVM 12.0.1, DRM 3.48, 6.0.0-1007-oem)'
[opencl_init] 1 'NVIDIA GeForce RTX 3060 Laptop GPU'
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
Unfortunately I do have issues with black images shown now …
After making the changes that you mentioned amdgpu-dkms installed but opencl is still not available.
[dt_get_sysresource_level] switched to 2 as `large’
total mem: 32003MB
mipmap cache: 4000MB
available mem: 21877MB
singlebuff: 500MB
OpenCL tune mem: WANTED
OpenCL pinned: WANTED
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: ‘very fast GPU’
[opencl_init] opencl_library: ‘default path’
[opencl_init] opencl_device_priority: ‘/!0,//’
[opencl_init] opencl_mandatory_timeout: 400
[opencl_init] opencl_synch_cache: active module
[opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] no devices found for Advanced Micro Devices, Inc. (vendor) - AMD Accelerated Parallel Processing (name)
[opencl_init] found 1 device
[dt_opencl_device_init]
DEVICE: 0: ‘AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)’
CANONICAL NAME: amdradeontmr9390serieshawaiillvm1301drm346515057generic
PLATFORM NAME & VENDOR: Clover, Mesa
DRIVER VERSION: 22.0.5
DEVICE VERSION: OpenCL 1.1 Mesa 22.0.5
DEVICE_TYPE: GPU
*** The OpenCL driver doesn’t provide image support. See also ‘clinfo’ output ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.
[imageio_load_module_format] failed to open `avif’: (null)
Number of platforms 2
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 22.0.5
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3380.4)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Extensions function suffix AMD
Platform Host timer resolution 1ns
Platform Name Clover
Number of devices 1
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 22.0.5
Device Numeric Version 0x401000 (1.1.0)
Driver Version 22.0.5
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Max compute units 44
Max clock frequency 1080MHz
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple (kernel) 64
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 2 / 2
half 0 / 0 (n/a)
float 4 / 4
double 2 / 2 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 27487790692 (25.6GiB)
Error Correction support No
Max memory allocation 6871947673 (6.4GiB)
Unified memory for Host and Device No
Minimum alignment for any data type 128 bytes
Alignment of base address 32768 bits (4096 bytes)
Global Memory cache type None
Image support No
Local memory type Local
Local memory size 32768 (32KiB)
Max number of constant args 16
Max constant buffer size 67108864 (64MiB)
Max size of kernel argument 1024
Queue properties
Out-of-order execution No
Profiling Yes
Profiling timer resolution 0ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
ILs with version (n/a)
Built-in kernels with version (n/a)
Device Extensions cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_extended_versioning
Device Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_int64_base_atomics 0x400000 (1.0.0)
cl_khr_int64_extended_atomics 0x400000 (1.0.0)
cl_khr_fp64 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
Platform Name AMD Accelerated Parallel Processing
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) No platform
clCreateContext(NULL, …) [default] No platform
clCreateContext(NULL, …) [other] Success [MESA]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Clover
Device Name AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)
It took a bit until all the required tools and libraries were installed on my Ubuntu 22.04 system before the build went through.
When the driver is installed you need to set the environment varable to
RUSTICL_ENABLE=radeonsi
With this environement set the amdgpu is recognized … unfortunately I have issues: Some images are completely black and I was not able yet to find out why. I suppose it’s some issues with the llvm version. I’ll try whether I am abel to compile and link against llvm-15
I have not tried it yet but this is dated 28 Nov 2022.
I am NO expert on Linux, I am a newbie but I experiment different things and put my findings here which works for me. So please backup your system before experimenting.
Platform Name Intel(R) OpenCL HD Graphics
Number of devices 1
Device Name Intel(R) UHD Graphics 630 [0x3e92]
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 3.0 NEO
Both my openCL devices are recognized by darktable-cltest.
[opencl_init] 0 ‘Intel(R) UHD Graphics 630 [0x3e92]’
[opencl_init] 1 ‘Ellesmere’
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is ON.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 0 0
[dt_opencl_update_priorities] -1 -1 0 1 1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 1 0 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 200
Decided to give up on AMD and moved on to NVIDIA. Current GPU prices are just stupid. Managed to get my hands on a GTX3080 10G. Installation of drivers in one click, everything installed nicely and hassle free. Performance is top notch compared to amd opencl dated stack. Thank you all for your help!
After mesa 23.1 got the rusticl drivers merged, I wanted to give it a try with darktable again. The driver is being detected within darktable but it’s marked as “disabled” … I have no idea why and what I am probably doing wrong …
darktable-cltest gives me
RUSTICL_ENABLE=radeonsi /opt/darktable/bin/darktable-cltest
0.0582 [dt_get_sysresource_level] switched to 2 as `large'
0.0582 total mem: 31460MB
0.0582 mipmap cache: 3932MB
0.0582 available mem: 21505MB
0.0582 singlebuff: 1966MB
0.0582 OpenCL tune mem: OFF
0.0582 OpenCL pinned: OFF
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: 'multiple GPUs'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '!0,*/!1,*/1,*/1,*'
[opencl_init] opencl_mandatory_timeout: 2000
0.0589 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL'
0.0590 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL.so'
[opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded
[opencl_init] found 3 platforms
[opencl_init] found 3 devices
[dt_opencl_device_init]
DEVICE: 0: 'AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.49, 6.1.0-1008-oem)'
CANONICAL NAME: amdradeongraphicsrenoirllvm1507drm3496101008oem
PLATFORM NAME & VENDOR: Clover, Mesa
DRIVER VERSION: 23.1.0-devel
DEVICE VERSION: OpenCL 1.1 Mesa 23.1.0-devel (git-55c9356 2023-04-13 jammy-oibaf-ppa)
DEVICE_TYPE: GPU
*** The OpenCL driver doesn't provide image support. See also 'clinfo' output ***
[dt_opencl_device_init]
DEVICE: 1: 'AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.49, 6.1.0-1008-oem)'
CANONICAL NAME: amdradeongraphicsrenoirllvm1507drm3496101008oem
PLATFORM NAME & VENDOR: rusticl, Mesa/X.org
DRIVER VERSION: 23.1.0-devel (git-45826e42c5)
DEVICE VERSION: OpenCL 3.0
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 15730 MB
MAX MEM ALLOC: 2048 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
*** marked as disabled ***
[dt_opencl_device_init]
DEVICE: 2: 'NVIDIA GeForce RTX 3060 Laptop GPU'
CANONICAL NAME: nvidiageforcertx3060laptopgpu
PLATFORM NAME & VENDOR: NVIDIA CUDA, NVIDIA Corporation
DRIVER VERSION: 515.105.01
DEVICE VERSION: OpenCL 3.0 CUDA, SM_20 SUPPORT
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 5947 MB
MAX MEM ALLOC: 1487 MB
MAX IMAGE SIZE: 32768 x 32768
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 64 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
MEMORY TUNING: NO
FORCED HEADROOM: 0
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 1.949
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /opt/darktable/share/darktable/kernels
KERNEL DIRECTORY: /home/ds/.cache/darktable/cached_v1_kernels_for_NVIDIAGeForceRTX3060LaptopGPU_51510501
CL COMPILER OPTION: -cl-fast-relaxed-math
KERNEL LOADING TIME: 0.0167 sec
[opencl_init] OpenCL successfully initialized. Internal numbers and names of available devices:
[opencl_init] 0 'NVIDIA GeForce RTX 3060 Laptop GPU'
[opencl_init] FINALLY: opencl is AVAILABLE and ENABLED.
yes, there are three different *.icd files … but even if I remove te other ones and leave only ruscticl.icd to force usage of the rusticl driver, the driver is marked as “disabled” and opencl is no longer available at all.