Enable single pass counter collection (#833)

[ROCm/rocprofiler-compute commit: 6a77d241ed]
Dieser Commit ist enthalten in:
xuchen-amd
2025-08-06 10:35:05 -04:00
committet von GitHub
Ursprung 5084aad00b
Commit 34dd26fb07
18 geänderte Dateien mit 778 neuen und 56 gelöschten Zeilen
@@ -35,11 +35,8 @@ import re
import selectors
import shutil
import subprocess
import sys
import tempfile
import time
from collections import OrderedDict
from itertools import product
from pathlib import Path as path
from typing import Optional
@@ -1616,3 +1613,25 @@ def format_time(seconds):
if secs > 0 or not parts:
parts.append(f"{secs} second{'s' if secs != 1 else ''}")
return ", ".join(parts[:-1]) + (" and " if len(parts) > 1 else "") + parts[-1]
def parse_sets_yaml(arch):
filename = (
config.rocprof_compute_home
/ "rocprof_compute_soc"
/ "profile_configs"
/ "sets"
/ f"{arch}_sets.yaml"
)
with open(filename, "r") as file:
content = file.read()
data = yaml.safe_load(content)
sets_data = data.get("sets", [])
sets_info = {}
for set_item in sets_data:
set_option = set_item.get("set_option", "")
if set_option:
sets_info[set_option] = set_item
return sets_info