JP2022183833A - Neural network circuit and neural network operation method - Google Patents

Neural network circuit and neural network operation method Download PDF

Info

Publication number
JP2022183833A
JP2022183833A JP2021091331A JP2021091331A JP2022183833A JP 2022183833 A JP2022183833 A JP 2022183833A JP 2021091331 A JP2021091331 A JP 2021091331A JP 2021091331 A JP2021091331 A JP 2021091331A JP 2022183833 A JP2022183833 A JP 2022183833A
Authority
JP
Japan
Prior art keywords
circuit
layer
quantization
memory
convolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021091331A
Other languages
Japanese (ja)
Inventor
賢治 渡邊
Kenji Watanabe
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Leap Mind Inc
Original Assignee
Leap Mind Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Leap Mind Inc filed Critical Leap Mind Inc
Priority to JP2021091331A priority Critical patent/JP2022183833A/en
Publication of JP2022183833A publication Critical patent/JP2022183833A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a high-performance neural network circuit that can be embedded in an embedded device such as an IoT device.SOLUTION: There is provided a neural network apparatus including operation means for a plurality of layers for performing operations on input data. The plurality of layers include at least a first layer for performing a first operation using at least a first parameter and a second layer for performing a second operation that differs from the first operation. In the second operation, the operation is performed based on the first parameter and a second parameter that differs from the first parameter.SELECTED DRAWING: Figure 10

Description

本発明は、ニューラルネットワーク回路およびニューラルネットワーク演算方法に関する。 The present invention relates to a neural network circuit and a neural network operation method.

近年、畳み込みニューラルネットワーク(Convolutional Neural Network:CNN)が画像認識等のモデルとして用いられている。畳み込みニューラルネットワークは、畳み込み層やプーリング層を有する多層構造であり、畳み込み演算等の多数の演算を必要とする。畳み込みニューラルネットワークによる演算を高速化する演算手法が様々考案されている(特許文献1)。
また、組み込み機器において、少ないリソースで畳み込み演算を高速処理する手法として、排他的論理和回路とビットシフトを用いる方法が考案されている(特許文献2)。
In recent years, a convolutional neural network (CNN) has been used as a model for image recognition and the like. A convolutional neural network has a multilayer structure having convolution layers and pooling layers, and requires a large number of operations such as convolution operations. Various calculation techniques have been devised for speeding up calculations by convolutional neural networks (Patent Document 1).
In addition, a method using an exclusive OR circuit and a bit shift has been devised as a technique for high-speed processing of a convolution operation with few resources in an embedded device (Patent Document 2).

特開2018-077829号公報JP 2018-077829 A 特開2020-060968号公報Japanese Patent Application Laid-Open No. 2020-060968

一方で、IoT機器などの組み込み機器においても畳み込みニューラルネットワークを利用した画像認識等を実現することが望まれている。組み込み機器においては、特許文献1等に記載された大規模な専用回路を組み込むことは難しい。また、CPUやメモリ等のハードウェアリソースが限られた組み込み機器においては、ハードウェアリソースをより効率的に用いて演算性能を高めることが求められる。 On the other hand, it is desired to realize image recognition using a convolutional neural network even in embedded devices such as IoT devices. In an embedded device, it is difficult to incorporate the large-scale dedicated circuit described in Patent Document 1 and the like. Further, in embedded devices with limited hardware resources such as CPUs and memories, it is required to use hardware resources more efficiently to improve computational performance.

上記事情を踏まえ、本発明は、IoT機器などの組み込み機器に組み込み可能かつ高性能なニューラルネットワーク回路およびニューラルネットワーク演算方法を提供することを目的とする。 In view of the above circumstances, an object of the present invention is to provide a high-performance neural network circuit and a neural network operation method that can be incorporated in an embedded device such as an IoT device.

上記課題を解決するために、この発明は以下の手段を提案している。
本発明の第一の態様に係るニューラルネットワーク装置は、入力データに対して演算を行う複数のレイヤのための演算手段を備えるニューラルネットワーク装置であって、前記複数のレイヤは少なくとも第1のパラメータを用いて第1の演算を行う第1のレイヤと、前記第1の演算とは異なる第2の演算を行う第2のレイヤを含み、前記第2の演算は前記第1のパラメータ及び前記第1のパラメータとは異なる第2のパラメータに基づいて演算を行うことを特徴とする。
In order to solve the above problems, the present invention proposes the following means.
A neural network device according to a first aspect of the present invention is a neural network device comprising computing means for a plurality of layers that perform computations on input data, wherein the plurality of layers have at least a first parameter. and a second layer that performs a second operation different from the first operation, wherein the second operation is the first parameter and the first The calculation is performed based on a second parameter different from the parameter of .

本発明のニューラルネットワーク回路およびニューラルネットワーク演算方法は、IoT機器などの組み込み機器に組み込み可能かつ高性能である。 The neural network circuit and neural network operation method of the present invention can be incorporated into embedded equipment such as IoT equipment and have high performance.

畳み込みニューラルネットワークを示す図である。FIG. 2 illustrates a convolutional neural network; 畳み込み層が行う畳み込み演算を説明する図である。FIG. 4 is a diagram for explaining convolution operations performed by a convolution layer; 畳み込み演算のデータの展開を説明する図である。FIG. 4 is a diagram for explaining expansion of data in a convolution operation; 第一実施形態に係るニューラルネットワーク回路の全体構成を示す図である。1 is a diagram showing the overall configuration of a neural network circuit according to a first embodiment; FIG. 同ニューラルネットワーク回路の動作例を示すタイミングチャートである。It is a timing chart which shows the operation example of the same neural network circuit. 同ニューラルネットワーク回路の他の動作例を示すタイミングチャートである。4 is a timing chart showing another operation example of the same neural network circuit; 同ニューラルネットワーク回路のDMACの内部ブロック図である。3 is an internal block diagram of the DMAC of the same neural network circuit; FIG. 同DMACの制御回路のステート遷移図である。4 is a state transition diagram of a control circuit of the same DMAC; FIG. 同ニューラルネットワーク回路の畳み込み演算回路の内部ブロック図である。4 is an internal block diagram of a convolution operation circuit of the same neural network circuit; FIG. 同畳み込み演算回路の乗算器の内部ブロック図である。FIG. 4 is an internal block diagram of a multiplier of the convolution arithmetic circuit; 同乗算器の積和演算ユニットの内部ブロック図である。3 is an internal block diagram of a sum-of-products operation unit of the same multiplier; FIG. 同畳み込み演算回路のアキュムレータ回路の内部ブロック図である。FIG. 4 is an internal block diagram of an accumulator circuit of the same convolution arithmetic circuit; 同アキュムレータ回路のアキュムレータユニットの内部ブロック図である。It is an internal block diagram of the accumulator unit of the same accumulator circuit. 同ニューラルネットワーク回路の量子化演算回路の内部ブロック図である。4 is an internal block diagram of a quantization arithmetic circuit of the same neural network circuit; FIG. 同量子化演算回路のベクトル演算回路と量子化回路の内部ブロック図である。3 is an internal block diagram of a vector operation circuit and a quantization circuit of the same quantization operation circuit; FIG. 演算ユニットのブロック図である。3 is a block diagram of an arithmetic unit; FIG. 同量子化回路のベクトル量子化ユニットの内部ブロック図である。4 is an internal block diagram of a vector quantization unit of the same quantization circuit; FIG.

(第一実施形態)
本発明の第一実施形態について、図1から図17を参照して説明する。
図1は、畳み込みニューラルネットワーク200(以下、「CNN200」という)を示す図である。第一実施形態に係るニューラルネットワーク回路100(以下、「NN回路100」という)が行う演算は、推論時に使用する学習済みのCNN200の少なくとも一部である。
(First embodiment)
A first embodiment of the present invention will be described with reference to FIGS. 1 to 17. FIG.
FIG. 1 is a diagram showing a convolutional neural network 200 (hereinafter referred to as "CNN 200"). The computations performed by the neural network circuit 100 (hereinafter referred to as "NN circuit 100") according to the first embodiment are at least part of the learned CNN 200 used during inference.

[CNN200]
CNN200は、畳み込み演算を行う畳み込み層210と、量子化演算を行う量子化演算層220と、出力層230と、を含む多層構造のネットワークである。CNN200の少なくとも一部において、畳み込み層210と量子化演算層220とが交互に連結されている。CNN200は、画像認識や動画認識に広く使われるモデルである。CNN200は、全結合層などの他の機能を有する層(レイヤ)をさらに有してもよい。
[CNN200]
The CNN 200 is a multi-layered network including a convolution layer 210 that performs convolution operations, a quantization operation layer 220 that performs quantization operations, and an output layer 230 . In at least part of CNN 200, convolutional layers 210 and quantization operation layers 220 are interleaved. CNN200 is a model widely used for image recognition and moving image recognition. The CNN 200 may further have layers with other functions, such as fully connected layers.

図2は、畳み込み層210が行う畳み込み演算を説明する図である。
畳み込み層210は、入力データaに対して重みwを用いた畳み込み演算を行う。畳み込み層210は、入力データaと重みwとを入力とする積和演算を行う。
FIG. 2 is a diagram for explaining the convolution operation performed by the convolution layer 210. As shown in FIG.
The convolution layer 210 performs a convolution operation on input data a using weight w. The convolution layer 210 performs a sum-of-products operation with input data a and weight w as inputs.

畳み込み層210への入力データa(アクティベーションデータ、特徴マップともいう)は、画像データ等の多次元データである。本実施形態において、入力データaは、要素(x,y,c)からなる3次元テンソルである。CNN200の畳み込み層210は、低ビットの入力データaに対して畳み込み演算を行う。本実施形態において、入力データaの要素は、2ビットの符号なし整数(0,1,2,3)である。入力データaの要素は、例えば、4ビットや8ビット符号なし整数でもよい。 Input data a (also called activation data or feature map) to the convolutional layer 210 is multidimensional data such as image data. In this embodiment, the input data a is a three-dimensional tensor consisting of elements (x, y, c). The convolution layer 210 of the CNN 200 performs a convolution operation on low-bit input data a. In this embodiment, the elements of the input data a are 2-bit unsigned integers (0, 1, 2, 3). Elements of input data a may be, for example, 4-bit or 8-bit unsigned integers.

CNN200に入力される入力データが、例えば32ビットの浮動小数点型など、畳み込み層210への入力データaと形式が異なる場合、CNN200は畳み込み層210の前に型変換や量子化を行う入力層をさらに有してもよい。 If the input data input to the CNN 200 has a different format from the input data a to the convolutional layer 210, such as a 32-bit floating point type, the CNN 200 has an input layer that performs type conversion and quantization before the convolutional layer 210. You may have more.

畳み込み層210の重みw(フィルタ、カーネルともいう)は、学習可能なパラメータである要素を有する多次元データである。本実施形態において、重みwは、要素(i,j,c,d)からなる4次元テンソルである。重みwは、要素(i,j,c)からなる3次元テンソル(以降、「重みwo」という)をd個有している。学習済みのCNN200における重みwは、学習済みのデータである。CNN200の畳み込み層210は、低ビットの重みwを用いて畳み込み演算を行う。本実施形態において、重みwの要素は、1ビットの符号付整数(0,1)であり、値「0」は+1を表し、値「1」は-1を表す。 The weights w (also called filters, kernels) of the convolutional layer 210 are multidimensional data whose elements are learnable parameters. In this embodiment, the weight w is a 4-dimensional tensor consisting of elements (i,j,c,d). The weight w has d three-dimensional tensors (hereinafter referred to as “weight wo”) each having elements (i, j, c). The weight w in the learned CNN 200 is learned data. Convolutional layer 210 of CNN 200 performs a convolution operation using low-bit weights w. In this embodiment, the elements of the weight w are 1-bit signed integers (0,1), where the value '0' represents +1 and the value '1' represents -1.

畳み込み層210は、式1に示す畳み込み演算を行い、出力データfを出力する。式1において、sはストライドを示す。図2において点線で示された領域は、入力データaに対して重みwoが適用される領域ao(以降、「適用領域ao」という)の一つを示している。適用領域aoの要素は、a(x+i,y+j,c)で表される。 The convolution layer 210 performs the convolution operation shown in Equation 1 and outputs output data f. In Equation 1, s indicates stride. The area indicated by the dotted line in FIG. 2 indicates one of the areas ao (hereinafter referred to as “applied area ao”) to which the weight wo is applied to the input data a. An element of the application area ao is represented by a(x+i, y+j, c).

Figure 2022183833000002
Figure 2022183833000002

