hsa-trace fix for no-kernel dispatching scenario

Change-Id: I2833964222b285de8fcf93b0b69e9f12ee4a41d8


[ROCm/rocprofiler commit: f3d27ef21c]
Этот коммит содержится в:
Evgeny
2019-07-12 11:22:57 -05:00
родитель e6336aa4a8
Коммит a701cd90ed
+9 -10
Просмотреть файл
@@ -68,7 +68,7 @@ def dbglog(msg):
# parse results method
def parse_res(infile):
global max_gpu_id
if not os.path.isfile(infile): fatal("Error: input file '" + infile + "' not found")
if not os.path.isfile(infile): return # fatal("Error: input file '" + infile + "' not found")
inp = open(infile, 'r')
beg_pattern = re.compile("^dispatch\[(\d*)\], (.*) kernel-name\(\"([^\"]*)\"\)")
@@ -345,8 +345,7 @@ else:
if inext == '.txt':
for f in infiles: parse_res(f)
if len(var_table) == 0: sys.exit(1)
merge_table()
if len(var_table) != 0: merge_table()
if dbfile == '':
dump_csv(csvfile)
@@ -387,14 +386,14 @@ else:
if hsa_trace_found and 'BeginNs' in var_list:
dform.gen_kernel_json_trace(db, 'A', GPU_BASE_PID, START_US, jsonfile)
if hsa_trace_found:
statfile = re.sub(r'stats', r'hsa_stats', statfile)
dform.post_process_data(db, 'HSA')
dform.gen_table_bins(db, 'HSA', statfile, 'Name', 'DurationNs')
dform.gen_api_json_trace(db, 'HSA', START_US, jsonfile)
if hsa_trace_found:
statfile = re.sub(r'stats', r'hsa_stats', statfile)
dform.post_process_data(db, 'HSA')
dform.gen_table_bins(db, 'HSA', statfile, 'Name', 'DurationNs')
dform.gen_api_json_trace(db, 'HSA', START_US, jsonfile)
dform.post_process_data(db, 'COPY')
dform.gen_api_json_trace(db, 'COPY', START_US, jsonfile)
dform.post_process_data(db, 'COPY')
dform.gen_api_json_trace(db, 'COPY', START_US, jsonfile)
if hip_trace_found:
statfile = re.sub(r'stats', r'hip_stats', statfile)