From 10e6b1f068e6a2a0bd3195c7282e9fe63da6996d Mon Sep 17 00:00:00 2001 From: Nicholas Curtis Date: Wed, 24 May 2023 14:22:00 -0400 Subject: [PATCH 1/3] Fix issue where join was being done on the incorrect key --- src/utils/perfagg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/perfagg.py b/src/utils/perfagg.py index 4560d89cf5..54e23dfd0f 100755 --- a/src/utils/perfagg.py +++ b/src/utils/perfagg.py @@ -104,13 +104,14 @@ def join_prof(workload_dir, join_type, log_file, verbose, out=None): _df = pd.read_csv(file) if join_type == "kernel": key = _df.groupby("KernelName").cumcount() + _df["key"] = _df.KernelName + " - " + key.astype(str) elif join_type == "grid": key = _df.groupby(["KernelName", "grd"]).cumcount() + _df["key"] = _df.KernelName + " - " + _df.grd.astype(str) + " - " + key.astype(str) else: print("ERROR: Unrecognized --join-type") sys.exit(1) - _df["key"] = _df.KernelName + " - " + key.astype(str) if df is None: df = _df else: From 2e403232db802f1c32db1f7ac87ffb156b94a9f6 Mon Sep 17 00:00:00 2001 From: Nicholas Curtis Date: Wed, 24 May 2023 15:29:29 -0400 Subject: [PATCH 2/3] fix column name --- src/utils/perfagg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/perfagg.py b/src/utils/perfagg.py index 54e23dfd0f..95b1d9c98d 100755 --- a/src/utils/perfagg.py +++ b/src/utils/perfagg.py @@ -122,7 +122,7 @@ def join_prof(workload_dir, join_type, log_file, verbose, out=None): duplicate_cols = { "gpu": [col for col in df.columns if "gpu" in col], "grd": [col for col in df.columns if "grd" in col], - "wpr": [col for col in df.columns if "wgr" in col], + "wgr": [col for col in df.columns if "wgr" in col], "lds": [col for col in df.columns if "lds" in col], "scr": [col for col in df.columns if "scr" in col], "arch_vgpr": [col for col in df.columns if "arch_vgpr" in col], From b48fb1e4cb36f971049cf5610c0b6daf433c5171 Mon Sep 17 00:00:00 2001 From: Nicholas Curtis Date: Wed, 24 May 2023 16:08:09 -0400 Subject: [PATCH 3/3] reformat --- src/utils/perfagg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/perfagg.py b/src/utils/perfagg.py index 95b1d9c98d..e965b784c6 100755 --- a/src/utils/perfagg.py +++ b/src/utils/perfagg.py @@ -107,7 +107,9 @@ def join_prof(workload_dir, join_type, log_file, verbose, out=None): _df["key"] = _df.KernelName + " - " + key.astype(str) elif join_type == "grid": key = _df.groupby(["KernelName", "grd"]).cumcount() - _df["key"] = _df.KernelName + " - " + _df.grd.astype(str) + " - " + key.astype(str) + _df["key"] = ( + _df.KernelName + " - " + _df.grd.astype(str) + " - " + key.astype(str) + ) else: print("ERROR: Unrecognized --join-type") sys.exit(1)