量子化演算層220は、畳み込み層210が出力する畳み込み演算の出力に対して量子化などを実施する。量子化演算層220は、プーリング層221と、Batch Normalization層222と、活性化関数層223と、量子化層224と、を有する。 The quantization operation layer 220 performs quantization and the like on the convolution operation output from the convolution layer 210 . The quantization operation layer 220 has a pooling layer 221 , a batch normalization layer 222 , an activation function layer 223 and a quantization layer 224 .

プーリング層221は、畳み込み層210が出力する畳み込み演算の出力データfに対して平均プーリング(式2)やMAXプーリング(式3)などの演算を実施して、畳み込み層210の出力データfを圧縮する。式2および式3において、uは入力テンソルを示し、vは出力テンソルを示し、Tはプーリング領域の大きさを示す。式3において、maxはTに含まれるiとjの組み合わせに対するuの最大値を出力する関数である。 The pooling layer 221 performs operations such as average pooling (equation 2) and MAX pooling (equation 3) on the output data f of the convolutional operation output by the convolutional layer 210 to compress the output data f of the convolutional layer 210. do. In Equations 2 and 3, u indicates the input tensor, v indicates the output tensor, and T indicates the size of the pooling region. In Equation 3, max is a function that outputs the maximum value of u for combinations of i and j contained in T.

Figure 2022183833000003
Figure 2022183833000003

Figure 2022183833000004
Figure 2022183833000004

Batch Normalization層222は、量子化演算層220やプーリング層221の出力データに対して、例えば式4に示すような演算によりデータ分布の正規化を行う。式4において、uは入力テンソルを示し、vは出力テンソルを示し、αはスケールを示し、βはバイアスを示す。学習済みのCNN200において、αおよびβは学習済みの定数ベクトルである。 The Batch Normalization layer 222 normalizes the data distribution of the output data of the quantization operation layer 220 and the pooling layer 221 by, for example, the operation shown in Equation 4. In Equation 4, u denotes the input tensor, v the output tensor, α the scale, and β the bias. In the trained CNN 200, α and β are trained constant vectors.

Figure 2022183833000005
Figure 2022183833000005

活性化関数層223は、量子化演算層220やプーリング層221やBatch Normalization層222の出力に対してReLU(式5)などの活性化関数の演算を行う。式5において、uは入力テンソルであり、vは出力テンソルである。式5において、maxは引数のうち最も大きい数値を出力する関数である。 The activation function layer 223 computes an activation function such as ReLU (Formula 5) on the outputs of the quantization computation layer 220 , the pooling layer 221 and the batch normalization layer 222 . In Equation 5, u is the input tensor and v is the output tensor. In Expression 5, max is a function that outputs the largest numerical value among the arguments.

Figure 2022183833000006
Figure 2022183833000006

量子化層224は、量子化パラメータに基づいて、プーリング層221や活性化関数層223の出力に対して例えば式6に示すような量子化を行う。式6に示す量子化は、入力テンソルuを2ビットにビット削減している。式6において、q(c)は量子化パラメータのベクトルである。学習済みのCNN200において、q(c)は学習済みの定数ベクトルである。式6における不等式「≦」は「<」であってもよい。 The quantization layer 224 quantizes the outputs of the pooling layer 221 and the activation function layer 223 based on the quantization parameter, as shown in Equation 6, for example. The quantization shown in Equation 6 reduces the input tensor u to 2 bits. In Equation 6, q(c) is the vector of quantization parameters. In the trained CNN 200, q(c) is a trained constant vector. The inequality “≦” in Equation 6 may be “<”.

Figure 2022183833000007
Figure 2022183833000007

出力層230は、恒等関数やソフトマックス関数等によりCNN200の結果を出力する層である。出力層230の前段のレイヤは、畳み込み層210であってもよいし、量子化演算層220であってもよい。 The output layer 230 is a layer that outputs the results of the CNN 200 using an identity function, a softmax function, or the like. A layer preceding the output layer 230 may be the convolution layer 210 or the quantization operation layer 220 .

CNN200は、量子化された量子化層224の出力データが、畳み込み層210に入力されるため、量子化を行わない他の畳み込みニューラルネットワークと比較して、畳み込み層210の畳み込み演算の負荷が小さい。 In the CNN 200, the quantized output data of the quantization layer 224 is input to the convolution layer 210, so the convolution operation load of the convolution layer 210 is small compared to other convolutional neural networks that do not perform quantization. .

[畳み込み演算の分割]
NN回路100は、畳み込み層210の畳み込み演算(式1)の入力データを部分テンソルに分割して演算する。部分テンソルへの分割方法や分割数は特に限定されない。部分テンソルは、例えば、入力データa(x+i,y+j,c)をa(x+i,y+j,co)に分割することにより形成される。なお、NN回路100は、畳み込み層210の畳み込み演算(式1)の入力データを分割せずに演算することもできる。
[Division of convolution operation]
The NN circuit 100 divides the input data for the convolution operation (Equation 1) of the convolution layer 210 into partial tensors and performs the operation. The method of division into partial tensors and the number of divisions are not particularly limited. A partial tensor is formed, for example, by splitting the input data a(x+i, y+j, c) into a(x+i, y+j, co). Note that the NN circuit 100 can also perform computation without dividing the input data for the convolution computation (equation 1) of the convolution layer 210 .

畳み込み演算の入力データ分割において、式1における変数cは、式7に示すように、サイズBcのブロックで分割される。また、式1における変数dは、式8に示すように、サイズBdのブロックで分割される。式7において、coはオフセットであり、ciは0から(Bc-1)までのインデックスである。式8において、doはオフセットであり、diは0から(Bd-1)までのインデックスである。なお、サイズBcとサイズBdは同じであってもよい。 In the input data division of the convolution operation, the variable c in Equation 1 is divided into blocks of size Bc as shown in Equation 7. Also, the variable d in Equation 1 is divided into blocks of size Bd, as shown in Equation 8. In Equation 7, co is the offset and ci is the index from 0 to (Bc-1). In Equation 8, do is the offset and di is the index from 0 to (Bd-1). Note that the size Bc and the size Bd may be the same.

Figure 2022183833000008
Figure 2022183833000008

Figure 2022183833000009
Figure 2022183833000009

式1における入力データa(x+i,y+j,c)は、サイズBcにより分割され、分割された入力データa(x+i,y+j,co)で表される。以降の説明において、分割された入力データaを「分割入力データa」ともいう。 Input data a(x+i, y+j, c) in Equation 1 is divided by size Bc and represented by divided input data a(x+i, y+j, co). In the following description, the divided input data a is also referred to as "divided input data a".

式1における重みw(i,j,c,d)は、サイズBcおよびBdにより分割され、分割された重みw(i,j,co,do)で表される。以降の説明において、分割された重みwを「分割重みw」ともいう。 The weight w(i,j,c,d) in Equation 1 is divided by the sizes Bc and Bd and denoted by the divided weight w(i,j,co,do). In the following description, the divided weight w is also referred to as "divided weight w".

サイズBdにより分割された出力データf(x,y,do)は、式9により求まる。分割された出力データf(x,y,do)を組み合わせることで、最終的な出力データf(x,y,d)を算出できる。 The output data f(x, y, do) divided by the size Bd is obtained by Equation (9). By combining the divided output data f(x, y, do), the final output data f(x, y, d) can be calculated.

Figure 2022183833000010
Figure 2022183833000010

[畳み込み演算のデータの展開]
NN回路100は、畳み込み層210の畳み込み演算における入力データaおよび重みwを展開して畳み込み演算を行う。
[Development of convolution operation data]
The NN circuit 100 develops the input data a and the weight w in the convolution operation of the convolution layer 210 and performs the convolution operation.

図3は、畳み込み演算のデータの展開を説明する図である。
分割入力データa(x+i、y+j、co)は、Bc個の要素を持つベクトルデータに展開される。分割入力データaの要素は、ciでインデックスされる(0≦ci<Bc)。以降の説明において、i,jごとにベクトルデータに展開された分割入力データaを「入力ベクトルA」ともいう。入力ベクトルAは、分割入力データa(x+i、y+j、co×Bc)から分割入力データa(x+i、y+j、co×Bc+(Bc-1))までを要素とする。
FIG. 3 is a diagram for explaining expansion of data in a convolution operation.
Divided input data a(x+i, y+j, co) is developed into vector data having Bc elements. Elements of the divided input data a are indexed by ci (0≤ci<Bc). In the following description, divided input data a developed into vector data for each i and j is also referred to as "input vector A". Input vector A has elements from divided input data a(x+i, y+j, co×Bc) to divided input data a(x+i, y+j, co×Bc+(Bc−1)).

分割重みw(i,j,co、do)は、Bc×Bd個の要素を持つマトリクスデータに展開される。マトリクスデータに展開された分割重みwの要素は、ciとdiでインデックスされる(0≦di<Bd)。以降の説明において、i,jごとにマトリクスデータに展開された分割重みwを「重みマトリクスW」ともいう。重みマトリクスWは、分割重みw(i,j,co×Bc、do×Bd)から分割重みw(i,j,co×Bc+(Bc-1)、do×Bd+(Bd-1))までを要素とする。 The division weight w(i, j, co, do) is developed into matrix data having Bc×Bd elements. The elements of the division weight w developed into matrix data are indexed by ci and di (0≦di<Bd). In the following description, the divided weight w developed into matrix data for each i and j is also referred to as "weight matrix W". The weight matrix W includes division weights w(i, j, co×Bc, do×Bd) to division weights w(i, j, co×Bc+(Bc−1), do×Bd+(Bd−1)). element.

入力ベクトルAと重みマトリクスWとを乗算することで、ベクトルデータが算出される。i,j,coごとに算出されたベクトルデータを3次元テンソルに整形することで、出力データf(x,y,do)を得ることができる。このようなデータの展開を行うことで、畳み込み層210の畳み込み演算を、ベクトルデータとマトリクスデータとの乗算により実施できる。 By multiplying the input vector A and the weight matrix W, vector data is calculated. Output data f(x, y, do) can be obtained by shaping the vector data calculated for each of i, j, and co into a three-dimensional tensor. By developing such data, the convolution operation of the convolution layer 210 can be performed by multiplying the vector data and the matrix data.

[NN回路100]
図4は、本実施形態に係るNN回路100の全体構成を示す図である。
NN回路100は、第一メモリ1と、第二メモリ2と、DMAコントローラ3(以下、「DMAC3」ともいう)と、畳み込み演算回路4と、量子化演算回路5と、コントローラ6と、を備える。NN回路100は、第一メモリ1および第二メモリ2を介して、畳み込み演算回路4と量子化演算回路5とがループ状に形成されていることを特徴とする。
[NN circuit 100]
FIG. 4 is a diagram showing the overall configuration of the NN circuit 100 according to this embodiment.
The NN circuit 100 includes a first memory 1, a second memory 2, a DMA controller 3 (hereinafter also referred to as "DMAC 3"), a convolution operation circuit 4, a quantization operation circuit 5, and a controller 6. . NN circuit 100 is characterized in that convolution operation circuit 4 and quantization operation circuit 5 are formed in a loop via first memory 1 and second memory 2 .

第一メモリ1は、例えばSRAM(Static RAM)などで構成された揮発性のメモリ等の書き換え可能なメモリである。第一メモリ1には、DMAC3やコントローラ6を介してデータの書き込みおよび読み出しが行われる。第一メモリ1は、畳み込み演算回路4の入力ポートと接続されており、畳み込み演算回路4は第一メモリ1からデータを読み出すことができる。また、第一メモリ1は、量子化演算回路5の出力ポートと接続されており、量子化演算回路5は第一メモリ1にデータを書き込むことができる。外部ホストCPUは、第一メモリ1に対するデータの書き込みや読み出しにより、NN回路100に対するデータの入出力を行うことができる。 The first memory 1 is a rewritable memory such as a volatile memory such as an SRAM (Static RAM). Data is written to and read from the first memory 1 via the DMAC 3 and the controller 6 . The first memory 1 is connected to the input port of the convolution operation circuit 4 , and the convolution operation circuit 4 can read data from the first memory 1 . The first memory 1 is also connected to the output port of the quantization arithmetic circuit 5 , and the quantization arithmetic circuit 5 can write data to the first memory 1 . The external host CPU can input/output data to/from the NN circuit 100 by writing data to and reading data from the first memory 1 .

