[NFC][SYCL] Refactor code around device_image_impl::KernelIDs#19516
Merged
steffenlarsen merged 1 commit intointel:syclfrom Jul 21, 2025
Merged
[NFC][SYCL] Refactor code around device_image_impl::KernelIDs#19516steffenlarsen merged 1 commit intointel:syclfrom
device_image_impl::KernelIDs#19516steffenlarsen merged 1 commit intointel:syclfrom
Conversation
fbbf961 to
4e11774
Compare
4e11774 to
c69c3ba
Compare
aelovikov-intel
commented
Jul 18, 2025
| "State mismatch between main image and its dependency"); | ||
| DeviceImageImplPtr DepImpl = | ||
| device_image_impl::create(DepImage, Ctx, Devs, DepState, DepKernelIDs, | ||
| device_image_impl::create(DepImage, Ctx, Devs, DepState, std::move(DepKernelIDs), |
Contributor
Author
There was a problem hiding this comment.
An alternative to part of this change would be to initialize DepKernelIDs if it's nullptr here and add an assert in device_image_impl::create to make sure that device_image_impl::KernelIDs is always non-null. @steffenlarsen, what approach would you like better?
c69c3ba to
a4a6feb
Compare
device_image_impl::get_kernel_ids_ptrdevice_image_impl::KernelIDs
a4a6feb to
f7ed339
Compare
* Clarify the reason for `std::shared_ptr` (performance) * Clarify that `get_kernel_ids` is preferred over `get_kernel_ids_ptr` and update some of the existing uses of the latter to use the former * Change `get_kernel_ids` to return `iterator_range` instead of the reference to the underlying container. That way we can also return an empty range when `shared_ptr` isn't initialized, which was possible before but many ctors led to believe that is guaranteed to never happen. * Change those ctors to keep empty `shared_ptr` instead of creating empty `vector`s
f7ed339 to
146abac
Compare
Contributor
|
Arc: Reported in #19305 |
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.
std::shared_ptr(performance,see Improve get_kernel_bundle performance #5496)
get_kernel_idsis preferred overget_kernel_ids_ptrandupdate some of the existing uses of the latter to use the former
get_kernel_idsto returniterator_rangeinstead of thereference to the underlying container. That way we can also return an
empty range when
shared_ptrisn't initialized, which was possiblebefore but many ctors led to believe that is guaranteed to never happen.
shared_ptrinstead of creatingempty
vectors