Skip to content

Commit b6268b2

Browse files
committed
[Helion Benchmark] Use geomean for speedup
stack-info: PR: #7126, branch: oulgen/stack/6
1 parent 42eb661 commit b6268b2

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

torchci/clickhouse_queries/oss_ci_benchmark_llms/query.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ WITH benchmarks AS (
1010
o.model.'backend' AS backend,
1111
o.model.'origins' AS origins,
1212
o.metric.'name' AS metric,
13+
-- Arithmetic mean
1314
floor(arrayAvg(o.metric.'benchmark_values'), 2) AS actual,
15+
-- Geometric mean
16+
floor(exp(arrayAvg(arrayMap(x -> log(x), o.metric.'benchmark_values'))), 2) AS actual_geomean,
1417
floor(toFloat64(o.metric.'target_value'), 2) AS target,
1518
o.benchmark.'mode' AS mode,
1619
o.benchmark.'dtype' AS dtype,
@@ -141,6 +144,7 @@ SELECT DISTINCT
141144
origins,
142145
metric,
143146
actual,
147+
actual_geomean,
144148
target,
145149
mode,
146150
dtype,

torchci/components/benchmark/llms/components/LLMsSummaryPanel.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ export default function LLMsSummaryPanel({
384384
l = l === 1 ? "Pass" : "Fail";
385385
r = r === 1 ? "Pass" : "Fail";
386386
} else if (metric.includes("speedup")) {
387+
l = v.l.actual_geomean;
388+
r = v.r.actual_geomean;
389+
387390
const accuracy = metric.replace(/_speedup$/, "_accuracy");
388391
const accuracy_v = params.row[accuracy];
389392
if (accuracy_v.l.actual !== 1) {

torchci/lib/benchmark/llms/common.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export const METRIC_DISPLAY_HEADERS: { [k: string]: string } = {
4242
p99_ttft_ms: "p99 TTFT (ms)",
4343
requests_per_second: "Requests/s",
4444
tokens_per_second: "Tokens/s",
45-
triton_speedup: "Triton Speedup",
45+
triton_speedup: "Triton Speedup (Geomean)",
4646
triton_accuracy: "Triton Accuracy",
47-
torch_compile_speedup: "Torch Compile Speedup",
47+
torch_compile_speedup: "Torch Compile Speedup (Geomean)",
4848
torch_compile_accuracy: "Torch Compile Accuracy",
49-
helion_speedup: "Helion Speedup",
49+
helion_speedup: "Helion Speedup (Geomean)",
5050
helion_accuracy: "Helion Accuracy",
5151
};
5252
// The variable name is a bit dumb, but it tells if a higher metric value
@@ -127,6 +127,7 @@ export interface LLMsBenchmarkData {
127127
job_id: number;
128128
metric: string;
129129
actual: number;
130+
actual_geomean: number;
130131
target: number;
131132
mode?: string;
132133
dtype: string;

torchci/lib/benchmark/llms/utils/llmUtils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,23 @@ const toRowData = (
339339
l: hasL
340340
? {
341341
actual: Number.MAX_SAFE_INTEGER, // indicate the failure on left side
342+
actual_geomean: Number.MAX_SAFE_INTEGER, // indicate the failure on left side
342343
target: 0,
343344
}
344345
: {
345346
actual: 0,
347+
actual_geomean: 0,
346348
target: 0,
347349
},
348350
r: hasR
349351
? {
350352
actual: Number.MAX_SAFE_INTEGER, // indicate the failure on right side
353+
actual_geomean: Number.MAX_SAFE_INTEGER, // indicate the failure on right side
351354
target: 0,
352355
}
353356
: {
354357
actual: 0,
358+
actual_geomean: 0,
355359
target: 0,
356360
},
357361
highlight: hasL && hasR,
@@ -361,19 +365,23 @@ const toRowData = (
361365
l: hasL
362366
? {
363367
actual: record["l"].actual,
368+
actual_geomean: record["l"].actual_geomean,
364369
target: record["l"].target,
365370
}
366371
: {
367372
actual: 0,
373+
actual_geomean: 0,
368374
target: 0,
369375
},
370376
r: hasR
371377
? {
372378
actual: record["r"].actual,
379+
actual_geomean: record["r"].actual_geomean,
373380
target: record["r"].target,
374381
}
375382
: {
376383
actual: 0,
384+
actual_geomean: 0,
377385
target: 0,
378386
},
379387
highlight: hasL && hasR,

0 commit comments

Comments
 (0)