-
Notifications
You must be signed in to change notification settings - Fork 18
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
Explicitly manage buffer / host object lifetimes in graph generation #246
Conversation
Check-perf-impact results: (4c65f1399a47e0eb1340f63004745b17) ❓ No new benchmark data submitted. ❓ |
7f025ed
to
c23899d
Compare
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.
clang-tidy made some suggestions
c23899d
to
33d4e65
Compare
Pull Request Test Coverage Report for Build 7976008559Details
💛 - Coveralls |
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.
Nice, so this also solves the issue of having different names for a single buffer throughout the course of an application! I like the parity between distributed_graph_generator and task_manager. Also the operator<<
on recorders looks neat!
Check-perf-impact results: (f7ef1830fe7f830eee417b0b5a37c2ef) ❓ No new benchmark data submitted. ❓ |
I've gone ahead and renamed every |
task_manager and distributed_graph_generator already maintain state for each buffer and host object, but keep it around indefinitely even after the buffer or host object in question is destroyed. Also, neither have access to buffer debug names and thus can't include that information in error reports (such as uninitialized-read detection). This commit adds explicit methods for tracking the creation and destruction of objects to task_manager, distributed_graph_generator, scheduler (and now by necessity, runtime, which receives these requests directly instead of via the buffer_lifetime_callback). This also removes the recorder -> buffer_manager dependency by replicating the buffer name (like all other metadata) in both graph generators. This foreshadows the eventual removal of buffer_manager with the merge of instruction graph scheduling.
2b675b1
to
b4ef1c0
Compare
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.
clang-tidy made some suggestions
b4ef1c0
to
b0717e7
Compare
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.
LGTM.
Check-perf-impact results: (19e9c0e63e2eff8d602cc7a81b622c19) ✔️ No significant performance change in the microbenchmark set. You are good to go! Relative execution time per category: (mean of relative medians)
|
6098277
to
234e017
Compare
This is a back-port from IDAG development and a second attempt at #216.
task_manager
anddistributed_graph_generator
already maintain state for each buffer (add_buffer()
) and host object (implicit on creation) , but keep that state around indefinitely even after the buffer or host object in question is destroyed. Also, neither graph generator has access to buffer debug names and thus can't include that information in error reports (such as uninitialized-read detection, there is a TODO in the code about this).This PR adds explicit member functions for tracking the creation and destruction of buffers (
create_buffer
,destroy_buffer
) and host objects (create_host_object
,destroy_host_object
) totask_manager
,distributed_graph_generator
,scheduler
; and now by necessity,runtime
, which receives these requests directly instead of indirectly throughbuffer_manager::buffer_lifetime_callback
.It also removes the
recorder
->buffer_manager
dependency by replicating the buffer name (like all other metadata) in both graph generators. This foreshadows the eventual removal ofbuffer_manager
post-IDAG.I purposefully changed the recording API such that its user is responsible for constructing records and the recorder simply aggregates them. This is now possible because the recorders do not need to know about
task_manager
andbuffer_manager
anymore, and will allow us, in the future, to add debug info to records that is not present in the "real" DAG (see the upcoming instruction graph generator for how this might look).