JP7467786B2 - DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD - Google Patents
DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD Download PDFInfo
- Publication number
- JP7467786B2 JP7467786B2 JP2020043230A JP2020043230A JP7467786B2 JP 7467786 B2 JP7467786 B2 JP 7467786B2 JP 2020043230 A JP2020043230 A JP 2020043230A JP 2020043230 A JP2020043230 A JP 2020043230A JP 7467786 B2 JP7467786 B2 JP 7467786B2
- Authority
- JP
- Japan
- Prior art keywords
- dimensional
- data
- processing
- filters
- processing elements
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims description 10
- 238000000034 method Methods 0.000 claims description 58
- 238000013527 convolutional neural network Methods 0.000 claims description 15
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 17
- 101100028962 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) PDR1 gene Proteins 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000000354 decomposition reaction Methods 0.000 description 3
- 238000011176 pooling Methods 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Description
特許法第30条第2項適用 (1)令和1年7月7日に8th International Congress on Advanced Applied Informaticsの予稿集にて発表。 (2)令和1年7月7日に8th International Congress on Advanced Applied Informaticsにて発表。 (3)令和1年11月27日にIoTワークショップ「センシング・エッジによるIoT革新的ビジネスの潮流」~2019年度第1回産業・インフラ向けIoTデバイス・システムの進展と活用事例~にて発表。 (4)令和2年2月13日にhttps://ieeexplore.ieee.org/document/8992640にて発表。Article 30,
本発明は、データ処理装置及びデータ処理方法に関し、特に、畳み込みニューラルネットワークにおける畳み込み演算に適したデータ処理装置及びデータ処理方法に関する。 The present invention relates to a data processing device and a data processing method, and in particular to a data processing device and a data processing method suitable for convolution operations in a convolutional neural network.
近年、ニューラルネットワークに畳み込み(Convolution)を追加した畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)が、画像認識等に有効な機械学習として広く認識されている。以下、CNNの概略について説明を行う。 In recent years, convolutional neural networks (CNNs), which add convolution to neural networks, have been widely recognized as an effective machine learning technique for image recognition and other purposes. Below, we provide an overview of CNNs.
図1は、CNNのシステム構成の概略について説明する図である。図1に示すCNNにおいて、レイヤーL1及びレイヤーL2は、畳み込み層(Convolutional Layer)及びプーリング層(Pooling Layer)をそれぞれ含む。 Figure 1 is a diagram illustrating an outline of the system configuration of a CNN. In the CNN shown in Figure 1, layer L1 and layer L2 each include a convolutional layer and a pooling layer.
畳み込み層は、入力データに対してフィルタ(Kernel)の特徴重みを乗算する演算(特徴量を畳み込む演算)を行う層である。具体的に、畳み込み層では、入力データが画像データである場合、入力データに対してそれぞれ異なるフィルタの特徴重みを乗算することによって、フィルタの数に対応する画像データを得る。すなわち、畳み込み層では、複数のフィルタを使うことによって、入力データ(画像データ)のさまざまな特徴が捉えることが可能な入力データ内のパターンを検出することが可能になる。 The convolutional layer is a layer that performs an operation to multiply the input data by the feature weights of the filters (kernels) (an operation to convolve the features). Specifically, when the input data is image data, the convolutional layer multiplies the input data by the feature weights of the different filters to obtain image data corresponding to the number of filters. In other words, by using multiple filters in the convolutional layer, it becomes possible to detect patterns in the input data that can capture various features of the input data (image data).
また、プーリング層は、畳み込み層の直後に配置される層である。プーリング層では、レイヤーを縮小することによって、後続処理の実行を容易にすることが可能になり、かつ、畳み込み層において抽出された特徴の位置感度を低下させることが可能になる。 The pooling layer is a layer that is placed immediately after the convolution layer. The pooling layer shrinks the layer, making it easier to perform subsequent processing, and also reducing the position sensitivity of the features extracted in the convolution layer.
その後、CNNでは、レイヤーL3からレイヤーL5において全結合した多層パーセプトロンを配置することによって、入力データ(画像データ)の認識を行う(例えば、特許文献1を参照)。 Then, in the CNN, fully connected multilayer perceptrons are arranged in layers L3 to L5 to recognize the input data (image data) (see, for example, Patent Document 1).
ここで、上記のようなCNNにおける畳み込み演算(特に、序盤のレイヤーにおいて行われる畳み込み演算)では、膨大な回数の積和演算が行われる。以下、畳み込み演算において行われる積和演算ついて説明を行う。 Here, in the convolution calculations in the above-mentioned CNN (especially the convolution calculations performed in the early layers), a huge number of product-sum calculations are performed. Below, we will explain the product-sum calculations performed in the convolution calculations.
図2は、畳み込み演算において行われる積和演算について説明する図である。図2(A)に示す例における入力データ(input feature map)は、データサイズがNix×Niyであって、チャネル数がNifである。また、図2(A)に示す例におけるフィルタ(filters)は、データサイズがNkx×Nkyである。さらに、図2(A)に示す例における出力データ(output feature map)は、データサイズがNox×Noyであって、チャネル数がNofである。 Figure 2 is a diagram explaining the product-sum operation performed in the convolution operation. The input data (input feature map) in the example shown in Figure 2(A) has a data size of Nix x Niy and the number of channels is Nif. The filters (filters) in the example shown in Figure 2(A) have a data size of Nkx x Nky. Furthermore, the output data (output feature map) in the example shown in Figure 2(A) has a data size of Nox x Noy and the number of channels is Nof.
そして、この例における畳み込み演算では、図2(B)に示すように、積和演算として「pixelL(no;x,y)+=pixelL-1(ni;x+kx,y+ky)*weightL-1(ni,no;kx,ky)」が繰り返し行われる。なお、図2(B)に示す例において、「bias(no)」がない場合、「pixelL(no;x,y)」の初期値は0になる。 In the convolution operation in this example, as shown in Fig. 2B, "pixel L (no; x, y) + = pixel L-1 (ni; x + kx, y + ky) * weight L-1 (ni, no; kx, ky)" is repeatedly performed as a multiplication and addition operation. Note that in the example shown in Fig. 2B, if there is no "bias (no)", the initial value of "pixel L (no; x, y)" will be 0.
ここで、図2(B)に示す例における積和演算の実行回数は、Nof×Nox×Noy×Nif×Nkx×Nky(回)になる。そのため、Nof等の大きさによっては、実行する必要がある積和演算の実行回数が膨大になる。 Here, the number of times the multiply-and-accumulate operation is performed in the example shown in FIG. 2B is Nof×Nox×Noy×Nif×Nkx×Nky (times). Therefore, depending on the size of Nof, etc., the number of times the multiply-and-accumulate operation needs to be performed may become enormous.
したがって、例えば、CNNをロボットの動作制御や自動車の自動運転等の様々な分野においてより活用させる場合、畳み込み層において行われる畳み込み演算(積和演算)を可能な限り並行に実行し、CNNにおける処理時間をより高速化させる必要がある。 Therefore, for example, to utilize CNN in various fields such as robot motion control and autonomous driving, it is necessary to perform the convolution operations (product-accumulation operations) in the convolution layer in parallel as much as possible to speed up the processing time in CNN.
そこで、本発明の目的は、畳み込み演算を高速に行うことを可能とするデータ処理装置及びデータ処理方法を提供することにある。 The object of the present invention is to provide a data processing device and a data processing method that enable high-speed convolution operations.
上記目的を達成するための本発明におけるデータ処理装置は、2次元の入力データの特徴量を前記2次元の入力データに対応する複数のフィルタを用いて算出するデータ処理装置であって、2次元に配置された複数のプロセッシングエレメントからなるプロセッシングエレメント群と、前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第1記憶部と、を有し、前記プロセッシングエレメント群は、前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信し、前記複数のフィルタごとに、各フィルタに含まれる1つの特徴重みをそれぞれ取得し、取得した前記複数のフィルタごとの前記1つの特徴重みを、前記複数のプロセッシングエレメントと同じ数だけ複製して前記複数のプロセッシングエレメントと同じ配置にすることによって3次元の特徴重みを生成し、前記複数のプロセッシングエレメントのそれぞれに、取得した前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信し、前記複数のプロセッシングエレメントのそれぞれに、送信した前記2次元の入力データに含まれるデータと、送信した前記複数のフィルタごとの前記1つの特徴重みとを乗算させることによって3次元の積を算出させ、前記第1記憶部における前記3次元の記憶領域に記憶された値に前記3次元の積を加算し、前記複数のプロセッシングエレメントのそれぞれに対して前記3次元の積の算出にまだ用いられていないデータが送信されるように、前記複数のプロセッシングエレメントのそれぞれに、前記複数のプロセッシングエレメントのそれぞれが保持する前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させ、前記加算する処理が行われた回数が前記複数のフィルタのそれぞれに含まれる特徴重みの数に到達するまで、前記取得する処理、前記生成する処理、前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信する処理、前記算出させる処理、前記加算する処理及び前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させる処理を繰り返す、ことを特徴とする。 In order to achieve the above object, the data processing device of the present invention is a data processing device that calculates a feature amount of two-dimensional input data using a plurality of filters corresponding to the two-dimensional input data, and has a processing element group consisting of a plurality of processing elements arranged in two dimensions, and a first storage unit having a three-dimensional storage area for each of the plurality of processing elements and for each of the plurality of filters, and the processing element group transmits each of the data included in the two-dimensional input data to one of the plurality of processing elements such that all of the transmission destinations are different processing elements, and for each of the plurality of filters, obtains one feature weight included in each filter, and generates three-dimensional feature weights by duplicating the one feature weight obtained for each of the plurality of filters the same number as the plurality of processing elements and arranging them in the same arrangement as the plurality of processing elements, and transmits the one feature weight obtained for each of the plurality of filters to each of the plurality of processing elements. the first storage unit, and causes each of the processing elements to multiply the data included in the two-dimensional input data transmitted by the one feature weight for each of the filters transmitted to calculate a three-dimensional product; the first storage unit, and each of the processing elements, transmits the data included in the two-dimensional input data held by each of the processing elements to an adjacent processing element so that data not yet used in the calculation of the three-dimensional product is transmitted to each of the processing elements; and the process of acquiring, generating, transmitting each of the one feature weight for each of the filters, calculating, adding, and transmitting the data included in the two-dimensional input data to an adjacent processing element are repeated until the number of times the adding process has been performed reaches the number of feature weights included in each of the filters.
上記目的を達成するための本発明におけるデータ処理装置は、前記プロセッシングエレメント群は、畳み込みニューラルネットワークの畳み込み層における処理を行う、ことを特徴とする。 To achieve the above object, the data processing device of the present invention is characterized in that the group of processing elements performs processing in the convolutional layer of a convolutional neural network.
上記目的を達成するための本発明におけるデータ処理装置は、前記プロセッシングエレメント群は、前記繰り返す処理の後、前記第1記憶部に記憶された前記3次元の値を出力する、ことを特徴とする。 To achieve the above object, the data processing device of the present invention is characterized in that, after the repeated processing, the processing element group outputs the three-dimensional values stored in the first storage unit.
上記目的を達成するための本発明におけるデータ処理装置は、前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第2記憶部を有し、前記プロセッシングエレメント群は、生成した前記3次元の特徴重みを前記第2記憶部に記憶する、ことを特徴とする。 To achieve the above object, the data processing device of the present invention has a second storage unit having a three-dimensional storage area for each of the plurality of processing elements and for each of the plurality of filters, and the processing element group stores the generated three-dimensional feature weights in the second storage unit.
上記目的を達成するための本発明におけるデータ処理装置は、前記複数のプロセッシングエレメントごとの2次元の記憶領域を有する第3記憶部を有し、前記プロセッシングエレメント群は、前記第3記憶部に記憶された前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信する、ことを特徴とする。 To achieve the above object, the data processing device of the present invention is characterized in that it has a third storage unit having a two-dimensional storage area for each of the plurality of processing elements, and the group of processing elements transmits each of the data contained in the two-dimensional input data stored in the third storage unit to one of the plurality of processing elements such that all of the data are transmitted to different processing elements.
上記目的を達成するための本発明におけるデータ処理装置は、それぞれ異なる前記2次元の入力データとそれぞれ異なる前記複数のフィルタにとに基づく処理を行う複数の前記プロセッシングエレメント群と、前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第4記憶部と、を有し、前記複数のプロセッシングエレメント群は、前記繰り返す処理の後、各プロセッシングエレメント群の前記第1記憶部に記憶した前記3次元の値をそれぞれ加算することによって3次元の合計値を算出し、算出した前記3次元の合計値を前記第4記憶部に記憶する、ことを特徴とする。 To achieve the above object, the data processing device of the present invention has a plurality of processing element groups each performing processing based on different two-dimensional input data and different filters, and a fourth storage unit having a three-dimensional storage area for each of the plurality of processing elements and for each of the plurality of filters, and after the repeated processing, the plurality of processing element groups calculate a three-dimensional total value by adding up the three-dimensional values stored in the first storage unit of each processing element group, and store the calculated three-dimensional total value in the fourth storage unit.
上記目的を達成するための本発明におけるデータ処理装置は、前記複数のプロセッシングエレメント群は、前記3次元の合計値を算出する処理の後、前記第4記憶部に記憶された前記3次元の合計値を出力する、ことを特徴とする。 To achieve the above object, the data processing device of the present invention is characterized in that the group of multiple processing elements outputs the three-dimensional sum stored in the fourth storage unit after the process of calculating the three-dimensional sum.
また、上記目的を達成するための本発明におけるデータ処理方法は、2次元の入力データの特徴量を前記2次元の入力データに対応する複数のフィルタを用いて算出するデータ処理装置におけるデータ処理方法であって、2次元に配置された複数のプロセッシングエレメントからなるプロセッシングエレメント群と、前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第1記憶部と、を有し、前記プロセッシングエレメント群は、前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信し、前記複数のフィルタごとに、各フィルタに含まれる1つの特徴重みをそれぞれ取得し、取得した前記複数のフィルタごとの前記1つの特徴重みを、前記複数のプロセッシングエレメントと同じ数だけ複製して前記複数のプロセッシングエレメントと同じ配置にすることによって3次元の特徴重みを生成し、前記複数のプロセッシングエレメントのそれぞれに、取得した前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信し、前記複数のプロセッシングエレメントのそれぞれに、送信した前記2次元の入力データに含まれるデータと、送信した前記複数のフィルタごとの前記1つの特徴重みとを乗算させることによって3次元の積を算出させ、前記第1記憶部における前記3次元の記憶領域に記憶された値に前記3次元の積を加算し、前記複数のプロセッシングエレメントのそれぞれに対して前記3次元の積の算出にまだ用いられていないデータが送信されるように、前記複数のプロセッシングエレメントのそれぞれに、前記複数のプロセッシングエレメントのそれぞれが保持する前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させ、前記加算する処理が行われた回数が前記複数のフィルタのそれぞれに含まれる特徴重みの数に到達するまで、前記取得する処理、前記生成する処理、前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信する処理、前記算出させる処理、前記加算する処理及び前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させる処理を繰り返す、ことを特徴とする。 In addition, the data processing method of the present invention for achieving the above object is a data processing method in a data processing device that calculates a feature amount of two-dimensional input data using a plurality of filters corresponding to the two-dimensional input data, the data processing method comprising: a processing element group consisting of a plurality of processing elements arranged two-dimensionally; and a first storage unit having a three-dimensional storage area for each of the plurality of processing elements and for each of the plurality of filters, the processing element group transmits each of the data included in the two-dimensional input data to one of the plurality of processing elements such that all of the transmission destinations are different processing elements, obtains one feature weight included in each filter for each of the plurality of filters, copies the obtained one feature weight for each of the plurality of filters by the same number as the plurality of processing elements and arranges them in the same manner as the plurality of processing elements to generate three-dimensional feature weights, and transmits the obtained one feature weight for each of the plurality of filters to each of the plurality of processing elements. the first storage unit, and causes each of the processing elements to calculate a three-dimensional product by multiplying the data included in the two-dimensional input data transmitted by the one feature weight for each of the multiple filters transmitted; the first storage unit, and the processing element, each of the processing elements, transmits the data included in the two-dimensional input data held by each of the multiple processing elements to an adjacent processing element so that data not yet used in the calculation of the three-dimensional product is transmitted to each of the multiple processing elements; and the process of acquiring, generating, transmitting the one feature weight for each of the multiple filters, calculating, adding, and transmitting the data included in the two-dimensional input data to an adjacent processing element is repeated until the number of times the adding process has been performed reaches the number of feature weights included in each of the multiple filters.
本発明におけるデータ処理装置及びデータ処理方法によれば、畳み込み層において行われる畳み込み演算を並行に実行することが可能になるため、畳み込み演算を高速に行うことが可能になる。 The data processing device and data processing method of the present invention make it possible to execute the convolution operations in the convolution layer in parallel, thereby enabling the convolution operations to be performed at high speed.
以下、図面を参照して本発明の実施の形態について説明する。しかしながら、かかる実施の形態例が、本発明の技術的範囲を限定するものではない。 Below, an embodiment of the present invention will be described with reference to the drawings. However, such an embodiment does not limit the technical scope of the present invention.
[データ処理装置の構成]
初めに、データ処理装置10の構成について説明を行う。図3は、本発明の実施の形態におけるデータ処理装置10の構成例を示す図である。
[Configuration of data processing device]
First, a description will be given of the configuration of the
データ処理装置10は、図3に示す例において、基盤12と、CPU(Central Processing Unit)13とを有する。そして、基盤12は、図3に示す例において、チップ14と、オフチップメモリ15(以下、単にメモリ15とも呼ぶ)とを有する。すなわち、データ処理装置10では、例えば、CPU13とチップ14とが各種処理を分担して実行する。
In the example shown in FIG. 3, the
なお、基盤12は、例えば、FPGA(Field-Programmable Gate Array)ボードであってよい。また、チップ14は、例えば、FPGAチップやASIC(Application Specific Integrated Circuit)チップであってよい。
The
さらに、チップ14は、図3に示す例において、コントローラ17と、オンチップメモリ16(以下、単にメモリ16とも呼ぶ)と、TPE(Tensor Processing Element)1からTPEmまでのm個のTPEを含むプロセッサであるSTP(Soft Tensor Processor)20とを有する。なお、以下、TPE1からTPEmを総称して単にTPEとも呼ぶ。
Furthermore, in the example shown in FIG. 3, the
図3に示す例において、メモリ16には、畳み込み演算の対象である3次元の入力データXが記憶される情報格納領域であるバッファ21と、畳み込み演算に用いられるフィルタが記憶される情報格納領域であるバッファ22と、畳み込み演算の演算結果が記憶される情報格納領域であるバッファ23(以下、第4記憶部とも呼ぶ)とが含まれる。
In the example shown in FIG. 3,
また、図3に示す例において、コントローラ17は、例えば、バッファ21、バッファ22及びバッファ23に格納された各種情報をTPEのそれぞれに送信することによって、TPEのそれぞれに畳み込み演算を行わせる処理を行う。
In the example shown in FIG. 3, the
[TPEの構成]
次に、TPEの構成について説明を行う。図4は、本実施の形態におけるTPEnの構成例を示す図である。なお、TPEn以外の他のTPEについては、TPEnと同様の構成であるため説明を省略する。
[Configuration of TPE]
Next, the configuration of the TPE will be described. Fig. 4 is a diagram showing an example of the configuration of the TPEn in this embodiment. Note that the other TPEs than the TPEn have the same configuration as the TPEn, so the description will be omitted.
図4に示す例において、TPEnは、それぞれ畳み込み演算(積和演算)を行うNox×Noy個の演算器Uと、演算器Uにおける畳み込み演算の演算結果が記憶されるレジスタR1,1からR1,Nofのそれぞれ(以下、これらを総称してレジスタR1または第1記憶部とも呼ぶ)と、バッファ22に記憶されていたフィルタの一部を格納するレジスタR2,1からレジスタR2,Nofのそれぞれ(以下、これらを総称してレジスタR2または第2記憶部とも呼ぶ)と、バッファ21に格納されていた入力データXの一部を記憶するレジスタR3(以下、第3記憶部とも呼ぶ)と、を有する。
In the example shown in FIG. 4, TPEn has Nox×Noy arithmetic units U each performing a convolution operation (multiply-and-accumulate operation), registers R1,1 to R1,Nof (hereinafter collectively referred to as register R1 or first storage unit) in which the results of the convolution operation in arithmetic unit U are stored, registers R2,1 to R2,Nof (hereinafter collectively referred to as register R2 or second storage unit) in which a portion of the filter stored in
具体的に、コントローラ17は、図4に示すように、バッファ22に記憶されたNof種類のフィルタのうち、1種類目のフィルタに含まれる1つ目の特徴重みω1
(1)を取得し、取得した特徴重みω1
(1)をNox×Noy個(演算器Uと同じ数)に複製して配置することによって2次元の特徴重みω1
(1)を生成し、生成した2次元の特徴重みω1
(1)をレジスタR2,1に記憶する。
Specifically, as shown in FIG. 4 , the
また、コントローラ17は、図4に示すように、バッファ22に記憶されたNof種類のフィルタのうち、2種類目のフィルタに含まれる1つ目の特徴重みω2
(1)を取得し、取得した特徴重みω2
(1)をNox×Noy個に複製して配置することによって2次元の特徴重みω2
(1)を生成し、生成した2次元の特徴重みω2
(1)をレジスタR2,2に記憶する。
Moreover, as shown in FIG. 4 , the
さらに、コントローラ17は、他の種類のフィルタに含まれる1つ目の特徴重みについても同様に、2次元の特徴重みを生成してレジスタR2に記憶する。
Furthermore, the
すなわち、コントローラ17は、Nof種類のフィルタのそれぞれに対応する2次元の特徴重み(以下、これらを纏めて3次元の特徴重みΩとも呼ぶ)を生成してレジスタR2に記憶する。
That is, the
また、コントローラ17は、図4に示すように、バッファ21に記憶された3次元の入力データXのうち、TPEnに対応する2次元の入力データXをレジスタR3に記憶する。
In addition, as shown in FIG. 4, the
続いて、Nox×Noy個の演算器Uは、レジスタR2に記憶された3次元の特徴重みΩを分解することによってNof個の2次元の特徴重みΩを生成する。そして、Nox×Noy個の演算器Uは、レジスタR3に記憶された2次元の入力データXと、分解することによって生成されたNof個の2次元の特徴重みΩのそれぞれとを乗算することによって、Nof個の2次元の積(以下、これらを纏めて3次元の積とも呼ぶ)を算出する。 Then, the Nox×Noy calculators U generate Nof two-dimensional feature weights Ω by decomposing the three-dimensional feature weights Ω stored in the register R2. Then, the Nox×Noy calculators U multiply the two-dimensional input data X stored in the register R3 by each of the Nof two-dimensional feature weights Ω generated by the decomposition, thereby calculating Nof two-dimensional products (hereinafter, these are also collectively referred to as three-dimensional products).
すなわち、Nox×Noy個の演算器Uのそれぞれは、レジスタR3に記憶された2次元の入力データXのうち、各演算器Uに対応するデータと、分解することによって生成されたNof個の2次元の特徴重みΩのそれぞれのうち、各演算器Uに対応する特徴重みとを乗算することによって、1×1×Nof個の積を算出する。そのため、Nox×Noy個の演算器Uは、全体として、Nox×Noy×Nof個の3次元の積の算出を行う。 That is, each of the Nox×Noy calculators U calculates 1×1×Nof products by multiplying the data corresponding to each calculator U among the two-dimensional input data X stored in register R3 by the feature weight corresponding to each calculator U among the Nof two-dimensional feature weights Ω generated by decomposition. Therefore, the Nox×Noy calculators U as a whole calculate Nox×Noy×Nof three-dimensional products.
そして、Nox×Noy個の演算器Uは、算出した3次元の積を、レジスタR1に記憶された3次元のデータZ(既に算出した3次元の積の総和)に加算する。 Then, the Nox x Noy calculators U add the calculated three-dimensional products to the three-dimensional data Z stored in register R1 (the sum of the three-dimensional products already calculated).
その後、Nox×Noy個の演算器Uは、バッファ22に記憶された各フィルタに含まれる特徴重みの数に対応する回数(K2回)だけ、上記の処理を繰り返し行う。以下、TPEnにおける処理の詳細について説明を行う。
Thereafter, the Nox×Noy computing units U repeat the above process a number of times (K 2 times) corresponding to the number of feature weights included in each filter stored in the
[TPEにおける処理の詳細のフローチャート]
図5から図8は、TPEnにおける処理の詳細のフローチャート図である。
[Flowchart showing details of processing in TPE]
5 to 8 are flow charts showing details of the processing in TPEn.
コントローラ17は、図5に示すように、3次元の入力データXに含まれる2次元の入力データXのそれぞれを識別する変数であるiにnを設定する(S01)。すなわち、TPEnがTPE1である場合、コントローラ17は、iに1を設定する。また、コントローラ17は、各フィルタに含まれる特徴重みを識別する変数であるkに1を設定する(S02)。
As shown in FIG. 5, the
そして、コントローラ17は、nが1である場合(S03のYES)、バッファ22からバイアスに対応する3次元のデータを取得してレジスタR1に記憶する(S04)。
If n is 1 (YES in S03), the
一方、コントローラ17は、nが1でない場合(S03のNO)、全ての要素が0であってデータサイズがNox×Noy×Nofである3次元のデータZをレジスタR1に記憶する(S05)。すなわち、TPEnが1である場合に限り、バイアスが加算されるように積和演算を行う。
On the other hand, if n is not 1 (NO in S03), the
そして、コントローラ17は、バッファ21に記憶された3次元の入力データXのうち、第iチャネルに対応する2次元のデータXを取得してレジスタR3に記憶する(S06)。
Then, the
続いて、コントローラ17は、図6に示すように、バッファ22に記憶された各フィルタの第iチャネルに含まれる特徴重みのうち、kに対応する1×1×Nofのデータサイズの特徴重みを取得する(S11)。
Next, as shown in FIG. 6, the
そして、コントローラ17は、S11の処理で取得した各特徴重みをNox×Noy個に複製することによってNox×Noy×Nofの3次元の特徴重みΩを生成してレジスタR2に格納する(S12)。
Then, the
その後、Nox×Noy個の演算器Uは、レジスタR1に記憶された3次元のデータZを取得する(S13)。また、Nox×Noy個の演算器Uは、レジスタR2に記憶された3次元のデータΩを取得する(S14)。さらに、Nox×Noy個の演算器Uは、レジスタR3に記憶された2次元のデータXを取得する(S15)。 Then, the Nox×Noy calculators U acquire the three-dimensional data Z stored in the register R1 (S13). The Nox×Noy calculators U also acquire the three-dimensional data Ω stored in the register R2 (S14). Furthermore, the Nox×Noy calculators U acquire the two-dimensional data X stored in the register R3 (S15).
続いて、Nox×Noy個の演算器Uは、S14の処理で取得したNox×Noy×Nofの3次元のデータΩをNof個の2次元のデータ(データサイズがNox×Noyであるデータ)に分解し、分解した各2次元のデータとS15で取得した2次元のデータXとの3次元の積に対し、S13の処理で取得した3次元のデータZを加算する(S16)。 Next, the Nox x Noy calculators U decompose the Nox x Noy x Nof three-dimensional data Ω obtained in the process of S14 into Nof two-dimensional data (data with a data size of Nox x Noy), and add the three-dimensional data Z obtained in the process of S13 to the three-dimensional product of each of the decomposed two-dimensional data and the two-dimensional data X obtained in S15 (S16).
すなわち、各演算器Uは、3次元データΩから分解された2次元のデータに含まれる1×1のデータサイズのデータと、データXに含まれる1×1のデータサイズのデータとの積に対し、3次元のデータZのうちの対応するデータを加算する。 That is, each calculator U adds the corresponding data in the three-dimensional data Z to the product of the 1x1 data size data contained in the two-dimensional data decomposed from the three-dimensional data Ω and the 1x1 data size data contained in the data X.
そして、コントローラ17は、図7に示すように、レジスタR1に記憶された3次元のデータZを、S16の処理で算出した3次元のデータに更新する(S21)。
Then, as shown in FIG. 7, the
次に、コントローラ17は、レジスタR3に記憶された2次元のデータXを所定の方法によって与えられた方向にシフトする(S22)。具体的に、コントローラ17は、2次元のデータXに含まれる各データが各フィルタに含まれる全ての特徴重みを巡回するように、2次元のデータXのシフト方向を決定する。S22の処理の具体例については後述する。
Next, the
そして、コントローラ17は、kに1を加算する(S23)。その結果、kがK2以上でない場合(S24のNO)、コントローラ17は、S06以降の処理を再度行う。
Then, the
一方、kがK2以上である場合(S24のYES)、コントローラ17は、iにmを加算する(S25)。その結果、iがNif以上でない場合(S26のNO)、コントローラ17は、S06以降の処理を再度行う。すなわち、バッファ21に記憶された3次元の入力データXの全てが処理済でないと判定した場合、コントローラ17は、S06以降の処理を再度行う。以下、S16からS22の処理の具体例について説明を行う。
On the other hand, if k is equal to or greater than K2 (YES in S24), the
[S16からS22の処理の具体例]
図9から図15は、S16からS22の処理の具体例について説明する図である。以下、図9に示すように、TPEnに4×4個の演算器U(演算器U1,1、U1,2、U1,3、U1,4、U2,1、U2,2、U2,3、U2,4、U3,1、U3,2、U3,3、U3,4、U4,1、U4,2、U4,3及びU4,4)が搭載されているものとして説明を行う。また、以下、各フィルタに含まれる特徴重みの数(K2)が9であるものとして説明を行う。
[Specific example of processing from S16 to S22]
9 to 15 are diagrams for explaining a specific example of the process from S16 to S22. In the following, as shown in FIG. 9, the TPEn is assumed to have 4×4 calculators U (calculator U 1,1 , U 1,2 , U 1,3 , U 1,4 , U 2,1 , U 2,2 , U 2,3 , U 2,4 , U 3,1 , U 3,2 , U 3,3 , U 3,4 , U 4,1 , U 4,2 , U 4,3 and U 4,4 ). In the following, the number of feature weights (K 2 ) included in each filter is assumed to be 9.
(kが1の場合の処理)
初めに、kが1の場合の処理について説明を行う。
(Processing when k is 1)
First, the process when k is 1 will be described.
この場合、コントローラ17は、図10(A)に示すように、分解後の2次元の特徴重みω1を演算器U1,1から演算器U4,4のそれぞれに送信(ブロードキャスト送信)する。また、コントローラ17は、図10(A)に示すように、レジスタR3に格納された2次元の入力データXに含まれるデータX1,1からデータX4,4を演算器U1,1から演算器U4,4のそれぞれに送信する。
In this case, as shown in Fig. 10A, the
その後、演算器U1,1から演算器U4,4のそれぞれは、特徴重みω1とデータXとを乗算する。具体的に、例えば、演算器U2,2は、図10(A)に示すように、特徴重みω1とデータX2,2との積を算出する。 Thereafter, each of the calculators U1,1 to U4,4 multiplies the feature weight ω1 by the data X. Specifically, for example, the calculator U2,2 calculates the product of the feature weight ω1 and the data X2,2 as shown in FIG.
続いて、演算器U1,1から演算器U4,4のそれぞれは、レジスタR3に格納された3次元のデータZのうち、各演算器Uに対応するデータに、算出した積を加算する。具体的に、例えば、演算器U2,2は、図10(B)のStep1に示すように、レジスタR3に格納された3次元のデータZのうち、演算器U2,2に対応する値(kが1である場合は0)に、特徴重みω1とデータX2,2との積を加算する。 Next, each of the calculators U1,1 to U4,4 adds the calculated product to the data corresponding to each calculator U among the three-dimensional data Z stored in the register R3. Specifically, for example, the calculator U2,2 adds the product of the feature weight ω1 and the data X2,2 to the value corresponding to the calculator U2,2 (0 when k is 1) among the three-dimensional data Z stored in the register R3, as shown in Step 1 of FIG. 10B .
そして、演算器U1,1から演算器U4,4は、それぞれが保持しているデータXを隣接している演算器Uに送信する。具体的に、例えば、演算器U2,2は、図11(A)に示すように、データX2,2を演算器U2,1に送信する。 Then, the calculators U1,1 to U4,4 transmit the data X that they hold to the adjacent calculator U. Specifically, for example, the calculator U2,2 transmits the data X2,2 to the calculator U2,1 as shown in FIG.
ここで、データXの送信方向に他の演算器Uが存在しない場合、各演算器Uは、図10(A)等に示すトラースネットワークを用いることによって、それぞれが保持しているデータXを反対側の演算器Uに送信するものであってよい。具体的に、図10(A)に示す例において、演算器U1,1、演算器U2,1、演算器U3,1及び演算器U4,1(左端に位置する演算器U)は、それぞれが保持しているデータを演算器U1,4、演算器U2,4、演算器U3,4及び演算器U4,4(右端に位置する演算器U)のそれぞれに送信する。 Here, when there is no other computing unit U in the transmission direction of the data X, each computing unit U may transmit the data X held by it to the computing unit U on the opposite side by using the trace network shown in Fig. 10(A) etc. Specifically, in the example shown in Fig. 10(A), the computing units U1,1 , U2,1 , U3,1 and U4,1 (the computing units U located at the left end) transmit the data held by them to the computing units U1,4 , U2,4 , U3,4 and U4,4 (the computing units U located at the right end), respectively.
これにより、各演算器Uは、データXの送信方向に他の演算器Uが存在しない場合であっても、それぞれが保持しているデータXがシフトによって失われることを防止することが可能になる。 This allows each computing unit U to prevent the data X held by each computing unit U from being lost due to a shift, even if there are no other computing units U in the transmission direction of the data X.
なお、演算器U1,1、演算器U2,1、演算器U3,1及び演算器U4,1は、この場合、トラースネットワークを経由して反対側の演算器Uに送信されたデータXが反対側の演算器Uにおいて積和計算に用いられることを防止する必要がある。そのため、演算器U1,1、演算器U2,1、演算器U3,1及び演算器U4,1のそれぞれは、例えば、トラースネットワークを経由して反対側の演算器Uから送信されたデータであることを示すフラグ(積和計算に用いられないデータであることを示すフラグ)を付加した上で、演算器U1,4、演算器U2,4、演算器U3,4及び演算器U4,4に対してデータXの送信を行う。 In this case, the calculators U1,1 , U2,1 , U3,1 , and U4,1 need to prevent the data X transmitted to the calculator U on the opposite side via the trace network from being used for product-sum calculation in the calculator U on the opposite side. For this reason, each of the calculators U1,1 , U2,1 , U3,1 , and U4,1 transmits the data X to the calculators U1,4, U2,4 , U3,4, and U4,4 after adding a flag indicating that the data is transmitted from the calculator U on the opposite side via the trace network ( a flag indicating that the data is not used for product - sum calculation).
また、TPEnは、この場合、演算器U1,1等の4×4個の演算器Uの外側に配置されたパティング用の演算器Uをさらに有するものであってもよい。そして、図10(A)に示す例において、演算器U1,1、演算器U2,1、演算器U3,1及び演算器U4,1は、それぞれが保持しているデータを、各演算器Uの左側に位置するパティング用の演算器Uに送信するものであってよい。 In this case, TPEn may further include a padding calculator U arranged outside the 4×4 calculators U such as calculator U1,1 . In the example shown in Fig. 10A, calculators U1,1 , U2,1 , U3,1 , and U4,1 may transmit data held by each of them to a padding calculator U arranged to the left of each of the calculators U.
なお、この場合、TPEnが有する演算器U(パティング用の演算器Uを含む)の数は、以下の式(1)によって算出される。 In this case, the number of operators U (including the operator U for padding) that TPEn has is calculated using the following formula (1).
次に、kが2の場合の処理について説明を行う。
Next, the process when k is 2 will be described.
この場合、コントローラ17は、図11(A)に示すように、分解後の2次元の特徴重みω2を演算器U1,1から演算器U4,4のそれぞれに送信(ブロードキャスト送信)する。そして、演算器U1,1から演算器U4,4のそれぞれは、データXを保持している場合(直前に行われたS12の処理において隣接する演算器UからデータXを受信している場合)、特徴重みω2とデータXとを乗算する。具体的に、例えば、演算器U2,2は、図11(A)に示すように、特徴重みω2とデータX2,3(演算器U2,2から送信されたデータX)との積を算出する。
In this case, the
続いて、演算器U1,1から演算器U4,4のそれぞれは、レジスタR3に格納された3次元のデータZのうち、各演算器Uに対応する値に、算出した積を加算する。具体的に、例えば、演算器U2,2は、図11(B)のStep2に示すように、レジスタR3に格納された3次元のデータZのうち、演算器U2,2に対応する値に、特徴重みω2とデータX2,3との積を加算する。 Next, each of the calculators U1,1 to U4,4 adds the calculated product to a value of the three-dimensional data Z stored in the register R3 that corresponds to each calculator U. Specifically, for example, the calculator U2,2 adds the product of the feature weight ω2 and the data X2,3 to a value of the three-dimensional data Z stored in the register R3 that corresponds to the calculator U2,2 , as shown in Step 2 of FIG.
そして、演算器U1,1から演算器U4,4は、保持しているデータXを隣接している演算器Uに送信する。具体的に、例えば、演算器U2,2は、図11(B)に示すように、データX2,3を演算器U3,2に送信する。 Then, the calculators U1,1 to U4,4 transmit the data X they hold to the adjacent calculators U. Specifically, for example, the calculator U2,2 transmits data X2,3 to the calculator U3,2 as shown in FIG.
(kが3の場合の処理)
次に、kが3の場合の処理について説明を行う。
(Processing when k is 3)
Next, the process when k is 3 will be described.
コントローラ17は、この場合、図12(A)に示すように、分解後の2次元の特徴重みω3を演算器U1,1から演算器U4,4のそれぞれに送信(ブロードキャスト送信)する。そして、演算器U1,1から演算器U4,4のそれぞれは、データXを保持している場合、特徴重みω3とデータXとを乗算する。具体的に、例えば、演算器U2,2は、図12(A)に示すように、特徴重みω3とデータX1,3との積を算出する。
In this case, the
続いて、演算器U1,1から演算器U4,4のそれぞれは、レジスタR3に格納された3次元のデータZのうち、各演算器Uに対応する値に、算出した積を加算する。具体的に、例えば、演算器U2,2は、図12(B)のStep3に示すように、レジスタR3に格納された3次元のデータZのうち、演算器U2,2に対応する値に、特徴重みω3とデータX1,3との積を加算する。
Next, each of the calculators U1,1 to U4,4 adds the calculated product to a value of the three-dimensional data Z stored in the register R3 that corresponds to each calculator U. Specifically, for example, as shown in
そして、演算器U1,1から演算器U4,4は、保持しているデータXを隣接している演算器Uに送信する。具体的に、例えば、演算器U2,2は、データX1,3を演算器U2,3に送信する。 Then, the computing units U1,1 to U4,4 transmit the held data X to the adjacent computing units U. Specifically, for example, the computing unit U2,2 transmits data X1,3 to the computing unit U2,3 .
その後、例えば、演算器U2,2は、図13及び図14に示すように、特徴重みω1とデータX2,2との乗算(kが1の場合の演算)と、特徴重みω2とデータX2,3との乗算(kが2の場合の演算)と、特徴重みω3とデータX1,3との乗算(kが3の場合の演算)とに加え、特徴重みω4とデータX1,2との乗算(kが4の場合の演算)と、特徴重みω5とデータX1,1との乗算(kが5の場合の演算)と、特徴重みω6とデータX2,1との乗算(kが6の場合の演算)と、特徴重みω7とデータX3,1との乗算(kが7の場合の演算)と、特徴重みω8とデータX3,2との乗算(kが8の場合の演算)と、特徴重みω9とデータX3,3との乗算(kが9の場合の演算)とを行う。 Thereafter, for example, as shown in FIG. 13 and FIG. 14 , the calculator U2,2 multiplies the feature weight ω1 by the data X2,2 (operation when k is 1), the feature weight ω2 by the data X2,3 (operation when k is 2), and the feature weight ω3 by the data X1,3 (operation when k is 3), and also multiplies the feature weight ω4 by the data X1,2 (operation when k is 4), the feature weight ω5 by the data X1,1 (operation when k is 5), the feature weight ω6 by the data X2,1 (operation when k is 6), the feature weight ω7 by the data X3,1 (operation when k is 7), the feature weight ω8 by the data X3,2 (operation when k is 8), and the feature weight ω9 by the data X3,3 (operation when k is 9).
すなわち、各演算器Uは、kの値が加算されるごとに、特徴重みのブロードキャスト送信とデータXのシフトとを行いながら、各フィルタに含まれる特徴重みと入力データXとの畳み込み演算を行うことで、畳み込み演算を演算器Uごとに並行して行う。 In other words, each time the value of k is incremented, each calculator U broadcasts the feature weight and shifts the data X, while performing a convolution operation between the feature weight contained in each filter and the input data X, thereby performing the convolution operation in parallel for each calculator U.
また、各演算器Uは、特徴重みとデータXとの乗算を行う場合、図15に示すように、Nof種類のフィルタごとに、各フィルタに含まれる特徴重みと入力データXとの乗算を並行して行う。 When each calculator U multiplies a feature weight by data X, it performs multiplication of the feature weight included in each filter by the input data X in parallel for each Nof type of filter, as shown in FIG. 15.
具体的に、演算器U2,2は、kが1である場合、1種類目のフィルタに含まれる1つ目の特徴重みω1 (1)とデータX2,2との乗算を行うことによって、積Z2,2,1を算出する。また、演算器U2,2は、この場合、2種類目のフィルタに含まれる1つ目の特徴重みω2 (1)とデータX2,2との乗算を行うことによって、積Z2,2,2を算出する。同様に、演算器U2,2は、Nof種類のフィルタのそれぞれに対応する乗算を行う。 Specifically, when k is 1, the calculator U2,2 calculates the product Z2,2,1 by multiplying the first feature weight ω1 (1) included in the first type of filter by the data X2,2 . In this case, the calculator U2,2 calculates the product Z2,2,2 by multiplying the first feature weight ω2 (1) included in the second type of filter by the data X2,2 . Similarly, the calculator U2,2 performs multiplications corresponding to each of the Nof types of filters.
これにより、各演算器Uは、演算器Uの数(Nox×Noy)とフィルタの種類数(Nof)との積に対応する多重度によって並列処理を行うことが可能になる。 This allows each calculator U to perform parallel processing with a degree of multiplicity that corresponds to the product of the number of calculators U (Nox x Noy) and the number of filter types (Nof).
さらに、本実施の形態におけるデータ処理装置10では、上記のように各演算器Uが行う処理を、各TPEにおいて行う。
Furthermore, in the
これにより、データ処理装置10では、各TPEにおける演算器Uの数(Nox×Noy)とフィルタの種類数(Nof)とTPEの数(n)との積に対応する多重度によって並列処理を行うことが可能になる。そのため、データ処理装置10では、CNNにおける畳み込み演算を高速に行うことが可能になる。
As a result, the
図7に戻り、iがNif以上である場合(S26のYES)、コントローラ17は、S27以降の処理を再度行う。すなわち、コントローラ17は、各TPEにおける畳み込み演算が完了したことに応じて、各TPEにおいて算出された値の総和を算出する処理を開始する。
Returning to FIG. 7, if i is equal to or greater than Nif (YES in S26), the
そして、例えば、TPEnがTPE1以外である場合(S27のNO)、コントローラ17は、図8に示すように、隣接するTPE(n-1)から3次元のデータZ´を受信する(S31)。
For example, if TPEn is other than TPE1 (NO in S27), the
続いて、Nox×Noy個の演算器Uは、S31の処理で受信した3次元のデータZ´に対して、レジスタR1に記憶された3次元のデータZを加算する(S32)。 Next, the Nox×Noy calculators U add the three-dimensional data Z stored in the register R1 to the three-dimensional data Z' received in the process of S31 (S32).
その後、Nox×Noyの演算器Uは、S32の処理で算出した3次元のデータZをレジスタR1に記憶する(S33)。 Then, the Nox x Noy calculator U stores the three-dimensional data Z calculated in the process of S32 in register R1 (S33).
そして、TPEnがTPEmでない場合(S34のYES)、TPEnは、レジスタR1に格納された3次元のデータZを隣接するTPE(n+1)に送信する(S35)。また、TPEnは、レジスタR1に格納された3次元のデータZをバッファ23に格納する(S36)。 If TPEn is not TPEm (YES in S34), TPEn transmits the three-dimensional data Z stored in register R1 to the adjacent TPE(n+1) (S35). In addition, TPEn stores the three-dimensional data Z stored in register R1 in buffer 23 (S36).
これにより、データ処理装置10は、各TPEにおいて算出された畳み込み演算の結果の総和を算出することが可能になる。
This enables the
なお、TPEnがTPE1である場合(S27のYES)も同様に、TPEnは、S35の処理を行う。 Note that if TPEn is TPE1 (YES in S27), TPEn also performs the process of S35.
一方、TPEnがTPEmである場合(S34のNO)、TPEnは、S35の処理を行わずに、レジスタR1に格納された3次元のデータZをバッファ23に格納する(S36)。すなわち、コントローラ17は、この場合、各TPEにおいて行われた畳み込み演算の最終的な結果をバッファ23に格納する。
On the other hand, if TPEn is TPEm (NO in S34), TPEn stores the three-dimensional data Z stored in register R1 in
このように、本実施の形態におけるデータ処理装置10では、Nof、Nox、Noy及びNifに関する積和演算を並行して行うことが可能になる。そのため、本実施の形態におけるデータ処理装置10は、図16に示すように、畳み込み演算における積和演算の並列度を他の方法を採用した場合よりも大きくすることが可能になる。
In this way, the
従って、本実施の形態におけるデータ処理装置10では、積和演算の実行回数を大幅に抑えることが可能になる。そのため、本実施の形態におけるデータ処理装置10では、CNNの畳み込み層における畳み込み演算を高速に行うことが可能になる。
Therefore, in the
また、例えば、畳み込み演算の実行時間が閾値以下にすることが求められる場合、本実施の形態におけるデータ処理装置10によれば、積和演算の実行回数を抑えることが可能になるため、積和演算の1回あたりの実行速度が遅くなるように設定することが許容される。すなわち、これは、データ処理装置10の動作周波数の抑えることが可能になり、かつ、回路の駆動電圧を抑制することが可能になることを意味する。したがって、本実施の形態におけるデータ処理装置10では、畳み込み演算の実行に伴う消費電力を抑えることが可能になる。
In addition, for example, when it is required that the execution time of a convolution operation be equal to or less than a threshold value, the
そのため、本実施の形態におけるデータ処理装置10は、様々な制約が求められる各分野(例えば、ロボットの動作制御や自動車の自動運転等の分野)においても使用することが可能になる。
As a result, the
1:TPE
2:TPE
n:TPE
m:TPE
10:データ処理装置
12:基盤
13:CPU
14:チップ
15:メモリ
16:メモリ
17:コントローラ
20:STP
21:バッファ
22:バッファ
23:バッファ
R1:レジスタ
R2:レジスタ
R3:レジスタ
U:演算器
1: TPE
2: TPE
n: TPE
m: TPE
10: Data processing device 12: Board 13: CPU
14: Chip 15: Memory 16: Memory 17: Controller 20: STP
21: Buffer 22: Buffer 23: Buffer R1: Register R2: Register R3: Register U: Arithmetic unit
Claims (8)
2次元に配置された複数のプロセッシングエレメントからなるプロセッシングエレメント群と、
前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第1記憶部と、を有し、
前記プロセッシングエレメント群は、
前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信し、
前記複数のフィルタごとに、各フィルタに含まれる1つの特徴重みをそれぞれ取得し、
取得した前記複数のフィルタごとの前記1つの特徴重みを、前記複数のプロセッシングエレメントと同じ数だけ複製して前記複数のプロセッシングエレメントと同じ配置にすることによって3次元の特徴重みを生成し、
前記複数のプロセッシングエレメントのそれぞれに、取得した前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信し、
前記複数のプロセッシングエレメントのそれぞれに、送信した前記2次元の入力データに含まれるデータと、送信した前記複数のフィルタごとの前記1つの特徴重みとを乗算させることによって3次元の積を算出させ、
前記第1記憶部における前記3次元の記憶領域に記憶された値に前記3次元の積を加算し、
前記複数のプロセッシングエレメントのそれぞれに対して前記3次元の積の算出にまだ用いられていないデータが送信されるように、前記複数のプロセッシングエレメントのそれぞれに、前記複数のプロセッシングエレメントのそれぞれが保持する前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させ、
前記加算する処理が行われた回数が前記複数のフィルタのそれぞれに含まれる特徴重みの数に到達するまで、前記取得する処理、前記生成する処理、前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信する処理、前記算出させる処理、前記加算する処理及び前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させる処理を繰り返す、
ことを特徴とするデータ処理装置。 A data processing device that calculates a feature amount of two-dimensional input data using a plurality of filters corresponding to the two-dimensional input data,
a processing element group consisting of a plurality of processing elements arranged two-dimensionally;
a first storage unit having a three-dimensional storage area for each of the plurality of filters for each of the plurality of processing elements,
The processing element group includes:
Sending each of the data included in the two-dimensional input data to one of the plurality of processing elements such that each of the sending destinations is a different processing element;
Obtaining one feature weight included in each of the plurality of filters;
generating three-dimensional feature weights by duplicating the one feature weight for each of the plurality of filters by the same number as the plurality of processing elements and arranging the duplicated feature weights in the same arrangement as the plurality of processing elements;
Transmitting the one feature weight for each of the plurality of filters to each of the plurality of processing elements;
causing each of the plurality of processing elements to multiply data included in the transmitted two-dimensional input data by the one feature weight for each of the transmitted plurality of filters to calculate a three-dimensional product;
adding the three-dimensional product to the value stored in the three-dimensional storage area in the first storage unit;
causing each of the plurality of processing elements to transmit data included in the two-dimensional input data held by each of the plurality of processing elements to an adjacent processing element such that data that has not yet been used in the calculation of the three-dimensional product is transmitted to each of the plurality of processing elements;
repeating the obtaining process, the generating process, the process of transmitting the one feature weight for each of the plurality of filters, the calculating process, the adding process, and the process of transmitting the data included in the two-dimensional input data to an adjacent processing element until the number of times the adding process has been performed reaches the number of feature weights included in each of the plurality of filters.
23. A data processing device comprising:
前記プロセッシングエレメント群は、畳み込みニューラルネットワークの畳み込み層における処理を行う、
ことを特徴とするデータ処理装置。 In claim 1,
The processing elements perform processing in a convolutional layer of a convolutional neural network.
23. A data processing device comprising:
前記プロセッシングエレメント群は、前記繰り返す処理の後、前記第1記憶部に記憶された前記3次元の値を出力する、
ことを特徴とするデータ処理装置。 In claim 1,
the processing element group outputs the three-dimensional values stored in the first storage unit after the repeated processing.
23. A data processing device comprising:
前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第2記憶部を有し、
前記プロセッシングエレメント群は、生成した前記3次元の特徴重みを前記第2記憶部に記憶する、
ことを特徴とするデータ処理装置。 In claim 1,
a second storage unit having a three-dimensional storage area for each of the plurality of filters for each of the plurality of processing elements;
the processing element group stores the generated three-dimensional feature weights in the second storage unit;
23. A data processing device comprising:
前記複数のプロセッシングエレメントごとの2次元の記憶領域を有する第3記憶部を有し、
前記プロセッシングエレメント群は、前記第3記憶部に記憶された前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信する、
ことを特徴とするデータ処理装置。 In claim 1,
a third storage unit having a two-dimensional storage area for each of the plurality of processing elements;
the processing element group transmits each of the data included in the two-dimensional input data stored in the third storage unit to any of the plurality of processing elements such that each of the data destinations is a different processing element;
23. A data processing device comprising:
それぞれ異なる前記2次元の入力データとそれぞれ異なる前記複数のフィルタとに基づく処理を行う複数の前記プロセッシングエレメント群と、
前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第4記憶部と、を有し、
前記複数のプロセッシングエレメント群は、
前記繰り返す処理の後、各プロセッシングエレメント群の前記第1記憶部に記憶した前記3次元の値をそれぞれ加算することによって3次元の合計値を算出し、
算出した前記3次元の合計値を前記第4記憶部に記憶する、
ことを特徴とするデータ処理装置。 In claim 1,
a plurality of processing element groups each performing processing based on the two-dimensional input data different from each other and the plurality of filters different from each other;
a fourth storage unit having a three-dimensional storage area for each of the plurality of filters for each of the plurality of processing elements,
The plurality of processing element groups include
After the repeated process, a three-dimensional sum is calculated by adding up the three-dimensional values stored in the first storage unit of each processing element group;
The calculated three-dimensional sum value is stored in the fourth storage unit.
23. A data processing device comprising:
前記複数のプロセッシングエレメント群は、前記3次元の合計値を算出する処理の後、前記第4記憶部に記憶された前記3次元の合計値を出力する、
ことを特徴とするデータ処理装置。 In claim 6,
the plurality of processing elements output the three-dimensional sum value stored in the fourth storage unit after the process of calculating the three-dimensional sum value.
23. A data processing device comprising:
2次元に配置された複数のプロセッシングエレメントからなるプロセッシングエレメント群と、
前記複数のプロセッシングエレメントごとであって前記複数のフィルタごとの3次元の記憶領域を有する第1記憶部と、を有し、
前記プロセッシングエレメント群は、
前記2次元の入力データに含まれるデータのそれぞれを、全ての送信先が異なるプロセッシングエレメントになるように前記複数のプロセッシングエレメントのいずれかに送信し、
前記複数のフィルタごとに、各フィルタに含まれる1つの特徴重みをそれぞれ取得し、
取得した前記複数のフィルタごとの前記1つの特徴重みを、前記複数のプロセッシングエレメントと同じ数だけ複製して前記複数のプロセッシングエレメントと同じ配置にすることによって3次元の特徴重みを生成し、
前記複数のプロセッシングエレメントのそれぞれに、取得した前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信し、
前記複数のプロセッシングエレメントのそれぞれに、送信した前記2次元の入力データに含まれるデータと、送信した前記複数のフィルタごとの前記1つの特徴重みとを乗算させることによって3次元の積を算出させ、
前記第1記憶部における前記3次元の記憶領域に記憶された値に前記3次元の積を加算し、
前記複数のプロセッシングエレメントのそれぞれに対して前記3次元の積の算出にまだ用いられていないデータが送信されるように、前記複数のプロセッシングエレメントのそれぞれに、前記複数のプロセッシングエレメントのそれぞれが保持する前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させ、
前記加算する処理が行われた回数が前記複数のフィルタのそれぞれに含まれる特徴重みの数に到達するまで、前記取得する処理、前記生成する処理、前記複数のフィルタごとの前記1つの特徴重みをそれぞれ送信する処理、前記算出させる処理、前記加算する処理及び前記2次元の入力データに含まれるデータを隣接するプロセッシングエレメントに送信させる処理を繰り返す、
ことを特徴とするデータ処理方法。 1. A data processing method for a data processing device that calculates a feature amount of two-dimensional input data using a plurality of filters corresponding to the two-dimensional input data, comprising:
a processing element group consisting of a plurality of processing elements arranged two-dimensionally;
a first storage unit having a three-dimensional storage area for each of the plurality of filters for each of the plurality of processing elements,
The processing element group includes:
Sending each of the data included in the two-dimensional input data to one of the plurality of processing elements such that each of the sending destinations is a different processing element;
Obtaining one feature weight included in each of the plurality of filters;
generating three-dimensional feature weights by duplicating the one feature weight for each of the plurality of filters by the same number as the plurality of processing elements and arranging the duplicated feature weights in the same arrangement as the plurality of processing elements;
Transmitting the one feature weight for each of the plurality of filters to each of the plurality of processing elements;
causing each of the plurality of processing elements to multiply data included in the transmitted two-dimensional input data by the one feature weight for each of the transmitted plurality of filters to calculate a three-dimensional product;
adding the three-dimensional product to the value stored in the three-dimensional storage area in the first storage unit;
causing each of the plurality of processing elements to transmit data included in the two-dimensional input data held by each of the plurality of processing elements to an adjacent processing element such that data that has not yet been used in the calculation of the three-dimensional product is transmitted to each of the plurality of processing elements;
repeating the obtaining process, the generating process, the process of transmitting the one feature weight for each of the plurality of filters, the calculating process, the adding process, and the process of transmitting the data included in the two-dimensional input data to an adjacent processing element until the number of times the adding process has been performed reaches the number of feature weights included in each of the plurality of filters.
23. A data processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020043230A JP7467786B2 (en) | 2020-03-12 | 2020-03-12 | DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020043230A JP7467786B2 (en) | 2020-03-12 | 2020-03-12 | DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021144519A JP2021144519A (en) | 2021-09-24 |
JP7467786B2 true JP7467786B2 (en) | 2024-04-16 |
Family
ID=77766859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020043230A Active JP7467786B2 (en) | 2020-03-12 | 2020-03-12 | DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7467786B2 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018067154A (en) | 2016-10-19 | 2018-04-26 | ソニーセミコンダクタソリューションズ株式会社 | Arithmetic processing circuit and recognition system |
JP2019003414A (en) | 2017-06-15 | 2019-01-10 | 公立大学法人会津大学 | Data processing device, and data processing method thereof |
-
2020
- 2020-03-12 JP JP2020043230A patent/JP7467786B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018067154A (en) | 2016-10-19 | 2018-04-26 | ソニーセミコンダクタソリューションズ株式会社 | Arithmetic processing circuit and recognition system |
JP2019003414A (en) | 2017-06-15 | 2019-01-10 | 公立大学法人会津大学 | Data processing device, and data processing method thereof |
Also Published As
Publication number | Publication date |
---|---|
JP2021144519A (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11816532B2 (en) | Performing kernel striding in hardware | |
EP3179415B1 (en) | Systems and methods for a multi-core optimized recurrent neural network | |
WO2019119301A1 (en) | Method and device for determining feature image in convolutional neural network model | |
Duan et al. | Two-stage recursive least squares parameter estimation algorithm for output error models | |
CN106716449A (en) | Interfacing an event based system with a frame based processing system | |
KR20190041922A (en) | Method and device for performing activation and convolution operation at the same time, learning method and learning device for the same | |
US11481618B2 (en) | Optimization apparatus and method for controlling neural network | |
KR20210053160A (en) | Piecewise quantization method for artificial neural networks | |
Chervyakov et al. | Increasing of convolutional neural network performance using residue number system | |
JP2019075114A (en) | Method and device for performing activation operation and convolution operation at the same time, and learning method and learning device for the same | |
JP7414930B2 (en) | Information processing device, information processing method | |
KR20180125843A (en) | A hardware classifier applicable to various CNN models | |
CN108629403B (en) | Processing signal saturation in impulse neural networks | |
JP7467786B2 (en) | DATA PROCESSING APPARATUS AND DATA PROCESSING METHOD | |
JP2020204894A (en) | Filtering process device and control method thereof | |
JP2019003414A (en) | Data processing device, and data processing method thereof | |
CN112970036B (en) | Convolutional block array for implementing neural network applications and methods of use thereof | |
KR20200072666A (en) | Selective data processing method of convolution layer and neural network processor using thereof | |
WO2019082511A1 (en) | Computation device and in-vehicle control device | |
US20200410340A1 (en) | Information processing device and information processing method | |
JP2023518717A (en) | Machine learning accelerator power reduction | |
Novikov-Borodin | Elimination of Systematic Distortions in the Signals of LTI Systems using Test Measurements | |
Cariow et al. | An algorithm for dividing quaternions | |
CN113283593B (en) | Convolution operation coprocessor and rapid convolution method based on processor | |
JP2020027245A5 (en) | Information processing method, information processing apparatus, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A80 | Written request to apply exceptions to lack of novelty of invention |
Free format text: JAPANESE INTERMEDIATE CODE: A80 Effective date: 20200330 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221226 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240227 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240305 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7467786 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |