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

[Profiler] Profiling support for parallel programs #2370

Merged
merged 58 commits into from
Dec 9, 2024

Conversation

ayakayorihiro
Copy link
Contributor

@ayakayorihiro ayakayorihiro commented Dec 4, 2024

This PR contains:

  • The profiler-instrumentation pass is now updated to contain four types of probes in order to capture call site information.
    • group_probe: A probe that is high when a group is active.
    • primitive_probe: A probe that is high when a primitive cell is active.
    • se_probe: A probe that is high when a group that structurally enables another group is active.
    • cell_probe: A probe that is high when a group that invokes a non-primitive cell is active.
  • profiler-process.py: an updated VCD postprocessing script that generates .folded and .dot files:
    • A "flattened" flame graph, where each parallel arm gets its own "cycle". So, if arm A and arm B were executing on a single cycle, the flame graph would account for a cycle in arm A and a cycle in arm B.
    • A scaled flame graph, where a cycle is divided between the parallel arms in execution. So, if arm A and arm B were executing on a single cycle, the flame graph would account for 0.5 cycles in arm A and 0.5 cycles in arm B.
    • aggregate.dot: A tree summary of the execution of the program. Nodes (groups and cells) are labeled with the number of times the node was a leaf, and edges are labeled with the number of cycles that edge was activated.
    • rank{i}.dot: A tree representation of the ith most active stack picture. rankings.csv lists the specific cycles that each ranked tree was active for.
  • Updated fud2 support (fud2/scripts/profiler.rhai)
  • Utility scripts to help convert generated .folded and .dot files into visualizations (svg and png files respectively)
  • Updated tests/cleanup of old tests that relied on scripts that no longer exist

As usual, I'd really appreciate any suggestions or thoughts!!

@ayakayorihiro ayakayorihiro added the C: calyx-profiler Profiling Calyx programs label Dec 4, 2024
@ayakayorihiro ayakayorihiro self-assigned this Dec 4, 2024
@ayakayorihiro ayakayorihiro requested a review from ekiwi December 6, 2024 16:32
Copy link
Contributor

@ekiwi ekiwi left a comment

Choose a reason for hiding this comment

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

Two small changes and then we can merge this in.

docs/running-calyx/profiler.md Outdated Show resolved Hide resolved
tools/profiler/finagle-with-svg.py Outdated Show resolved Hide resolved
@ayakayorihiro ayakayorihiro marked this pull request as ready for review December 9, 2024 14:53
Copy link
Contributor

@ekiwi ekiwi left a comment

Choose a reason for hiding this comment

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

:shipit: !

@ayakayorihiro : is this ready to be merged?

@ayakayorihiro
Copy link
Contributor Author

Merging :)

@ayakayorihiro ayakayorihiro merged commit d9df264 into main Dec 9, 2024
18 checks passed
@ayakayorihiro ayakayorihiro deleted the profiler-probe-attempt2 branch December 9, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: calyx-profiler Profiling Calyx programs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants