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

[Profiling] Visualizations: Cycle flame graph, frequency flame graph, timeline view #2284

Merged
merged 117 commits into from
Sep 18, 2024

Conversation

ayakayorihiro
Copy link
Contributor

The profiling script (get-profile-counts-info.sh) now produces visualizations!

  • Cycle flame graph: flame.svg can be viewed using your favorite web browser. For any group, it shows the "call stack" and the number of cycles it was active for.
  • Frequency flame graph: frequency-flame.svg can also be viewed using your favorite web browser. For any group, it shows the "call stack" and the number of times the group was active.
  • Timeline view: timeline.json is a JSON file in the Google Trace File Format. You can visualize the timeline using Perfetto UI.

The biggest caveat to the profiler right now is that the visualizations only work for non-optimized, sequential (i.e. no par) Calyx programs. I will work on expanding the profiler's capabilities in the near future (after finding some example use cases where knowing performance information was helpful).

@ayakayorihiro ayakayorihiro self-assigned this Sep 18, 2024
@ayakayorihiro ayakayorihiro added the C: calyx-profiler Profiling Calyx programs label Sep 18, 2024
@ayakayorihiro ayakayorihiro merged commit 651c476 into main Sep 18, 2024
18 checks passed
@ayakayorihiro ayakayorihiro deleted the profiling-first-visuals branch September 18, 2024 19:29
@rachitnigam
Copy link
Contributor

Hey @ayakayorihiro. This PR has a couple of flamegraphs that don't seem to be connected to any inputs or tests. Can you either (1) remove them, or (2) connect them to a test suite? If these are needed for testing/evaluation of a current paper, can you create a new repo to store those changes?

@ayakayorihiro
Copy link
Contributor Author

ayakayorihiro commented Sep 18, 2024

The flame graphs that I included in this PR were me sketching out what a more ADL-friendly flame graph would look like, as opposed to what the profiler currently produces, so in a sense they're more "notes for the future"/"proof of concept" than anything connected to a concrete test. I can remove them from the repo if you think it's not appropriate to keep here though! They just seemed too small to create a whole new repo for, but I can do that in a quick separate PR + private repo.

@rachitnigam
Copy link
Contributor

Got it! I've found that having a private repo to track these kinds of design notes can be useful so I would recommend using one for ideas/sketches (and linking to it in issues and discussions when appropriate). My worry with these kinds of files is that they will remain committed in the repo and bit rot away.

@ayakayorihiro
Copy link
Contributor Author

Gotcha! Makes sense, that sounds like a good plan :)

@ayakayorihiro
Copy link
Contributor Author

Done! #2286

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