Skip to content
Closed
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
6 changes: 5 additions & 1 deletion tests/v1/attention/test_attention_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ def mock_get_per_layer_parameters(vllm_config, layer_names, impl_cls):
# in the calling test function.
if not try_backend_includes_kv_cache_update(actual_backend):
impl.do_kv_cache_update(
mock_layer, key, value, kv_cache, attn_metadata.slot_mapping
mock_layer,
key,
value,
kv_cache,
common_attn_metadata.slot_mapping,
)
output = impl.forward(
mock_layer, query, key, value, kv_cache, attn_metadata, output=output
Expand Down
4 changes: 0 additions & 4 deletions vllm/v1/attention/backends/flashinfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@ class FlashInferMetadata:
num_actual_tokens: int
"""Total number of tokens in the batch (excluding padding)."""

slot_mapping: torch.Tensor
"""Tensor for writing K/V to the cache. Shape: [num_actual_tokens]"""

q_data_type: torch.dtype

num_decodes: int
Expand Down Expand Up @@ -951,7 +948,6 @@ def build(
# case by case depending on the batch contents and backend selection.
attn_metadata = FlashInferMetadata(
num_actual_tokens=num_actual_tokens,
slot_mapping=common_attn_metadata.slot_mapping,
q_data_type=self.q_data_type,
num_decodes=num_decodes,
num_decode_tokens=num_decode_tokens,
Expand Down
3 changes: 0 additions & 3 deletions vllm/v1/attention/backends/flex_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ class FlexAttentionMetadata:
max_seq_len: int
seq_lens: torch.Tensor
block_table: torch.Tensor
slot_mapping: torch.Tensor

use_cascade: bool
common_prefix_len: int
Expand Down Expand Up @@ -804,7 +803,6 @@ def build(
query_start_loc = common_attn_metadata.query_start_loc
seq_lens = common_attn_metadata.seq_lens
block_table_tensor = common_attn_metadata.block_table_tensor
slot_mapping = common_attn_metadata.slot_mapping
num_blocks_per_seq = cdiv(seq_lens, self.block_size)

use_cascade = common_prefix_len > 0
Expand Down Expand Up @@ -869,7 +867,6 @@ def build(
max_seq_len=max_seq_len,
seq_lens=seq_lens,
block_table=block_table_tensor,
slot_mapping=slot_mapping,
use_cascade=use_cascade,
common_prefix_len=common_prefix_len,
cu_prefix_query_lens=cu_prefix_query_lens,
Expand Down
3 changes: 0 additions & 3 deletions vllm/v1/attention/backends/rocm_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class RocmAttentionMetadata:
max_seq_len: int
seq_lens: torch.Tensor
block_table: torch.Tensor
slot_mapping: torch.Tensor

# For cascade attention.
use_cascade: bool
Expand Down Expand Up @@ -123,7 +122,6 @@ def build(
query_start_loc = common_attn_metadata.query_start_loc
seq_lens = common_attn_metadata.seq_lens
block_table_tensor = common_attn_metadata.block_table_tensor
slot_mapping = common_attn_metadata.slot_mapping

use_cascade = common_prefix_len > 0

Expand All @@ -149,7 +147,6 @@ def build(
max_seq_len=max_seq_len,
seq_lens=seq_lens,
block_table=block_table_tensor,
slot_mapping=slot_mapping,
use_cascade=use_cascade,
common_prefix_len=common_prefix_len,
cu_prefix_query_lens=cu_prefix_query_lens,
Expand Down
3 changes: 0 additions & 3 deletions vllm/v1/attention/backends/triton_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class TritonAttentionMetadata:
max_seq_len: int
seq_lens: torch.Tensor
block_table: torch.Tensor
slot_mapping: torch.Tensor

seq_threshold_3D: int
num_par_softmax_segments: int
Expand Down Expand Up @@ -221,7 +220,6 @@ def build(
query_start_loc = common_attn_metadata.query_start_loc
seq_lens = common_attn_metadata.seq_lens
block_table_tensor = common_attn_metadata.block_table_tensor
slot_mapping = common_attn_metadata.slot_mapping

use_cascade = common_prefix_len > 0

Expand All @@ -247,7 +245,6 @@ def build(
max_seq_len=max_seq_len,
seq_lens=seq_lens,
block_table=block_table_tensor,
slot_mapping=slot_mapping,
use_cascade=use_cascade,
common_prefix_len=common_prefix_len,
cu_prefix_query_lens=cu_prefix_query_lens,
Expand Down
Loading