Fix bug in profiling for Mi100

Signed-off-by: colramos-amd <colramos@amd.com>


[ROCm/rocprofiler-compute commit: d4a649a926]
This commit is contained in:
colramos-amd
2024-01-11 16:30:46 -06:00
committed by Cole Ramos
parent e8ec84a854
commit 035c6ec7a3
4 changed files with 8 additions and 7 deletions
@@ -334,9 +334,9 @@ class OmniProfiler_Base():
logging.debug(output)
logging.info("\nCurrent input file: %s" % fname)
options = self.get_profiler_options(fname)
options += self._soc.get_profiler_options()
print("options are ", options)
# Fetch any SoC/profiler specific profiling options
options = self._soc.get_profiler_options()
options += self.get_profiler_options(fname)
if self.__profiler == "rocprofv1" or self.__profiler == "rocprofv2":
run_prof(
@@ -31,6 +31,7 @@ import glob
import re
import numpy as np
from utils.utils import demarcate
from pathlib import Path
class OmniSoC_Base():
def __init__(self,args):
@@ -57,8 +58,8 @@ class OmniSoC_Base():
self.__perfmon_config = config
def set_soc_param(self, param: dict):
self.__soc_params = param
def get_perfmon_dir(self):
return self.__perfmon_dir
def get_workload_perfmon_dir(self):
return str(Path(self.__perfmon_dir).parent.absolute())
def get_soc_param(self):
return self.__soc_params
def set_soc(self, soc: str):
@@ -66,7 +66,7 @@ class gfx908_soc (OmniSoC_Base):
@demarcate
def get_profiler_options(self):
# Mi100 requires a custom xml config
return ["-m", self.get_perfmon_dir() + "/" + "metrics.xml"]
return ["-m", self.get_workload_perfmon_dir() + "/" + "metrics.xml"]
#-----------------------
# Required child methods
@@ -192,7 +192,7 @@ def run_prof(fname, profiler_options):
# profile the app
success, output = capture_subprocess_output(
[ rocprof_cmd, "-i", fname ] + options
[ rocprof_cmd ] + options
)
if not success: