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
zhaoyu6
sglang
Commits
ef21729c
"test/vscode:/vscode.git/clone" did not exist on "0ff00ef6d3fc974da77a8e7c6bbd6454cccdc414"
Unverified
Commit
ef21729c
authored
Jun 03, 2025
by
fzyzcjy
Committed by
GitHub
Jun 02, 2025
Browse files
Fix profiles do not have consistent names (#6811)
parent
f5159315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+6
-2
No files found.
python/sglang/srt/managers/scheduler.py
View file @
ef21729c
...
...
@@ -429,7 +429,7 @@ class Scheduler(
self
.
torch_profiler
=
None
self
.
torch_profiler_output_dir
:
Optional
[
str
]
=
None
self
.
profiler_activities
:
Optional
[
List
[
str
]]
=
None
self
.
profile
r
_id
:
Optional
[
str
]
=
None
self
.
profile_id
:
Optional
[
str
]
=
None
self
.
profiler_target_forward_ct
:
Optional
[
int
]
=
None
self
.
profiler_target_prefill_ct
:
Optional
[
int
]
=
None
self
.
profiler_target_decode_ct
:
Optional
[
int
]
=
None
...
...
@@ -2145,6 +2145,7 @@ class Scheduler(
recv_req
.
with_stack
,
recv_req
.
record_shapes
,
recv_req
.
profile_by_stage
,
recv_req
.
profile_id
,
)
else
:
self
.
init_profile
(
...
...
@@ -2154,6 +2155,7 @@ class Scheduler(
recv_req
.
with_stack
,
recv_req
.
record_shapes
,
recv_req
.
profile_by_stage
,
recv_req
.
profile_id
,
)
return
self
.
start_profile
(
True
)
else
:
...
...
@@ -2167,6 +2169,7 @@ class Scheduler(
with_stack
:
Optional
[
bool
],
record_shapes
:
Optional
[
bool
],
profile_by_stage
:
bool
,
profile_id
:
str
,
)
->
ProfileReqOutput
:
if
self
.
profile_in_progress
:
return
ProfileReqOutput
(
...
...
@@ -2185,6 +2188,7 @@ class Scheduler(
self
.
torch_profiler_with_stack
=
with_stack
self
.
torch_profiler_record_shapes
=
record_shapes
self
.
profiler_activities
=
activities
self
.
profile_id
=
profile_id
if
num_steps
:
self
.
profile_steps
=
num_steps
...
...
@@ -2284,7 +2288,7 @@ class Scheduler(
self
.
torch_profiler
.
export_chrome_trace
(
os
.
path
.
join
(
self
.
torch_profiler_output_dir
,
s
tr
(
time
.
time
())
s
elf
.
profile_id
+
f
"-TP-
{
self
.
tp_rank
}
"
+
stage_suffix
+
".trace.json.gz"
,
...
...
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