Fix torch profiler bugs for bench_offline_throughput.py (#6557)

This commit is contained in:
Yueyang Pan
2025-06-09 20:33:41 +08:00
committed by GitHub
parent 451ffe74d9
commit 98c00a2df1
5 changed files with 49 additions and 5 deletions

View File

@@ -116,6 +116,7 @@ from sglang.srt.sampling.sampling_params import SamplingParams
from sglang.srt.server_args import PortArgs, ServerArgs
from sglang.srt.utils import (
dataclass_to_string_truncated,
get_bool_env_var,
get_zmq_socket,
kill_process_tree,
)
@@ -805,6 +806,8 @@ class TokenizerManager:
profile_by_stage: bool = False,
):
self.auto_create_handle_loop()
env_with_stack: bool = get_bool_env_var("SGLANG_PROFILE_WITH_STACK", "true")
with_stack = False if with_stack is False or env_with_stack is False else True
req = ProfileReq(
type=ProfileReqType.START_PROFILE,
output_dir=output_dir,