第二メモリ2は、例えばSRAM(Static RAM)などで構成された揮発性のメモリ等の書き換え可能なメモリである。第二メモリ2には、DMAC3やコントローラ6を介してデータの書き込みおよび読み出しが行われる。第二メモリ2は、量子化演算回路5の入力ポートと接続されており、量子化演算回路5は第二メモリ2からデータを読み出すことができる。また、第二メモリ2は、畳み込み演算回路4の出力ポートと接続されており、畳み込み演算回路4は第二メモリ2にデータを書き込むことができる。外部ホストCPUは、第二メモリ2に対するデータの書き込みや読み出しにより、NN回路100に対するデータの入出力を行うことができる。 The second memory 2 is, for example, a rewritable memory such as a volatile memory such as an SRAM (Static RAM). Data is written to and read from the second memory 2 via the DMAC 3 and the controller 6 . The second memory 2 is connected to the input port of the quantization arithmetic circuit 5 , and the quantization arithmetic circuit 5 can read data from the second memory 2 . The second memory 2 is also connected to the output port of the convolution circuit 4 , and the convolution circuit 4 can write data to the second memory 2 . The external host CPU can input/output data to/from the NN circuit 100 by writing data to or reading data from the second memory 2 .

DMAC3は、外部バスEBに接続されており、DRAMなどの外部メモリと第一メモリ1との間のデータ転送を行う。また、DMAC3は、DRAMなどの外部メモリと第二メモリ2との間のデータ転送を行う。また、DMAC3は、DRAMなどの外部メモリと畳み込み演算回路4との間のデータ転送を行う。また、DMAC3は、DRAMなどの外部メモリと量子化演算回路5との間のデータ転送を行う。 The DMAC 3 is connected to the external bus EB and performs data transfer between an external memory such as a DRAM and the first memory 1 . The DMAC 3 also transfers data between an external memory such as a DRAM and the second memory 2 . The DMAC 3 also transfers data between an external memory such as a DRAM and the convolution circuit 4 . The DMAC 3 also transfers data between an external memory such as a DRAM and the quantization arithmetic circuit 5 .

畳み込み演算回路4は、学習済みのCNN200の畳み込み層210における畳み込み演算を行う回路である。畳み込み演算回路4は、第一メモリ1に格納された入力データaを読み出し、入力データaに対して畳み込み演算を実施する。畳み込み演算回路4は、畳み込み演算の出力データf(以降、「畳み込み演算出力データ」ともいう)を第二メモリ2に書き込む。 The convolution operation circuit 4 is a circuit that performs convolution operation in the convolution layer 210 of the trained CNN 200 . The convolution operation circuit 4 reads the input data a stored in the first memory 1 and performs a convolution operation on the input data a. The convolution operation circuit 4 writes output data f of the convolution operation (hereinafter also referred to as “convolution operation output data”) to the second memory 2 .

量子化演算回路5は、学習済みのCNN200の量子化演算層220における量子化演算の少なくとも一部を行う回路である。量子化演算回路5は、第二メモリ2に格納された畳み込み演算の出力データfを読み出し、畳み込み演算の出力データfに対して量子化演算(プーリング、Batch Normalization、活性化関数、および量子化のうち少なくとも量子化を含む演算)を行う。量子化演算回路5は、量子化演算の出力データ(以降、「量子化演算出力データ」ともいう)を第一メモリ1に書き込む。 The quantization operation circuit 5 is a circuit that performs at least part of the quantization operation in the quantization operation layer 220 of the trained CNN 200 . The quantization operation circuit 5 reads the output data f of the convolution operation stored in the second memory 2, and performs quantization operations (pooling, batch normalization, activation function, and quantization) on the output data f of the convolution operation. calculation including at least quantization). The quantization operation circuit 5 writes the output data of the quantization operation (hereinafter also referred to as “quantization operation output data”) to the first memory 1 .

コントローラ6は、外部バスEBに接続されており、外部のホストCPUのスレーブとして動作する。コントローラ6は、パラメータレジスタや状態レジスタを含むレジスタ61を有している。パラメータレジスタは、NN回路100の動作を制御するレジスタである。状態レジスタはセマフォSを含むNN回路100の状態を示すレジスタである。外部ホストCPUは、コントローラ6を経由して、レジスタ61にアクセスできる。 The controller 6 is connected to the external bus EB and operates as a slave of an external host CPU. The controller 6 has registers 61 including parameter registers and status registers. A parameter register is a register that controls the operation of the NN circuit 100 . The status register is a register that indicates the status of the NN circuit 100 including the semaphore S. FIG. An external host CPU can access the register 61 via the controller 6 .

コントローラ6は、内部バスIBを介して、第一メモリ1と、第二メモリ2と、DMAC3と、畳み込み演算回路4と、量子化演算回路5と、接続されている。外部ホストCPUは、コントローラ6を経由して、各ブロックに対してアクセスできる。例えば、外部ホストCPUは、コントローラ6を経由して、DMAC3や畳み込み演算回路4や量子化演算回路5に対する命令を指示することができる。また、DMAC3や畳み込み演算回路4や量子化演算回路5は、内部バスIBを介して、コントローラ6が有する状態レジスタ(セマフォSを含む)を更新できる。状態レジスタ(セマフォSを含む)は、DMAC3や畳み込み演算回路4や量子化演算回路5と接続された専用配線を介して更新されるように構成されていてもよい。 Controller 6 is connected to first memory 1, second memory 2, DMAC 3, convolution circuit 4, and quantization circuit 5 via internal bus IB. An external host CPU can access each block via the controller 6 . For example, the external host CPU can issue commands to the DMAC 3, the convolution circuit 4, and the quantization circuit 5 via the controller 6. FIG. Also, the DMAC 3, the convolution operation circuit 4, and the quantization operation circuit 5 can update the status register (including the semaphore S) of the controller 6 via the internal bus IB. The status register (including the semaphore S) may be configured to be updated via dedicated wiring connected to the DMAC 3, the convolution operation circuit 4, and the quantization operation circuit 5. FIG.

NN回路100は、第一メモリ1や第二メモリ2等を有するため、DRAMなどの外部メモリからのDMAC3によるデータ転送において、重複するデータのデータ転送の回数を低減できる。これにより、メモリアクセスにより発生する消費電力を大幅に低減することができる。 Since the NN circuit 100 has the first memory 1, the second memory 2, etc., it is possible to reduce the number of data transfers of overlapping data in data transfer by the DMAC 3 from an external memory such as a DRAM. As a result, power consumption caused by memory access can be greatly reduced.

[NN回路100の動作例1]
図5は、NN回路100の動作例を示すタイミングチャートである。
DMAC3は、レイヤ1の入力データaを第一メモリ1に格納する。DMAC3は、畳み込み演算回路4が行う畳み込み演算の順序にあわせて、レイヤ1の入力データaを分割して第一メモリ1に転送してもよい。
[Operation example 1 of the NN circuit 100]
FIG. 5 is a timing chart showing an operation example of the NN circuit 100. FIG.
The DMAC 3 stores the layer 1 input data a in the first memory 1 . The DMAC 3 may divide the input data a of the layer 1 according to the order of the convolution operation performed by the convolution operation circuit 4 and transfer the divided data to the first memory 1 .

畳み込み演算回路4は、第一メモリ1に格納されたレイヤ1の入力データaを読み出す。畳み込み演算回路4は、レイヤ1の入力データaに対して図1に示すレイヤ1の畳み込み演算を行う。レイヤ1の畳み込み演算の出力データfは、第二メモリ2に格納される。 The convolution operation circuit 4 reads the layer 1 input data a stored in the first memory 1 . The convolution operation circuit 4 performs the layer 1 convolution operation shown in FIG. 1 on the layer 1 input data a. The output data f of the layer 1 convolution operation is stored in the second memory 2 .

量子化演算回路5は、第二メモリ2に格納されたレイヤ1の出力データfを読み出す。量子化演算回路5は、レイヤ1の出力データfに対してレイヤ2の量子化演算を行う。レイヤ2の量子化演算の出力データは、第一メモリ1に格納される。 The quantization arithmetic circuit 5 reads the layer 1 output data f stored in the second memory 2 . A quantization operation circuit 5 performs a layer 2 quantization operation on layer 1 output data f. The output data of the layer 2 quantization operation is stored in the first memory 1 .

畳み込み演算回路4は、第一メモリ1に格納されたレイヤ2の量子化演算の出力データを読み出す。畳み込み演算回路4は、レイヤ2の量子化演算の出力データを入力データaとしてレイヤ3の畳み込み演算を行う。レイヤ3の畳み込み演算の出力データfは、第二メモリ2に格納される。 The convolution operation circuit 4 reads the output data of the layer 2 quantization operation stored in the first memory 1 . The convolution operation circuit 4 performs a layer 3 convolution operation using the output data of the layer 2 quantization operation as input data a. The output data f of the layer 3 convolution operation is stored in the second memory 2 .

畳み込み演算回路4は、第一メモリ1に格納されたレイヤ2M-2(Mは自然数)の量子化演算の出力データを読み出す。畳み込み演算回路4は、レイヤ2M-2の量子化演算の出力データを入力データaとしてレイヤ2M-1の畳み込み演算を行う。レイヤ2M-1の畳み込み演算の出力データfは、第二メモリ2に格納される。 The convolution operation circuit 4 reads the output data of the quantization operation of the layer 2M-2 (M is a natural number) stored in the first memory 1. FIG. The convolution operation circuit 4 performs the convolution operation of the layer 2M-1 using the output data of the quantization operation of the layer 2M-2 as the input data a. The output data f of the layer 2M-1 convolution operation is stored in the second memory 2. FIG.

量子化演算回路5は、第二メモリ2に格納されたレイヤ2M-1の出力データfを読み出す。量子化演算回路5は、2M-1レイヤの出力データfに対してレイヤ2Mの量子化演算を行う。レイヤ2Mの量子化演算の出力データは、第一メモリ1に格納される。 The quantization arithmetic circuit 5 reads the layer 2M-1 output data f stored in the second memory 2 . The quantization operation circuit 5 performs a layer 2M quantization operation on the output data f of the 2M-1 layer. The output data of the layer 2M quantization operation are stored in the first memory 1 .

畳み込み演算回路4は、第一メモリ1に格納されたレイヤ2Mの量子化演算の出力データを読み出す。畳み込み演算回路4は、レイヤ2Mの量子化演算の出力データを入力データaとしてレイヤ2M+1の畳み込み演算を行う。レイヤ2M+1の畳み込み演算の出力データfは、第二メモリ2に格納される。 The convolution operation circuit 4 reads the output data of the layer 2M quantization operation stored in the first memory 1 . The convolution operation circuit 4 performs a layer 2M+1 convolution operation using the output data of the layer 2M quantization operation as input data a. The output data f of the layer 2M+1 convolution operation are stored in the second memory 2 .

畳み込み演算回路4と量子化演算回路5とが交互に演算を行い、図1に示すCNN200の演算を進めていく。NN回路100は、畳み込み演算回路4が時分割によりレイヤ2M-1の畳み込み演算とレイヤ2M+1を実施する。また、NN回路100は、量子化演算回路5が時分割によりレイヤ2M-2の畳み込み演算とレイヤ2Mを実施する。そのため、NN回路100は、レイヤごとに別々の畳み込み演算回路4と量子化演算回路5を実装する場合と比較して、回路規模が著しく小さい。 The convolution calculation circuit 4 and the quantization calculation circuit 5 alternately perform calculations to advance the calculation of the CNN 200 shown in FIG. In the NN circuit 100, the convolution operation circuit 4 performs the convolution operation of the layer 2M-1 and the layer 2M+1 by time division. In the NN circuit 100, the quantization operation circuit 5 performs the layer 2M-2 convolution operation and the layer 2M by time division. Therefore, the NN circuit 100 has a significantly smaller circuit scale than a case where separate convolution operation circuits 4 and quantization operation circuits 5 are implemented for each layer.

NN回路100は、複数のレイヤの多層構造であるCNN200の演算を、ループ状に形成された回路により演算する。NN回路100は、ループ状の回路構成により、ハードウェア資源を効率的に利用できる。なお、NN回路100は、ループ状に回路を形成するために、各レイヤで変化する畳み込み演算回路4や量子化演算回路5におけるパラメータは適宜更新される。 The NN circuit 100 performs computation of the CNN 200, which has a multi-layered structure, by means of circuits formed in loops. The NN circuit 100 can efficiently use hardware resources due to its looped circuit configuration. Since the NN circuit 100 forms a circuit in a loop, the parameters in the convolution operation circuit 4 and the quantization operation circuit 5 that change in each layer are updated as appropriate.

