Skip to content

Commit

Permalink
Move perfmon_configs dir into omniperf_soc dir. Rename config dirs fo…
Browse files Browse the repository at this point in the history
…r clarity

Signed-off-by: colramos-amd <colramos@amd.com>
  • Loading branch information
coleramos425 authored and koomie committed Dec 11, 2023
1 parent b99d448 commit fbe6b2d
Show file tree
Hide file tree
Showing 126 changed files with 10 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def omniarg_parser(parser, omniperf_home, omniperf_version):
dest="config_dir",
metavar="",
help="\t\tSpecify the directory of customized configs.",
default=omniperf_home.joinpath("omniperf_soc/configs"),
default=omniperf_home.joinpath("omniperf_soc/analysis_configs/"),
)
analyze_advanced_group.add_argument(
"--save-dfs",
Expand Down
4 changes: 4 additions & 0 deletions src/omniperf_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ def detect_analyze(self):

@demarcate
def detect_soc(self, arch=None):
"""Load OmniSoC instance for Omniperf run
"""
# in case of analyze mode, we can explicitly specify an arch
# rather than detect from rocminfo
if not arch:
mspec = get_machine_specs(0)
arch = mspec.GPU
Expand Down
2 changes: 1 addition & 1 deletion src/omniperf_profile/profiler_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self,args, profiler_mode,soc):
self.__profiler = profiler_mode
self.__soc = soc

self.__perfmon_dir = os.path.join(str(config.omniperf_home), "perfmon_configs")
self.__perfmon_dir = os.path.join(str(config.omniperf_home), "omniperf_soc", "profile_configs")

def get_args(self):
return self.__args
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions src/omniperf_soc/soc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ def __eq__(self, other):
return NotImplemented
return self.__soc == other.get_soc()

def error(self,message):
logging.error("")
logging.error("[ERROR]: " + message)
logging.error("")
sys.exit(1)
def set_perfmon_dir(self, path:str):
self.__perfmon_dir = path
def set_perfmon_config(self, config: dict):
Expand Down
2 changes: 1 addition & 1 deletion src/omniperf_soc/soc_gfx906.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self,args):
super().__init__(args)
soc = "gfx906"
self.set_soc(soc)
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "perfmon_configs", soc))
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "omniperf_soc", "profile_configs", soc))
# Per IP block max number of simulutaneous counters. GFX IP Blocks
self.set_perfmon_config(
{
Expand Down
2 changes: 1 addition & 1 deletion src/omniperf_soc/soc_gfx908.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self,args):
super().__init__(args)
soc = "gfx908"
self.set_soc(soc)
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "perfmon_configs", soc))
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "omniperf_soc", "profile_configs", soc))
# Per IP block max number of simulutaneous counters. GFX IP Blocks
self.set_perfmon_config(
{
Expand Down
5 changes: 2 additions & 3 deletions src/omniperf_soc/soc_gfx90a.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ def __init__(self,args):
soc = "gfx90a"
self.set_soc(soc)
if hasattr(self.get_args(), 'roof_only') and self.get_args().roof_only:
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "perfmon_configs", "roofline"))
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "omniperf_soc", "profile_configs", "roofline"))
else:
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "perfmon_configs", soc))
self.__metric_config_dir = os.path.join(str(config.omniperf_home), "metric_configs", soc)
self.set_perfmon_dir(os.path.join(str(config.omniperf_home), "omniperf_soc", "profile_configs", soc))
# Per IP block max number of simulutaneous counters. GFX IP Blocks
self.set_perfmon_config(
{
Expand Down
2 changes: 0 additions & 2 deletions src/soc_params/mi100.csv

This file was deleted.

2 changes: 0 additions & 2 deletions src/soc_params/mi200.csv

This file was deleted.

2 changes: 0 additions & 2 deletions src/soc_params/mi50.csv

This file was deleted.

13 changes: 0 additions & 13 deletions src/utils/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ def load_sys_info(f):
return pd.read_csv(f)


def load_soc_params(dir):
"""
Load soc params for all supported archs to a df.
"""
df = pd.DataFrame()
for root, dirs, files in os.walk(dir):
for f in files:
if f.endswith(".csv"):
tmp_df = pd.read_csv(os.path.join(root, f))
df = pd.concat([tmp_df, df])
df.set_index("name", inplace=True)
return df

def load_panel_configs(dir):
"""
Load all panel configs from yaml file.
Expand Down

0 comments on commit fbe6b2d

Please sign in to comment.