Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/sglang/srt/layers/attention/aiter_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@ def forward_extend(
self.use_triton_unified_attention
and self.use_sliding_window_kv_pool
):

token_to_kv_pool = forward_batch.token_to_kv_pool
k_cache, v_cache = forward_batch.token_to_kv_pool.get_kv_buffer(
layer.layer_id
Expand All @@ -2036,7 +2037,6 @@ def forward_extend(
k_scale=k_descale,
v_scale=v_descale,
)

elif self.use_mla:
forward_batch.token_to_kv_pool.set_kv_buffer(layer, cache_loc, k, v)
else:
Expand Down Expand Up @@ -2419,6 +2419,7 @@ def forward_decode(
# use standard set_kv_buffer, as they lack SWA-specific attributes
# like full_to_swa_index_mapping.
if self.use_triton_unified_attention and self.use_sliding_window_kv_pool:

token_to_kv_pool = forward_batch.token_to_kv_pool
k_cache, v_cache = forward_batch.token_to_kv_pool.get_kv_buffer(
layer.layer_id
Expand Down
Loading
Loading