Skip to content

Commit 6c46356

Browse files
committed
[Helion Benchmark] Refactor Helion Benchmark to a constant
stack-info: PR: #7129, branch: oulgen/stack/8
1 parent 4639245 commit 6c46356

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

torchci/components/benchmark/llms/LLMsBenchmarkPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
DEFAULT_DTYPE_NAME,
2222
DEFAULT_MODE_NAME,
2323
DEFAULT_MODEL_NAME,
24+
HELION_BENCHMARK_NAME,
2425
REPO_TO_BENCHMARKS,
2526
} from "lib/benchmark/llms/common";
2627
import { LLMsBenchmarkProps } from "lib/benchmark/llms/types/dashboardProps";
@@ -194,7 +195,7 @@ const MainPage = ({
194195
const metricNames = getMetricNames(data);
195196
// Default to latest for Helion Benchmark, otherwise default to oldest commit
196197
const lcommitFallbackIdx =
197-
props.benchmarkName === "Helion Benchmark" ? 0 : -1;
198+
props.benchmarkName === HELION_BENCHMARK_NAME ? 0 : -1;
198199
return (
199200
<div>
200201
<Stack direction="row" spacing={2} sx={{ mb: 2 }}>

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Granularity } from "components/metrics/panels/TimeSeriesPanel";
66
import dayjs from "dayjs";
77
import {
88
BranchAndCommitPerfData,
9+
HELION_BENCHMARK_NAME,
910
IS_INCREASING_METRIC_VALUE_GOOD,
1011
METRIC_DISPLAY_HEADERS,
1112
RELATIVE_THRESHOLD,
@@ -315,12 +316,12 @@ export default function LLMsSummaryPanel({
315316
const l = v.l.actual;
316317
const r = v.r.actual;
317318

318-
if (!v.highlight && benchmarkName !== "Helion Benchmark") {
319+
if (!v.highlight && benchmarkName !== HELION_BENCHMARK_NAME) {
319320
return "";
320321
}
321322

322323
if (lCommit === rCommit) {
323-
if (benchmarkName === "Helion Benchmark") {
324+
if (benchmarkName === HELION_BENCHMARK_NAME) {
324325
// Highlight the fastest speedup
325326
if (metric.endsWith("_speedup")) {
326327
let maxKey: string | null = null;
@@ -394,10 +395,7 @@ export default function LLMsSummaryPanel({
394395
let lUnit = unit;
395396
let rUnit = unit;
396397

397-
if (
398-
repoName === "pytorch/helion" &&
399-
benchmarkName === "Helion Benchmark"
400-
) {
398+
if (benchmarkName === HELION_BENCHMARK_NAME) {
401399
if (metric.includes("accuracy")) {
402400
l = l === 1 ? "Pass" : "Fail";
403401
r = r === 1 ? "Pass" : "Fail";

torchci/lib/benchmark/llms/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const REPO_TO_BENCHMARKS: { [k: string]: string[] } = {
88
"vllm-project/vllm": ["vLLM benchmark"],
99
"sgl-project/sglang": ["SGLang benchmark"],
1010
};
11+
export const HELION_BENCHMARK_NAME = "Helion Benchmark";
1112
export const EXCLUDED_METRICS: string[] = [
1213
"load_status",
1314
"mean_itl_ms",

0 commit comments

Comments
 (0)