opencl on mac mini m4

the log shows that 2 OpenCL devices found. but later in the log, this is found
[opencl_init] no suitable devices found.
0.3342 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.

i woud appreciate any help to resolve this and DT use Opencl

glyndavies@Glyns-Mac-mini contents % MacOS/darktable -d opencl
darktable 5.0.0
Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options:
Bit depth → 64 bit
Debug → DISABLED
SSE2 optimizations → ENABLED
OpenMP → ENABLED
OpenCL → ENABLED
Lua → ENABLED - API version 9.4.0
Colord → DISABLED
gPhoto2 → ENABLED
GMIC → ENABLED - Compressed LUTs are supported
GraphicsMagick → DISABLED
ImageMagick → ENABLED
libavif → ENABLED
libheif → ENABLED
libjxl → ENABLED
LibRaw → ENABLED - Version 0.22.0-Devel202403
OpenJPEG → ENABLED
OpenEXR → ENABLED
WebP → ENABLED

See resources | darktable for detailed documentation.
See Sign in to GitHub · GitHub to report bugs.

 0.0001 [dt starting]

MacOS/darktable -d opencl
0.3048 [dt_get_sysresource_level] switched to 2 as `large’
0.3048 total mem: 16384MB
0.3048 mipmap cache: 2048MB
0.3048 available mem: 11200MB
0.3048 singlebuff: 256MB
0.3277 [opencl_init] opencl disabled via darktable preferences
0.3278 [opencl_init] opencl library ‘/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL’ found on your system and loaded, preference ‘default path’
0.3278 [opencl_init] found 1 platform
[opencl_init] found 2 devices

[dt_opencl_device_init]
DEVICE: 0: ‘Apple M4’
CONF KEY: cldevice_v5_appleapplem4
PLATFORM, VENDOR & ID: Apple, Apple, ID=-1
CANONICAL NAME: appleapplem4
DRIVER VERSION: 1.1
DEVICE VERSION: OpenCL 1.2
DEVICE_TYPE: CPU, unified mem
GLOBAL MEM SIZE: 16384 MB
MAX MEM ALLOC: 4096 MB
MAX IMAGE SIZE: 8192 x 8192
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1 1 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 1000
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
*** marked as disabled ***

[dt_opencl_device_init]
DEVICE: 1: ‘Apple M4’
CONF KEY: cldevice_v5_appleapplem4
PLATFORM, VENDOR & ID: Apple, Apple, ID=16940800
CANONICAL NAME: appleapplem4
DRIVER VERSION: 1.2 1.0
DEVICE VERSION: OpenCL 1.2
DEVICE_TYPE: GPU, unified mem
GLOBAL MEM SIZE: 10923 MB
MAX MEM ALLOC: 2048 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 256
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 256 256 256 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 1000
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
*** marked as disabled ***
[opencl_init] no suitable devices found.
0.3342 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.

(darktable:10411): Gtk-CRITICAL **: 12:53:29.766: gtk_window_add_accel_group: assertion ‘GTK_IS_WINDOW (window)’ failed
2024-12-23 12:53:31.844 darktable[10411:643902] +[IMKClient subclass]: chose IMKClient_Modern

known issue with gpu performance tests on macs. If that doesn’t give proper results (thats usually the case :wink: ) opencl isn’t activated.
You can activate it yourself in ./config/darktable/darktblerc :
see: darktable user manual - memory & performance tuning
find the line: cldevice_v5_… and switch parameter h from 1 to 0

Thank you for this, i have made the change but still get an error.
Here it is, I appreciate the help.
glyndavies@Glyns-Mac-mini contents % macos/darktable -d perf -d opencl
darktable 5.0.0
Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options:
Bit depth → 64 bit
Debug → DISABLED
SSE2 optimizations → ENABLED
OpenMP → ENABLED
OpenCL → ENABLED
Lua → ENABLED - API version 9.4.0
Colord → DISABLED
gPhoto2 → ENABLED
GMIC → ENABLED - Compressed LUTs are supported
GraphicsMagick → DISABLED
ImageMagick → ENABLED
libavif → ENABLED
libheif → ENABLED
libjxl → ENABLED
LibRaw → ENABLED - Version 0.22.0-Devel202403
OpenJPEG → ENABLED
OpenEXR → ENABLED
WebP → ENABLED

See resources | darktable for detailed documentation.
See Sign in to GitHub · GitHub to report bugs.

 0.0002 [dt starting]

macos/darktable -d perf -d opencl
0.0037 [l10n] error: can’t open iso-codes file `/usr/local/Cellar/iso-codes/4.17.0/share/iso-codes/json/iso_639-2.json’
there won’t be nicely translated language names in the preferences

