-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: improve version automation based on CMake project version #182
base: main
Are you sure you want to change the base?
Conversation
Great idea. Should we add something akin to: |
This is an interesting idea. I can see how something like Good reminder too - if we do start versioning the Khronos ICD loader more precisely do we need to coordinate versioning with the ocl-icd loader, since they both build a libOpenCL.so? |
From the introspection mechanism, right now, ocl-icd returns:
We could have the official Khronos Loader return:
We could also devise a feature/extension parameter name query to know if the loader supports layers, system layers, device ordering etc... For library versioning ocl-icd uses the same symbol versioning as we do here, but the library version is 1.0.0:
Built with libtool using
But I am unsure this difference has any consequence in practice. I am not an expert on shared library versioning issues, but I don't see a reason to diverge from what we've been doing for now, I think the symbol versioning map file is fine. I think the query mechanism should allow tools (e.g. clinfo) and application to introspect the loader to know what version it is, and what features it implements. |
This is my concern, though I'm not sure if it's a real concern or if I'm just being paranoid. One way to interpret the different library naming / versioning is that the Khronos ICD loader is always newer than the ocl-icd loader because the Khronos ICD loader has version 1.2 and the ocl-icd loader has version 1.0.0. This obviously is not always the case, though. Is this something to worry about? I guess we wouldn't be making the problem any worse if we added a "patch" version to the Khronos ICD loader so it had version 1.2.X vs. 1.2. We're also lucky that we currently have different versioning (1.2 vs. 1.0) so we won't have a Khronos ICD loader and an ocl-icd with the same file name (the symlinks are a different story, but that's OK). |
On Debian based systems icd loaders are all named in the same manner and mutually exclusive: On rpm based distributions, they all seem to be called libOpenCL.so.1 I would need to talk to distribution managers/packagers, to understand if changing numbers, or packaging the official one as is would cause issues. I am out of my depth here. |
9a7f3f3
to
488b258
Compare
This PR has some ideas I've been considering to improve version automation. The ideal goal is to derive all versioning from the CMake project version so no other versioning has to be set "manually".
For now I haven't changed any versions, so the Linux so still has version 1.2 and soversion 1 and the Windows DLL still has version 3.0.3. It would be a one line change to the CMake file to build a so with version 1.2.3 instead, though, see related discussion in PR #75.
I did add a trace message to print the ICD loader revision for now, to provide a way to know the ICD loader revision on both Windows and Linux.
I'll keep this WIP until we figure out if this is something we want to do or if we want to make additional changes at the same time.