CNN200の演算にNN回路100により実施できない演算が含まれる場合、NN回路100は外部ホストCPUなどの外部演算デバイスに中間データを転送する。外部演算デバイスが中間データに対して演算を行った後、外部演算デバイスによる演算結果は第一メモリ1や第二メモリ2に入力される。NN回路100は、外部演算デバイスによる演算結果に対する演算を再開する。 If the operations of CNN 200 include operations that cannot be performed by NN circuit 100, NN circuit 100 transfers intermediate data to an external computing device such as an external host CPU. After the external arithmetic device performs arithmetic on the intermediate data, the arithmetic result by the external arithmetic device is input to the first memory 1 and the second memory 2 . The NN circuit 100 restarts the operation on the operation result by the external operation device.

[NN回路100の動作例2]
図6は、NN回路100の他の動作例を示すタイミングチャートである。
NN回路100は、入力データaを部分テンソルに分割して、時分割により部分テンソルに対する演算を行ってもよい。部分テンソルへの分割方法や分割数は特に限定されない。
[Operation example 2 of the NN circuit 100]
FIG. 6 is a timing chart showing another operation example of the NN circuit 100. FIG.
The NN circuit 100 may divide the input data a into partial tensors and perform operations on the partial tensors by time division. The method of division into partial tensors and the number of divisions are not particularly limited.

図6は、入力データaを二つの部分テンソルに分解した場合の動作例を示している。分解された部分テンソルを、「第一部分テンソルa1」、「第二部分テンソルa2」とする。例えば、レイヤ2M-1の畳み込み演算は、第一部分テンソルa1に対応する畳み込み演算(図6において、「レイヤ2M-1(a1)」と表記)と、第二部分テンソルa2に対応する畳み込み演算(図6において、「レイヤ2M-1(a2)」と表記)と、に分解される。 FIG. 6 shows an operation example when the input data a is decomposed into two partial tensors. Let the decomposed partial tensors be “first partial tensor a 1 ” and “second partial tensor a 2 ”. For example, the convolution operation of layer 2M-1 is the convolution operation corresponding to the first partial tensor a 1 (denoted as “layer 2M-1 (a 1 )” in FIG. 6) and the convolution operation corresponding to the second partial tensor a 2 Convolution operation (denoted as “Layer 2M-1 (a 2 )” in FIG. 6).

第一部分テンソルa1に対応する畳み込み演算および量子化演算と、第二部分テンソルa2に対応する畳み込み演算および量子化演算とは、図6に示すように、独立して実施することができる。 The convolution and quantization operations corresponding to the first partial tensor a 1 and the convolution and quantization operations corresponding to the second partial tensor a 2 can be performed independently, as shown in FIG.

畳み込み演算回路4は、第一部分テンソルa1に対応するレイヤ2M-1の畳み込み演算(図6において、レイヤ2M-1(a1)で示す演算)を行う。その後、畳み込み演算回路4は、第二部分テンソルaに対応するレイヤ2M-1の畳み込み演算(図6において、レイヤ2M-1(a)で示す演算)を行う。また、量子化演算回路5は、第一部分テンソルa1に対応するレイヤ2Mの量子化演算(図6において、レイヤ2M(a1)で示す演算)を行う。このように、NN回路100は、第二部分テンソルaに対応するレイヤ2M-1の畳み込み演算と、第一部分テンソルa1に対応するレイヤ2Mの量子化演算と、を並列に実施できる。 The convolution operation circuit 4 performs a layer 2M-1 convolution operation (operation indicated by layer 2M-1 (a 1 ) in FIG. 6) corresponding to the first partial tensor a 1 . After that, the convolution operation circuit 4 performs a layer 2M-1 convolution operation (operation indicated by layer 2M-1 (a 2 ) in FIG. 6) corresponding to the second partial tensor a 2 . The quantization operation circuit 5 also performs a layer 2M quantization operation (operation indicated by layer 2M (a 1 ) in FIG. 6) corresponding to the first partial tensor a 1 . Thus, the NN circuit 100 can perform the layer 2M-1 convolution operation corresponding to the second partial tensor a 2 and the layer 2M quantization operation corresponding to the first partial tensor a 1 in parallel.

次に、畳み込み演算回路4は、第一部分テンソルa1に対応するレイヤ2M+1の畳み込み演算(図6において、レイヤ2M+1(a1)で示す演算)を行う。また、量子化演算回路5は、第二部分テンソルaに対応するレイヤ2Mの量子化演算(図6において、レイヤ2M(a)で示す演算)を行う。このように、NN回路100は、第一部分テンソルa1に対応するレイヤ2M+1の畳み込み演算と、第二部分テンソルaに対応するレイヤ2Mの量子化演算と、を並列に実施できる。 Next, the convolution operation circuit 4 performs a layer 2M+1 convolution operation (operation indicated by layer 2M+1 (a 1 ) in FIG. 6) corresponding to the first partial tensor a 1 . The quantization operation circuit 5 also performs a layer 2M quantization operation (operation indicated by layer 2M (a 2 ) in FIG. 6) corresponding to the second partial tensor a2. Thus, the NN circuit 100 can perform the layer 2M+1 convolution operation corresponding to the first partial tensor a 1 and the layer 2M quantization operation corresponding to the second partial tensor a 2 in parallel.

入力データaを部分テンソルに分割することで、NN回路100は畳み込み演算回路4と量子化演算回路5とを並列して動作させることができる。その結果、畳み込み演算回路4と量子化演算回路5が待機する時間が削減され、NN回路100の演算処理効率が向上する。図6に示す動作例において分割数は2であったが、分割数が2より大きい場合も同様に、NN回路100は畳み込み演算回路4と量子化演算回路5とを並列して動作させることができる。 By dividing the input data a into partial tensors, the NN circuit 100 can operate the convolution operation circuit 4 and the quantization operation circuit 5 in parallel. As a result, the waiting time of the convolution operation circuit 4 and the quantization operation circuit 5 is reduced, and the operation processing efficiency of the NN circuit 100 is improved. Although the division number is 2 in the operation example shown in FIG. 6, the NN circuit 100 can operate the convolution operation circuit 4 and the quantization operation circuit 5 in parallel when the division number is greater than 2. can.

なお、部分テンソルに対する演算方法としては、同一レイヤにおける部分テンソルの演算を畳み込み演算回路4または量子化演算回路5で行った後に次のレイヤにおける部分テンソルの演算を行う例(方法1)を示したが、演算方法はこれに限られない。NN回路100は、複数レイヤにおける一部の部分テンソルの演算をした後に残部の部分テンソルの演算をしてもよい(方法2)。また、NN回路100は、方法1と方法2とを組み合わせて部分テンソルを演算してもよい。また、並列した動作としては、レイヤ2M-1の畳み込み演算とレイヤ2Mの量子化演算のように連続したレイヤに限られるものではなく、レイヤ2M-1の畳み込み演算とレイヤ2M+2の量子化演算のように不連続なレイヤ間で行っても良い。また、複数のレイヤ2M-1の結果を加算などの演算を行って統合する場合などにおいては、レイヤ2M-1の畳み込み演算とレイヤ2Mの量子化演算の時間が大きく異なる。この場合には、両演算を並列して実施する期間が短くなるために、当該余った期間に異なる演算を並列に行うようにしても良い。 As a method for calculating a partial tensor, an example (Method 1) is shown in which a partial tensor in the same layer is calculated by the convolution calculation circuit 4 or the quantization calculation circuit 5, and then a partial tensor in the next layer is calculated. However, the calculation method is not limited to this. The NN circuit 100 may compute the remaining partial tensors after computing some of the partial tensors in multiple layers (Method 2). Also, the NN circuit 100 may combine method 1 and method 2 to compute a partial tensor. In addition, parallel operations are not limited to consecutive layers such as the convolution operation of layer 2M-1 and the quantization operation of layer 2M, but the convolution operation of layer 2M-1 and the quantization operation of layer 2M+2. You may perform between discontinuous layers like this. Further, when the results of a plurality of layers 2M-1 are integrated by performing an operation such as addition, the time required for the convolution operation for the layer 2M-1 and the quantization operation for the layer 2M differ greatly. In this case, since the period during which both operations are performed in parallel is shortened, different operations may be performed in parallel during the remaining period.

次に、NN回路100の各構成に関して詳しく説明する。 Next, each configuration of the NN circuit 100 will be described in detail.

[DMAC3]
図7は、DMAC3の内部ブロック図である。
DMAC3は、データ転送回路31と、ステートコントローラ32と、を有する。DMAC3は、データ転送回路31に対する専用のステートコントローラ32を有しており、命令コマンドが入力されると、外部のコントローラを必要とせずにDMAデータ転送を実施できる。
[DMAC3]
FIG. 7 is an internal block diagram of the DMAC3.
The DMAC 3 has a data transfer circuit 31 and a state controller 32 . The DMAC 3 has a dedicated state controller 32 for the data transfer circuit 31, and when an instruction command is input, DMA data transfer can be performed without the need for an external controller.

データ転送回路31は、外部バスEBに接続されており、DRAMなどの外部メモリと第一メモリ1との間のDMAデータ転送を行う。また、データ転送回路31は、DRAMなどの外部メモリと第二メモリ2との間のDMAデータ転送を行う。また、データ転送回路31は、DRAMなどの外部メモリと畳み込み演算回路4との間のデータ転送を行う。また、データ転送回路31は、DRAMなどの外部メモリと量子化演算回路5との間のデータ転送を行う。データ転送回路31のDMAチャンネル数は限定されない。例えば、第一メモリ1と第二メモリ2のそれぞれに専用のDMAチャンネルを有していてもよい。 The data transfer circuit 31 is connected to the external bus EB and performs DMA data transfer between an external memory such as a DRAM and the first memory 1 . The data transfer circuit 31 also performs DMA data transfer between an external memory such as a DRAM and the second memory 2 . A data transfer circuit 31 transfers data between an external memory such as a DRAM and the convolution circuit 4 . A data transfer circuit 31 transfers data between an external memory such as a DRAM and the quantization arithmetic circuit 5 . The number of DMA channels of the data transfer circuit 31 is not limited. For example, each of the first memory 1 and the second memory 2 may have a dedicated DMA channel.

ステートコントローラ32は、データ転送回路31のステートを制御する。また、ステートコントローラ32は、内部バスIBを介してコントローラ6と接続されている。ステートコントローラ32は、命令キュー33と制御回路34とを有する。 State controller 32 controls the state of data transfer circuit 31 . Also, the state controller 32 is connected to the controller 6 via an internal bus IB. The state controller 32 has an instruction queue 33 and a control circuit 34 .

命令キュー33は、DMAC3用の命令コマンドC3が格納されるキューであり、例えばFIFOメモリで構成される。命令キュー33には、内部バスIB経由で1つ以上の命令コマンドC3が書き込まれる。 The instruction queue 33 is a queue in which the instruction command C3 for the DMAC 3 is stored, and is composed of, for example, a FIFO memory. One or more instruction commands C3 are written to the instruction queue 33 via the internal bus IB.

制御回路34は、命令コマンドC3をデコードし、命令コマンドC3に基づいて順次データ転送回路31を制御するステートマシンである。制御回路34は、論理回路により実装されていてもよいし、ソフトウェアによって制御されるCPUによって実装されていてもよい。 The control circuit 34 is a state machine that decodes the instruction command C3 and sequentially controls the data transfer circuit 31 based on the instruction command C3. The control circuit 34 may be implemented by a logic circuit or by a CPU controlled by software.

図8は、制御回路34のステート遷移図である。
制御回路34は、命令キュー33に命令コマンドC3が入力されると(Not empty)、アイドルステートS1からデコードステートS2に遷移する。
FIG. 8 is a state transition diagram of the control circuit 34. As shown in FIG.
When the instruction command C3 is input to the instruction queue 33 (Not empty), the control circuit 34 transitions from the idle state S1 to the decode state S2.

制御回路34は、デコードステートS2において、命令キュー33から出力される命令コマンドC3をデコードする。また、制御回路34は、コントローラ6のレジスタ61に格納されたセマフォSを読み出し、命令コマンドC3において指示されたデータ転送回路31の動作を実行可能であるかを判定する。実行不能である場合(Not ready)、制御回路34は実行可能となるまで待つ(Wait)。実行可能である場合(ready)、制御回路34はデコードステートS2から実行ステートS3に遷移する。 The control circuit 34 decodes the instruction command C3 output from the instruction queue 33 in the decode state S2. Also, the control circuit 34 reads the semaphore S stored in the register 61 of the controller 6 and determines whether the operation of the data transfer circuit 31 instructed by the instruction command C3 can be executed. If it is not ready (Not ready), the control circuit 34 waits until it becomes ready (Wait). If it is ready (ready), the control circuit 34 transitions from the decode state S2 to the run state S3.

制御回路34は、実行ステートS3において、データ転送回路31を制御して、データ転送回路31に命令コマンドC3において指示された動作を実施させる。制御回路34は、データ転送回路31の動作が終わると、命令キュー33から実行を終えた命令コマンドC3を取り除くとともに、コントローラ6のレジスタ61に格納されたセマフォSを更新する。制御回路34は、命令キュー33に命令がある場合(Not empty)、実行ステートS3からデコードステートS2に遷移する。制御回路34は、命令キュー33に命令がない場合(empty)、実行ステートS3からアイドルステートS1に遷移する。 In the execution state S3, the control circuit 34 controls the data transfer circuit 31 to cause the data transfer circuit 31 to perform the operation instructed by the instruction command C3. When the operation of the data transfer circuit 31 is completed, the control circuit 34 removes the executed instruction command C3 from the instruction queue 33 and updates the semaphore S stored in the register 61 of the controller 6 . When there is an instruction in the instruction queue 33 (Not empty), the control circuit 34 transitions from the execution state S3 to the decode state S2. When the instruction queue 33 has no instruction (empty), the control circuit 34 transitions from the execution state S3 to the idle state S1.

[畳み込み演算回路4]
図9は、畳み込み演算回路4の内部ブロック図である。
畳み込み演算回路4は、重みメモリ41と、乗算器42と、アキュムレータ回路43と、ステートコントローラ44と、を有する。畳み込み演算回路4は、乗算器42およびアキュムレータ回路43に対する専用のステートコントローラ44を有しており、命令コマンドが入力されると、外部のコントローラを必要とせずに畳み込み演算を実施できる。
[Convolution arithmetic circuit 4]
FIG. 9 is an internal block diagram of the convolution arithmetic circuit 4. As shown in FIG.
The convolution circuit 4 has a weight memory 41 , a multiplier 42 , an accumulator circuit 43 and a state controller 44 . The convolution operation circuit 4 has a dedicated state controller 44 for the multiplier 42 and the accumulator circuit 43, and when an instruction command is input, the convolution operation can be performed without the need for an external controller.

重みメモリ41は、畳み込み演算に用いる重みwが格納されるメモリであり、例えばSRAM(Static RAM)などで構成された揮発性のメモリ等の書き換え可能なメモリである。DMAC3は、DMA転送により、畳み込み演算に必要な重みwを重みメモリ41に書き込む。 The weight memory 41 is a memory that stores the weight w used in the convolution operation, and is a rewritable memory such as a volatile memory such as an SRAM (Static RAM). The DMAC 3 writes the weight w required for the convolution operation into the weight memory 41 by DMA transfer.

図10は、乗算器42の内部ブロック図である。
乗算器42は、分割入力データa(x+i,y+j,co)の各要素a(x+i,y+j,ci)と、分割重みw(i,j,co,do)の各要素w(i,j,ci,di)と、を乗算する。乗算器42は、パイプライン的に接続されたBd個の積和演算ユニット48を有し、分割入力データa(x+i,y+j,co)の要素a(x+i,y+j,ci)と分割重みw(i,j,co,do)の要素w(i,j,ci,di)との乗算を並列して実施できる。
FIG. 10 is an internal block diagram of the multiplier 42. As shown in FIG.
The multiplier 42 calculates each element a(x+i, y+j, ci) of the divided input data a(x+i, y+j, co) and each element w(i, j, co, do) of the divided weight w(i, j, co, do). ci, di) and . The multiplier 42 has Bd product-sum operation units 48 connected in a pipeline, and the element a(x+i, y+j, ci) of the divided input data a(x+i, y+j, co) and the division weight w( The multiplication of i,j,co,do) with element w(i,j,ci,di) can be performed in parallel.

本実施形態において、要素a(x+i,y+j,ci)は、例えば2ビットなどの低ビットに量子化されていることから分割入力データa(x+i,y+j,co)は、Bcを8とした場合には16ビットの大きさを持つデータとなる。これは第一メモリ1または第二メモリ2のバス幅と同程度であることから、分割入力データa(x+i,y+j,co)の複数の要素を短いタイミングで効率的に読み出すことや書き込むことが可能となる。同様に、要素w(i,j,ci,di)も、例えば1ビットに量子化されていることから、分割重みw(i,j,co,do)の複数の要素を短いタイミングで読み出すことや書き込むことが可能となる。 In the present embodiment, the element a(x+i, y+j, ci) is quantized to low bits such as 2 bits, so the divided input data a(x+i, y+j, co) is becomes data having a size of 16 bits. Since this is about the same as the bus width of the first memory 1 or the second memory 2, multiple elements of the divided input data a(x+i, y+j, co) can be efficiently read and written in short timing. It becomes possible. Similarly, since the element w(i, j, ci, di) is also quantized to, for example, 1 bit, multiple elements of the division weight w(i, j, co, do) can be read at short timing. or can be written.

なお、乗算器42は、乗算に必要な要素a(x+i,y+j,ci)と要素w(i,j,ci,di)を、第一メモリ1および重みメモリ41から読み出して乗算を実施する。乗算器42は、Bd個の積和演算結果O(x+i,y+j,di)を出力する。ここで、本実施形態において第一メモリ1には一度に32×32個の要素aを格納可能とするが、これに限られるものではない。 The multiplier 42 reads the elements a(x+i, y+j, ci) and the elements w(i, j, ci, di) required for multiplication from the first memory 1 and the weight memory 41 and performs the multiplication. The multiplier 42 outputs Bd sum-of-products operation results O(x+i, y+j, di). Here, in the present embodiment, 32×32 elements a can be stored in the first memory 1 at one time, but the number of elements a is not limited to this.

図11は、積和演算ユニット48の内部ブロック図である。
積和演算ユニット48は、複数のXOR回路47、複数のカウンタ回路49、加算回路50を含み、分割入力データa(x+i,y+j,co)と、分割重みw(i,j,co,do)とを乗算する。本実施形態において、一つの積和演算ユニット48は、1x1サイズの畳み込み演算を行う回路に相当する。
FIG. 11 is an internal block diagram of the sum-of-products operation unit 48. As shown in FIG.
The sum-of-products operation unit 48 includes a plurality of XOR circuits 47, a plurality of counter circuits 49, and an addition circuit 50, and divides input data a (x+i, y+j, co) and divides weight w (i, j, co, do). Multiply with . In this embodiment, one sum-of-products operation unit 48 corresponds to a circuit that performs a 1×1 size convolution operation.

積和演算ユニット48は、分割入力データa(x+i,y+j,co)に含まれる2ビットの各要素aの上位ビットからなるデータa[1]と下位ビットからなるデータa[0]とを入力する入力部を備える。一例として、Bcを8とした場合に、a[1]及びa[0]は、それぞれ8つのバイナリ値からなる8ビットのデータとなる。さらに、積和演算ユニット48は、分割重みw(i,j,co,do)を入力する入力部を備える。なお、分割重みw(i,j,co,do)は1ビットの各要素で構成されるため、一例としてBcを8とした場合に、8ビットの値となる。 The sum-of-products operation unit 48 inputs data a[1] consisting of the upper bits of each 2-bit element a contained in the divided input data a(x+i, y+j, co) and data a[0] consisting of the lower bits. It has an input unit for As an example, if Bc is 8, a[1] and a[0] are 8-bit data each consisting of 8 binary values. Further, the sum-of-products operation unit 48 has an input section for inputting the division weight w(i, j, co, do). Note that the division weight w(i, j, co, do) is composed of 1-bit elements, so if Bc is 8 as an example, it becomes an 8-bit value.

XOR回路47は入力されるデータa[1]またはデータa[0]と分割重みw(i,j,co,do)とのXOR演算を行う。データa[1]及びデータa[0]に対するXOR演算結果は、それぞれBc個のバイナリ値からなるデータとなる。 The XOR circuit 47 performs an XOR operation of the input data a[1] or data a[0] and the division weight w(i, j, co, do). The result of the XOR operation on data a[1] and data a[0] is data consisting of Bc binary values.

XOR回路47におけるXOR演算の演算結果はそれぞれ、カウンタ回路49に入力される。カウンタ回路49は、それぞれのXOR演算の演算結果に含まれるバイナリ値として1の個数をカウントする(popcount演算)。そして、加算回路50は複数のカウンタの出力を加算して積和演算結果O(x+i,y+j,do)を出力する。本実施形態において、積和演算ユニット48が行う演算は式10で表すことができる。 The calculation results of the XOR calculation in the XOR circuit 47 are input to the counter circuit 49 respectively. The counter circuit 49 counts the number of 1s as the binary value included in the result of each XOR operation (popcount operation). The adder circuit 50 adds the outputs of a plurality of counters and outputs the sum-of-products operation result O(x+i, y+j, do). In this embodiment, the calculation performed by the sum-of-products calculation unit 48 can be represented by Equation 10.

Figure 2022183833000011
Figure 2022183833000011

図12は、アキュムレータ回路43の内部ブロック図である。
アキュムレータ回路43は、乗算器42の積和演算結果O(di)を第二メモリ2にアキュムレートする。アキュムレータ回路43は、Bd個のアキュムレータユニット48を有し、Bd個の積和演算結果O(di)を並列して第二メモリ2にアキュムレートできる。
FIG. 12 is an internal block diagram of the accumulator circuit 43. As shown in FIG.
The accumulator circuit 43 accumulates the sum-of-products operation result O(di) of the multiplier 42 in the second memory 2 . The accumulator circuit 43 has Bd accumulator units 48 and can accumulate Bd product-sum operation results O(di) in parallel in the second memory 2 .

図13は、アキュムレータユニット48の内部ブロック図である。
アキュムレータユニット48は、加算器48aと、マスク部48bとを有している。加算器48aは、積和演算結果Oの要素O(di)と、第二メモリ2に格納された式1に示す畳み込み演算の途中経過である部分和と、を加算する。加算結果は、要素あたり16ビットである。加算結果は、要素あたり16ビットに限定されず、例えば要素あたり15ビットや17ビットであってもよい。
FIG. 13 is an internal block diagram of the accumulator unit 48. As shown in FIG.
The accumulator unit 48 has an adder 48a and a mask portion 48b. The adder 48 a adds the element O(di) of the sum-of-products operation result O and the partial sum, which is the intermediate progress of the convolution operation shown in Equation 1, stored in the second memory 2 . The addition result is 16 bits per element. The addition result is not limited to 16 bits per element, and may be, for example, 15 bits or 17 bits per element.

加算器48aは、加算結果を第二メモリ2の同一アドレスに書き込む。マスク部48bは、初期化信号clearがアサートされた場合に、第二メモリ2からの出力をマスクし、要素O(di)に対する加算対象をゼロにする。初期化信号clearは、第二メモリ2に途中経過の部分和が格納されていない場合にアサートされる。 The adder 48a writes the addition result to the same address in the second memory 2. FIG. The mask unit 48b masks the output from the second memory 2 and zeros the addition target for the element O(di) when the initialization signal clear is asserted. The initialization signal clear is asserted when the intermediate partial sum is not stored in the second memory 2 .

乗算器42およびアキュムレータ回路43による畳み込み演算が完了すると、第二メモリに、出力データf(x,y,do)が格納される。 When the convolution operation by the multiplier 42 and the accumulator circuit 43 is completed, the output data f(x, y, do) are stored in the second memory.

ステートコントローラ44は、乗算器42およびアキュムレータ回路43のステートを制御する。また、ステートコントローラ44は、内部バスIBを介してコントローラ6と接続されている。ステートコントローラ44は、命令キュー45と制御回路46とを有する。 State controller 44 controls the states of multiplier 42 and accumulator circuit 43 . Also, the state controller 44 is connected to the controller 6 via an internal bus IB. The state controller 44 has an instruction queue 45 and a control circuit 46 .

命令キュー45は、畳み込み演算回路4用の命令コマンドC4が格納されるキューであり、例えばFIFOメモリで構成される。命令キュー45には、内部バスIB経由で命令コマンドC4が書き込まれる。 The instruction queue 45 is a queue in which the instruction command C4 for the convolution operation circuit 4 is stored, and is composed of a FIFO memory, for example. An instruction command C4 is written to the instruction queue 45 via the internal bus IB.

制御回路46は、命令コマンドC4をデコードし、命令コマンドC4に基づいて乗算器42およびアキュムレータ回路43を制御するステートマシンである。制御回路46は、DMAC3のステートコントローラ32の制御回路34と同様の構成である。 The control circuit 46 is a state machine that decodes the instruction command C4 and controls the multiplier 42 and the accumulator circuit 43 based on the instruction command C4. The control circuit 46 has the same configuration as the control circuit 34 of the state controller 32 of the DMAC3.

なお、本実施形態において、一つの積和演算ユニット48は、1x1サイズの畳み込み演算を行う回路に相当する例を示したが、これに限定されない。例えば、適宜分割重みw(i,j,co,do)を重みメモリ41から読み出しして複数の1x1サイズの畳み込み演算を行い、それぞれの結果をアキュムレータユニット48でアキュムレートすることにより大きいサイズの重みwを用いた畳み込み演算を実現することもできる。 In the present embodiment, one product-sum operation unit 48 has shown an example corresponding to a circuit that performs a 1×1 size convolution operation, but the present invention is not limited to this. For example, an appropriate division weight w(i, j, co, do) is read out from the weight memory 41 to perform a plurality of 1×1 size convolution operations, and each result is accumulated in the accumulator unit 48 to obtain a larger size weight. A convolution operation using w can also be implemented.

[量子化演算回路5]
図14は、量子化演算回路5の内部ブロック図である。
量子化演算回路5は、量子化パラメータメモリ51と、ベクトル演算回路52と、量子化回路53と、ステートコントローラ54と、を有する量子化演算回路5は、ベクトル演算回路52および量子化回路53に対する専用のステートコントローラ54を有しており、命令コマンドが入力されると、外部のコントローラを必要とせずに量子化演算を実施できる。
[Quantization arithmetic circuit 5]
FIG. 14 is an internal block diagram of the quantization arithmetic circuit 5. As shown in FIG.
Quantization operation circuit 5 has quantization parameter memory 51 , vector operation circuit 52 , quantization circuit 53 , and state controller 54 . It has a dedicated state controller 54, and when an instruction command is input, it can perform quantization operations without the need for an external controller.

量子化パラメータメモリ51は、量子化演算に用いる量子化パラメータqが格納されるメモリであり、例えばSRAM(Static RAM)などで構成された揮発性のメモリ等の書き換え可能なメモリである。DMAC3は、DMA転送により、量子化演算に必要な量子化パラメータqを量子化パラメータメモリ51に書き込む。 The quantization parameter memory 51 is a memory that stores the quantization parameter q used in the quantization calculation, and is a rewritable memory such as a volatile memory such as an SRAM (Static RAM). The DMAC 3 writes the quantization parameter q required for the quantization calculation into the quantization parameter memory 51 by DMA transfer.

図15は、ベクトル演算回路52と量子化回路53の内部ブロック図である。
ベクトル演算回路52は、第二メモリ2に格納された出力データf(x,y,do)に対して演算を行う。ベクトル演算回路52は、Bd個の演算ユニット57を有し、出力データf(x,y,do)に対して並列にSIMD演算を行う。
FIG. 15 is an internal block diagram of the vector operation circuit 52 and the quantization circuit 53. As shown in FIG.
The vector computation circuit 52 computes the output data f(x, y, do) stored in the second memory 2 . The vector operation circuit 52 has Bd number of operation units 57 and performs SIMD operations on output data f(x, y, do) in parallel.

図16は、演算ユニット57のブロック図である。
演算ユニット57は、例えば、ALU57aと、第一セレクタ57bと、第二セレクタ57cと、レジスタ57dと、シフタ57eと、を有する。演算ユニット57は、公知の汎用SIMD演算回路が有する他の演算器等をさらに有してもよい。
FIG. 16 is a block diagram of the arithmetic unit 57. As shown in FIG.
The arithmetic unit 57 has, for example, an ALU 57a, a first selector 57b, a second selector 57c, a register 57d, and a shifter 57e. The arithmetic unit 57 may further include other calculators and the like that a known general-purpose SIMD arithmetic circuit has.

ベクトル演算回路52は、演算ユニット57が有する演算器等を組み合わせることで、出力データf(x,y,do)に対して、量子化演算層220におけるプーリング層221や、Batch Normalization層222や、活性化関数層223の演算のうち少なくとも一つの演算を行う。 The vector operation circuit 52 performs a pooling layer 221 in the quantization operation layer 220, a batch normalization layer 222, and a At least one operation among the operations of the activation function layer 223 is performed.

演算ユニット57は、レジスタ57dに格納されたデータと第二メモリ2から読み出した出力データf(x,y,do)の要素f(di)とをALU57aにより加算できる。演算ユニット57は、ALU57aによる加算結果をレジスタ57dに格納できる。演算ユニット57は、第一セレクタ57bの選択によりレジスタ57dに格納されたデータに代えて「0」をALU57aに入力することで加算結果を初期化できる。例えばプーリング領域が2×2である場合、シフタ57eはALU57aの出力を2bit右シフトすることで加算結果の平均値を出力できる。ベクトル演算回路52は、Bd個の演算ユニット57による上記の演算等を繰り返すことで、式2に示す平均プーリングの演算を実施できる。 The arithmetic unit 57 can add the data stored in the register 57d and the element f(di) of the output data f(x, y, do) read from the second memory 2 by the ALU 57a. The arithmetic unit 57 can store the addition result by the ALU 57a in the register 57d. The arithmetic unit 57 can initialize the addition result by inputting "0" to the ALU 57a instead of the data stored in the register 57d by selecting the first selector 57b. For example, when the pooling area is 2×2, the shifter 57e can output the average value of the addition result by shifting the output of the ALU 57a to the right by 2 bits. The vector operation circuit 52 can perform the average pooling operation shown in Equation 2 by repeating the above operations and the like by the Bd number of operation units 57 .

演算ユニット57は、レジスタ57dに格納されたデータと第二メモリ2から読み出した出力データf(x,y,do)の要素f(di)とをALU57aにより比較できる。
演算ユニット57は、ALU57aによる比較結果に応じて第二セレクタ57cを制御して、レジスタ57dに格納されたデータと要素f(di)の大きい方を選択できる。演算ユニット57は、第一セレクタ57bの選択により要素f(di)の取りうる値の最小値をALU57aに入力することで比較対象を最小値に初期化できる。本実施形態において要素f(di)は16bit符号付き整数であるので、要素f(di)の取りうる値の最小値は「0x8000」である。ベクトル演算回路52は、Bd個の演算ユニット57による上記の演算等を繰り返すことで、式3のMAXプーリングの演算を実施できる。なお、MAXプーリングの演算ではシフタ57eは第二セレクタ57cの出力をシフトしない。
The arithmetic unit 57 can compare the data stored in the register 57d with the element f(di) of the output data f(x, y, do) read from the second memory 2 by the ALU 57a.
The arithmetic unit 57 can control the second selector 57c according to the result of comparison by the ALU 57a to select the larger one of the data stored in the register 57d and the element f(di). The arithmetic unit 57 can initialize the comparison target to the minimum value by inputting the minimum value of the possible values of the element f(di) to the ALU 57a by selecting the first selector 57b. Since the element f(di) is a 16-bit signed integer in this embodiment, the minimum possible value of the element f(di) is "0x8000". The vector operation circuit 52 can implement the MAX pooling operation of Equation 3 by repeating the above operations and the like by the Bd number of operation units 57 . Note that the shifter 57e does not shift the output of the second selector 57c in the MAX pooling calculation.

演算ユニット57は、レジスタ57dに格納されたデータと第二メモリ2から読み出した出力データf(x,y,do)の要素f(di)とをALU57aにより減算できる。シフタ57eはALU57aの出力を左シフト(すなわち乗算)もしくは右シフト(すなわち除算)できる。ベクトル演算回路52は、Bd個の演算ユニット57による上記の演算等を繰り返すことで、式4のBatch Normalizationの演算を実施できる。 The arithmetic unit 57 can subtract the data stored in the register 57d and the element f(di) of the output data f(x, y, do) read from the second memory 2 by the ALU 57a. Shifter 57e can left shift (ie, multiply) or right shift (ie, divide) the output of ALU 57a. The vector operation circuit 52 can perform the operation of Batch Normalization of Equation 4 by repeating the above operation and the like by the Bd number of operation units 57 .

演算ユニット57は、第二メモリ2から読み出した出力データf(x,y,do)の要素f(di)と第一セレクタ57bにより選択された「0」とをALU57aにより比較できる。演算ユニット57は、ALU57aによる比較結果に応じて要素f(di)と予めレジスタ57dに格納された定数値「0」のいずれかを選択して出力できる。ベクトル演算回路52は、Bd個の演算ユニット57による上記の演算等を繰り返すことで、式5のReLU演算を実施できる。 The arithmetic unit 57 can compare the element f(di) of the output data f(x, y, do) read from the second memory 2 with "0" selected by the first selector 57b by the ALU 57a. The arithmetic unit 57 can select and output either the element f(di) or the constant value "0" previously stored in the register 57d according to the comparison result by the ALU 57a. The vector operation circuit 52 can perform the ReLU operation of Equation 5 by repeating the above operations and the like by the Bd number of operation units 57 .

ベクトル演算回路52は、平均プーリング、MAXプーリング、Batch Normalization、活性化関数の演算およびこれらの演算の組み合わせを実施できる。ベクトル演算回路52は、汎用SIMD演算を実施できるため、量子化演算層220における演算に必要な他の演算を実施してもよい。また、ベクトル演算回路52は、量子化演算層220における演算以外の演算を実施してもよい。 The vector operation circuit 52 can perform average pooling, MAX pooling, batch normalization, activation function operations, and combinations of these operations. Since vector arithmetic circuit 52 is capable of performing general-purpose SIMD operations, it may also perform other operations required for operations in quantization operations layer 220 . Also, the vector operation circuit 52 may perform operations other than the operations in the quantization operation layer 220 .

なお、量子化演算回路5は、ベクトル演算回路52を有してなくてもよい。量子化演算回路5がベクトル演算回路52を有していない場合、出力データf(x,y,do)は量子化回路53に入力される。 Note that the quantization arithmetic circuit 5 may not have the vector arithmetic circuit 52 . If the quantization operation circuit 5 does not have the vector operation circuit 52 , the output data f(x, y, do) are input to the quantization circuit 53 .

量子化回路53は、ベクトル演算回路52の出力データに対して、量子化を行う。量子化回路53は、図15に示すように、Bd個の量子化ユニット58を有し、ベクトル演算回路52の出力データに対して並列に演算を行う。 A quantization circuit 53 quantizes the output data of the vector operation circuit 52 . As shown in FIG. 15, the quantization circuit 53 has Bd quantization units 58 and performs operations on the output data of the vector operation circuit 52 in parallel.

図17は、量子化ユニット58の内部ブロック図である。
量子化ユニット58は、ベクトル演算回路52の出力データの要素in(di)に対して量子化を行う。量子化ユニット58は、比較器58aと、エンコーダ58bと、を有する。量子化ユニット58はベクトル演算回路52の出力データ(16ビット/要素)に対して、量子化演算層220における量子化層224の演算(式6)を行う。量子化ユニット58は、量子化パラメータメモリ51から必要な量子化パラメータq(th0,th1,th2)を読み出し、比較器58aにより入力in(di)と量子化パラメータqとの比較を行う。量子化ユニット58は、比較器58aによる比較結果をエンコーダ58bにより2ビット/要素に量子化する。式4におけるα(c)とβ(c)は、変数cごとに異なるパラメータであるため、α(c)とβ(c)を反映する量子化パラメータq(th0,th1,th2)はin(di)ごとに異なるパラメータである。
FIG. 17 is an internal block diagram of quantization unit 58. As shown in FIG.
A quantization unit 58 quantizes the element in(di) of the output data of the vector operation circuit 52 . Quantization unit 58 comprises a comparator 58a and an encoder 58b. The quantization unit 58 performs the operation (formula 6) of the quantization layer 224 in the quantization operation layer 220 on the output data (16 bits/element) of the vector operation circuit 52 . The quantization unit 58 reads the necessary quantization parameters q (th0, th1, th2) from the quantization parameter memory 51, and the comparator 58a compares the input in(di) with the quantization parameter q. Quantization unit 58 quantizes the result of comparison by comparator 58a to 2 bits/element by encoder 58b. Since α(c) and β(c) in Equation 4 are different parameters for each variable c, the quantization parameter q(th0, th1, th2) reflecting α(c) and β(c) is in( d) different parameters for each;

本実施形態において、比較器58aは量子化パラメータq(th0,th1,th2)に対してのオフセット演算機能を備える。具体的には、量子化パラメータqに含まれるそれぞれの閾値に対してOff(di)を加算する。Off(di)は式11で表すことができる。 In this embodiment, the comparator 58a has an offset calculation function for the quantization parameter q (th0, th1, th2). Specifically, Off(di) is added to each threshold included in the quantization parameter q. Off(di) can be expressed by Equation 11.

Figure 2022183833000012
Figure 2022183833000012

ここで、popcount(w)は畳み込み演算に用いた分割重みw(i,j,co,do)に含まれるバイナリ値として1の個数をカウントしたものである。より詳細には比較器58aにおいて比較対象となるin(di)に相当する第二メモリ2から読み出した出力データf(x,y,do)であって、当該出力データf(x,y,do)を求める際の畳み込み演算に用いた分割重みwに含まれるバイナリ値として1の個数をカウントしたものである。例えば、レイヤ2M―1の畳み込み演算で用いた分割重みwを用い、レイヤ2Mの量子化演算の量子化パラメータqに対してpopcount(w)に依存するOff(di)を加算する。なお、ベクトル演算回路52において、出力データf(x,y,do)に対してプーリング処理、正規化処理、活性化処理などの処理を行なっている場合には、popcount(w)に対しても同様の処理を行うことが好ましい。一例として、ベクトル演算回路52において、出力データf(x,y,do)に対してビットシフト処理を行なっている場合には、同じ量のビットシフトをpopcount(w)に対しても行うことが好ましい。 Here, popcount(w) is obtained by counting the number of 1s as a binary value included in the division weight w(i, j, co, do) used in the convolution operation. More specifically, the output data f(x, y, do) read from the second memory 2 corresponding to in(di) to be compared in the comparator 58a, and the output data f(x, y, do ) is obtained by counting the number of 1s as a binary value included in the division weight w used in the convolution operation when obtaining For example, using the division weight w used in the convolution operation of the layer 2M-1, Off(di) depending on popcount(w) is added to the quantization parameter q of the quantization operation of the layer 2M. In the vector operation circuit 52, if the output data f(x, y, do) is subjected to processing such as pooling processing, normalization processing, activation processing, etc., also for popcount(w) A similar treatment is preferably performed. As an example, when the vector operation circuit 52 performs bit shift processing on the output data f(x, y, do), the same amount of bit shift processing can also be performed on popcount(w). preferable.

本実施形態において、入力データaの要素は、2ビットの符号なし整数(0,1,2,3)として、重みwの要素は、1ビットの符号付整数(0,1)であり、値「0」は+1を表し、値「1」として例示する。この場合、式1に示した畳み込み演算は式12で表すことができる。 In this embodiment, the elements of input data a are 2-bit unsigned integers (0, 1, 2, 3), the elements of weight w are 1-bit signed integers (0, 1), and the value A "0" represents +1 and is exemplified as a value of "1". In this case, the convolution operation shown in Equation 1 can be represented by Equation 12.

Figure 2022183833000013
Figure 2022183833000013

一例として出力データf(x,y,do)を16ビットの大きさを持つデータとすると、とりうる値は―32768から32767となる。このため、符号用ビットを設けるが必要がある。一方で、式10と式12を比較すると、式10では負の値を取る第3項のpopcount(w)に依存する項が存在しない。そのため、符号ビットが不要となる。この結果、式10の演算結果であるO(di)は16ビットの大きさを持つとすると、符号用ビットを設ける必要がないことから、とりうる値は0から65535となる。言い換えれば、負の値を取る項を省略することにより、f(x,y,do)の取りうるレンジを拡大することができる。言い換えれば、畳み込み演算の対象範囲を拡大することができる。より詳細には、重みwのxy方向のサイズは畳み込み演算に用いるフィルタサイズで決定されるが、c方向のサイズは加算結果がオーバーフローしない範囲で制限される。そのため、出力データf(x,y,do)の取りうる最大値の増加はオーバーフローしない範囲が拡大することに相当し、演算効率をより高めることが可能となる。 As an example, if the output data f(x, y, do) is data having a size of 16 bits, possible values range from -32768 to 32767. Therefore, it is necessary to provide a sign bit. On the other hand, comparing Equation 10 and Equation 12, Equation 10 does not have a term that depends on the third term popcount(w) that takes a negative value. Therefore, no sign bit is required. As a result, if O(di), which is the operation result of Equation 10, has a size of 16 bits, the possible values are 0 to 65535 because there is no need to provide a sign bit. In other words, by omitting the terms that take negative values, the possible range of f(x, y, do) can be expanded. In other words, the target range of the convolution operation can be expanded. More specifically, the size of the weight w in the xy direction is determined by the size of the filter used for the convolution operation, but the size in the c direction is limited within a range in which the result of addition does not overflow. Therefore, an increase in the maximum value that can be taken by the output data f(x, y, do) corresponds to an expansion of the range in which overflow does not occur, and it is possible to further improve the computational efficiency.

さらに、式10において必要なpopcount(w)に依存する項については、上述したように量子化パラメータq(th0,th1,th2)に対してのオフセット演算機能として相殺する。特にpopcount(w)は入力データaに依存しないため、学習結果としてレイヤごとに事前に決定することができる。なお、本実施形態においては、比較器58aが量子化パラメータq(th0,th1,th2)に対してのオフセット演算機能を備える場合を示したが、演算ユニット57の演算に含めるようにしても良い。また、量子化パラメータメモリ51に記憶されている量子化パラメータqに対して事前に演算を行なった結果を再度量子化パラメータメモリ51に記憶させておくようにしても良い。言い換えれば、学習した結果に基づいて学習済モデルを生成する際に、量子化パラメータqを対応する重みwを用いて更新するようにしてもよい。 Furthermore, the term dependent on popcount(w) required in Equation 10 is canceled as an offset calculation function for the quantization parameter q(th0, th1, th2) as described above. In particular, since popcount(w) does not depend on the input data a, it can be determined in advance for each layer as a learning result. In this embodiment, the comparator 58a has an offset operation function for the quantization parameter q (th0, th1, th2), but the operation of the operation unit 57 may include the offset operation function. . Alternatively, the result of pre-computing the quantization parameter q stored in the quantization parameter memory 51 may be stored in the quantization parameter memory 51 again. In other words, the quantization parameter q may be updated using the corresponding weight w when generating the trained model based on the learned result.

量子化ユニット58は、入力in(di)をオフセット演算処理を行なった後の3つの閾値th0,th1,th2と比較することにより、入力in(di)を4領域(例えば、in≦th0,th0<in≦th1,th1<in≦th2,th2<in)に分類し、分類結果を2ビットにエンコードして出力する。量子化ユニット58は、量子化パラメータq(th0,th1,th2)の設定により、量子化と併せてBatch Normalizationや活性化関数の演算を行うこともできる。 Quantization unit 58 compares input in(di) with three thresholds th0, th1, and th2 after offset arithmetic processing, thereby dividing input in(di) into four regions (for example, in≤th0, th0 <in≤th1, th1<in≤th2, th2<in), and encodes the result of classification into 2 bits and outputs it. The quantization unit 58 can also perform batch normalization and calculation of an activation function together with quantization by setting quantization parameters q (th0, th1, th2).

量子化ユニット58は、閾値th0を式4のβ(c)、閾値の差(th1―th0)および(th2―th1)を式4のα(c)として設定して量子化を行うことで、式4に示すBatch Normalizationの演算を量子化と併せて実施できる。(th1―th0)および(th2―th1)を大きくすることでα(c)を小さくできる。(th1―th0)および(th2―th1)を小さくすることで、α(c)を大きくできる。 The quantization unit 58 performs quantization by setting the threshold th0 as β(c) in Equation 4 and threshold differences (th1−th0) and (th2−th1) as α(c) in Equation 4, The Batch Normalization operation shown in Equation 4 can be performed together with quantization. α(c) can be reduced by increasing (th1-th0) and (th2-th1). α(c) can be increased by decreasing (th1-th0) and (th2-th1).

量子化ユニット58は、入力in(di)の量子化と併せて活性化関数のReLU演算を実施できる。例えば、量子化ユニット58は、in(di)≦th0およびth2<in(di)となる領域では出力値を飽和させる。量子化ユニット58は、出力が非線形とするように量子化パラメータqを設定することで活性化関数の演算を量子化と併せて実施できる。 Quantization unit 58 may perform a ReLU operation of the activation function in conjunction with quantization of the input in(di). For example, quantization unit 58 saturates the output values in regions where in(di)≤th0 and th2<in(di). Quantization unit 58 may perform activation function computation in conjunction with quantization by setting the quantization parameter q such that the output is non-linear.

ステートコントローラ54は、ベクトル演算回路52および量子化回路53のステートを制御する。また、ステートコントローラ54は、内部バスIBを介してコントローラ6と接続されている。ステートコントローラ54は、命令キュー55と制御回路56とを有する。 State controller 54 controls the states of vector operation circuit 52 and quantization circuit 53 . Also, the state controller 54 is connected to the controller 6 via an internal bus IB. The state controller 54 has an instruction queue 55 and a control circuit 56 .

命令キュー55は、量子化演算回路5用の命令コマンドC5が格納されるキューであり、例えばFIFOメモリで構成される。命令キュー55には、内部バスIB経由で命令コマンドC5が書き込まれる。 The instruction queue 55 is a queue in which the instruction command C5 for the quantization arithmetic circuit 5 is stored, and is composed of a FIFO memory, for example. The instruction command C5 is written to the instruction queue 55 via the internal bus IB.

制御回路56は、命令コマンドC5をデコードし、命令コマンドC5に基づいてベクトル演算回路52および量子化回路53を制御するステートマシンである。制御回路56は、DMAC3のステートコントローラ32の制御回路34と同様の構成である。 The control circuit 56 is a state machine that decodes the instruction command C5 and controls the vector operation circuit 52 and the quantization circuit 53 based on the instruction command C5. The control circuit 56 has the same configuration as the control circuit 34 of the state controller 32 of the DMAC3.

量子化演算回路5は、Bd個の要素を持つ量子化演算出力データを第一メモリ1に書き込む。なお、BdとBcの好適な関係を式10に示す。式10においてnは整数である。 The quantization operation circuit 5 writes quantization operation output data having Bd elements into the first memory 1 . Formula 10 shows a suitable relationship between Bd and Bc. In Equation 10, n is an integer.

この様に、量子化パラメータq及び重みwを学習した結果として、例えばレイヤ2M-1の畳み込み演算における重みwを用いて、レイヤ2Mなどの異なるレイヤの量子化パラメータqを更新などの量子化演算に反映することで、全体の演算効率を高めることができる。またより一般的には複数のレイヤに含まれる一つのレイヤを第1のレイヤとし、これと異なるレイヤを第2のレイヤとした場合に、第1のレイヤの演算(第1の演算)で用いたパラメータ(第1のパラメータ)を、第2のレイヤの演算(第2の演算)に用いることで演算効率を高めることができる。 In this way, as a result of learning the quantization parameter q and the weight w, for example, using the weight w in the convolution operation of the layer 2M-1, a quantization operation such as updating the quantization parameter q of a different layer such as the layer 2M , the overall computational efficiency can be improved. More generally, when one layer included in a plurality of layers is defined as a first layer and a different layer is defined as a second layer, Calculation efficiency can be improved by using the parameters (first parameters) used for the calculation of the second layer (second calculation).

以上、本発明の第一実施形態について図面を参照して詳述したが、具体的な構成はこの実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。また、上述の実施形態および変形例において示した構成要素は適宜に組み合わせて構成することが可能である。
(変形例1)
なお、本実施形態では、畳み込み演算に用いた重みwを用いて量子化演算に用いる量子化パラメータに反映させたが、演算を効率化させる方法としてはこれに限定されるものではない。例えば、畳み込み演算に用いた重みwを演算ユニット57の演算に反映させることも可能である。また、畳み込み演算は主に線形計算で成り立っているため、交換法則が成り立つことから、逆に量子化演算に用いる量子化パラメータの演算を簡略化するために畳み込み演算の重みwに反映させることも可能である。
As described above, the first embodiment of the present invention has been described in detail with reference to the drawings, but the specific configuration is not limited to this embodiment, and design changes and the like are included within the scope of the present invention. . Also, the constituent elements shown in the above-described embodiment and modifications can be combined as appropriate.
(Modification 1)
In this embodiment, the weight w used in the convolution operation is used to reflect the quantization parameter used in the quantization operation, but the method for improving the efficiency of the operation is not limited to this. For example, it is possible to reflect the weight w used in the convolution calculation in the calculation of the calculation unit 57 . In addition, since the convolution operation is mainly based on linear calculation, the commutative law holds. It is possible.

