From ea9783f10524ecce9e38721e07d95ac292b972e5 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Sun, 3 Mar 2024 14:38:28 -0600 Subject: [PATCH] Fix typo, patch issue in kernel filtering in standalone GUI, and error on version mismatch Signed-off-by: colramos-amd --- src/utils/parser.py | 3 ++- src/utils/specs.py | 11 ++++++++--- src/utils/utils.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/utils/parser.py b/src/utils/parser.py index ad369c70a..a8fbfcb20 100644 --- a/src/utils/parser.py +++ b/src/utils/parser.py @@ -881,8 +881,9 @@ def apply_filters(workload, dir, is_gui, debug): ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin(kernels) ] elif all(type(kid) == str for kid in workload.filter_kernel_ids): + df_cleaned = ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].apply(lambda x: x.strip() if isinstance(x, str) else x) ret_df = ret_df.loc[ - ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin( + df_cleaned.isin( workload.filter_kernel_ids ) ] diff --git a/src/utils/specs.py b/src/utils/specs.py index e07cb9306..7a410a644 100644 --- a/src/utils/specs.py +++ b/src/utils/specs.py @@ -82,11 +82,16 @@ def __init__(self, *args, **kwargs): def generate_machine_specs(args, sysinfo: dict = None): if not sysinfo is None: - sysinfo_ver = str(sysinfo["version"]) + try: + sysinfo_ver = str(sysinfo["version"]) + except KeyError: + error( + "Detected mismatch in sysinfo versioning. You need to reprofile to update data." + ) version = get_version(config.omniperf_home)["version"] if sysinfo_ver != version[: version.find(".")]: - logging.warning( - "WARNING: Detected mismatch in sysinfo versioning. You may need to reprofile to update data." + error( + "Detected mismatch in sysinfo versioning. You need to reprofile to update data." ) return MachineSpecs(**sysinfo) # read timestamp info diff --git a/src/utils/utils.py b/src/utils/utils.py index 8fe262e75..90112358f 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -390,7 +390,7 @@ def run_rocscope(args, fname): def mibench(args, mspec): - """Run roofline microbenchmark to generate peak BW and FLOP measurements.""" + """Run roofline microbenchmark to generate peek BW and FLOP measurements.""" logging.info("[roofline] No roofline data found. Generating...") distro_map = {"platform:el8": "rhel8", "15.3": "sle15sp3", "20.04": "ubuntu20_04"}