Update to work with rocprof v1

Signed-off-by: benrichard-amd <ben.richard@amd.com>


[ROCm/rocprofiler-compute commit: 4723ecb6c9]
This commit is contained in:
benrichard-amd
2024-07-12 14:37:22 -05:00
gecommit door David Galiffi
bovenliggende f172301a7f
commit 68f0efd56c
3 gewijzigde bestanden met toevoegingen van 0 en 41 verwijderingen
@@ -62,43 +62,6 @@ class OmniProfiler_Base:
# assume no SoC specific options and return empty list by default
return []
@demarcate
def pmc_perf_split(self):
"""Avoid default rocprof join utility by spliting each line into a separate input file"""
workload_perfmon_dir = os.path.join(self.__args.path, "perfmon")
lines = (
open(os.path.join(workload_perfmon_dir, "pmc_perf.txt"), "r")
.read()
.splitlines()
)
# Iterate over each line in pmc_perf.txt
mpattern = r"^pmc:(.*)"
i = 0
for line in lines:
# Verify no comments
stext = line.split("#")[0].strip()
if not stext:
continue
# all pmc counters start with "pmc:"
m = re.match(mpattern, stext)
if m is None:
continue
# Create separate file for each line
fd = open(workload_perfmon_dir + "/pmc_perf_" + str(i) + ".txt", "w")
fd.write(stext + "\n\n")
fd.write("gpu:\n")
fd.write("range:\n")
fd.write("kernel:\n")
fd.close()
i += 1
# Remove old pmc_perf.txt input from perfmon dir
os.remove(workload_perfmon_dir + "/pmc_perf.txt")
@demarcate
def join_prof(self, out=None):
"""Manually join separated rocprof runs"""
@@ -59,8 +59,6 @@ class rocprof_v1_profiler(OmniProfiler_Base):
def pre_processing(self):
"""Perform any pre-processing steps prior to profiling."""
super().pre_processing()
if self.ready_to_profile:
self.pmc_perf_split()
@demarcate
def run_profiling(self, version: str, prog: str):
@@ -59,8 +59,6 @@ class rocprof_v2_profiler(OmniProfiler_Base):
def pre_processing(self):
"""Perform any pre-processing steps prior to profiling."""
super().pre_processing()
# if self.ready_to_profile:
# self.pmc_perf_split()
@demarcate
def run_profiling(self, version, prog):