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
12047f5e
Unverified
Commit
12047f5e
authored
Apr 01, 2025
by
Zhiqiang Xie
Committed by
GitHub
Apr 01, 2025
Browse files
Prevent memory leak of retract_decode when page_size > 1 (#4977)
parent
fda6bb78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
python/sglang/srt/managers/schedule_batch.py
python/sglang/srt/managers/schedule_batch.py
+2
-4
No files found.
python/sglang/srt/managers/schedule_batch.py
View file @
12047f5e
...
...
@@ -1220,10 +1220,8 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
else
:
# TODO: apply more fine-grained retraction
last_uncached_pos
=
(
(
len
(
req
.
prefix_indices
)
+
server_args
.
page_size
-
1
)
//
server_args
.
page_size
*
server_args
.
page_size
)
len
(
req
.
prefix_indices
)
//
server_args
.
page_size
)
*
server_args
.
page_size
token_indices
=
self
.
req_to_token_pool
.
req_to_token
[
req
.
req_pool_idx
,
last_uncached_pos
:
seq_lens_cpu
[
idx
]
]
...
...
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