Added instance platform specification.#1527
Open
Kerilk wants to merge 1 commit intoKhronosGroup:mainfrom
Open
Conversation
This was referenced Feb 9, 2026
EwanC
reviewed
Feb 11, 2026
Contributor
EwanC
left a comment
There was a problem hiding this comment.
I've read through this and the associated issue. This solution makes sense to me and this PR looks good with respect to that, but not sure I fully grasp all the nuance of the problem to evaluate if this is the best solution. i.e other people should take a look at this too 🙂
Contributor
Author
|
Tagging @pjaaskel since we may need to discuss the best way to implement this in pocl. |
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.
Hello,
this PR describes the notion of OpenCL instance platforms (and devices). This should allow addressing the concerns described here: #1378.
In effect platform instances (and their associated devices) allow several dispatch information to be set for the same vendor platform, they are otherwise indistinguishable from our current platform and devices. This enables guarantying that instance platforms would only see
clIcdSetPlatformDispatchDataKHRcalled once. It also allows the ICD2 mechanism to be robust in the case where several ICD loaders are built in the same executable, which is unfortunately possible since some have statically linked the loader inside applications.This also allows implementing OpenCL instances that support user defined layering, see here for a prototype:
https://github.com/Kerilk/OpenCL-ICD-Loader/tree/instance_layers
I've demonstrated instance platforms in pocl here:and frankly really buggy right now... I'll prepare something better.https://github.com/Kerilk/pocl/tree/instance
This is slightly outdated (I've added properties to the instance platform creation API since),