[SYCL] Add implementation of kernel_bundle. Part 3#3375
Merged
romanovvlad merged 50 commits intointel:syclfrom Mar 31, 2021
Merged
[SYCL] Add implementation of kernel_bundle. Part 3#3375romanovvlad merged 50 commits intointel:syclfrom
romanovvlad merged 50 commits intointel:syclfrom
Conversation
The patch adds implementation of basic API and data structures. Error handling will added in a separate patch.
romanovvlad
commented
Mar 18, 2021
sycl/source/handler.cpp
Outdated
Contributor
Author
There was a problem hiding this comment.
The kernel_bundle is used if there are calls to use_kernel_bundle or set_specialization_constants only.
sycl/test/on-device/basic_tests/kernel_bundle/kernel_bundle_api.cpp
Outdated
Show resolved
Hide resolved
sycl/test/on-device/basic_tests/kernel_bundle/kernel_bundle_api.cpp
Outdated
Show resolved
Hide resolved
03cf48c to
3a05631
Compare
romanovvlad
commented
Mar 25, 2021
| CODEPLAY_INTEROP_TASK = 13, | ||
| CODEPLAY_HOST_TASK = 14 | ||
| CODEPLAY_HOST_TASK = 14, | ||
| KERNEL_V1 = |
Contributor
Author
There was a problem hiding this comment.
Probably it makes more sense to not have distinct enum value and hide manipulations with version in setType, getType, setVersion, getVersion methods.
gmlueck
reviewed
Mar 25, 2021
kbobrovs
reviewed
Mar 26, 2021
Contributor
kbobrovs
left a comment
There was a problem hiding this comment.
Reviewed up to program manager (including).
Contributor
alexbatashev
left a comment
There was a problem hiding this comment.
LGTM if the comments above are resolved
Contributor
Author
|
/summary:run |
alexbatashev
approved these changes
Mar 31, 2021
Comment on lines
+42
to
+91
| // Periodically there is a need to extend handler and CG classes to hold more | ||
| // data(members) than it has now. But any modification of the layout of those | ||
| // classes is an ABI break. To have an ability to have more data the following | ||
| // approach is implemented: | ||
| // | ||
| // Those classes have a member - MSharedPtrStorage which is an std::vector of | ||
| // std::shared_ptr's and is supposed to hold reference counters of user | ||
| // provided shared_ptr's. | ||
| // | ||
| // The first element of this vector is reused to store a vector of additional | ||
| // members handler and CG need to have. | ||
| // | ||
| // These additional arguments are represented using "ExtendedMemberT" structure | ||
| // which has a pointer to an arbitrary value and an integer which is used to | ||
| // understand how the value the pointer points to should be interpreted. | ||
| // | ||
| // ======== ======== ======== | ||
| // | | | | ... | | std::vector<std::shared_ptr<void>> | ||
| // ======== ======== ======== | ||
| // || || || | ||
| // || \/ \/ | ||
| // || user user | ||
| // || data data | ||
| // \/ | ||
| // ======== ======== ======== | ||
| // | Type | | Type | ... | Type | std::vector<ExtendedMemberT> | ||
| // | | | | | | | ||
| // | Ptr | | Ptr | ... | Ptr | | ||
| // ======== ======== ======== | ||
| // | ||
| // Prior to this change this vector was supposed to have user's values only, so | ||
| // it is not legal to expect that the first argument is a special one. | ||
| // Versioning is implemented to overcome this problem - if the first element of | ||
| // the MSharedPtrStorage is a pointer to the special vector then CGType value | ||
| // has version "1" encoded. | ||
| // | ||
| // The version of CG type is encoded in the highest byte of the value: | ||
| // | ||
| // 0x00000001 - CG type KERNEL version 0 | ||
| // 0x01000001 - CG type KERNEL version 1 | ||
| // /\ | ||
| // || | ||
| // The byte specifies the version | ||
| // | ||
| // A user of this vector should not expect that a specific data is stored at a | ||
| // specific position, but iterate over all looking for an ExtendedMemberT value | ||
| // with the desired type. | ||
| // This allows changing/extending the contents of this vector without changing | ||
| // the version. | ||
| // |
Contributor
There was a problem hiding this comment.
We probably should update ABI policy guide after this patch is merged
Contributor
Author
There was a problem hiding this comment.
Ok, will add in a separate PR.
jsji
pushed a commit
that referenced
this pull request
Nov 4, 2025
It's deduced from a pointer's address space. Resolves: KhronosGroup/SPIRV-LLVM-Translator#3371 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@630f8ef0759944e
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.
The patch adds
The patch duplicates some code in program manager in order to support
compilation for multiple devices. The refactoring of program manager
will be done in a separate patch.
Error handling will be added in a separate patch.