Skip to content

Commit 68170b1

Browse files
authored
Add inductor graph partition mode to vLLM benchmark (#166)
Generate benchmark variants with compilation config {"cudagraph_mode": "PIECEWISE", "use_inductor_graph_partition": true} via the new --include-inductor-graph-partition flag. This will be used to populate another set of data on the dashboard. The current speedup on the dashboard is for default vLLM compile over Eager. And the new data can be thought as "advanced vLLM compile" over Eager.
1 parent c269cf9 commit 68170b1

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/scripts/setup_vllm_benchmark.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
# dashboard baseline.
3333
EAGER_COMPILATION_CONFIG = {"backend": "eager"}
3434

35+
# Piecewise cudagraph mode with inductor graph partition enabled
36+
INDUCTOR_GRAPH_PARTITION_COMPILATION_CONFIG = {
37+
"cudagraph_mode": "PIECEWISE",
38+
"use_inductor_graph_partition": True,
39+
}
40+
3541

3642
def apply_compilation_config(
3743
config: Dict[str, Any],
@@ -115,6 +121,12 @@ def parse_args() -> Any:
115121
default=False,
116122
help="also generate eager mode variants of all benchmarks",
117123
)
124+
parser.add_argument(
125+
"--include-inductor-graph-partition",
126+
action="store_true",
127+
default=False,
128+
help="also generate inductor graph partition variants of all benchmarks",
129+
)
118130
parser.add_argument(
119131
"--compilation-config",
120132
type=str,
@@ -132,6 +144,7 @@ def setup_benchmark_configs(
132144
device: str,
133145
compilation_config: Optional[Dict[str, Any]] = None,
134146
include_eager_mode: bool = False,
147+
include_inductor_graph_partition: bool = False,
135148
) -> None:
136149
"""
137150
Setup the benchmark configs to run on this runner.
@@ -169,6 +182,11 @@ def setup_benchmark_configs(
169182
config, EAGER_COMPILATION_CONFIG, "_eager"
170183
)
171184
benchmark_configs.append(eager_config)
185+
if include_inductor_graph_partition:
186+
inductor_graph_partition_config = apply_compilation_config(
187+
config, INDUCTOR_GRAPH_PARTITION_COMPILATION_CONFIG, "_inductor_graph_partition"
188+
)
189+
benchmark_configs.append(inductor_graph_partition_config)
172190

173191
if benchmark_configs:
174192
with open(os.path.join(to_benchmark_configs_dir, filename), "w") as f:
@@ -187,6 +205,7 @@ def main() -> None:
187205
args.device,
188206
compilation_config,
189207
args.include_eager_mode,
208+
args.include_inductor_graph_partition,
190209
)
191210

192211

.github/workflows/vllm-benchmark.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ jobs:
287287
--to-benchmark-configs-dir vllm-benchmarks/vllm/.buildkite/performance-benchmarks/tests \
288288
--models "${MODELS}" \
289289
--device "${DEVICE_NAME}" \
290-
--include-eager-mode
290+
--include-eager-mode \
291+
--include-inductor-graph-partition
291292
292293
pushd vllm-benchmarks/vllm
293294
ls -lah .buildkite/performance-benchmarks/tests

0 commit comments

Comments
 (0)