[PD]feat(bench): add --fake-prefill flag for decode-only stress testing (#22973)
This commit is contained in:
@@ -44,6 +44,7 @@ from sglang.benchmark.utils import (
|
||||
remove_prefix,
|
||||
set_ulimit,
|
||||
)
|
||||
from sglang.srt.disaggregation.utils import FAKE_BOOTSTRAP_HOST
|
||||
from sglang.srt.utils.network import NetworkAddress
|
||||
|
||||
_ROUTING_KEY_HEADER = "X-SMG-Routing-Key"
|
||||
@@ -1709,6 +1710,11 @@ def run_benchmark(args_: argparse.Namespace):
|
||||
if args.extra_request_body:
|
||||
extra_request_body = json.loads(args.extra_request_body)
|
||||
|
||||
# Inject bootstrap fields for fake decode benchmarking
|
||||
if getattr(args, "fake_prefill", False):
|
||||
extra_request_body["bootstrap_host"] = FAKE_BOOTSTRAP_HOST
|
||||
extra_request_body["bootstrap_room"] = 0
|
||||
|
||||
if args.tokenize_prompt:
|
||||
assert (
|
||||
args.backend == "sglang"
|
||||
@@ -2339,6 +2345,14 @@ if __name__ == "__main__":
|
||||
],
|
||||
help="Underlying workload for the mooncake dataset.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--fake-prefill",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Enable fake prefill mode for decode-only benchmarking. "
|
||||
"Use with a decode server running --disaggregation-transfer-backend fake "
|
||||
"to benchmark pure decode performance without a real prefill node.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--tag", type=str, default=None, help="The tag to be dumped to output."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user