SOLE: Hardware-Software Co-design of Softmax and LayerNorm for Efficient Transformer Inference

被引:4
作者
Wang, Wenxun [1 ]
Zhou, Shuchang [2 ]
Sun, Wenyu [1 ]
Sun, Peiqin [2 ]
Liu, Yongpan [1 ]
机构
[1] Tsinghua Univ, Dept Elect Engn, Beijing, Peoples R China
[2] MEGVII Technol, Beijing, Peoples R China
来源
2023 IEEE/ACM INTERNATIONAL CONFERENCE ON COMPUTER AIDED DESIGN, ICCAD | 2023年
关键词
Transformers; neural networks; hardware-software co-design; softmax; layer normalization;
D O I
10.1109/ICCAD57390.2023.10323725
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Transformers have shown remarkable performance in both natural language processing (NLP) and computer vision (CV) tasks. However, their real-time inference speed and efficiency are limited due to the inefficiency in Softmax and Layer Normalization (LayerNorm). Previous works based on function approximation suffer from inefficient implementation as they place emphasis on computation while disregarding memory overhead concerns. Moreover, such methods rely on retraining to compensate for approximation error which can be costly and inconvenient. In this paper, we present SOLE, a hardware-software co-design for Softmax and LayerNorm which is composed of E2Softmax and AILayerNorm. E2Softmax utilizes log2 quantization of exponent function and log-based division to approximate Softmax while AILayerNorm adopts low-precision statistic calculation. Compared with state-of-the-art designs, we achieve both low-precision calculation and low bit-width storage on Softmax and LayerNorm. Experiments show that SOLE maintains inference accuracy without retraining while offering orders of magnitude speedup and energy savings over GPU, achieving 3.04x, 3.86x energy-efficiency improvements and 2.82x, 3.32x area-efficiency improvements over prior state-of-the-art custom hardware for Softmax and LayerNorm, respectively.
引用
收藏
页数:9
相关论文
共 50 条
  • [21] A ovel Hardware/software Co-design for An Efficient RSA System
    Pan, Yuyang
    Wu, Liji
    Zhang, Xiangmin
    2019 IEEE INTERNATIONAL CONFERENCE ON ELECTRON DEVICES AND SOLID-STATE CIRCUITS (EDSSC), 2019,
  • [22] Modeling and Simulating Rydberg Atom Quantum Computers for Hardware-Software Co-design with PachinQo
    Ludmir, Jason zev
    Huo, Yuqian
    Dibrita, Nicholas s.
    Pael, Tirthak
    PROCEEDINGS OF THE ACM ON MEASUREMENT AND ANALYSIS OF COMPUTING SYSTEMS, 2024, 8 (03)
  • [23] PipeDevice: A Hardware-Software Co-Design Approach to Intra-Host Container Communication
    Su, Qiang
    Wang, Chuanwen
    Niu, Zhixiong
    Shu, Ran
    Cheng, Peng
    Xiong, Yongqiang
    Han, Dongsu
    Xue, Chun Jason
    Xu, Hong
    PROCEEDINGS OF THE 18TH INTERNATIONAL CONFERENCE ON EMERGING NETWORKING EXPERIMENTS AND TECHNOLOGIES, CONEXT 2022, 2022, : 126 - 139
  • [24] SECDA: Efficient Hardware/Software Co-Design of FPGA-based DNN Accelerators for Edge Inference
    Haris, Jude
    Gibson, Perry
    Cano, Jose
    Agostini, Nicolas Bohm
    Kaeli, David
    2021 IEEE 33RD INTERNATIONAL SYMPOSIUM ON COMPUTER ARCHITECTURE AND HIGH PERFORMANCE COMPUTING (SBAC-PAD 2021), 2021, : 33 - 43
  • [25] NeRF-PIM: PIM Hardware-Software Co-Design of Neural Rendering Networks
    Heo, Jaeyoung
    Yoo, Sungjoo
    IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2024, 43 (11) : 3900 - 3912
  • [26] Hardware software co-design in Haskell
    Aronsson M.
    Sheeran M.
    1600, Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States (52): : 162 - 173
  • [27] Hardware Software Co-design in Haskell
    Aronsson, Markus
    Sheeran, Mary
    ACM SIGPLAN NOTICES, 2017, 52 (10) : 162 - 173
  • [28] Hardware/software co-design for multimedia
    Wolf, W
    ADVANCED SIGNAL PROCESSING: ALGORITHMS, ARCHITECTURES, AND IMPLEMENTATIONS VII, 1997, 3162 : 510 - 517
  • [29] Hardware-software co-design for dynamic reconfigurable computing with collaborative supports of architecture and operating system
    Wang, Wei
    Wu, Qiang
    Xie, Wei
    PROCEEDINGS OF THE 2007 11TH INTERNATIONAL CONFERENCE ON COMPUTER SUPPORTED COOPERATIVE WORK IN DESIGN, VOLS 1 AND 2, 2007, : 275 - +
  • [30] Using Behaviour-Driven Development with Hardware-Software Co-Design for Autonomous Load Management
    Alhaj, Mohammad
    Arbez, Gilbert
    Peyton, Liam
    2017 8TH INTERNATIONAL CONFERENCE ON INFORMATION AND COMMUNICATION SYSTEMS (ICICS), 2017, : 46 - 51