System and method for accelerating RNN network, and storage medium

    公开(公告)号:US11775803B2

    公开(公告)日:2023-10-03

    申请号:US18012938

    申请日:2021-04-26

    CPC分类号: G06N3/0442 G06F17/16

    摘要: A system for accelerating an RNN network including: a first cache, which is used for outputting Wx1 to WxN or Wh1 to WhN in parallel in N paths in a cyclic switching manner, and the degree of parallelism is k; a second cache, which is used for outputting xt or ht-1 in the cyclic switching manner; a vector multiplication circuit, which is used for, by using N groups of multiplication arrays, respectively calculating Wx1xt to WxNxt, or respectively calculating Wh1ht-1 to WhNht-1; an addition circuit, which is used for calculating Wx1xt+Wh1ht-1+b1 to WxNxt+WhNht-1+bN; an activation circuit, which is used for performing an activation operation according to an output of the addition circuit; a state updating circuit, which is used for acquiring ct-1, calculating ct and ht, updating ct-1, and sending ht to the second cache; a bias data cache; a vector cache; and a cell state cache.

    Hardware environment-based data quantization method and apparatus, and readable storage medium

    公开(公告)号:US11748970B2

    公开(公告)日:2023-09-05

    申请号:US17794110

    申请日:2020-11-16

    IPC分类号: G06V10/00 G06V10/28

    CPC分类号: G06V10/28

    摘要: A hardware environment-based data quantization method includes: parsing a model file under a current deep learning framework to obtain intermediate computational graph data and weight data that are independent of a hardware environment; performing calculation on image data in an input data set through a process indicated by an intermediate computational graph to obtain feature map data; separately performing uniform quantization on the weight data and the feature map data of each layer according to a preset linear quantization method, and calculating a weight quantization factor and a feature map quantization factor (S103); combining the weight quantization factor and the feature map quantization factor to obtain a quantization parameter that makes hardware use shift instead of division; and finally, writing the quantization parameter and the quantized weight data to a bin file according to a hardware requirement so as to generate quantized file data (S105).