OpenCL with Mesa Intel(R) Xe Graphics (TGL GT2)

I just bought a Lenovo IdeaPad Slim 7 14ITL05 with

11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz × 8
Mesa Intel® Xe Graphics (TGL GT2)

and 16GB ram. Im running Ubuntu 22.04LTS on it. I’ve instsalled the masterbranch and notices that the openCL options are not available. Is openCL not availble with this GPU or is there a way to tell if I need to include something in the build?

You may try darktable 4.0 user manual - darktable-cltest

Also: darktable 4.0 user manual - possible problems & solutions

A few on-CPU implementations of OpenCL also exist, coming as drivers provided by INTEL or AMD. We have observed that they do not provide any speed gain versus our hand-optimized CPU code. Therefore darktable simply discards these devices by default. This behavior can be changed by setting the configuration variable opencl_use_cpu_devices (in $HOME/.config/darktablerc) to TRUE.

Is clinfo showing the device?

Well thats good to know. I was going on the assumption that having the gpu availble would speed things up. This is what I got when I looked into the darktablerc file.

opencl=TRUE
opencl_device_priority=/!0,///!0,*
opencl_library=
opencl_mandatory_timeout=400
opencl_scheduling_profile=default
opencl_synch_cache=active module
opencl_tuning_mode=nothing

After installing clinfo I got

Number of platforms 0

So no.

I think you need to make sure your drivers under ubuntu 22.04 support OpenCL.

That was it. I needed the intel-opcl package. Found it here
https://ubuntu.pkgs.org/22.04/ubuntu-universe-amd64/intel-opencl-icd_22.14.22890-1_amd64.deb.html

Opencl works now, shows up in darktable and I get device info when I use clinfo. Thanks everyone.

2 Likes