Added error handling to att iterate_data. Fix for genasm.

Change-Id: Ia86e629e74c6e00b98155355beabf69681a88875


[ROCm/rocprofiler commit: 1c11700521]
This commit is contained in:
Giovanni LB
2023-07-11 20:10:29 -03:00
committed by Giovanni Baraldi
parent 6eb06cf201
commit d209a2fdd1
4 changed files with 25 additions and 20 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ def draw_wave_states(selections, normalize, TIMELINES):
kernel = np.asarray([np.exp(-abs(10*k/kernsize)) for k in range(-kernsize//2,kernsize//2+1)])
kernel /= np.sum(kernel)
timelines = [np.convolve(time, kernel)[kernsize//2:-kernsize//2] for time in timelines]
timelines = [np.convolve(time, kernel)[kernsize//2:-kernsize//2] for time in timelines if len(time) > 0]
[plt.plot(cycles, t, label='State '+s, linewidth=1.1, color=c)
for t, s, c, sel in zip(timelines, STATES, colors, selections) if sel]
+3 -3
View File
@@ -332,7 +332,7 @@ def stitch(insts, raw_code, jumps, gfxv):
elif inst[1] == IMMED and 's_waitcnt ' in as_line[0]:
if 'lgkmcnt' in as_line[0]:
wait_N = int(as_line[0].split('lgkmcnt(')[1].split(')')[0])
flight_count.append([as_line[-1], num_inflight, wait_N])
flight_count.append([as_line[5], num_inflight, wait_N])
if wait_N == 0:
smem_ordering = 0
if smem_ordering == 0:
@@ -349,7 +349,7 @@ def stitch(insts, raw_code, jumps, gfxv):
if 'vmcnt' in as_line[0]:
wait_N = int(as_line[0].split('vmcnt(')[1].split(')')[0])
flight_count.append([as_line[-1], num_inflight, wait_N])
flight_count.append([as_line[5], num_inflight, wait_N])
if wait_N == 0:
vlmem_ordering = 0
if vlmem_ordering == 0:
@@ -369,7 +369,7 @@ def stitch(insts, raw_code, jumps, gfxv):
wait_N = int(as_line[0].split('vscnt(')[1].split(')')[0])
except:
wait_N = int(as_line[0].split('vmcnt(')[1].split(')')[0])
flight_count.append([as_line[-1], num_inflight, wait_N])
flight_count.append([as_line[5], num_inflight, wait_N])
if wait_N == 0:
vsmem_ordering = 0
if vsmem_ordering == 0:
@@ -280,9 +280,6 @@ def view_trace(args, code, dbnames, att_filenames, bReturnLoc, OCCUPANCY, bDumpO
if mpi_root:
JSON_GLOBAL_DICTIONARY['code.json'] = Readable({"code": code[:allse_maxline+16], "top_n": get_top_n(code[:allse_maxline+16])})
if bReturnLoc:
return flight_count
for key in simd_wave_filenames.keys():
wv_array = [[
int(s[0].split('_sm')[1].split('_sl')[0]),
@@ -324,6 +321,9 @@ def view_trace(args, code, dbnames, att_filenames, bReturnLoc, OCCUPANCY, bDumpO
for k, v in return_dict.items():
JSON_GLOBAL_DICTIONARY[k] = v
if bReturnLoc:
return flight_count
if bDumpOnly == False:
if MPI_COMM is not None:
JSON_GLOBAL_DICTIONARY = MPI_COMM.gather(JSON_GLOBAL_DICTIONARY, root=0)