implement rocprofv2 workaround for dispatch ids (#336)
* implement rocprofv2 workaround for dispatch ids Signed-off-by: Nicholas Curtis <nicurtis@amd.com> * formatting Signed-off-by: Nicholas Curtis <nicurtis@amd.com> --------- Signed-off-by: Nicholas Curtis <nicurtis@amd.com> Co-authored-by: Nicholas Curtis <nicurtis@amd.com>
This commit is contained in:
zatwierdzone przez
Cole Ramos
rodzic
1a3bdad90a
commit
a1017b68e9
@@ -74,6 +74,22 @@ class rocprof_v2_profiler(OmniProfiler_Base):
|
||||
else:
|
||||
console_log("roofline", "Detected existing pmc_perf.csv")
|
||||
|
||||
@demarcate
|
||||
def fixup_rocprofv2_dispatch_ids(self):
|
||||
# Workaround for rocprofv2 being silly and using 1-based dispatch indicies
|
||||
import pandas as pd
|
||||
import glob
|
||||
|
||||
# first read pmc_perf
|
||||
df = pd.read_csv(self.get_args().path + "/pmc_perf.csv")
|
||||
df["Dispatch_ID"] -= 1
|
||||
df.to_csv(self.get_args().path + "/pmc_perf.csv", index=False)
|
||||
# next glob for *LEVEL*.csv
|
||||
for f in glob.glob(self.get_args().path + "/*LEVEL*.csv"):
|
||||
df = pd.read_csv(f)
|
||||
df["Dispatch_ID"] -= 1
|
||||
df.to_csv(f, index=False)
|
||||
|
||||
@demarcate
|
||||
def post_processing(self):
|
||||
"""Perform any post-processing steps prior to profiling."""
|
||||
|
||||
Reference in New Issue
Block a user