Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Force only GPU in some modules if OpenCL is available #11955

Closed
gi-man opened this issue Jun 1, 2022 · 5 comments
Closed

[FR] Force only GPU in some modules if OpenCL is available #11955

gi-man opened this issue Jun 1, 2022 · 5 comments

Comments

@gi-man
Copy link
Contributor

gi-man commented Jun 1, 2022

**Is your feature request related to a problem?
I recently took multiple images during a sunset. I used the highlight recovery GL with nice results. When I'm editing, at most the image takes 2sec for [full] in GPU. This is fine by me.

But, I noticed when I switch to Lightview, culling/Fullscreen, darktable becomes very slow trying to process the [thumbnails]. Upon review, the CPU is 100%, while there is still plenty of memory (no tile). I used the -d perf to further evaluate and I noticed that some of the thumbnail processing is going into CPU. The ones in CPU path take 45 to 50sec just in the highlight recovery module vs 1s in GPU. The impact of CPU path is there also in the D&S module, but not at the same magnitude (~5sec vs 0.5s).

Describe the solution you'd like
I would like to be able to force those two modules to use the GPU path in all cases and maybe other modules in the future. This should be a user selectable option.

Alternatives
I switched to the Very Fast GPU and it avoids the CPU path, but I dont think it is ideal to then never use the CPU for the other modules.

Thoughts?

@jenshannoschwalm
Copy link
Collaborator

Thoughts?

Yes. Indeed that's one more thing in the dt scheduler to be worked on. I will certainly get into this later, not sure if we
a) can use a much better benchmark that allows us to calculate a valid performance ratio specific_gpu versus cpu to make a better decision how long we should wait for a device instead of cpu-fallback
b) use something like process_cl_preferred like we already have process_cl_ready

don't know yet

@MStraeten
Copy link
Collaborator

instead of switching to "Very fast GPU" better use default mode with custom opencl_device_priority=1,0,*/!1,0,*/1,0,*/1,0,*/* settings.
you can set a default priority - i used it to prioritize the dedicated GPU (1) over the on CPU GPU (0) except for preview (the default setting prioritizes the first GPU but thats the slower one in my config). So whenever possible (and waiting for jobs) the fastest GPU is used and fallback to the slower GPU or CPU is just done if the fastest GPU is already in use.
depending on your systems configuration you need to try to find the optimum configuration.

@gi-man
Copy link
Contributor Author

gi-man commented Jun 1, 2022

I tried that option, but it still used the CPU. I prefer to wait for the GPU to be finished (in a few seconds) than using CPU (a lot of seconds).

The Very fast GPU worked for me.

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

@github-actions
Copy link

This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants