I’m in the process of buying a new Windows PC including a good GPU.
I noticed that my present MVIDIA GPU has a total of 8 GB memory. 4 GB is listed as dedicated video memory. Is Darktable in OpenCL mode able to make use of dedicated video memory or do I have to disregard dedicated video memory evaluating new GPU’s?
This (link to manual below) might be a good section to review…I have a 3060TI with 8GB and it runs well. I did tweak it so that DT uses as much as possible of the vram and I don’t have any crashes by pushing it… I think these days 8GB would be a base line and you should likely go higher. I think there is some buzz around a new budget priced Intel card … B580 or something… I think its comparable in performance to roughly a 4070 Nvidia card and much cheaper but I am not sure about driver support for opencl and darktable esp under linux… I am totally going from a video I watched over Christmas so I could be off base…
Yes, and the more the better, basically. The more megapixels your camera has, the more memory you need. There are several, fairly recent, discussions on this topic, so look for those.
What does that mean? darktable -d opencl gives me:
1.6114 [opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
1.6243 [opencl_init] found 1 platform
[opencl_init] found 1 device
[dt_opencl_device_init]
DEVICE: 0: 'NVIDIA GeForce GTX 1060 6GB'
CONF KEY: cldevice_v5_nvidiacudanvidiageforcegtx10606gb
PLATFORM, VENDOR & ID: NVIDIA CUDA, NVIDIA Corporation, ID=4318
CANONICAL NAME: nvidiacudanvidiageforcegtx10606gb
DRIVER VERSION: 550.127.08
DEVICE VERSION: OpenCL 3.0 CUDA, SM_20 SUPPORT
DEVICE_TYPE: GPU, dedicated mem
GLOBAL MEM SIZE: 6064 MB
MAX MEM ALLOC: 1516 MB
MAX IMAGE SIZE: 16384 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
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 0
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /home/kofa/darktable-master/share/darktable/kernels
KERNEL DIRECTORY: /home/kofa/.cache/darktable/cached_v5_kernels_for_NVIDIACUDANVIDIAGeForceGTX10606GB_55012708
CL COMPILER OPTION: -cl-fast-relaxed-math
CL COMPILER COMMAND: -w -cl-fast-relaxed-math -DNVIDIA_SM_20=1 -DNVIDIA=1 -I"/home/kofa/darktable-master/share/darktable/kernels"
KERNEL LOADING TIME: 0.0242 sec
[opencl_init] OpenCL successfully initialized. internal numbers and names of available devices:
[opencl_init] 0 'NVIDIA CUDA NVIDIA GeForce GTX 1060 6GB'
1.7255 [opencl_init] FINALLY: opencl PREFERENCE=ON is AVAILABLE and ENABLED.
[opencl_init] opencl_scheduling_profile: 'very fast GPU'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 20000
[opencl_update_priorities] these are your device priorities:
[opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[opencl_update_priorities] image preview export thumbs preview2
[opencl_update_priorities] 1 1 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 0
[opencl_update_priorities] these are your device priorities:
[opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[opencl_update_priorities] image preview export thumbs preview2
[opencl_update_priorities] 1 1 1 1 1
[opencl_synchronization_timeout] synchronization timeout set to 0
I don’t see a distinction between ‘memory’ and ‘dedicated video memory’.
Output of nvidia-smi:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.127.08 Driver Version: 550.127.08 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1060 6GB Off | 00000000:06:00.0 On | N/A |
| 0% 53C P8 7W / 120W | 779MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1565 G /usr/lib/xorg/Xorg 239MiB |
| 0 N/A N/A 2194 G ..._64-linux-gnu/libexec/kglobalacceld 1MiB |
| 0 N/A N/A 2261 G /usr/bin/ksmserver 1MiB |
| 0 N/A N/A 2263 G /usr/bin/kded6 1MiB |
| 0 N/A N/A 2264 G /usr/bin/kwin_x11 14MiB |
| 0 N/A N/A 2300 G /usr/bin/plasmashell 157MiB |
| 0 N/A N/A 2343 G ...linux-gnu/libexec/kactivitymanagerd 1MiB |
| 0 N/A N/A 2346 G ...c/polkit-kde-authentication-agent-1 1MiB |
| 0 N/A N/A 2347 G ...inux-gnu/libexec/org_kde_powerdevil 1MiB |
| 0 N/A N/A 2348 G ...-gnu/libexec/xdg-desktop-portal-kde 1MiB |
| 0 N/A N/A 2526 G /usr/bin/kdeconnectd 1MiB |
| 0 N/A N/A 2535 G /usr/bin/qbittorrent 1MiB |
| 0 N/A N/A 2572 G /usr/bin/kaccess 1MiB |
| 0 N/A N/A 2585 G ...-linux-gnu/libexec/DiscoverNotifier 1MiB |
| 0 N/A N/A 3349 G /usr/bin/konsole 1MiB |
| 0 N/A N/A 18722 G /usr/bin/firefox 271MiB |
| 0 N/A N/A 19297 G ...bin/plasma-browser-integration-host 1MiB |
| 0 N/A N/A 20223 C ./darktable 64MiB |
+-----------------------------------------------------------------------------------------+
If you set darktable to use OpenCL, it will run the processing on the GPU and therefore also use the video (GPU) memory. It can’t really work any other way.
The difference between dedicated and shared memory is that the dedicated memory is integrated with the GPU, and may also be special high-speed RAM, while the shared memory is the normal RAM that the system uses for “normal” tasks, which the GPU can also use if needed (but it will be slower). Note that this is something that is managed by the system and which the programs, such as darktable, can’t influence. This is typical in laptops and some lower-end desktops.
In a desktop PC, with a separate GPU, there is no such thing as shared memory. The GPU has its own dedicated RAM and that’s it. It can’t also use the system RAM.
BTW, you may want to wait a bit. New cards have just been announced, with higher gaming performance. I don’t think that helps darktable (AI frame generation), but it may push the older cards, just as good for darktable, into a lower price range, especially second-hand.
Thank you for a good explanation.
So a laptop with a 8 GB NVIDIA graphics card should be a really good enhancement (2 x fast graphic memory) compared to my present laptop and will be well equipped for Darktable work.