From 0fc6fb9cf299e01f88952ee94fcb7f668d901301 Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Thu, 9 May 2024 06:17:07 -0300 Subject: [PATCH] Fixing crash on [deprecated] file mode Change-Id: I39b644429d19b185f278caa039a3180c2fa3ab7c [ROCm/rocprofiler commit: 67faf92553f755bb53b7a86bbc002620bfeb34b8] --- projects/rocprofiler/plugin/att/drawing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler/plugin/att/drawing.py b/projects/rocprofiler/plugin/att/drawing.py index f47eed1916..2d47280881 100644 --- a/projects/rocprofiler/plugin/att/drawing.py +++ b/projects/rocprofiler/plugin/att/drawing.py @@ -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: