An Optimized Implementation of Activation Instruction Based on RISC-V

Activation is an important component of the neural network, and the standard instructions of RISC-V are difficult to use to effectively handle the activation of the array. In this paper, we propose an optimized implementation of activation instruction based on RISC-V. Based on the opensource RISC-V...

Full description

Bibliographic Details
Main Authors: Chen, C. (Author), Kong, D. (Author), Yu, H. (Author), Yuan, G. (Author)
Format: Article
Language:English
Published: MDPI 2023
Subjects:
Online Access:View Fulltext in Publisher
View in Scopus
LEADER 02281nam a2200253Ia 4500
001 10.3390-electronics12091986
008 230529s2023 CNT 000 0 und d
020 |a 20799292 (ISSN) 
245 1 0 |a An Optimized Implementation of Activation Instruction Based on RISC-V 
260 0 |b MDPI  |c 2023 
856 |z View Fulltext in Publisher  |u https://doi.org/10.3390/electronics12091986 
856 |z View in Scopus  |u https://www.scopus.com/inward/record.uri?eid=2-s2.0-85159187707&doi=10.3390%2felectronics12091986&partnerID=40&md5=535794312c33a6918e0a3ea438a7748d 
520 3 |a Activation is an important component of the neural network, and the standard instructions of RISC-V are difficult to use to effectively handle the activation of the array. In this paper, we propose an optimized implementation of activation instruction based on RISC-V. Based on the opensource RISC-V processor Hummingbird E203, we designed a special instruction for the implementation of activation functions. A single instruction is chosen to implement the entire activation operation, including data loading, data arithmetic and data write-back. At the hardware level, we designed a method of alternate reading and writing that only needs a small hardware storage unit to meet the requirements of the activation operation for long arrays without affecting the activation efficiency. In addition, we added the length of the array as a new parameter to instruct our designed hardware to adapt to any length of arrays. Finally, the scheduling method of some instructions in the activation process was optimized in accordance with the law of instructions, which improves the execution efficiency of instructions. Considering an activation process with an array length of 15, our design demonstrates a 4.89-fold increase in speed compared to RISC-V standard instructions while consuming only 7.78% of the energy. © 2023 by the authors. 
650 0 4 |a activation 
650 0 4 |a alternate reading and writing 
650 0 4 |a instruction scheduling 
650 0 4 |a length adaptation 
650 0 4 |a single instruction operation 
650 0 4 |a special instruction 
700 1 0 |a Chen, C.  |e author 
700 1 0 |a Kong, D.  |e author 
700 1 0 |a Yu, H.  |e author 
700 1 0 |a Yuan, G.  |e author 
773 |t Electronics (Switzerland)