muh-pipeline b6538fd10e [BASE] vllm/attention/ops/paged_attn.py: fix num_kv_heads type annotation
Discovered by tracing call chain after reading CCCL catch2_test_block_reduce.cu
(randomly selected). The test covers multi-dim block configs (BlockDimX/Y/Z)
which maps to GQA group dimensions in attention.

Call chain trace:
  xformers.py:__init__() builds self.head_mapping = tensor [num_heads]
  xformers.py:forward() → PagedAttention.forward_decode(head_mapping=tensor)
  paged_attn.py:forward_decode(num_kv_heads: int) ← WRONG TYPE ANNOTATION
  _custom_ops.py:paged_attention_v1(head_mapping=tensor) ← expects tensor

The parameter is head_mapping tensor for V1 (ixformer precompiled),
but int num_kv_heads for V2 (our PyTorch implementation).
Fixed annotation to remove misleading int type hint.

CCCL source read: cub/test/catch2_test_block_reduce.cu (252 lines, full)
Base file modified: vllm/attention/ops/paged_attn.py
2026-08-06 02:28:12 +00:00
2026-07-30 17:03:23 +08:00

project_6

Description
No description provided
Readme 427 MiB
Languages
C++ 41.8%
Cuda 31.6%
Python 22.2%
C 2.1%
CMake 1.1%
Other 1.1%