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

Refactors topdown service to support multiple types of calculations and adds support for Sapphire Rapids #576

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ilumsden
Copy link
Contributor

This PR refactors the topdown service to allow it to be easily extended to support top-down calculations for processors besides Haswell/Broadwell. To do this, I've made the following changes:

  • Creates a new TopdownCalculator base class to represent calculations for different processors
  • Moves the existing calculations to a new HaswellTopdown class, which inherits from TopdownCalculator
  • Refactors IntelTopdown to offload all the computation and associated tracking to a pointer to a TopdownCalculator object

This PR also uses this new infrastructure to add support for Sapphire Rapids and Emerald Rapids CPUs. The calculations for these CPUs were obtained from Intel's perfmon repo, specifically the following file: https://github.com/intel/perfmon/blob/main/SPR/metrics/perf/sapphirerapids_metrics_perf.json. The support added by this PR only covers the first two levels of the top-down hierarchy. In the future, this could be expanded to cover as much of the 6 levels for Sapphire Rapids as desired.

This PR is still work-in-progress. The following tasks need to be completed before this is ready for review:

  • Add a CMake mechanism to specify an architecture (currently planning on supporting architecture names from archspec)
  • Use that mechanism to select (at build time) the correct TopdownCalculator child class to use in the topdown service
  • Examine if any changes need to be made to the topdown built-in option

…ll calculations and Sapphire Rapids/Emerald Rapids calculations
@ilumsden ilumsden marked this pull request as draft July 21, 2024 00:25
@ilumsden
Copy link
Contributor Author

In the future, it might be useful to consider embedding archspec-json if more architecture-specific features are added to Caliper.

@ilumsden
Copy link
Contributor Author

ilumsden commented Sep 9, 2024

Outstanding work on this PR:

  • Find a way to use PAPI multiplexing with the SPR counters needed for topdown
  • Add testing
  • Update documentation (if it exists) about the topdown service

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.

1 participant