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

Remove abstract_command::debug_label #133

Merged
merged 5 commits into from
Aug 29, 2022
Merged

Conversation

fknorr
Copy link
Contributor

@fknorr fknorr commented Aug 18, 2022

Currently, the DOT graph generation for print_graph happens partially in graph_generator, which stringifies the data requirements into the abstract_command::debug_label. In addition to the missing separation of concerns, this is surprisingly slow as it uses iostreams to print the GridRegion of each requirement.

This PR moves this entire printing logic to print_graph.cc and removes the debug_label member. It also simplifies the remaining printing code by replacing iostreams uses with fmt.

The CI failure on dpcpp:HEAD is due to a bug in Clang 15 and not related to this PR.

@fknorr fknorr self-assigned this Aug 18, 2022
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@PeterTh PeterTh left a comment

Choose a reason for hiding this comment

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

Given that there are formatting changes but no changes to any test, I assume we don't have any. Maybe it would be good to add at least a simple basic graph printing unit test (ideally in a commit before the change).

src/print_graph.cc Outdated Show resolved Hide resolved
src/print_graph.cc Outdated Show resolved Hide resolved
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@fknorr
Copy link
Contributor Author

fknorr commented Aug 22, 2022

I have used the opportunity to improve readability and information density of the graphs overall:
TaskGraph
CommandGraph

Also, there are now smoke tests checking that task and command graphs remains unchanged for two example programs.

@fknorr fknorr requested a review from PeterTh August 22, 2022 15:57
@fknorr fknorr force-pushed the remove-member-debug-label branch from 1c4deb9 to 1315274 Compare August 22, 2022 16:01
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

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.

This is great! The graphs look much nicer now.

In addition to the missing separation of concerns, this is surprisingly slow as it uses iostreams to print the GridRegion of each requirement.

Have you tried running the microbenchmarks to see whether this is measurable?

src/print_graph.cc Outdated Show resolved Hide resolved
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@fknorr fknorr force-pushed the remove-member-debug-label branch from c0ff88b to ea7b6f3 Compare August 24, 2022 16:14
@fknorr fknorr force-pushed the remove-member-debug-label branch from ea7b6f3 to e8845f2 Compare August 24, 2022 16:15
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@fknorr
Copy link
Contributor Author

fknorr commented Aug 24, 2022

Here's a comparison for CDAG generation benchmarks between master and this branch:

output1

output2

output3

This suggests a significant overall performance improvement, especially in the 4-node case - although it is curious why the same difference can't be seen for the 16-node case.

@PeterTh
Copy link
Contributor

PeterTh commented Aug 26, 2022

LGTM. Re:16 threads - my guess would be that the improvement from getting rid of this string processing only scales linearly with the number of nodes, while many other overheads scale non-linearly, so the relative impact is reduced at increasing node counts.

@fknorr fknorr merged commit d3a61da into master Aug 29, 2022
@psalz psalz deleted the remove-member-debug-label branch August 29, 2022 12:20
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