flashinfer.attention.prims_ts.batch_prefill

flashinfer.attention.prims_ts.batch_prefill(q: Tensor, k: Tensor, v: Tensor, *, qo_indptr: Tensor | None = None, kv_indptr: Tensor | None = None, mask_type: Literal['dense', 'causal'] = 'dense', window_left: int = -1, sm_scale: float | None = None, output_scale: float = 1.0, out_dtype: dtype | None = None, out: Tensor | None = None) Tensor

Run one-shot fixed or packed-ragged task-scheduled context attention.

Fixed tensors use [B, S, H, D] storage. Providing both cumulative int32 offset tensors selects packed [total_tokens, H, D] storage. D may be 128 or 256. Causal masking is bottom-right aligned. window_left=-1 disables the left window; a positive value selects the private head-paired GQA policy and retains at most window_left + 1 keys at each causal row, including when S_q < S_kv.