Skip to content

Commit 7943851

Browse files
authored
[Utilization] fix bugs (#6312)
remove the duration spike since it's not useful, the gpu_mem_all should aggregated as max instead avg
1 parent e094fce commit 7943851

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

torchci/components/utilization/components/UtilizationStatsTable.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ export default function UtilizationStatsTable({ data }: { data: any[] }) {
1414
spike_frequency: row.columns.find(
1515
(col: any) => col.type == StatType.SpikeFrequency
1616
)?.value,
17-
spike_avg_interval: row.columns.find(
18-
(col: any) => col.type == StatType.SpikeAvgInterval
19-
)?.value,
2017
};
2118
});
2219
return (
@@ -93,10 +90,4 @@ const columns: GridColDef[] = [
9390
valueFormatter: valueFormatterSpike,
9491
minWidth: 200,
9592
},
96-
{
97-
field: "spike_avg_interval",
98-
headerName: "avg spike interval (above 90%)",
99-
valueFormatter: valueFormatterSeconds,
100-
minWidth: 200,
101-
},
10293
];

torchci/components/utilization/helper.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,6 @@ export function getTimeSeriesStats(dps: TimeSeriesDataPoint[]) {
105105
unit: "%",
106106
};
107107
results.push(maxStat);
108-
const avgSpikeInterval = findAvgSpikeIntervals(dps, p90Metric.value);
109-
const spikeAvgInterval = {
110-
type: StatType.SpikeAvgInterval,
111-
value: Number((avgSpikeInterval / 1000).toFixed(2)),
112-
unit: "%",
113-
};
114-
results.push(spikeAvgInterval);
115108
return results;
116109
}
117110

@@ -121,17 +114,6 @@ export const findMaxValue = (data: number[]) => {
121114
return max;
122115
};
123116

124-
const findAvgSpikeIntervals = (
125-
timestamps: TimeSeriesDataPoint[],
126-
threshold: number
127-
) => {
128-
const spikeIntervals = findSpikeIntervals(timestamps, threshold);
129-
if (spikeIntervals.length == 0) return -1; // No spikes
130-
const avgSpike =
131-
spikeIntervals.reduce((a, b) => a + b, 0) / spikeIntervals.length;
132-
return avgSpike;
133-
};
134-
135117
const findSpikeIntervals = (
136118
timestamps: TimeSeriesDataPoint[],
137119
threshold: number
@@ -306,7 +288,7 @@ function getAllGpusStats(stats: StatsInfo[]) {
306288
id: "gpu_mem_all",
307289
columns: [
308290
aggregateStats(gpuMems, StatType.Average, AgggregateMethod.Average),
309-
aggregateStats(gpuMems, StatType.Max, AgggregateMethod.Average),
291+
aggregateStats(gpuMems, StatType.Max, AgggregateMethod.Max),
310292
aggregateStats(
311293
gpuMems,
312294
StatType.SpikeFrequency,

0 commit comments

Comments
 (0)