Skip to content

vllm.v1.attention.backends.mla.prefill.cpu_sdpa

CPU MLA prefill backend implemented with dense per-request attention.

This backend is selected on CPU devices, where flash-attn is unavailable. It computes MLA prefill attention by slicing the ragged (varlen) q/k/v tensors per request and evaluating dense attention in PyTorch.

Classes:

CPUSDPAMLAPrefillBackend

Bases: MLAPrefillBackend

MLA prefill backend for CPU using dense PyTorch attention.

flash-attn is not installable on CPU, so this backend provides an equivalent prefill implementation using per-request dense attention.