Skip to content

No OpenCL advantage hints#21287

Open
jenshannoschwalm wants to merge 1 commit into
darktable-org:masterfrom
jenshannoschwalm:no_advantage_hints
Open

No OpenCL advantage hints#21287
jenshannoschwalm wants to merge 1 commit into
darktable-org:masterfrom
jenshannoschwalm:no_advantage_hints

Conversation

@jenshannoschwalm

Copy link
Copy Markdown
Collaborator

Until now we had the per-device advantage setting; it was used to decide if tiled processing was worth to be done via OpenCL. That decision was based on the assumption, the overall amount of processed data on CPU vs. OpenCL knowing a "performance-ratio" would be a good bet.

Unfortunately, this didn't work that good.

  1. The "calibration" was difficult and thus the advantage feature was used by only very few people.
  2. The assumption was often misleading.

Still, on some systems like those with very small OpenCL memory but decent CPUs it might be worthwhile to have non-demanding modules (like exposure, temperature ...) running on the GPU but exclude those requiring a lot of graphics memory.

So let's

  1. remove the advantage feature
  2. introduce a per-device entry in the conf database 'device_nocl This can hold a comma-separated list of module->so names. Any module in this list will be executed on the CPU instead of OpenCL.

It would be tempting, to allow users to toggle OpenCL processing on/off in the module header, but that would only make sense for systems with a single OpenCL device.

  • some minor code cleanup when reading/writing per-device conf, simplifications
  • improved logs for unified memory

@jenshannoschwalm jenshannoschwalm added this to the 5.8 milestone Jun 9, 2026
@jenshannoschwalm jenshannoschwalm added feature: redesign current features to rewrite scope: codebase making darktable source code easier to manage release notes: pending OpenCL Related to darktable OpenCL code labels Jun 9, 2026
@jenshannoschwalm jenshannoschwalm force-pushed the no_advantage_hints branch 3 times, most recently from bbe7b78 to a813ccd Compare June 9, 2026 09:14
Until now we had the per-device advantage setting; it was used to decide if tiled processing was
worth to be done via OpenCL. That decision was based on the assumption, the overall amount of
processed data on CPU vs. OpenCL knowing a "performance-ratio" would be a good bet.

Unfortunately, this didn't work that good.
1. The "calibration" was difficult and thus the advantage feature was used by only very few people.
2. The assumption was often misleading.

Still, on some systems like those with very small OpenCL memory but decent CPUs it might be
worthwhile to have non-demanding modules (like exposure, temperature ...) running on the GPU
but exclude those requiring a lot of graphics memory.

So let's
1. remove the advantage feature
2. introduce a per-device entry in the conf database '***device***_nocl
   This can hold a comma-separated list of module->so names.
   Any module in this list will be executed on the CPU instead of OpenCL.

It would be tempting, to allow users to toggle OpenCL processing on/off in the module header, but
that would only make sense for systems with a single OpenCL device.

- some minor code cleanup when reading/writing per-device conf, simplifications
- improved logs for unified memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: redesign current features to rewrite OpenCL Related to darktable OpenCL code release notes: pending scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant