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
4fea040c
Unverified
Commit
4fea040c
authored
Mar 13, 2025
by
Lianmin Zheng
Committed by
GitHub
Mar 13, 2025
Browse files
Fix a regression introduced by overlapping KV cache writing (#4375)
parent
6aaeb848
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/mem_cache/memory_pool.py
python/sglang/srt/mem_cache/memory_pool.py
+1
-1
No files found.
python/sglang/srt/mem_cache/memory_pool.py
View file @
4fea040c
...
@@ -326,7 +326,7 @@ class MHATokenToKVPool(KVCache):
...
@@ -326,7 +326,7 @@ class MHATokenToKVPool(KVCache):
cache_k
=
cache_k
.
view
(
self
.
store_dtype
)
cache_k
=
cache_k
.
view
(
self
.
store_dtype
)
cache_v
=
cache_v
.
view
(
self
.
store_dtype
)
cache_v
=
cache_v
.
view
(
self
.
store_dtype
)
if
self
.
capture_mode
:
if
self
.
capture_mode
and
cache_k
.
shape
[
0
]
<
4
:
self
.
alt_stream
.
wait_stream
(
torch
.
cuda
.
current_stream
())
self
.
alt_stream
.
wait_stream
(
torch
.
cuda
.
current_stream
())
with
torch
.
cuda
.
stream
(
self
.
alt_stream
):
with
torch
.
cuda
.
stream
(
self
.
alt_stream
):
self
.
k_buffer
[
layer_id
][
loc
]
=
cache_k
self
.
k_buffer
[
layer_id
][
loc
]
=
cache_k
...
...
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