[NFCI][SYCL] Change scheduler::enqueueCommandForCG to accept event_impl 䲏
Merged
aelovikov-intel merged 1 commit intointel:syclfrom Jul 28, 2025
Merged
Conversation
…_impl &` Before this PR, its implementation had code paths for `nullptr` argument, but it's never `nullptr` at any of the call sites. Originally, this method was added in intel#7531 and was called with `nullptr` argument from some fusion code (at least), but it doesn't seem to be the case anymore (and fusion support has been removed from the project). Also, for some reason it was accepting `std::shared_ptr<event_impl>` by value and not by reference (no idea why), and the name was `NewEvent` without any comments/documentation. The former is irrelevant after this change, and for the latter I'm changing the name to a neutral "Event". If someone has a better understanding, please let me know.
aelovikov-intel
commented
Jul 25, 2025
| continue; | ||
| std::vector<Command *> AuxCmds; | ||
| Scheduler::getInstance().enqueueCommandForCG(EventImpl, AuxCmds, | ||
| Scheduler::getInstance().enqueueCommandForCG(*EventImpl, AuxCmds, |
Contributor
Author
There was a problem hiding this comment.
Known non-null due to dereference in line 283.
| } | ||
|
|
||
| enqueueCommandForCG(NewEvent, AuxiliaryCmds); | ||
| enqueueCommandForCG(*NewEvent, AuxiliaryCmds); |
Contributor
Author
There was a problem hiding this comment.
Known non-null due to dereference at line 136. Closing } at line 145 is from the lock guard scope, so we do go through line 135 before making this call.
aelovikov-intel
commented
Jul 25, 2025
| NewEvent->setCommand(nullptr); | ||
| } | ||
| Event.setCommand(nullptr); | ||
| delete NewCmd; |
Contributor
Author
There was a problem hiding this comment.
This delete is just bizarre, the ownership model is totally unclear here. Irrelevant to this PR though.
sommerlukas
approved these changes
Jul 28, 2025
sergey-semenov
approved these changes
Jul 28, 2025
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.
Before this PR, its implementation had code paths for
nullptrargument, but it's nevernullptrat any of the call sites. Originally, this method was added in #7531 and was called withnullptrargument from some fusion code (at least), but it doesn't seem to be the case anymore (and fusion support has been removed from the project).Also, for some reason it was accepting
std::shared_ptr<event_impl>by value and not by reference (no idea why), and the name wasNewEventwithout any comments/documentation. The former is irrelevant after this change, and for the latter I'm changing the name to a neutral "Event". If someone has a better understanding, please let me know.