[rocprofiler-compute] metrics generator (#1199)

This commit is contained in:
xuchen-amd
2025-10-22 15:17:43 -04:00
committed by GitHub
parent e453705d9b
commit 578589d363
165 changed files with 31522 additions and 10056 deletions
@@ -60,6 +60,8 @@ from utils.logger import (
demarcate,
)
METRIC_ID_RE = re.compile(pattern=r"^\d{1,2}(?:\.\d{1,2}){0,2}$")
rocprof_cmd = ""
rocprof_args = ""
@@ -1629,3 +1631,16 @@ def format_scientific_notation_if_needed(
formatted = normal_str
return formatted
def load_yaml(filepath: str) -> dict[str, Any]:
"""Load YAML file and return as dictionary."""
with open(filepath) as f:
return yaml.safe_load(f)
def get_panel_alias() -> dict[str, str]:
panel_yaml = load_yaml("tools/config_management/gfx9_config_template.yaml")
return {
panel["panel_alias"]: str(panel["panel_id"]) for panel in panel_yaml["panels"]
}