Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
fd7a72d6
"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "1140ecf237c8287a315fd293e0a1bb5f710e115a"
Unverified
Commit
fd7a72d6
authored
Nov 04, 2025
by
fzyzcjy
Committed by
GitHub
Nov 03, 2025
Browse files
Super tiny allow profile activities in bench_serving (#12549)
parent
21a8fa16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+12
-1
No files found.
python/sglang/bench_serving.py
View file @
fd7a72d6
...
@@ -615,7 +615,10 @@ async def async_request_profile(api_url: str) -> RequestFuncOutput:
...
@@ -615,7 +615,10 @@ async def async_request_profile(api_url: str) -> RequestFuncOutput:
async
with
_create_bench_client_session
()
as
session
:
async
with
_create_bench_client_session
()
as
session
:
output
=
RequestFuncOutput
()
output
=
RequestFuncOutput
()
try
:
try
:
async
with
session
.
post
(
url
=
api_url
)
as
response
:
body
=
{
"activities"
:
getattr
(
args
,
"profile_activities"
,
[]),
}
async
with
session
.
post
(
url
=
api_url
,
json
=
body
)
as
response
:
if
response
.
status
==
200
:
if
response
.
status
==
200
:
output
.
success
=
True
output
.
success
=
True
else
:
else
:
...
@@ -2527,6 +2530,14 @@ if __name__ == "__main__":
...
@@ -2527,6 +2530,14 @@ if __name__ == "__main__":
help
=
"Use Torch Profiler. The endpoint must be launched with "
help
=
"Use Torch Profiler. The endpoint must be launched with "
"SGLANG_TORCH_PROFILER_DIR to enable profiler."
,
"SGLANG_TORCH_PROFILER_DIR to enable profiler."
,
)
)
# TODO unify all these
parser
.
add_argument
(
"--profile-activities"
,
type
=
str
,
nargs
=
"+"
,
default
=
[
"CPU"
,
"GPU"
],
choices
=
[
"CPU"
,
"GPU"
,
"CUDA_PROFILER"
],
)
parser
.
add_argument
(
parser
.
add_argument
(
"--lora-name"
,
"--lora-name"
,
type
=
str
,
type
=
str
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment