-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL][Graph] try to opt duplicateNodes() function. #20615
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
base: sycl
Are you sure you want to change the base?
Conversation
KseniyaTikhomirova
left a comment
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.
handler.cpp looks ok.
| MRecordingQueues.erase(RecordingQueue.weak_from_this()); | ||
| } | ||
|
|
||
| void graph_impl::endRecording() { |
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.
I don't understand why is it called "endRecording". It just checks of there is a single queue and it is in-order-queue. How does it reflect the naming?
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.
This function is to cover work to be done at the time of ending Graph recording, like current collecting attribute(s) of the Graph before MRecordingQueues is destroyed. The right time to collect some attribute(s) of the recorded Graph is endRecording time.
|
|
||
| void graph_impl::endRecording() { | ||
| if (MRecordingQueues.size() == 1) { | ||
| MIsLinearRecorded = MRecordingQueues.begin()->lock()->isInOrder(); |
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.
MRecordingQueues stores weak pointers. Technically there is a chance you can get (nullptr)->isInOrder().
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.
Yes, will add a checker here. [Addressed]
duplicateNodes() is quite hot in graph.finalize() code path.