Tessera:将逻辑掩码与GPU执行解耦的动态块稀疏注意力运行时
Decoupling Logical Masks from GPU Execution for Dynamic Block-Sparse Attention
Tessera 是面向视频扩散Transformer动态块稀疏注意力的运行时,通过两层物理执行计划将逻辑掩码与GPU执行解耦。其物理映射层把逻辑块保留、合并或细分为适配不同掩码形状与GPU架构的物理瓦片,任务组织层在GPU任务内分组调度瓦片以复用数据并重叠数据搬运与计算。
arXiv:2609.25869v2 Announce Type: replace Abstract: Attention computation makes inference expensive in video diffusion transformers (vDiTs), which generate videos through iterative denoising. Block-sparse attention (BSA) reduces this cost by computing only blocks selected by a logical mask, which specifies the attention interactions to compute. Existing BSA runtimes either fix one physical execution plan per block geometry, which limits adaptation to varying masks and graphics processing units (GPUs), or plan each mask at runtime, which adds preparation overhead to every request. Because masks change across requests, this per-mask planning must be repeated, so its cost can outweigh the execution-time savings. We present Tessera, a runtime for dynamic BSA that decouples logical masks from GPU execution through two-layer physical execution plans that preserve the specified attention interactions. First, its physical mapping layer retains, combines, or subdivides logical blocks into physical tiles suited to different mask shapes and GPU architectures. Second, its task organization layer groups and schedules tiles within GPU tasks to reuse data, expose parallelism, and overlap data movement with computation. Third, its plan selector chooses a plan for each request with low overhead, through either a plan table built from offline profiling or a calibrated cost model, which extends selection to masks outside the profiled distribution and to a new GPU with about 100 calibration requests. Implemented with specialized CUDA kernels for four NVIDIA GPU generations and evaluated on 2,312 real attention masks and two video diffusion models, Tessera achieves up to $2.88\times$ BSA request speedup over baseline systems in these models and speeds up their 50-step loop by $1.21$--$1.24\times$.
来源:arXiv (Robotics + Hardware + Signal) · arxiv.org