mstar.engine.resources.attn.xpu#
Paged attention through vllm-xpu-kernels.
Classes
|
Paged KV attention backed by |
|
- class mstar.engine.resources.attn.xpu.XPUPagedAttentionManager(kv_cache, device, kv_config)[source]#
Bases:
AttentionManagerPaged KV attention backed by
vllm-xpu-kernelsFlashAttention.- build_accelerator_graph_buffers(slots, max_bs, max_seq_len)[source]#
Size whatever the captured replays will read.
Called once per runner that captures against this node — the whole forward’s, and one per piecewise region — so it must tolerate repeated calls: grow to the largest shape asked for, never clobber what an earlier call already sized.
- Parameters:
slots (list[CGSlotSpec])
max_bs (int)
max_seq_len (int)
- Return type:
None
- plan(step, ctx)[source]#
ret is immutable and opaque to runner; only gives to ctx.plan_results
- Parameters:
step (AttentionStep)
ctx (StepContext)
- qo_indptr_buf(label='main')[source]#
Return this eager step’s query indptr.
Unlike CUDA-graph FlashInfer buffers, this tensor is newly allocated by every plan and therefore has no address-stability guarantee.
- property supports_preplan#
- class mstar.engine.resources.attn.xpu.XPUPagedPlan(block_table: torch.Tensor, cu_q: torch.Tensor, host_kv_lens: torch.Tensor, max_q: int, max_k: int, causal: bool)[source]#
Bases:
object- Parameters: