From b448b08401378351b7474c99cb6358fbc224c9d0 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Tue, 23 Jun 2026 18:37:52 -0700 Subject: [PATCH] [misc] Move bench_offline_throughput into sglang/benchmark/ with a back-compat shim (#28747) --- .../offline_throughput.py} | 0 python/sglang/test/test_utils.py | 2 +- test/manual/perf/test_bench_one_batch_1gpu.py | 2 +- test/registered/core/test_srt_engine.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename python/sglang/{bench_offline_throughput.py => benchmark/offline_throughput.py} (100%) diff --git a/python/sglang/bench_offline_throughput.py b/python/sglang/benchmark/offline_throughput.py similarity index 100% rename from python/sglang/bench_offline_throughput.py rename to python/sglang/benchmark/offline_throughput.py diff --git a/python/sglang/test/test_utils.py b/python/sglang/test/test_utils.py index d2f898364..91406f717 100644 --- a/python/sglang/test/test_utils.py +++ b/python/sglang/test/test_utils.py @@ -1616,7 +1616,7 @@ def run_bench_offline_throughput(model, other_args): command = [ "python3", "-m", - "sglang.bench_offline_throughput", + "sglang.benchmark.offline_throughput", "--num-prompts", "1", "--dataset-name", diff --git a/test/manual/perf/test_bench_one_batch_1gpu.py b/test/manual/perf/test_bench_one_batch_1gpu.py index 5a0c39383..b70818f21 100644 --- a/test/manual/perf/test_bench_one_batch_1gpu.py +++ b/test/manual/perf/test_bench_one_batch_1gpu.py @@ -31,7 +31,7 @@ class TestBenchOneBatch1GPU(CustomTestCase): command = [ "python3", "-m", - "sglang.bench_offline_throughput", + "sglang.benchmark.offline_throughput", "--num-prompts", "1", "--dataset-name", diff --git a/test/registered/core/test_srt_engine.py b/test/registered/core/test_srt_engine.py index f5c6ecfc8..c3e86e5d6 100644 --- a/test/registered/core/test_srt_engine.py +++ b/test/registered/core/test_srt_engine.py @@ -10,7 +10,7 @@ import unittest import torch import sglang as sgl -from sglang.bench_offline_throughput import BenchArgs, throughput_test +from sglang.benchmark.offline_throughput import BenchArgs, throughput_test from sglang.srt.server_args import ServerArgs from sglang.srt.utils.hf_transformers_utils import get_tokenizer from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci