跳到正文
arXiv (AI + Vision + Imaging)· Kwun Fung Lau, Frost Mitchell, Kanya Mo, Emani Ashok·· 1 天前AI 评分36

TACPU:面向CPU长上下文预填充注意力的分级缓存分块与内核内任务调度

Tiered Cache Blocking and In-Kernel Task Dispatch for Long-Context Prefill Attention on CPU

AI 导读

TACPU是一种面向因果全序列预填充的高性能注意力内核,采用分级缓存分块与内核内任务调度机制,相比PyTorch SDPA、FlexAttention和SGLang注意力内核最高提速2.01倍。集成到SGLang后,Llama-3.1-8B的首Token时延(TTFT)最高降低1.74倍,同时保持模型精度。

正文 · 原文

arXiv:2610.38809v3 Announce Type: replace Abstract: Agentic AI drives significant productivity gains across diverse domains, but concurrent long-context prefills from multiple agents can saturate GPU compute resources. Although CPUs offer a viable alternative, existing CPU attention kernels fall short in adapting to multi-tier cache hierarchies and lack effective thread scheduling. To address this, we introduce TACPU, a high-performance attention kernel featuring tiered cache blocking and an in-kernel task dispatching mechanism designed for causal full-sequence prefilling. TACPU achieves up to a 2.01x speedup over PyTorch SDPA, FlexAttention, and SGLang attention kernels. Integrated into SGLang, it reduces Time to First Token (TTFT) of Llama-3.1-8B by up to 1.74x while preserving model accuracy.

来源:arXiv (AI + Vision + Imaging) · arxiv.org