Opencl per device configs#21138
Merged
TurboGit merged 3 commits intoMay 26, 2026
Merged
Conversation
74992a0 to
99b6c94
Compare
Collaborator
Author
|
@TurboGit i just added another stability fix :-) |
TurboGit
requested changes
May 26, 2026
|
I know this isn't claiming to fully fix #21035 , but I tested it anyways, and I still get a crash when starting with an empty config folder. It crashed on the 6th time I tried it. |
Both are just internal stuff.
Instead of reading/writing floats we do it using integers and fiddle a bit using snprintf() and sscanf(). This is safe as we know the floating point representation of the data in the conf string and avoids fiddling with locales. rwgtb
1. dt_conf_save() must only by used when closing dt, otherwise we might have unstable results - we have dt_conf_get_string_const() for example and that is clearly not threadsafe. So it became a static function and is not exposed any more. 2. It was only used at one other place so far, we wrote while detecting a new OpenCL device, which happens if you start with a fresh resource file or change hardware/driver. I introduced that writing a while ago when detecting & checking OpenCL devices was not as stable as it is now. Let's get rid of it - it was a bad idea.
25c8ec3 to
e5afa7b
Compare
Collaborator
Author
In no way it's claiming to fix that issue :-) Let's continue the discussion there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
localewhile reading/writing OpenCL device configsInstead of reading/writing floats we do it using integers and fiddle a bit using
snprintf()andsscanf(). This is safe as we know the floating point representation of the data in the conf string and avoids fiddling with locales.@TurboGit @da-phil the use of locales in this part of code is certainly part of the problem we have when initializing dt OpenCL so high priority.
@TurboGit in general we might need to look in depth into conf strings related to floats. If you look at the config file some are represented with dots, some with comma. Not sure if we always get the correct value if there is a mismatch.