4867d4f780d021ad51880e1ef0c48041264913c8
Hardware diagnostics revealed three fatal issues:
1. V1 CRASH: paged_attn.py passes num_kv_heads=4 (int) but ixformer's
vllm_single_query_cached_kv_attention requires head_mapping as Tensor:
torch.repeat_interleave(arange(4), 6) = [0,0,0,0,0,0,1,...,3,3,3,3,3,3]
RuntimeError: Expected Tensor for argument '_4' but found int.
FIX: Convert int→Tensor in _custom_ops.py paged_attention_v1().
2. V2 NATIVE KERNEL EXISTS but was never called:
ixformer has vllm_single_query_cached_kv_attention_v2() — a compiled,
EX-engine-optimized V2 kernel. _custom_ops.py had raise NotImplementedError().
Our Python V2 (paged_attention_v2_pytorch.py) was a workaround for
something that already existed in the runtime.
FIX: Replace NotImplementedError with ixf_F call. V2 signature:
(output, partition, exp_sums, max_logits, temp_output, query,
key_cache, value_cache, head_mapping, scale, block_tables,
context_lens, block_size, max_context_len, alibi_slopes)
Note 'partition' (int) = max_num_partitions, between output and exp_sums.
3. Triton path: installed at /usr/local/lib/python3.10/ but vllm looks in
/usr/local/corex/lib64/python3/. Symlink + sys.path fix.
Impact: This replaces ALL Python attention fallbacks with native kernels.
V1: EX-engine compiled kernel for seq ≤ 8192 (was crashing)
V2: EX-engine compiled kernel for seq > 8192 (was Python fallback)
Combined: expect 10-100x speedup on decode path.
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%