sergiusens / darktable-snap

Darktable snap recipe.
GNU General Public License v3.0
11 stars 6 forks source link

[snap] Fails to detect OpenCL #17

Closed KristijanZic closed 2 years ago

KristijanZic commented 5 years ago

The current Darktable snap fails to detect OpenCL like seen in this screenshot:

screenshot from 2018-12-07 02-42-21

As opposed to the Darktable from the universe as it can be seen in this screenshot:

screenshot from 2018-12-07 02-41-53

neofetch

OS: Ubuntu 18.10 x86_64 
Kernel: 4.19.7-041907-generic 
Packages: 1993 (dpkg), 21 (flatpak),
Shell: bash 4.4.19 
Resolution: 1680x1050, 1920x1200 
DE: GNOME 3.30.1 
WM: GNOME Shell 
CPU: AMD Ryzen Threadripper 1900X 8-
GPU: AMD ATI Radeon RX Vega 64 
Memory: 2664MiB / 15958MiB 

clinfo

Number of platforms:                 1
  Platform Profile:              FULL_PROFILE
  Platform Version:              OpenCL 2.1 AMD-APP (2679.0)
  Platform Name:                 AMD Accelerated Parallel Processing
  Platform Vendor:               Advanced Micro Devices, Inc.
  Platform Extensions:               cl_khr_icd cl_amd_event_callback 

  Platform Name:                 AMD Accelerated Parallel Processing
Number of devices:               1
  Device Type:                   CL_DEVICE_TYPE_GPU
  Vendor ID:                     1002h
  Board name:                    Vega 10 XT [Radeon RX Vega 64]
  Device Topology:               PCI[ B#68, D#0, F#0 ]
  Max compute units:                 64
  Max work items dimensions:             3
    Max work items[0]:               1024
    Max work items[1]:               1024
    Max work items[2]:               1024
  Max work group size:               256
  Preferred vector width char:           4
  Preferred vector width short:          2
  Preferred vector width int:            1
  Preferred vector width long:           1
  Preferred vector width float:          1
  Preferred vector width double:         1
  Native vector width char:          4
  Native vector width short:             2
  Native vector width int:           1
  Native vector width long:          1
  Native vector width float:             1
  Native vector width double:            1
  Max clock frequency:               1750Mhz
  Address bits:                  64
  Max memory allocation:             7287183769
  Image support:                 Yes
  Max number of images read arguments:       128
  Max number of images write arguments:      8
  Max image 2D width:                16384
  Max image 2D height:               16384
  Max image 3D width:                2048
  Max image 3D height:               2048
  Max image 3D depth:                2048
  Max samplers within kernel:            26751
  Max size of kernel argument:           1024
  Alignment (bits) of base address:      1024
  Minimum alignment (bytes) for any datatype:    128
  Single precision floating point capability
    Denorms:                     Yes
    Quiet NaNs:                  Yes
    Round to nearest even:           Yes
    Round to zero:               Yes
    Round to +ve and infinity:           Yes
    IEEE754-2008 fused multiply-add:         Yes
  Cache type:                    Read/Write
  Cache line size:               64
  Cache size:                    16384
  Global memory size:                8573157376
  Constant buffer size:              7287183769
  Max number of constant args:           8
  Local memory type:                 Scratchpad
  Local memory size:                 65536
  Max pipe arguments:                16
  Max pipe active reservations:          16
  Max pipe packet size:              2992216473
  Max global variable size:          7287183769
  Max global variable preferred total size:  8573157376
  Max read/write image args:             64
  Max on device events:              1024
  Queue on device max size:          8388608
  Max on device queues:              1
  Queue on device preferred size:        262144
  SVM capabilities:              
    Coarse grain buffer:             Yes
    Fine grain buffer:               Yes
    Fine grain system:               No
    Atomics:                     No
  Preferred platform atomic alignment:       0
  Preferred global atomic alignment:         0
  Preferred local atomic alignment:      0
  Kernel Preferred work group size multiple:     64
  Error correction support:          0
  Unified memory for Host and Device:        0
  Profiling timer resolution:            1
  Device endianess:              Little
  Available:                     Yes
  Compiler available:                Yes
  Execution capabilities:                
    Execute OpenCL kernels:          Yes
    Execute native function:             No
  Queue on Host properties:              
    Out-of-Order:                No
    Profiling :                  Yes
  Queue on Device properties:                
    Out-of-Order:                Yes
    Profiling :                  Yes
  Platform ID:                   0x7fc4bc1fbdf0
  Name:                      gfx900
  Vendor:                    Advanced Micro Devices, Inc.
  Device OpenCL C version:           OpenCL C 2.0 
  Driver version:                2679.0 (HSA1.1,LC)
  Profile:                   FULL_PROFILE
  Version:                   OpenCL 1.2 
  Extensions:                    cl_khr_fp64 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_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program 

It there's anything I can help test just let me know what and how.

kum-deepak commented 5 years ago

I faced the same issue. First I had a doubt that there is an issue with my OpenCL installation. Then on my Ubuntu 18.04, I installed darktable using apt. In that OpenCL worked without issues.

This led to me to figure out the root cause. Since it is a restricted snap, the snap runtime blocked access to OpenCL related libraries. While being an restricted snap may be a good idea it leads to another limitation as reported in https://github.com/kyrofa/darktable-snap/issues/4

So, it may be worth considering to make this snap unrestricted. Please let me know if I can assist in any way.

nicocarbone commented 4 years ago

Finding the same issue with darktable 3. Is there anyway to install it with classic confinement?

kyrofa commented 4 years ago

Is there anyway to install it with classic confinement?

No, but if I can get some clear guidance on what I'm supposed to do to get opencl working I'd do it.

kum-deepak commented 4 years ago

@kyrofa I have not made a snap myself. https://snapcraft.io/docs/snap-confinement might be useful. There is a manual approval process for snaps with classic confinement.

KristijanZic commented 4 years ago

Any news on this? Could this snap be updated to use classic confinement so that it can take advantage of OpenCL and Darktable plugins and scripts?

As it now stands, the snap can't use OpenCL and can't use any plugins or scripts.

KristijanZic commented 3 years ago

Any news on this?

kyrofa commented 3 years ago

No, opencl in snaps still appears to be a mess. This is the topic I've been following.

KristijanZic commented 3 years ago

Thanks, I hope that snap team starts thinking about that. It affects most of the serious apps that deal with graphics.

mrkeuz commented 3 years ago

I want to use latest darktable via snap. And will wait with patience for a solution to the opencl problem.

sergiusens commented 2 years ago

This is upcoming, but results on Intel image image

And results for nvidia image image