SWDEV-410293: ATT API rework
Change-Id: I379e8cfd5abb182eaf56d18c2b1a5dac3e44e6e8
[ROCm/rocprofiler commit: c94d4c3e81]
This commit is contained in:
committed by
Giovanni Baraldi
orang tua
93d0d6c872
melakukan
6973eb4d8a
@@ -439,6 +439,7 @@ if __name__ == "__main__":
|
||||
OCCUPANCY = []
|
||||
GFXV = []
|
||||
analysed_filenames = []
|
||||
occupancy_filenames = []
|
||||
|
||||
shader_engine_data_dict = {}
|
||||
for name in filenames:
|
||||
@@ -453,14 +454,17 @@ if __name__ == "__main__":
|
||||
hitcount_map = np.zeros((len(code)), dtype=np.int32)
|
||||
for name in filenames:
|
||||
SIMD, perfevents, occupancy, gfxv = shader_engine_data_dict[name]
|
||||
getWaves_stitch(SIMD, code, jumps, gfxv, latency_map, hitcount_map)
|
||||
if len(SIMD) == 0:
|
||||
print("Error parsing ", name)
|
||||
if len(occupancy) > 0:
|
||||
OCCUPANCY.append( occupancy )
|
||||
occupancy_filenames.append( name )
|
||||
if np.sum([0]+[len(s.instructions) for s in SIMD]) == 0:
|
||||
print("No waves from", name)
|
||||
continue
|
||||
getWaves_stitch(SIMD, code, jumps, gfxv, latency_map, hitcount_map)
|
||||
|
||||
analysed_filenames.append(name)
|
||||
EVENTS.append(perfevents)
|
||||
DBFILES.append( persist(name, SIMD) )
|
||||
OCCUPANCY.append( occupancy )
|
||||
GFXV.append(gfxv)
|
||||
|
||||
gc.collect()
|
||||
@@ -488,7 +492,7 @@ if __name__ == "__main__":
|
||||
TIMELINES = comm.gather(TIMELINES, root=0)
|
||||
gather_latency_map = comm.gather(latency_map, root=0)
|
||||
gather_hitcount_map = comm.gather(hitcount_map, root=0)
|
||||
gathered_filenames = comm.gather(analysed_filenames, root=0)
|
||||
gathered_filenames = comm.gather(occupancy_filenames, root=0)
|
||||
|
||||
if mpi_root:
|
||||
latency_map *= 0
|
||||
@@ -513,7 +517,7 @@ if __name__ == "__main__":
|
||||
EVENTS = []
|
||||
else:
|
||||
apply_min_event(min_event_time, OCCUPANCY, EVENTS, DBFILES, TIMELINES)
|
||||
gathered_filenames = analysed_filenames
|
||||
gathered_filenames = occupancy_filenames
|
||||
|
||||
if mpi_root:
|
||||
for k in range(len(code)):
|
||||
|
||||
@@ -155,6 +155,12 @@ def draw_wave_states(selections, normalize, TIMELINES):
|
||||
def draw_occupancy(selections, normalize, OCCUPANCY, shadernames):
|
||||
plt.figure(figsize=(15,4))
|
||||
names = []
|
||||
if len(OCCUPANCY) == 1: # If single SE, do occupancy per CU/WGP
|
||||
OCCUPANCY = [[u for u in OCCUPANCY[0] if u&0xFF==k] for k in range(16)]
|
||||
shadernames = ['CU'+str(k) for k in range(16) if len(OCCUPANCY[k]) > 0]
|
||||
OCCUPANCY = [occ for occ in OCCUPANCY if len(occ) > 0]
|
||||
|
||||
maxtime = 1
|
||||
for name, occ in zip(shadernames, OCCUPANCY):
|
||||
occ_values = [0]
|
||||
occ_times = [0]
|
||||
@@ -166,10 +172,9 @@ def draw_occupancy(selections, normalize, OCCUPANCY, shadernames):
|
||||
occ_values.append(occ_values[-1] + value - current_occ[cu])
|
||||
current_occ[cu] = value
|
||||
try:
|
||||
name = 'SE'+name.split('.att')[0].split('_se')[-1]
|
||||
names.append('SE'+name.split('.att')[0].split('_se')[-1])
|
||||
except:
|
||||
pass
|
||||
names.append(name)
|
||||
names.append(name)
|
||||
|
||||
NUM_DOTS = 1500
|
||||
maxtime = np.max(occ_times)
|
||||
|
||||
Reference in New Issue
Block a user