Skip to content

Conversation

@slabasan
Copy link
Collaborator

@slabasan slabasan commented Feb 15, 2024

Supersedes #118

TODO:

  • fix conflicts -- looks like commits related to building PFA in a container are included in this
  • call to find_package(caliper) should follow current pattern with other dependencies (this was initially done before we refactored the find_package calls after running into issues on turing)
  • add config variable to config/*.cmake files to indicate to external software that perfflowaspect was built (or not built) with caliper --> bigger lift as this will require testing integration of PFA+caliper with other software tools, maybe this becomes a second PR, but realistically should be a single PR since external tools will link against these cmake files
  • test external software linking against PFA built with caliper to confirm correctness of config files
  • debug unit test builds in github actions -- boilerplate and release builds are failing, but they are building without caliper support, so builds shouldn't be impacted

Copying over notes from #118:

Couple of things before we can merge:

  • LLVM function names that get passed to Caliper (eg _Z3fooRKs instead of just foo) look confusing and don't match the original function name. Let's see if we can do better.

  • Caliper should not be "required" library. Many users may not need low-level perf counter details on their workflow and may just want the timeline traces. So, we need to add in an option/flag that determines if PFA should be built with Caliper for users who want something fine grained. With multiple workflow components eg in MuMMI or AHA Moles, we don't need this detail all the time and simple timelines are sufficient.

  • We need to update the CI to match these build changes (we need to build caliper in the CI tests)

  • We need to add detailed docs:

    • Explain the need and use case for integration with Caliper,
    • Add information on how to build caliper first (point to repo etc),
    • Add an example on how to use this with an application (eg CALI_CONFIG=runtime-report ./smoketest or CALI_CONFIG=runtime-report,output=test.cali ./smoketest or something with cali-query) and show the corresponding generated output, and
    • Explain how we can conduct end-to-end analysis of a workflow with a combination of PFA files and .cali files. For example, showcasing that we can get a quick big picture with the 800 configs of AMS with PFA and then dive deeper into 2-3 of those in detail with Caliper perf counters is a good use case to explain. We need to be clear in explaining that we don't want to end up with a data overload and that with a workflow with many configurations and components, we don't always want a low-level analysis for all configs. That is too much data (multiple metrics, time, cpu/mem usage, several perf counters) that we can't reasonably analyze at a function level or visualize.
    • Explain that using Caliper is only a C/C++ feature and not applicable to python workflows or hybrid workflows.

@slabasan slabasan changed the title Caliper integration WIP Caliper integration Feb 15, 2024
@slabasan slabasan changed the title WIP Caliper integration WIP Caliper integration and instrumentation May 10, 2024
@slabasan slabasan force-pushed the caliper-integration branch 4 times, most recently from 5504b98 to efc3e39 Compare May 10, 2024 17:45
@tpatki
Copy link
Member

tpatki commented Sep 28, 2024

@slabasan
One more thing in the to-do list (or may be we open an issue on this and revisit it later): resolve errors on newer clang versions, I will take a look at this once I am done resolving the issues with #167.

@ilumsden
Copy link
Contributor

This is super cool! It was awesome to hear about it in the AHM today.

I wanted to share one update from Caliper that might be useful to integrate into this PR (or a follow up). Since version 2.12.0 (from November 2024), Caliper has a Python API. It may be interesting to add Caliper support into the Python API of PerfFlow, similar (but much easier) to how you have added it to the C/C++ API.

@tpatki
Copy link
Member

tpatki commented Mar 12, 2025

Absolutely, @ilumsden, it'll be great to have the Caliper Python API integration as well! I'll create an issue for this,

@tpatki
Copy link
Member

tpatki commented Apr 4, 2025

@slabasan I'll start poking at this now that we've pinned to Clang18.
We should also support Caliper's python APIs if we can, like @ilumsden suggested, but that can be tracked as a separate issue.

@slabasan
Copy link
Collaborator Author

slabasan commented May 9, 2025

A new PR needs to be opened to replace this one. This PR targeted the old pass manager (work on this was started before we pinned PFA to clang18).

@tpatki
Copy link
Member

tpatki commented May 15, 2025

New PR created #190. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants