arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.19261cs.CV
收藏

dit.xpu:在移动系统级芯片(SoC)上优化扩散Transformer(DiT)的稀疏推理

dit.xpu : Taming DiT Sparse Inference on Mobile SoCs

Peking University(北京大学);Beijing Institute of Technology(北京理工大学)

Jiayu Chen, Jinye Hu, Maoliang Li, Anqian Cen, Hailong Zou, Zihao Zheng, Xinming Wei, Guojie Luo, Jie Zhang, Xuanzhe Liu, Xiang Chen

AI总结:

本研究针对移动SoC上DiT稀疏推理的适配问题,提出dit.xpu框架,通过块对齐稀疏注意力等技术实现加速,在骁龙手机上获最高1.56倍端到端去噪加速,同时保持生成质量。

摘要:

扩散Transformer(DiT)支持端侧图像生成与编辑,但在高分辨率下会产生高昂的注意力计算成本。现有稀疏注意力虽能降低计算量,但其动态稀疏性会引入预处理步骤与不规则数据访问,难以适配移动神经网络处理器(NPU)。本文提出dit.xpu——一款面向异构移动SoC的稀疏DiT推理框架。该框架结合了块对齐稀疏注意力与基于锚点的误差补偿,利用去噪步骤间缓慢变化的稠密-稀疏输出残差实现优化;异构XPU协作将NPU稠密注意力与GPU稀疏校准并行执行,同时掩码引导数据流通过将数据移动与计算重叠,减少数据传输与布局转换。在两款骁龙智能手机上的五种DiT模型测试显示,dit.xpu相比Hexagon-NPU后端实现了最高1.56倍的端到端去噪加速,相比最快替代方案实现了11.5倍的注意力内核加速,同时生成质量接近稠密注意力水平。代码可在指定链接获取。

英文摘要:

Diffusion Transformers (DiTs) enable on-device image generation and editing but incur high attention costs at high resolutions. Existing sparse attention reduces computation, yet dynamic sparsity introduces preprocessing and irregular data accesses that poorly fit mobile NPUs. We present DiT.XPU, a sparse DiT inference framework for heterogeneous mobile SoCs. DiT.XPU combines tile-aligned sparse attention with anchor-based error compensation by exploiting slowly varying dense-sparse output residuals across denoising steps. Heterogeneous XPU collaboration overlaps NPU dense attention with GPU sparse calibration, while mask-guided dataflow reduces data transfers and layout conversion by overlapping data movement with computation. Across five DiT models on two Snapdragon smartphones, DiT.XPU achieves up to 1.56x end-to-end denoising speedup over the Hexagon-NPU backend and 11.5x attention-kernel speedup over the fastest alternative, while preserving generation quality close to dense attention. Code is available at https://github.com/IF-LAB-PKU/dit.xpu.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