Skip to content
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

Full recording of tasks and commands on request (e.g. for graph printing) #197

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

PeterTh
Copy link
Contributor

@PeterTh PeterTh commented Jul 27, 2023

This was supposed to be a small thing I'll quickly finish before doing what I actually want to do. Oh well.

Results of some in-person discussions during development:

  • We want the recorded information to be standalone, simple data, without any dependencies at the point in time when it is printed.
  • Specifically, everything required for the output needs to be resolved when a task or command is recorded.
  • This is sufficiently important for us to accept that we will have some data structure code duplication in the storage data structures (which are completely independent from the data structures used during the actual execution).
  • Recording can be turned on with an environment variable. We do not believe that there will be any measurable performance impact while it is turned off (basically, one additional correctly predicted branch per command/task).

I still want to extend test coverage a bit before making the full PR, I noticed that a few things aren't covered at all during development.

Edit:
Added the additional tests and squashed into meaningful commit chunks. Ready for review.

@github-actions
Copy link

Check-perf-impact results: (9e900a306dc9f17e4a27439205a7680c)

❓ No new benchmark data submitted. ❓
Please re-run the microbenchmarks and include the results if your commit could potentially affect performance.

@PeterTh PeterTh force-pushed the full-graph-recording branch 2 times, most recently from 63659b6 to df1d1e0 Compare August 1, 2023 09:18
@PeterTh PeterTh marked this pull request as ready for review August 1, 2023 09:18
@PeterTh PeterTh force-pushed the full-graph-recording branch from 7d2bb8c to c60e073 Compare August 1, 2023 14:39
Copy link
Contributor

@fknorr fknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

One design decision that strikes me as odd is having the task manager / graph generator own the recorder. IMO we would have better separation of concerns if these classes received a pointer to an existing recorder, which would also allow us to get rid of both print_graph member functions.

include/print_graph.h Outdated Show resolved Hide resolved
include/print_graph.h Outdated Show resolved Hide resolved
src/print_graph.cc Outdated Show resolved Hide resolved
src/runtime.cc Outdated Show resolved Hide resolved
src/runtime.cc Outdated Show resolved Hide resolved
@PeterTh
Copy link
Contributor Author

PeterTh commented Aug 9, 2023

Review comments addressed.

This includes a pretty large (in terms of LOC) change to all unit tests working directly with tasks, due to the introduction of a new helper context, which allows us to throw away a lot of boilerplate.

Copy link

@github-actions github-actions bot left a 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

src/runtime.cc Outdated Show resolved Hide resolved
src/runtime.cc Outdated Show resolved Hide resolved
test/runtime_tests.cc Show resolved Hide resolved
test/runtime_tests.cc Show resolved Hide resolved
test/runtime_tests.cc Show resolved Hide resolved
test/task_graph_tests.cc Show resolved Hide resolved
test/task_graph_tests.cc Show resolved Hide resolved
test/task_graph_tests.cc Show resolved Hide resolved
test/task_graph_tests.cc Show resolved Hide resolved
test/test_utils.h Show resolved Hide resolved
@psalz psalz force-pushed the full-graph-recording branch from f846555 to e199133 Compare August 10, 2023 11:03
@PeterTh PeterTh force-pushed the full-graph-recording branch from e199133 to ef27e17 Compare August 10, 2023 12:08
Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff!

include/distributed_graph_generator.h Outdated Show resolved Hide resolved
include/print_graph.h Outdated Show resolved Hide resolved
include/print_graph.h Outdated Show resolved Hide resolved
include/print_graph.h Outdated Show resolved Hide resolved
include/print_graph.h Show resolved Hide resolved
include/task_manager.h Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
test/runtime_tests.cc Outdated Show resolved Hide resolved
test/runtime_tests.cc Outdated Show resolved Hide resolved
test/system/distr_tests.cc Show resolved Hide resolved
test/buffer_manager_tests.cc Outdated Show resolved Hide resolved
@PeterTh PeterTh force-pushed the full-graph-recording branch from ef27e17 to 65fdd46 Compare August 10, 2023 13:34
Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/recorders.cc Outdated Show resolved Hide resolved
@PeterTh PeterTh force-pushed the full-graph-recording branch 2 times, most recently from ab0a662 to 8f791c7 Compare August 22, 2023 14:53
fknorr pushed a commit to fknorr/celerity-runtime that referenced this pull request Aug 23, 2023
@PeterTh PeterTh force-pushed the full-graph-recording branch from 8f791c7 to a83b6f3 Compare August 24, 2023 10:33
Copy link
Contributor

@fknorr fknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I missed in the initial review:

test/distributed_graph_generator_test_utils.h Outdated Show resolved Hide resolved
@PeterTh PeterTh force-pushed the full-graph-recording branch from a83b6f3 to 926cf24 Compare August 28, 2023 14:11
@PeterTh PeterTh requested a review from fknorr August 28, 2023 15:06
Copy link
Contributor

@fknorr fknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PeterTh PeterTh requested a review from psalz September 7, 2023 10:36
Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice that the task naming thing worked out so well in the end!

src/utils.cc Outdated Show resolved Hide resolved
test/utils_tests.cc Outdated Show resolved Hide resolved
@fknorr fknorr added this to the 0.5.0 milestone Sep 8, 2023
@PeterTh PeterTh force-pushed the full-graph-recording branch from 727de29 to 64fb5f0 Compare September 8, 2023 10:48
Add testing context utility to reduce boilerplate and obviate the need
for explicit calls to maybe_print.
- also includes some extended tests
 * Recorders no longer owned by task manager / graph gen
 * Also fix member var naming scheme and namespaces according to review
   suggestions
 * Several minor improvements
@PeterTh PeterTh force-pushed the full-graph-recording branch from 64fb5f0 to ad4c05b Compare September 8, 2023 11:02
@PeterTh PeterTh merged commit 660fdf9 into master Sep 11, 2023
@PeterTh PeterTh deleted the full-graph-recording branch September 11, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants