Fixing crash on [deprecated] file mode

Change-Id: I39b644429d19b185f278caa039a3180c2fa3ab7c


[ROCm/rocprofiler commit: 67faf92553]
此提交包含在:
Giovanni LB
2024-05-09 06:17:07 -03:00
父節點 142b55865c
當前提交 0fc6fb9cf2
+3 -2
查看文件
@@ -210,7 +210,8 @@ def draw_occupancy_per_dispatch(selections, normalize, OCCUPANCY, dispatchnames)
for k in range(len(OCCUPANCY)):
if len(OCCUPANCY[k]) <= 1:
continue
maxtime = max(maxtime, OCCUPANCY[k][-1][0])
for ev in OCCUPANCY[k]:
maxtime = max(maxtime, ev[0])
NUM_DOTS = 1600 # number of points taken for graphing
delta = max(1, maxtime // NUM_DOTS) # Spacing between data points. Waves will be averaged over this interval.
@@ -247,7 +248,7 @@ def draw_occupancy_per_dispatch(selections, normalize, OCCUPANCY, dispatchnames)
chart += small_chart/norm_fact # small_chart / norm_fact is the mean number of waves a tthat time point
for (id, name), occ in zip(dispatchnames.items(), chart):
plt.plot(np.arange(occ.size) * delta, occ, label=str(id)+'#'+name, linewidth=1.1)
plt.plot(np.arange(occ.size) * delta * 8, occ, label=str(id)+'#'+name, linewidth=1.1)
plt.legend()
if normalize: