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

opencl_device_priority does not allow special characters in device name #5317

Closed
sbolten opened this issue Jun 5, 2020 · 9 comments
Closed
Labels
no-issue-activity question scope: hardware support dealing with drivers and external devices: GPU, printers

Comments

@sbolten
Copy link

sbolten commented Jun 5, 2020

Using an optimus laptop with two graphic cards:

Arch Linux 5.6.15-arch1-1
community/darktable 2:3.0.2-5

1.767031 [opencl_init]          0       'GeForce RTX 2060'
1.767033 [opencl_init]          1       'Intel(R) Gen9 HD Graphics NEO'
1.767036 [opencl_init] FINALLY: opencl is AVAILABLE on this system.
1.767039 [opencl_init] initial status of opencl enabled flag is ON.

In order to finetune which card to use for which pixelpipe I followed these instructions:
https://www.darktable.org/usermanual/en/darktable_and_opencl_multiple_devices.html

It is recommended to use device names instead of device numbers. Therefore my setting would look like this:

opencl_device_priority=!Intel(R) Gen9 HD Graphics NEO,*/!GeForce RTX 2060,*/GeForce RTX 2060,*/GeForce RTX 2060,*

However this does not seem to work. It looks like the brackets within the name of the Intel device break the logic. To test this, I have changed the logic for the export, trying to force the Intel to render the Export pixelpipe explicitely excluding the Nvidia:

opencl_device_priority=!Intel(R) Gen9 HD Graphics NEO,*/!GeForce RTX 2060,*/Intel(R) Gen9 HD Graphics NEO,!GeForce RTX 2060/GeForce RTX 2060,*
For completion these are my opencl related settings in darktablerc:

opencl=TRUE
opencl_async_pixelpipe=false
opencl_avoid_atomics=false
opencl_checksum=1235645779
opencl_device_priority=!1,0/!0,1/0,1/0,1 --> (this one is working obviously)
opencl_disable_drivers_blacklist=false
opencl_library=
opencl_mandatory_timeout=200
opencl_memory_headroom=300
opencl_memory_requirement=768
opencl_micro_nap=1000
opencl_number_event_handles=25
opencl_scheduling_profile=default
opencl_size_roundup=16
opencl_synch_cache=active module
opencl_use_cpu_devices=false
opencl_use_pinned_memory=false

Also: It looks like the opencl_device_priority is only taken into account as long as opencl_scheduling_profile is set to default.

Best,

Stephan

@sbolten
Copy link
Author

sbolten commented Jun 5, 2020

Tried escaping the brackets without success:

Intel\\(R\\) Gen9 HD Graphics NEO

@ghost
Copy link

ghost commented Jun 5, 2020

Hm. The code says
// check if user wants us to force-use opencl device(s)
and then goes looking for a +

So try !1,0/+1/+1/+1 to force the last three pixelpipes to use the Intel, to prove it works?

Note: This isn't a very good config to use in general because this also forces dt to wait if something else is using the Intel, which means generating thumbnails might block the export thread, and things sit around waiting for the GPU to come free instead of just falling back to CPU until GPU becomes free. At least you can find out if it works as intended though, then tweak it afterwards.

(And I've just realised that good testing practice needs to include adding that "+" whilst you're doing the formal testing...)

@ghost
Copy link

ghost commented Jun 5, 2020

Ahhh it looks like it explicitly strips out what it refers to as "invalid characters." The list of valid characters does NOT include () so if you tried matching the string with the braces removed, it might Just Work. It looks to me like by the time the code sees the string it has been silently reduced to
IntelR Gen9 HD Graphics NEO
for matching purposes...

@github-actions
Copy link

github-actions bot commented Jul 6, 2020

This issue did not get any activity in the past 30 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.

@johnny-bit
Copy link
Member

Actually i think the issue is somewhere in determining device canonical name... For example: my card name is NVIDIA GeForce GTX 1060 6GB but canonical name is nvidiag...

@johnny-bit johnny-bit added question scope: hardware support dealing with drivers and external devices: GPU, printers and removed no-issue-activity labels Jun 13, 2021
@github-actions
Copy link

This issue did not get any activity in the past 30 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.

@johnny-bit
Copy link
Member

Since #9230 we now have way to output canonical name and find if it's not working as it's supposed to.

This needs an investigation.

@github-actions
Copy link

This issue did not get any activity in the past 30 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 did not get any activity in the past year and thus has been closed. Please check if the newest release or master branch 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 Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity question scope: hardware support dealing with drivers and external devices: GPU, printers
Projects
None yet
Development

No branches or pull requests

2 participants