(変形例2)
上記実施形態において、第一メモリ1と第二メモリ2は別のメモリであったが、第一メモリ1と第二メモリ2の態様はこれに限定されない。第一メモリ1と第二メモリ2は、例えば、同一メモリにおける第一メモリ領域と第二メモリ領域であってもよい。
(Modification 2)
In the above embodiment, the first memory 1 and the second memory 2 are different memories, but the aspect of the first memory 1 and the second memory 2 is not limited to this. The first memory 1 and the second memory 2 may be, for example, a first memory area and a second memory area in the same memory.

(変形例3)
例えば、上記実施形態に記載のNN回路100に入力されるデータは単一の形式に限定されず、静止画像、動画像、音声、文字、数値およびこれらの組み合わせで構成することが可能である。なお、NN回路100に入力されるデータは、NN回路100が設けられるエッジデバイスに搭載され得る、光センサ、温度計、Global Positioning System(GPS)計測器、角速度計測器、風速計などの物理量測定器における測定結果に限られない。周辺機器から有線または無線通信経由で受信する基地局情報、車両・船舶等の情報、天候情報、混雑状況に関する情報などの周辺情報や金融情報や個人情報等の異なる情報を組み合わせてもよい。
(Modification 3)
For example, the data input to the NN circuit 100 described in the above embodiment is not limited to a single format, and can be composed of still images, moving images, voices, characters, numerical values, and combinations thereof. The data input to the NN circuit 100 can be mounted on the edge device where the NN circuit 100 is provided. It is not limited to the measurement result in the instrument. Peripheral information such as base station information, vehicle/vessel information, weather information, and congestion information received from peripheral devices via wired or wireless communication, and different information such as financial information and personal information may be combined.

(変形例4)
NN回路100が設けられるエッジデバイスは、バッテリー等で駆動する携帯電話などの通信機器、パーソナルコンピュータなどのスマートデバイス、デジタルカメラ、ゲーム機器、ロボット製品などのモバイル機器を想定するが、これに限られるものではない。Power on Ethernet(PoE)などでの供給可能なピーク電力制限、製品発熱の低減または長時間駆動の要請が高い製品に利用することでも他の先行例にない効果を得ることができる。例えば、車両や船舶などに搭載される車載カメラや、公共施設や路上などに設けられる監視カメラ等に適用することで長時間の撮影を実現できるだけでなく、軽量化や高耐久化にも寄与する。また、テレビやディスプレイ等の表示デバイス、医療カメラや手術ロボット等の医療機器、製造現場や建築現場で使用される作業ロボットなどにも適用することで同様の効果を奏することができる。
(Modification 4)
Edge devices provided with the NN circuit 100 are assumed to be communication devices such as mobile phones driven by batteries, smart devices such as personal computers, digital cameras, game devices, mobile devices such as robot products, but are limited to these. not a thing Unprecedented effects can also be obtained by using power on Ethernet (PoE), etc., to limit the peak power that can be supplied, reduce product heat generation, or use it for products that require long-time operation. For example, by applying it to in-vehicle cameras installed in vehicles and ships, surveillance cameras installed in public facilities and roads, etc., it is possible not only to realize long-time shooting, but also to contribute to weight reduction and durability. . Similar effects can be obtained by applying the present invention to display devices such as televisions and displays, medical equipment such as medical cameras and surgical robots, and work robots used at manufacturing sites and construction sites.

(変形例5)
NN回路100は、NN回路100の一部または全部を一つ以上のプロセッサを用いて実現してもよい。例えば、NN回路100は、入力層または出力層の一部または全部をプロセッサによるソフトウェア処理により実現してもよい。ソフトウェア処理により実現する入力層または出力層の一部は、例えば、データの正規化や変換である。これにより、様々な形式の入力形式または出力形式に対応できる。なお、プロセッサで実行するソフトウェアは、通信手段や外部メディアを用いて書き換え可能に構成してもよい。
(Modification 5)
NN circuit 100 may implement part or all of NN circuit 100 using one or more processors. For example, the NN circuit 100 may implement part or all of the input layer or the output layer by software processing by a processor. A part of the input layer or output layer realized by software processing is, for example, data normalization and transformation. This allows for various input or output formats. The software executed by the processor may be rewritable using communication means or external media.

(変形例6)
NN回路100は、CNN200における処理の一部をクラウド上のGraphics Processing Unit(GPU)等を組み合わせることで実現してもよい。NN回路100は、NN回路100が設けられるエッジデバイスで行った処理に加えて、クラウド上でさらに処理を行ったり、クラウド上での処理に加えてエッジデバイス上で処理を行ったりすることで、より複雑な処理を少ないリソースで実現できる。このような構成によれば、NN回路100は、処理分散によりエッジデバイスとクラウドとの間の通信量を低減できる。
(Modification 6)
The NN circuit 100 may implement part of the processing in the CNN 200 by combining a graphics processing unit (GPU) on the cloud. The NN circuit 100 performs further processing on the cloud in addition to the processing performed by the edge device provided with the NN circuit 100, or performs processing on the edge device in addition to the processing on the cloud. More complex processing can be realized with fewer resources. With such a configuration, the NN circuit 100 can reduce the amount of communication between the edge device and the cloud due to processing distribution.

(変形例7)
NN回路100が行う演算は、学習済みのCNN200の少なくとも一部であったが、NN回路100が行う演算の対象はこれに限定されない。NN回路100が行う演算は、例えば畳み込み演算と量子化演算のように、2種類の演算を繰り返す学習済みのニューラルネットワークの少なくとも一部であってもよい。
(Modification 7)
Although the operation performed by the NN circuit 100 is at least part of the learned CNN 200, the target of the operation performed by the NN circuit 100 is not limited to this. The calculations performed by the NN circuit 100 may be at least part of a trained neural network that repeats two types of calculations, such as convolution calculations and quantization calculations.

また、本明細書に記載された効果は、あくまで説明的または例示的なものであって限定的ではない。つまり、本開示に係る技術は、上記の効果とともに、または上記の効果に代えて、本明細書の記載から当業者には明らかな他の効果を奏しうる。 Also, the effects described herein are merely illustrative or exemplary, and are not limiting. In other words, the technology according to the present disclosure can produce other effects that are obvious to those skilled in the art from the description of this specification, in addition to or instead of the above effects.

本発明は、ニューラルネットワークの演算に適用することができる。 The present invention can be applied to computation of neural networks.

200 畳み込みニューラルネットワーク
100 ニューラルネットワーク回路(NN回路)
1 第一メモリ
2 第二メモリ
3 DMAコントローラ(DMAC)
4 畳み込み演算回路
42 乗算器
43 アキュムレータ回路
5 量子化演算回路
52 ベクトル演算回路
53 量子化回路
6 コントローラ
61 レジスタ
200 convolutional neural network 100 neural network circuit (NN circuit)
1 first memory 2 second memory 3 DMA controller (DMAC)
4 convolution operation circuit 42 multiplier 43 accumulator circuit 5 quantization operation circuit 52 vector operation circuit 53 quantization circuit 6 controller 61 register

Claims (8)

入力データに対して演算を行う複数のレイヤのための演算手段を備えるニューラルネットワーク装置であって、
前記複数のレイヤは少なくとも第1のパラメータを用いて第1の演算を行う第1のレイヤと、前記第1の演算とは異なる第2の演算を行う第2のレイヤを含み、
前記第2の演算は前記第1のパラメータ及び前記第1のパラメータとは異なる第2のパラメータに基づいて演算を行うことを特徴とするニューラルネットワーク装置。
A neural network device comprising computing means for a plurality of layers performing computations on input data,
The plurality of layers includes a first layer that performs a first operation using at least a first parameter and a second layer that performs a second operation different from the first operation,
The neural network device, wherein the second calculation is performed based on the first parameter and a second parameter different from the first parameter.
前記第1のレイヤと前記第2のレイヤは前記複数のレイヤにおいて連続して演算を行うレイヤであることを特徴とする請求項1に記載のニューラルネットワーク装置 2. The neural network device according to claim 1, wherein said first layer and said second layer are layers for successively performing operations in said plurality of layers. 前記第1の演算は畳み込み演算を含み、前記第2の演算は量子化演算を含むことを特徴とする請求項1または2に記載のニューラルネットワーク装置 3. The neural network device according to claim 1, wherein said first operation includes a convolution operation, and said second operation includes a quantization operation. 前記第1のパラメータは畳み込み演算に用いる重みを含み、前記第2のパラメータ量子化演算に用いる量子化パラメータを含むことを特徴とする請求項3に記載のニューラルネットワーク装置。 4. The neural network apparatus according to claim 3, wherein said first parameters include weights used in convolution calculations, and include quantization parameters used in said second parameter quantization calculations. 前記畳み込み演算を行う入力データの各要素は2ビット以下で表され、前記重みに含まれる各要素は1ビットで表されることを特徴とする請求項4に記載のニューラルネットワーク装置。 5. The neural network device according to claim 4, wherein each element of the input data for the convolution operation is represented by 2 bits or less, and each element included in the weight is represented by 1 bit. 前記演算手段は畳み込み演算を行うための第1の回路を含み、
前記第1の回路は1つ以上の排他的論理和回路及びカウンタ回路を含むことを特徴とする請求項5に記載のニューラルネットワーク装置。
the arithmetic means includes a first circuit for performing a convolution operation;
6. The neural network device according to claim 5, wherein said first circuit includes one or more exclusive OR circuits and counter circuits.
前記演算手段は第1のレイヤにおける第1の演算と第2のレイヤにおける第2の演算とを並列に行うことを特徴とする請求項1乃至6のいずれか1項に記載のニューラルネットワーク装置。 7. The neural network device according to any one of claims 1 to 6, wherein said computing means performs the first computation in the first layer and the second computation in the second layer in parallel. 請求項1乃至7のいずれか1項に記載のニューラルネットワーク装置を含むエッジデバイス。 An edge device comprising the neural network device according to any one of claims 1 to 7.
JP2021091331A 2021-05-31 2021-05-31 Neural network circuit and neural network operation method Pending JP2022183833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021091331A JP2022183833A (en) 2021-05-31 2021-05-31 Neural network circuit and neural network operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021091331A JP2022183833A (en) 2021-05-31 2021-05-31 Neural network circuit and neural network operation method

Publications (1)

Publication Number Publication Date
JP2022183833A true JP2022183833A (en) 2022-12-13

Family

ID=84437936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021091331A Pending JP2022183833A (en) 2021-05-31 2021-05-31 Neural network circuit and neural network operation method

Country Status (1)

Country Link
JP (1) JP2022183833A (en)

Similar Documents

Publication Publication Date Title
Choi et al. An energy-efficient deep convolutional neural network training accelerator for in situ personalization on smart devices
EP3709225A1 (en) System and method for efficient utilization of multipliers in neural-network computations
WO2022163861A1 (en) Neural network generation device, neural network computing device, edge device, neural network control method, and software generation program
US20220092399A1 (en) Area-Efficient Convolutional Block
WO2021210527A1 (en) Method for controlling neural network circuit
TWI773245B (en) Neural network circuit, network terminal equipment and neural network operation method
US20100257342A1 (en) Row of floating point accumulators coupled to respective pes in uppermost row of pe array for performing addition operation
CN116795324A (en) Mixed precision floating-point multiplication device and mixed precision floating-point number processing method
JP2022183833A (en) Neural network circuit and neural network operation method
CN112189216A (en) Data processing method and device
WO2023058422A1 (en) Neural network circuit and neural network circuit control method
US11335045B2 (en) Combining feature maps in an artificial intelligence semiconductor solution
WO2024038662A1 (en) Neural network training device and neural network training method
WO2022085661A1 (en) Neural network generation device, neural network control method, and software generation program
JP2022105437A (en) Neural network circuit and neural network operation method
WO2023139990A1 (en) Neural network circuit and neural network computation method
WO2022004815A1 (en) Neural network generating device, neural network generating method, and neural network generating program
WO2022230906A1 (en) Neural network generation device, neural network computing device, edge device, neural network control method, and software generation program
CN113240101A (en) Method for realizing heterogeneous SoC (system on chip) by cooperative acceleration of software and hardware of convolutional neural network
JP2022114698A (en) Neural network generator, neural network control method and software generation program
JP2023154880A (en) Neural network creation method and neural network creation program
JP2023006509A (en) Software generation device and software generation method
US20230229505A1 (en) Hardware accelerator for performing computations of deep neural network and electronic device including the same
JP2024517707A (en) Implementations and methods for processing neural networks in semiconductor hardware - Patents.com
JP2024026993A (en) Information processing device, information processing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210719