fix crash for running rocprofv3 on mi100 (#557)
* initial hack to fix for v3 stucking on mi100 becasue of -m parameter and missing counter csv file
* proper formating
* refactored profiler option function to take soc arch
* resolve missing step that casued error for profiler option
* fix typo of arch name
* change method of putting soc info into profiler option
* isort and black format
* add comment for the part that handles missing counter csv file
* remove unncecessary import
---------
Co-authored-by: YANG WANG <ywang@ywang-ubuntu.amd.com>
[ROCm/rocprofiler-compute commit: 5ee37b3353]
Este commit está contenido en:
@@ -63,7 +63,7 @@ class RocProfCompute_Base:
|
||||
def get_args(self):
|
||||
return self.__args
|
||||
|
||||
def get_profiler_options(self, fname):
|
||||
def get_profiler_options(self, fname, soc):
|
||||
"""Fetch any version specific arguments required by profiler"""
|
||||
# assume no SoC specific options and return empty list by default
|
||||
return []
|
||||
@@ -361,9 +361,7 @@ class RocProfCompute_Base:
|
||||
console_debug(output)
|
||||
console_log("profiling", "Current input file: %s" % fname)
|
||||
|
||||
# Fetch any SoC/profiler specific profiling options
|
||||
options = self._soc.get_profiler_options()
|
||||
options += self.get_profiler_options(fname)
|
||||
options = self.get_profiler_options(fname, self._soc)
|
||||
if (
|
||||
self.__profiler == "rocprofv1"
|
||||
or self.__profiler == "rocprofv2"
|
||||
|
||||
@@ -38,10 +38,16 @@ class rocprof_v1_profiler(RocProfCompute_Base):
|
||||
or not self.get_args().roof_only
|
||||
)
|
||||
|
||||
def get_profiler_options(self, fname):
|
||||
def get_profiler_options(self, fname, soc):
|
||||
fbase = Path(fname).stem
|
||||
app_cmd = self.get_args().remaining
|
||||
args = [
|
||||
|
||||
args = []
|
||||
# can be removed in the future. It supports gfx908 + v1
|
||||
if soc.get_arch() == "gfx908":
|
||||
args += ["-m", soc.get_workload_perfmon_dir() + "/" + "metrics.xml"]
|
||||
|
||||
args += [
|
||||
# v1 requires request for timestamps
|
||||
"--timestamp",
|
||||
"on",
|
||||
|
||||
@@ -39,10 +39,16 @@ class rocprof_v2_profiler(RocProfCompute_Base):
|
||||
or not self.get_args().roof_only
|
||||
)
|
||||
|
||||
def get_profiler_options(self, fname):
|
||||
def get_profiler_options(self, fname, soc):
|
||||
fbase = Path(fname).stem
|
||||
app_cmd = shlex.split(self.get_args().remaining)
|
||||
args = [
|
||||
|
||||
args = []
|
||||
# can be removed in the future. It supports gfx908 + v2
|
||||
if soc.get_arch() == "gfx908":
|
||||
args += ["-m", soc.get_workload_perfmon_dir() + "/" + "metrics.xml"]
|
||||
|
||||
args += [
|
||||
# v2 requires output directory argument
|
||||
"-d",
|
||||
self.get_args().path + "/" + "out",
|
||||
|
||||
@@ -40,7 +40,7 @@ class rocprof_v3_profiler(RocProfCompute_Base):
|
||||
or not self.get_args().roof_only
|
||||
)
|
||||
|
||||
def get_profiler_options(self, fname):
|
||||
def get_profiler_options(self, fname, soc):
|
||||
app_cmd = shlex.split(self.get_args().remaining)
|
||||
trace_option = "--kernel-trace"
|
||||
rocprof_out_format = "json"
|
||||
|
||||
Referencia en una nueva incidencia
Block a user