ViTCoD: Vision Transformer Acceleration via Dedicated Algorithm and Accelerator Co-Design

计算机科学 计算 变压器 瓶颈 限制 计算机工程 硬件加速 编码器 算法 计算机硬件 现场可编程门阵列 人工智能 嵌入式系统 电气工程 机械工程 工程类 电压 操作系统
作者
Haoran You,Zhanyi Sun,Huihong Shi,Zhongzhi Yu,Yang Zhao,Yongan Zhang,Chaojian Li,Baopu Li,Yingyan Celine Lin
标识
DOI:10.1109/hpca56546.2023.10071027
摘要

Vision Transformers (ViTs) have achieved state-of-the-art performance on various vision tasks. However, ViTs’ self-attention module is still arguably a major bottleneck, limiting their achievable hardware efficiency and more extensive applications to resource constrained platforms. Meanwhile, existing accelerators dedicated to NLP Transformers are not optimal for ViTs. This is because there is a large difference between ViTs and Transformers for natural language processing (NLP) tasks: ViTs have a relatively fixed number of input tokens, whose attention maps can be pruned by up to 90% even with fixed sparse patterns, without severely hurting the model accuracy (e.g., <=1.5% under 90% pruning ratio); while NLP Transformers need to handle input sequences of varying numbers of tokens and rely on on-the-fly predictions of dynamic sparse attention patterns for each input to achieve a decent sparsity (e.g., >=50%). To this end, we propose a dedicated algorithm and accelerator co-design framework dubbed ViTCoD for accelerating ViTs. Specifically, on the algorithm level, ViTCoD prunes and polarizes the attention maps to have either denser or sparser fixed patterns for regularizing two levels of workloads without hurting the accuracy, largely reducing the attention computations while leaving room for alleviating the remaining dominant data movements; on top of that, we further integrate a lightweight and learnable auto-encoder module to enable trading the dominant high-cost data movements for lower-cost computations. On the hardware level, we develop a dedicated accelerator to simultaneously coordinate the aforementioned enforced denser and sparser workloads for boosted hardware utilization, while integrating on-chip encoder and decoder engines to leverage ViTCoD’s algorithm pipeline for much reduced data movements. Extensive experiments and ablation studies validate that ViTCoD largely reduces the dominant data movement costs, achieving speedups of up to 235.3×, 142.9×, 86.0×, 10.1×, and 6.8× over general computing platforms CPUs, EdgeGPUs, GPUs, and prior-art Transformer accelerators SpAtten and Sanger under an attention sparsity of 90%, respectively. Our code implementation is available at https://github.com/GATECH-EIC/ViTCoD.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
2秒前
2秒前
小二郎的应助被现代的问丝采纳,获得10
2秒前
2秒前
Chloe完成签到,获得积分10
2秒前
任朝暮发布了新的文献求助10
2秒前
3秒前
拼搏飞荷完成签到,获得积分10
4秒前
5秒前
李雨完成签到,获得积分10
5秒前
5秒前
5秒前
super发布了新的文献求助20
6秒前
多买一只表完成签到 ,获得积分10
6秒前
Henry发布了新的文献求助30
6秒前
吃葡萄不吐葡萄皮的应助被BPX采纳,获得10
7秒前
清晨五点的沙滩完成签到,获得积分10
7秒前
7秒前
wwq发布了新的文献求助10
7秒前
Www发布了新的文献求助10
8秒前
8秒前
8秒前
彭佳乐发布了新的文献求助10
9秒前
10秒前
风格化橙发布了新的文献求助10
10秒前
科研通AI6.4的应助被酷酷的ff采纳,获得10
11秒前
Ava的应助被酷酷的ff采纳,获得10
11秒前
jianji发布了新的文献求助10
11秒前
Kristen发布了新的文献求助10
13秒前
13秒前
mmmmmm发布了新的文献求助10
13秒前
15秒前
xx发布了新的文献求助10
16秒前
小马甲的应助被jeff采纳,获得10
17秒前
打打的应助被图南采纳,获得30
17秒前
苗浩阳完成签到,获得积分10
18秒前
迅速灯泡完成签到,获得积分10
19秒前
啤啤完成签到,获得积分10
19秒前
jiaohengyuan发布了新的文献求助10
19秒前
XiaoJia发布了新的文献求助10
19秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Spec 401: Standards for Jet Fuel Facility and Equipment Commissioning and Flushing at Airports, 2026.1 (Original Issue) 1000
Spec 103: Standard for Jet Fuel Quality Control at Airports, Revision 2026.1 1000
Chinese Traditional Wisdom and Contemporary Education Values 600
AI Disclosure in Annual Reports: Evolution, Determinants, and Capital Market Participants’ Perceptions 500
5th World Conference on Detergents: Reinventing the Industry : Opportunities and Challenges 500
Erzählte Gnade 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8105694
求助须知:如何正确求助?哪些是违规求助? 9514811
关于积分的说明 21493582
捐赠科研通 7682202
什么是DOI,文献DOI怎么找? 3409786
关于科研通互助平台的介绍 2537426
邀请新用户注册赠送积分活动 2449728