(darktable:41756): Gtk-CRITICAL **: 11:37:52.816: gtk_image_set_pixel_size: assertion ‘GTK_IS_IMAGE (image)’ failed

(darktable:41756): GLib-GObject-CRITICAL **: 11:37:52.816: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
0.3046 [dt_get_sysresource_level] switched to 2 as `large’
0.3046 total mem: 16384MB
0.3046 mipmap cache: 2048MB
0.3046 available mem: 11200MB
0.3046 singlebuff: 256MB
0.3272 [opencl_init] opencl disabled via darktable preferences
0.3272 [opencl_init] opencl library ‘/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL’ found on your system and loaded, preference ‘default path’
0.3272 [opencl_init] found 1 platform
[opencl_init] found 2 devices

[dt_opencl_device_init]
DEVICE: 0: ‘Apple M4’
CONF KEY: cldevice_v5_appleapplem4
PLATFORM, VENDOR & ID: Apple, Apple, ID=-1
CANONICAL NAME: appleapplem4
DRIVER VERSION: 1.1
DEVICE VERSION: OpenCL 1.2
DEVICE_TYPE: CPU, unified mem
GLOBAL MEM SIZE: 16384 MB
MAX MEM ALLOC: 4096 MB
MAX IMAGE SIZE: 8192 x 8192
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1 1 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 1000
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /Applications/darktable.app/Contents/Resources/share/darktable/kernels
KERNEL DIRECTORY: /Users/glyndavies/.cache/darktable/cached_v5_kernels_for_AppleAppleM4_11
CL COMPILER OPTION: -cl-fast-relaxed-math
CL COMPILER COMMAND: -w -cl-fast-relaxed-math -DUNKNOWN=1 -I/Applications/darktable.app/Contents/Resources/share/darktable/kernels
0.3359 [opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
0.3360 [dt_opencl_device_init] failed to compile program `demosaic_ppg.cl’!

[dt_opencl_device_init]
DEVICE: 1: ‘Apple M4’
CONF KEY: cldevice_v5_appleapplem4
PLATFORM, VENDOR & ID: Apple, Apple, ID=16940800
CANONICAL NAME: appleapplem4
DRIVER VERSION: 1.2 1.0
DEVICE VERSION: OpenCL 1.2
DEVICE_TYPE: GPU, unified mem
GLOBAL MEM SIZE: 10923 MB
MAX MEM ALLOC: 2048 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 256
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 256 256 256 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 1000
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /Applications/darktable.app/Contents/Resources/share/darktable/kernels
KERNEL DIRECTORY: /Users/glyndavies/.cache/darktable/cached_v5_kernels_for_AppleAppleM4_1210
CL COMPILER OPTION: -cl-fast-relaxed-math
CL COMPILER COMMAND: -w -cl-fast-relaxed-math -DAPPLE=1 -I/Applications/darktable.app/Contents/Resources/share/darktable/kernels

(darktable:41756): Gtk-CRITICAL **: 11:37:53.220: gtk_window_add_accel_group: assertion ‘GTK_IS_WINDOW (window)’ failed
0.5874 [dt_init] ERROR: can’t init develop system, aborting.
glyndavies@Glyns-Mac-mini contents %