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
31653dd9
Commit
31653dd9
authored
Nov 21, 2025
by
lizhigong
Browse files
Merge branch 'v0.5.4_dev_niuhb' into 'v0.5.4_dev'
add pin_memory See merge request OpenDAS/sglang!35
parents
875344ee
06b29699
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/sglang/srt/model_executor/forward_batch_info.py
python/sglang/srt/model_executor/forward_batch_info.py
+3
-3
No files found.
python/sglang/srt/model_executor/forward_batch_info.py
View file @
31653dd9
...
...
@@ -369,7 +369,7 @@ class ForwardBatch:
if
batch
.
extend_input_logprob_token_ids
is
not
None
:
ret
.
extend_input_logprob_token_ids_gpu
=
(
batch
.
extend_input_logprob_token_ids
.
to
(
device
,
non_blocking
=
True
)
batch
.
extend_input_logprob_token_ids
.
pin_memory
().
to
(
device
,
non_blocking
=
True
)
)
if
enable_num_token_non_padded
(
model_runner
.
server_args
):
...
...
@@ -425,10 +425,10 @@ class ForwardBatch:
assert
isinstance
(
batch
.
extend_prefix_lens
,
list
)
ret
.
extend_seq_lens
=
torch
.
tensor
(
batch
.
extend_seq_lens
,
dtype
=
torch
.
int32
).
to
(
device
,
non_blocking
=
True
)
).
pin_memory
(
).
to
(
device
,
non_blocking
=
True
)
ret
.
extend_prefix_lens
=
torch
.
tensor
(
batch
.
extend_prefix_lens
,
dtype
=
torch
.
int32
).
to
(
device
,
non_blocking
=
True
)
).
pin_memory
(
).
to
(
device
,
non_blocking
=
True
)
ret
.
extend_num_tokens
=
batch
.
extend_num_tokens
positions
,
ret
.
extend_start_loc
=
compute_position
(
model_runner
.
server_args
.
attention_backend
,
...
...
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