-
Notifications
You must be signed in to change notification settings - Fork 786
[NFC][SYCL] Pass queue_impl
by raw ptr/ref in event_impl.hpp
#18983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][SYCL] Pass queue_impl
by raw ptr/ref in event_impl.hpp
#18983
Conversation
Part of the ongoing refactoring to prefer raw ptr/ref for SYCL RT objects by default with explicit `shared_from_this` when lifetimes need to be extended.
sycl/source/detail/event_impl.cpp
Outdated
std::weak_ptr<queue_impl> Queue = isHost() ? MSubmittedQueue : MQueue; | ||
if (QueueImplPtr QueuePtr = Queue.lock()) { | ||
device_impl &Device = QueuePtr->getDeviceImpl(); | ||
if (auto Queue = isHost() ? MSubmittedQueue.lock() : MQueue.lock()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be uniform with changes above, plus avoids creation of a weak_ptr
copy (which has some overhead: https://godbolt.org/z/YErne5446).
@@ -323,13 +323,6 @@ bool Command::isFusable() const { | |||
} | |||
#endif // __INTEL_PREVIEW_BREAKING_CHANGES | |||
|
|||
static void flushCrossQueueDeps(const std::vector<EventImplPtr> &EventImpls, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to be a member function of Command
c0d9bf5
to
2cfc087
Compare
2cfc087
to
118a184
Compare
Continuation of the refactoring efforts in intel#18715 intel#18748 intel#18830 intel#18907 intel#18983
Continuation of the refactoring efforts in intel#18715 intel#18748 intel#18830 intel#18907 intel#18983
Continuation of the refactoring efforts in intel#18715 intel#18748 intel#18830 intel#18907 intel#18983
Continuation of the refactoring efforts in intel#18715 intel#18748 intel#18830 intel#18907 intel#18983
Continuation of the refactoring efforts in intel#18715 intel#18748 intel#18830 intel#18907 intel#18983 intel#19004 intel#19006
Part of the ongoing refactoring to prefer raw ptr/ref for SYCL RT objects by default with explicit
shared_from_this
when lifetimes need to be extended.