Mobile Accelerator Exploiting Sparsity of Multi-Heads, Lines, and Blocks in Transformers in Computer Vision

Eunji Kwon, Haena Song, Jihye Park, Seokhyeong Kang
{"title":"Mobile Accelerator Exploiting Sparsity of Multi-Heads, Lines, and Blocks in Transformers in Computer Vision","authors":"Eunji Kwon, Haena Song, Jihye Park, Seokhyeong Kang","doi":"10.23919/DATE56975.2023.10137099","DOIUrl":null,"url":null,"abstract":"It is difficult to employ transformer models for computer vision in mobile devices due to their memory- and computation-intensive properties. Accordingly, there is ongoing research on various methods for compressing transformer models, such as pruning. However, general computing platforms such as central processing units (CPUs) and graphics processing units (GPUs) are not energy-efficient to accelerate the pruned model due to their structured sparsity. This paper proposes a low-power accelerator for transformers with various sizes of structured sparsity induced by pruning with different granularity. In this study, we can accelerate a transformer that has been pruned in a head-wise, line-wise, or block-wise manner. We developed a head scheduling algorithm to support head-wise skip operations and resolve the processing engine (PE) load imbalance problem caused by different number of operations in one head. Moreover, we implemented a sparse general matrix-to-matrix multiplication (sparse GEMM) module that supports line-wise and block-wise skipping. As a result, when compared with a mobile GPU and mobile CPU respectively, our proposed accelerator achieved $6.1\\times$ and $13.6\\times$ improvements in energy efficiency for the detection transformer (DETR) model and achieved approximately $2.6\\times$ and $7.9\\times$ improvements in the energy efficiency on average for the vision transformer (ViT) models.","PeriodicalId":340349,"journal":{"name":"2023 Design, Automation & Test in Europe Conference & Exhibition (DATE)","volume":"806 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 Design, Automation & Test in Europe Conference & Exhibition (DATE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.23919/DATE56975.2023.10137099","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

It is difficult to employ transformer models for computer vision in mobile devices due to their memory- and computation-intensive properties. Accordingly, there is ongoing research on various methods for compressing transformer models, such as pruning. However, general computing platforms such as central processing units (CPUs) and graphics processing units (GPUs) are not energy-efficient to accelerate the pruned model due to their structured sparsity. This paper proposes a low-power accelerator for transformers with various sizes of structured sparsity induced by pruning with different granularity. In this study, we can accelerate a transformer that has been pruned in a head-wise, line-wise, or block-wise manner. We developed a head scheduling algorithm to support head-wise skip operations and resolve the processing engine (PE) load imbalance problem caused by different number of operations in one head. Moreover, we implemented a sparse general matrix-to-matrix multiplication (sparse GEMM) module that supports line-wise and block-wise skipping. As a result, when compared with a mobile GPU and mobile CPU respectively, our proposed accelerator achieved $6.1\times$ and $13.6\times$ improvements in energy efficiency for the detection transformer (DETR) model and achieved approximately $2.6\times$ and $7.9\times$ improvements in the energy efficiency on average for the vision transformer (ViT) models.
移动加速器利用计算机视觉中变压器的多头、线路和块的稀疏性
由于变压器模型需要大量的内存和计算,因此很难将其应用于移动设备的计算机视觉。因此,人们正在研究各种压缩变压器模型的方法,如剪枝。然而,一般的计算平台,如中央处理器(cpu)和图形处理单元(gpu),由于其结构稀疏性,在加速剪枝模型时并不节能。针对不同粒度的剪枝引起的不同大小的结构稀疏度的变压器,提出了一种低功率加速器。在这项研究中,我们可以加速以头部、线路或块方式修剪的变压器。提出了一种head调度算法来支持head-wise skip操作,并解决了由于一个head中不同数量的操作而导致的处理引擎(PE)负载不平衡问题。此外,我们实现了一个稀疏的一般矩阵到矩阵乘法(sparse GEMM)模块,它支持逐行和逐块跳转。结果,与移动GPU和移动CPU相比,我们提出的加速器在检测变压器(DETR)模型的能效方面分别提高了6.1倍和13.6倍,在视觉变压器(ViT)模型的能效方面平均提高了约2.6倍和7.9倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信