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
899453ac
Unverified
Commit
899453ac
authored
Oct 28, 2025
by
jianan-gu
Committed by
GitHub
Oct 27, 2025
Browse files
Use explicit uint64 dtype for Tensor data_ptr() to avoid overflow (#11994)
parent
ce832d70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
python/sglang/srt/mem_cache/common.py
python/sglang/srt/mem_cache/common.py
+1
-0
No files found.
python/sglang/srt/mem_cache/common.py
View file @
899453ac
...
@@ -89,6 +89,7 @@ def write_cache_indices(
...
@@ -89,6 +89,7 @@ def write_cache_indices(
prefix_pointers
=
torch
.
tensor
(
prefix_pointers
=
torch
.
tensor
(
[
t
.
data_ptr
()
for
t
in
prefix_tensors
],
[
t
.
data_ptr
()
for
t
in
prefix_tensors
],
device
=
req_to_token_pool
.
device
,
device
=
req_to_token_pool
.
device
,
dtype
=
torch
.
uint64
,
)
)
# TODO: some tensors can be reused for ForwardBatchInfo (e.g., extend_lens, cumsum_start)
# TODO: some tensors can be reused for ForwardBatchInfo (e.g., extend_lens, cumsum_start)
write_req_to_token_pool_triton
[(
req_pool_indices_tensor
.
shape
[
0
],)](
write_req_to_token_pool_triton
[(
req_pool_indices_tensor
.
shape
[
0
],)](
...
...
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