JP2020112840A - Data processing device, data processing system, data processing method and program - Google Patents

Data processing device, data processing system, data processing method and program Download PDF

Info

Publication number
JP2020112840A
JP2020112840A JP2018235212A JP2018235212A JP2020112840A JP 2020112840 A JP2020112840 A JP 2020112840A JP 2018235212 A JP2018235212 A JP 2018235212A JP 2018235212 A JP2018235212 A JP 2018235212A JP 2020112840 A JP2020112840 A JP 2020112840A
Authority
JP
Japan
Prior art keywords
vector
data
data processing
output
comparison result
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
JP2018235212A
Other languages
Japanese (ja)
Inventor
ハンノ リースケ
Lieske Hanno
ハンノ リースケ
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2018235212A priority Critical patent/JP2020112840A/en
Publication of JP2020112840A publication Critical patent/JP2020112840A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

To implement a decision tree efficiently in a data processing device.SOLUTION: A data processing device comprises a comparator, a combination operation unit, and a data controller. Each comparator receives a plurality of input data vectors and outputs a comparison result vector. The combination operation unit combines the comparison result vectors output from the comparator and outputs a binary output vector. The data controller controls data processing based on the binary output vector.SELECTED DRAWING: Figure 3

Description

本発明は、データ処理装置、データ処理システム、データ処理方法及びプログラムに関する。 The present invention relates to a data processing device, a data processing system, a data processing method and a program.

画像処理や動作認識などの多くの異なる技術分野において、決定木に基づいた画像及び動作の分類アルゴリズムが広く用いられている。決定木は、樹状のグラフ又は決定モデルとこれらの生じ得る結果を用いた決定支援ツールである。 Image and motion classification algorithms based on decision trees are widely used in many different technical fields such as image processing and motion recognition. A decision tree is a decision support tool that uses a dendritic graph or decision model and their possible outcomes.

画像分類(例えば、ACF(aggregated channel features)アルゴリズム)は、決定木に基づいている。このアルゴリズムは、最先端のパフォーマンスを実現しつつ、特徴をより高いレベルで近似するものであり、これまでのHOG(histogram of gradient)アルゴリズムよりも高速である。 Image classification (eg, ACF (aggregated channel features) algorithm) is based on decision trees. This algorithm approximates features at a higher level while achieving leading edge performance and is faster than previous HOG (histogram of gradient) algorithms.

特許文献1では、生成されたマスクに基づいて、オペランド選択を伴う条件付き(conditional)ムーブ用の条件付きムーブマスクが生成される。生成されたマスクは、複数オペランドでのシングルSIMD(Single Instruction/Multiple Data)スタイル演算の出力である。 In Patent Document 1, a conditional move mask for a conditional move involving operand selection is generated based on the generated mask. The generated mask is the output of a single SIMD (Single Instruction/Multiple Data) style operation with multiple operands.

特許文献2では、1つの比較条件での評価に基づいたSIMDスタイルでの機能を実行する、多数の条件付き指示からなるコードをどのように高速化するかが記載されている。この解決策としては、コンパイラによる分岐能力を付加することである。 Patent Document 2 describes how to speed up a code composed of a large number of conditional instructions, which executes a SIMD-style function based on an evaluation under one comparison condition. The solution is to add branching capability by the compiler.

特許文献3では、SIMDスタイルにおいて、入力ベクトルの要素を出力ベクトルの要素にマッピングする方法が開示されている。このマッピングは、1ベクトルあたり1つが出力される1つの状態ビット比較を用いて制御される。 Patent Document 3 discloses a method of mapping elements of an input vector to elements of an output vector in the SIMD style. This mapping is controlled using one status bit compare, one output per vector.

非特許文献1には、決定木に基づいたACF(aggregated channel features)アルゴリズムが開示されている。本文献では、ACFアルゴリズムが、歩行者検出において最先端のパフォーマンスを実現していることを示している。 Non-Patent Document 1 discloses an ACF (aggregated channel features) algorithm based on a decision tree. This document shows that the ACF algorithm achieves state-of-the-art performance in pedestrian detection.

非特許文献2には、ACFアルゴリズムを用いることで、リアルタイムのマルチビュー顔検出が可能であることを示している。 Non-Patent Document 2 shows that real-time multi-view face detection is possible by using the ACF algorithm.

米国特許第7,480,787号明細書US Pat. No. 7,480,787 特開2009−128989号公報JP, 2009-128989, A 米国特許公開第2013/0212355号明細書U.S. Patent Publication No. 2013/0212355

R.Zabih and J.Woodfill, "Fast Feature Pyramids for Object Detection," in IEEE Transactions on Pattern Analysis and Machine Intelligence. 2014; 36(8):1532-1545.R. Zabih and J. Woodfill, "Fast Feature Pyramids for Object Detection," in IEEE Transactions on Pattern Analysis and Machine Intelligence. 2014; 36(8):1532-1545. B.Yang, J.Yan, Z. Lei, S.Z.Li, "Aggregate Channel Features for Multi-view Face Detection" in: 2014 IEEE International Joint Conference on Biometrics (IJCB), 2014, pp.1-8.B.Yang, J.Yan, Z. Lei, S.Z.Li, "Aggregate Channel Features for Multi-view Face Detection" in: 2014 IEEE International Joint Conference on Biometrics (IJCB), 2014, pp.1-8.

非特許文献は、ACFアルゴリズム自体の内部構成と、リアルタイム用途におけるアルゴリズムの使用方法を提供している。しかし、ACFハードウェア実装の詳細については、何も提供されていない。 Non-Patent Documents provide the internal structure of the ACF algorithm itself and how to use the algorithm in real-time applications. However, nothing is provided about the details of the ACF hardware implementation.

特許文献1〜3では、SIMDベクトルの各要素の制御パスにおいては、単一の演算出力が用いられている。非特許文献1及び2では、実装の詳細を提供することなく、決定木の概念が導入されている。問題点としては、決定木を実装するにあたり、1以上の決定について評価することである。特許文献1〜3に対する現在あり得べき解決方法では、多大なる時間を掛けて、単一の演算処理を順次行うことによってのみ処理することが可能である。(すなわち、3つの特徴ノードを有する)2階層の決定木に基づいた処理を考慮すると、この決定木のために単一の演算処理を順次実行するには、比較的多くのサイクルが必要である。 In Patent Documents 1 to 3, a single operation output is used in the control path of each element of the SIMD vector. Non-Patent Documents 1 and 2 introduce the concept of a decision tree without providing implementation details. The problem is to evaluate one or more decisions when implementing the decision tree. The currently possible solutions to Patent Documents 1 to 3 can be processed only by sequentially performing a single arithmetic process, taking a great amount of time. Considering processing based on a two-level decision tree (that is, having three feature nodes), it takes a relatively large number of cycles to sequentially perform a single arithmetic operation for this decision tree. ..

決定木演算はACFアルゴリズムの内部で行われる主処理であるので、到達可能な実行速度は、リアルタイム用途においては重要である。 The reachable execution speed is important in real-time applications, since the decision tree operation is the main processing performed inside the ACF algorithm.

一実施の形態にかかるデータ処理装置は、それぞれが複数の入力データベクトルを受け取って比較結果ベクトルを出力する、複数の比較器と、比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力する結合演算部と、前記バイナリ出力ベクトルに基づいてデータ処理を制御するデータコントローラと、を有するものである。 A data processing device according to an embodiment is configured to combine a plurality of comparators, which receive a plurality of input data vectors and output a comparison result vector, and the comparison result vectors output from the comparators, and to output a binary output. It has a combination operation unit that outputs a vector and a data controller that controls data processing based on the binary output vector.

一実施の形態にかかるデータ処理システムは、メモリ部と、バスと、前記バスを介して前記メモリ部と通信するデータ処理装置と、を有し、前記データ処理装置は、それぞれが複数の入力データベクトルを受け取って比較結果ベクトルを出力する、複数の比較器と、比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力する結合演算部と、前記バイナリ出力ベクトルに基づいてデータ処理を制御するデータコントローラと、を有するものである。 A data processing system according to an embodiment includes a memory unit, a bus, and a data processing device that communicates with the memory unit via the bus, and each of the data processing devices has a plurality of input data. A plurality of comparators that receive a vector and output a comparison result vector, a combining operation unit that combines the comparison result vectors output from the comparators and outputs a binary output vector, and data based on the binary output vector And a data controller for controlling processing.

一実施の形態にかかるデータ処理方法は、複数の入力データベクトルを受け取って比較結果ベクトルを出力し、比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力し、前記バイナリ出力ベクトルに基づいてデータ処理を制御するものである。 A data processing method according to an embodiment is to receive a plurality of input data vectors, output a comparison result vector, combine the comparison result vectors output from a comparator to output a binary output vector, and output the binary output vector. The data processing is controlled based on the vector.

一実施の形態にかかるデータ処理プログラムは、複数の入力データベクトルを受け取って比較結果ベクトルを出力する処理と、比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力する処理と、前記バイナリ出力ベクトルに基づいてデータ処理を制御する処理と、をコンピュータに実行させるものである。 A data processing program according to an embodiment includes a process of receiving a plurality of input data vectors and outputting a comparison result vector, and a process of combining the comparison result vectors output from a comparator and outputting a binary output vector. , A process for controlling data processing based on the binary output vector, and a computer.

一実施の形態によれば、データ処理装置に効率的に決定木を実装することができる。 According to one embodiment, a decision tree can be efficiently implemented in a data processing device.

データ処理システム内の実施の形態1にかかるデータ処理装置の実装を模式的に示す図である。It is a figure which shows typically mounting of the data processing apparatus concerning Embodiment 1 in a data processing system. 実施の形態1にかかるデータ処理装置への決定木の適用を示す図である。FIG. 3 is a diagram showing application of a decision tree to the data processing device according to the first exemplary embodiment. 実施の形態1にかかるデータ処理装置の構成を模式的に示す図である。FIG. 1 is a diagram schematically showing a configuration of a data processing device according to a first exemplary embodiment. 実施の形態1にかかるデータ処理装置でのデータ処理を模式的に示す図である。FIG. 3 is a diagram schematically showing data processing in the data processing device according to the first exemplary embodiment. 実施の形態2にかかるデータ処理装置の構成を模式的に示す図である。FIG. 3 is a diagram schematically showing the configuration of a data processing device according to a second exemplary embodiment. 実施の形態3にかかるデータ処理装置の構成を模式的に示す図である。It is a figure which shows typically the structure of the data processing apparatus concerning Embodiment 3.

以下、図面を参照して本発明の実施の形態について説明する。各図面においては、同一要素には同一の符号が付されており、必要に応じて重複説明は省略される。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In each of the drawings, the same reference numerals are given to the same elements, and redundant description will be omitted as necessary.

実施の形態1
実施の形態1にかかるデータ処理装置について説明する。実施の形態1にかかるデータ処理装置100は、決定木用の処理を行うものとして構成される。図1に、実施の形態1にかかるデータ処理装置100のデータ処理システム1000への実装を模式的に示す。
Embodiment 1
The data processing apparatus according to the first embodiment will be described. The data processing device 100 according to the first embodiment is configured to perform processing for a decision tree. FIG. 1 schematically shows the mounting of the data processing device 100 according to the first embodiment in a data processing system 1000.

図1に示すように、データ処理システム1000は、中央演算部(CPU:central processing unit)101、メモリ102、プロセッサ103及びバス104を有する。データ処理システム1000は、SIMD (Single Instruction/Multiple Data)処理を実行可能なものとして構成される。 As shown in FIG. 1, the data processing system 1000 includes a central processing unit (CPU) 101, a memory 102, a processor 103, and a bus 104. The data processing system 1000 is configured to be capable of executing SIMD (Single Instruction/Multiple Data) processing.

データ処理システム1000のCPU101、メモリ102、プロセッサ103及び他のモジュール及び構成要素は、バス104より接続され、これらの装置は相互にデータ、パラメータ、プログラム、アルゴリズムなどをやり取りすることができる。CPU101は、データ処理システム1000での演算を制御するための様々な処理を行う。メモリ102は、データ、パラメータ、プログラム、アルゴリズムなどを格納し、データ処理システム1000のCPU101、メモリ102、プロセッサ103及び他のモジュール及び構成要素からの要求に応じて、これらの装置へデータ、パラメータ、プログラム、アルゴリズムなどを提供することができる。 The CPU 101, the memory 102, the processor 103, and other modules and components of the data processing system 1000 are connected via a bus 104, and these devices can mutually exchange data, parameters, programs, algorithms, and the like. The CPU 101 performs various processes for controlling the calculation in the data processing system 1000. The memory 102 stores data, parameters, programs, algorithms, etc., and sends data, parameters, and data to these devices in response to requests from the CPU 101, the memory 102, the processor 103, and other modules and components of the data processing system 1000. Programs, algorithms, etc. can be provided.

プロセッサ103は、データ処理装置100を有する。例えば、プロセッサ103は論理演算部を有していてもよく、データ処理装置100は論理演算部に含まれてもよい。 The processor 103 includes the data processing device 100. For example, the processor 103 may include a logical operation unit, and the data processing device 100 may be included in the logical operation unit.

本実施の形態では、データ処理装置100 は、決定木に基づいて出力すべきデータを制御する。ここで、データ処理装置100に適用される決定木について説明する。図2に、実施の形態1にかかるデータ処理装置100への決定木の適用を示す。 In the present embodiment, the data processing device 100 controls the data to be output based on the decision tree. Here, the decision tree applied to the data processing device 100 will be described. FIG. 2 shows application of a decision tree to the data processing device 100 according to the first exemplary embodiment.

初めに、単一の値である第1の入力データYが、第1の閾値TH1と比較される。第1の入力データYが第1の閾値TH1よりも小さい場合(Y<TH1)、第1の比較C1の比較結果は「真」(第1の比較C1からの出力Y)となる。第1の入力データYが第1の閾値TH1以上である場合(Y≧TH1)、第1の比較C1の比較結果は「偽」(第1の比較C1からの出力N)となる。 First, the first input data Y, which is a single value, is compared with the first threshold TH1. When the first input data Y is smaller than the first threshold TH1 (Y<TH1), the comparison result of the first comparison C1 is “true” (output Y from the first comparison C1). When the first input data Y is greater than or equal to the first threshold TH1 (Y≧TH1), the comparison result of the first comparison C1 is “false” (output N from the first comparison C1).

第1の比較C1の比較結果が「真」の場合(すなわち、Y<TH1)には、単一の値である第2の入力データUが第2の閾値TH2と比較される。第2の入力データUが第2の閾値TH2よりも小さい場合(U<TH2)、第2の比較C2の比較結果は「真」(第2の比較C2からの出力Y)となり、「0x1」が結果値Rとして出力される。なお、「0x**」は16進数を表しており、「*」は1〜9及びA〜Fのいずれかである。第2の入力データUが第2の閾値TH2以上である場合(U≧TH2)、第2の比較C2の比較結果は「偽」(第2の比較C2からの出力N)となり、「0x2」が結果値Rとして出力される。 When the comparison result of the first comparison C1 is "true" (that is, Y<TH1), the second input data U having a single value is compared with the second threshold value TH2. When the second input data U is smaller than the second threshold TH2 (U<TH2), the comparison result of the second comparison C2 is “true” (output Y from the second comparison C2) and “0x1”. Is output as the result value R. In addition, "0x**" represents the hexadecimal number, and "*" is either 1-9 or AF. When the second input data U is greater than or equal to the second threshold TH2 (U≧TH2), the comparison result of the second comparison C2 is “false” (output N from the second comparison C2) and “0x2”. Is output as the result value R.

第1の比較C1の比較結果が「偽」の場合(すなわち、Y≧TH1)には、第2の入力データUが第3の閾値TH3と比較される。第2の入力データUが第3の閾値TH3よりも小さい場合(U<TH3)、第3の比較C3の比較結果は「真」(第3の比較C3からの出力Y)となり、「0x3」が結果値Rとして出力される。第2の入力データUが第3の閾値TH3以上である場合(U≧TH3)、第3の比較C3の比較結果は「偽」(第3の比較C3からの出力N)となり、「0x4」が結果値Rとして出力される。 When the comparison result of the first comparison C1 is “false” (that is, Y≧TH1), the second input data U is compared with the third threshold value TH3. When the second input data U is smaller than the third threshold TH3 (U<TH3), the comparison result of the third comparison C3 is “true” (output Y from the third comparison C3), and “0x3”. Is output as the result value R. When the second input data U is greater than or equal to the third threshold TH3 (U≧TH3), the comparison result of the third comparison C3 is “false” (output N from the third comparison C3), and “0x4”. Is output as the result value R.

本実施の形態では、データ処理装置100は、決定木での処理の結果に基づいて、データのムーブ演算を実行する。データ処理装置100の構成及び動作について説明する。図3に、実施の形態1にかかるデータ処理装置100の構成を模式的に示す。図4に、実施の形態1にかかるデータ処理装置100のデータ処理を模式的に示す。 In the present embodiment, the data processing device 100 executes the data move operation based on the result of the processing on the decision tree. The configuration and operation of the data processing device 100 will be described. FIG. 3 schematically shows the configuration of the data processing device 100 according to the first embodiment. FIG. 4 schematically shows the data processing of the data processing device 100 according to the first embodiment.

データ処理装置100は、比較器11、比較器12、 結合演算部1及びデータコントローラ2を有する。 The data processing device 100 includes a comparator 11, a comparator 12, a combination operation unit 1, and a data controller 2.

比較器11は、入力データベクトルYinを、例えばメモリ部102から読み込む。入力データは、複数の値を含んでいる。この場合、入力データベクトルYinは、「*」を16進数とした場合に、2桁の16進数「0x**」によって表される、4つの8ビット値Y1〜Y4を含むものとする。すなわち、Yin={Y1,Y2,Y3,Y4}である。例えば、Y1=0x20、Y2=0xA0、Y3=0x60及びY4=0xC0である場合、Yin=0x20A060C0となる。 The comparator 11 reads the input data vector Yin from the memory unit 102, for example. The input data includes multiple values. In this case, the input data vector Yin is assumed to include four 8-bit values Y1 to Y4 represented by a 2-digit hexadecimal number “0x**” when “*” is a hexadecimal number. That is, Yin={Y1, Y2, Y3, Y4}. For example, if Y1=0x20, Y2=0xA0, Y3=0x60 and Y4=0xC0, then Yin=0x20A060C0.

また、比較器11は、閾値入力データベクトルT1を、例えばメモリ部102から読み込む。閾値入力データベクトルT1は、複数の値を含んでいる。この場合、閾値入力データベクトルT1についても、2桁の16進数によって表される、4つの8ビット値T11〜T14を含むものとする。本実施の形態では、T11〜T14は同じ値である。すなわち、T1={T11,T12,T13,T14}であり、かつ、T11=T12=T13=T14=TH1である。例えば、TH1=0x80である場合、T1=0x80808080となる。 Further, the comparator 11 reads the threshold value input data vector T1 from, for example, the memory unit 102. The threshold input data vector T1 includes a plurality of values. In this case, the threshold input data vector T1 also includes four 8-bit values T11 to T14 represented by a 2-digit hexadecimal number. In the present embodiment, T11 to T14 have the same value. That is, T1={T11, T12, T13, T14} and T11=T12=T13=T14=TH1. For example, when TH1=0x80, T1=0x80808080.

比較器11は、入力データベクトルYinを閾値入力データベクトルT1と比較する。すなわち、値Y1〜Y4は、それぞれ閾値TH1と比較される。本実施の形態では、比較器11は、各入力値(Y1〜Y4のそれぞれ)が閾値TH1よりも小さいかを判定する。上述したように、Yin=0x20A060C0かつT1=0x80808080であるので、Y1,Y3<TH1(「真」)であり、Y2,Y4≧TH1(「偽」)である。この場合、比較器11は、比較結果ベクトルR1として0x0000000Aを出力する。ここで、Aは、2進数「1010」で表される。 The comparator 11 compares the input data vector Yin with the threshold input data vector T1. That is, the values Y1 to Y4 are respectively compared with the threshold value TH1. In the present embodiment, the comparator 11 determines whether each input value (each of Y1 to Y4) is smaller than the threshold value TH1. As described above, since Yin=0x20A060C0 and T1=0x80808080, Y1, Y3<TH1 (“true”), and Y2, Y4≧TH1 (“false”). In this case, the comparator 11 outputs 0x0000000A as the comparison result vector R1. Here, A is represented by a binary number “1010”.

比較器12は、入力データベクトルUinを、例えばメモリ部102から読み込む。この場合、入力データベクトルUinについても、2桁の16進数で表される、4つの8ビット値U1〜U4を含むものとする。すなわち、Uin={U1,U2,U3,U4}である。例えば、U1=0x10、U2=0x30、U3=0xE0及びU4=0xF0である場合、Uin=0x1030E0F0となる。 The comparator 12 reads the input data vector Uin from, for example, the memory unit 102. In this case, the input data vector Uin also includes four 8-bit values U1 to U4 represented by a 2-digit hexadecimal number. That is, Uin={U1, U2, U3, U4}. For example, if U1=0x10, U2=0x30, U3=0xE0 and U4=0xF0, then Uin=0x1030E0F0.

比較器12は、閾値入力データベクトルT2を、例えばメモリ部102から読み込む。この場合、閾値入力データベクトルT2についても、2桁の16進数によって表される、4つの8ビット値T21〜T24を含むものとする。本実施の形態では、T21〜T24は同じ値である。すなわち、T2={T21,T22,T23,T24}であり、かつ、T21=T22=T23=T24=TH2である。例えば、TH2=0xC0である場合、T1=0xC0C0C0C0となる。 The comparator 12 reads the threshold value input data vector T2 from, for example, the memory unit 102. In this case, the threshold value input data vector T2 also includes four 8-bit values T21 to T24 represented by a 2-digit hexadecimal number. In the present embodiment, T21 to T24 have the same value. That is, T2={T21, T22, T23, T24} and T21=T22=T23=T24=TH2. For example, when TH2=0xC0, T1=0xC0C0C0C0.

比較器12は、入力データベクトルUinを閾値入力データベクトルT2と比較する。すなわち、値U1〜U4は、それぞれ閾値TH2と比較される。本実施の形態では、比較器12は、各入力値(U1〜U4のそれぞれ)が閾値TH2よりも小さいかを判定する。上述したように、Uin=0x1030E0F0かつT2=0xC0C0C0C0であるので、U1,U1<TH2(「真」)であり、U3,U4≧TH2(「偽」)である。この場合、比較器12は、比較結果ベクトルR2として0x0000000Cを出力する。ここで、Cは、2進数「1100」で表される。 The comparator 12 compares the input data vector Uin with the threshold input data vector T2. That is, the values U1 to U4 are respectively compared with the threshold value TH2. In the present embodiment, the comparator 12 determines whether each input value (each of U1 to U4) is smaller than the threshold value TH2. As described above, since Uin=0x1030E0F0 and T2=0xC0C0C0C0, U1, U1<TH2 (“true”) and U3, U4≧TH2 (“false”). In this case, the comparator 12 outputs 0x00000000C as the comparison result vector R2. Here, C is represented by a binary number "1100".

結合演算部1は、比較結果ベクトルR1及びR2に対して論理和演算(AND)を行い、得られたデータをバイナリ出力ベクトルBINとして出力する。この場合、結合演算部1は、R1=1010及びR2=1100に対して論理和演算(AND)を行い、バイナリ出力ベクトルBIN=1000を出力する。 The combination operation unit 1 performs a logical sum operation (AND) on the comparison result vectors R1 and R2, and outputs the obtained data as a binary output vector BIN. In this case, the join operation unit 1 performs a logical sum operation (AND) on R1=1010 and R2=1100 and outputs a binary output vector BIN=1000.

データコントローラ2は、バイナリ出力ベクトルBINに応じて、入力データベクトルDA及びDBを用いることで、出力データベクトルDCを制御する。入力データベクトルDA、入力データベクトルDB及び出力データベクトルDCは、入力データベクトルYin及びUin、閾値入力データベクトルT1及びT2と同様に、2桁の16進数で表される8ビット値である。すなわち、入力データベクトルDA={DA1,DA2,DA3,DA4}、入力データベクトルDB={DB1,DB2,DB3,DB4}、出力データベクトルDC={DC1,DC2,DC3,DC4}である。但し、DA1〜DA4、DB1〜DB4及びDC1〜DC4は2桁の16進数である。 The data controller 2 controls the output data vector DC by using the input data vectors DA and DB according to the binary output vector BIN. The input data vector DA, the input data vector DB, and the output data vector DC are 8-bit values represented by two-digit hexadecimal numbers like the input data vectors Yin and Uin and the threshold input data vectors T1 and T2. That is, input data vector DA={DA1, DA2, DA3, DA4}, input data vector DB={DB1, DB2, DB3, DB4}, output data vector DC={DC1, DC2, DC3, DC4}. However, DA1 to DA4, DB1 to DB4, and DC1 to DC4 are two-digit hexadecimal numbers.

バイナリ出力ベクトルBINのビットが「1」である場合、入力データベクトルDAの対応する位置のビットの値が、出力データベクトルDCの対応する位置のビットへ転送される。一方、バイナリ出力ベクトルBINのビットが「0」である場合、入力データベクトルDBの対応する位置のビットの値が、出力データベクトルDCの対応する位置のビットへ転送される。 When the bit of the binary output vector BIN is "1", the value of the bit at the corresponding position of the input data vector DA is transferred to the bit at the corresponding position of the output data vector DC. On the other hand, when the bit of the binary output vector BIN is “0”, the value of the bit at the corresponding position of the input data vector DB is transferred to the bit at the corresponding position of the output data vector DC.

この場合、バイナリ出力ベクトルBINは「1000」であるので、入力データベクトルDAの最初の位置「DA1」の値が出力データベクトルDCの最初の位置「DC1」へ転送され、入力データベクトルDBの2〜4番目の位置「DA2」、「DA3」及び「DA4」の値がそれぞれ出力データベクトルDCの2〜4番目の位置「DC2」、「DC3」及び「DC4」へ転送される。よって、データコントローラ2は、出力データDC={DC1,DC2,DC3,DC4}={DA1,DB2,DB3,DB4}を出力する。 In this case, since the binary output vector BIN is "1000", the value of the first position "DA1" of the input data vector DA is transferred to the first position "DC1" of the output data vector DC, and 2 of the input data vector DB is transferred. The values of the fourth to fourth positions "DA2", "DA3" and "DA4" are transferred to the second to fourth positions "DC2", "DC3" and "DC4" of the output data vector DC, respectively. Therefore, the data controller 2 outputs the output data DC={DC1, DC2, DC3, DC4}={DA1, DB2, DB3, DB4}.

すなわち、バイナリ出力ベクトルBINのビット「1」は、出力データベクトルDCの対応する位置に転送される入力データベクトルDBの値を、入力データベクトルDAの対応する位置の値に置き換えるフラグとして機能する。バイナリ出力ベクトルBINがビット「1」を1つも含まない場合(すなわち、BIN=0000)、入力データベクトルDBの値(DB1〜DB4)の全てが何ら変化することなく出力データベクトルDCへ転送される(すなわち、DC={DC1,DC2,DC3,DC4}={DB1,DB2,DB3,DB4})ことは、言うまでもない。 That is, the bit “1” of the binary output vector BIN functions as a flag that replaces the value of the input data vector DB transferred to the corresponding position of the output data vector DC with the value of the corresponding position of the input data vector DA. When the binary output vector BIN does not include any bit "1" (that is, BIN=0000), all the values (DB1 to DB4) of the input data vector DB are transferred to the output data vector DC without any change. It goes without saying that (that is, DC={DC1, DC2, DC3, DC4}={DB1, DB2, DB3, DB4}).

また、入力データベクトルDAはベクトルであるものとしたが、入力データDAはスカラー値であってもよい。この場合、バイナリ出力ベクトルBINがビット「1」であるときには、スカラー値DA0が出力データベクトルDCの対応する位置に転送される。すなわち、バイナリ出力ベクトルBINが例えば「1010」である場合、出力データベクトルDCは{DA、DB2、DA、DB4}であってもよい。 Further, although the input data vector DA is assumed to be a vector, the input data DA may be a scalar value. In this case, when the binary output vector BIN is bit "1", the scalar value DA0 is transferred to the corresponding position of the output data vector DC. That is, when the binary output vector BIN is "1010", for example, the output data vector DC may be {DA, DB2, DA, DB4}.

本構成では、出力データベクトルDCを、入力データベクトルDBに戻してもよい。換言すれば、入力データベクトルDBは、前のサイクルで生成された出力データベクトルDCによって、連続的に更新されてもよい。 In this configuration, the output data vector DC may be returned to the input data vector DB. In other words, the input data vector DB may be continuously updated by the output data vector DC generated in the previous cycle.

データ処理装置100は、1サイクルで、各値(すなわち、値のセット(Yk,Uk,T1k,T2k)、但し1≦k≦4のそれぞれ)について、上述のデータムーブ(条件付きムーブ)演算を行うことができる。これにより、データ処理装置100は、4サイクルだけで、同時に読み込まれた4つの値のセットの全てに対して、データムーブ演算を行うことができる。 The data processing device 100 performs the above-described data move (conditional move) operation for each value (that is, a set of values (Yk, Uk, T1k, T2k), where 1≦k≦4) in one cycle. It can be carried out. As a result, the data processing device 100 can perform the data move operation on all of the sets of four values read at the same time in only four cycles.

一方で、特許文献や非特許文献などに基づく一般的構成によれば、図2に示すように、2階層の決定木処理は、3つの比較ノード(C1〜C3)が必要である。この一般的構成では、Yの読み込み、Uの読み込み及び比較ノードC1〜C3のそれぞれについて少なくとも1つのサイクルを必要とする1つの指示が必要となるので、このような決定木では、決定分岐に応じて5つ又は6つのサイクルが必要となる。また、比較ノードC1〜C3において、比較及び分岐の指示に伴う停止サイクルが必要である場合、これらの比較ノードのそれぞれは、少なくとも2サイクルを必要とする。結果として、一般的な構成では、2階層の決定木処理を実行するのに、1つの値セット(Y及びU)あたりで、8つ、9つ又はより多くのサイクルを要する。ここでは、一般的構成は、2階層の決定木処理について、1つの値セットあたりで10サイクルを要するものとする。この場合、データ処理装置100におけるように4つの値のセットに対して同じ演算を行おうとすると、データ処理装置100が4サイクルだけしか要しないのに対し、一般的構成では10×4=40サイクルが必要となる。 On the other hand, according to a general configuration based on patent documents, non-patent documents, etc., as shown in FIG. 2, the decision tree process of two layers requires three comparison nodes (C1 to C3). This general configuration requires one instruction that requires at least one cycle for each of Y reading, U reading, and each of the comparison nodes C1 to C3. Therefore, in such a decision tree, according to the decision branch, 5 or 6 cycles are required. Further, in the comparison nodes C1 to C3, when a stop cycle associated with a comparison and branch instruction is required, each of these comparison nodes requires at least two cycles. As a result, typical configurations require eight, nine, or more cycles per value set (Y and U) to perform a two-tier decision tree process. Here, it is assumed that the general configuration requires 10 cycles for each value set for two-layer decision tree processing. In this case, if the same operation is performed on a set of four values as in the data processing device 100, the data processing device 100 requires only 4 cycles, whereas in the general configuration, 10×4=40 cycles. Is required.

すなわち、それぞれ複数の値を含んでいる複数の入力データベクトル及び閾値入力データベクトルを少ないサイクルで処理することができるので、データムーブ演算の処理速度を向上させることができる。 That is, since it is possible to process a plurality of input data vectors and threshold input data vectors each containing a plurality of values in a small number of cycles, it is possible to improve the processing speed of the data move calculation.

なお、同時に読み込まれる各ベクトルの値の数は、4に限られない。同時にロードされる各ベクトルの値の数は、2、3、5又はより大きな値であってもよい。 The number of values of each vector read simultaneously is not limited to four. The number of values in each vector loaded at the same time may be 2, 3, 5 or higher.

本実施の形態では、結合演算部1は、論理和演算(AND)を実行するが、結合演算部1は、論理積演算(OR)、排他的論理和演算(XOR)、否定論理積演算(NAND)、否定論理和演算(NOR)又は否定排他的論理和演算(XNOR)を実行してもよい。 In the present embodiment, the join operation unit 1 executes the logical sum operation (AND), but the join operation unit 1 performs the logical product operation (OR), the exclusive OR operation (XOR), and the negative logical product operation ( NAND), NOR operation (NOR), or exclusive NOR operation (XNOR) may be executed.

本実施の形態では、データ処理装置100の動作は図2に示す2つのマスクを提供する2階層の決定木に基づいているが、これは例示に過ぎない。データ処理装置100の動作は、2以上のマスクを提供するより深い階層の決定木に基づいていてもよい。 In the present embodiment, the operation of the data processing device 100 is based on the two-layer decision tree that provides the two masks shown in FIG. 2, but this is merely an example. The operation of the data processing device 100 may be based on a deeper hierarchy of decision trees that provide more than one mask.

本実施の形態では、入力データベクトル及び出力データベクトルは、4つの8ビット値を含んでいる。しかし、入力データベクトル及び出力データベクトルに含まれる値は、8ビット値に限定されるものではない。入力データベクトル及び出力データベクトルは、4つの16ビット値を含んでもよい。入力データベクトル及び出力データベクトルに含まれる値のそれぞれは、4桁の16進数「0x****」である。但し、「*」は16進数である。 In the present embodiment, the input data vector and the output data vector include four 8-bit values. However, the values contained in the input data vector and the output data vector are not limited to 8-bit values. The input data vector and output data vector may include four 16-bit values. Each of the values included in the input data vector and the output data vector is a 4-digit hexadecimal number “0x***”. However, "*" is a hexadecimal number.

入力データ及び閾値入力データは、8ビット値又は16ビット値に限定されるものではない。2ビット、4ビット、32ビットなど他の多ビット値によって入力データ、閾値入力データ及び出力データを構成してもよい。 The input data and threshold input data are not limited to 8-bit values or 16-bit values. The input data, the threshold input data, and the output data may be configured by other multi-bit values such as 2 bits, 4 bits, and 32 bits.

実施の形態2
次に、実施の形態2にかかるデータ処理装置について説明する。図5に、実施の形態2にかかるデータ処理装置200の構成を模式的に示す。データ処理装置200は、実施の形態1にかかるデータ処理装置100に、パイプラインレジスタ部3を追加した構成を有する。
Embodiment 2
Next, a data processing device according to the second embodiment will be described. FIG. 5 schematically shows the configuration of the data processing device 200 according to the second embodiment. The data processing device 200 has a configuration in which the pipeline register unit 3 is added to the data processing device 100 according to the first embodiment.

パイプラインレジスタ部3は、比較器11及び12と結合演算部1との間に挿入される。パイプラインレジスタ部3は、コンパレータ11及び12から出力される比較結果を連続的かつ一時的に格納する。パイプラインレジスタ部3は、同じサイクルにて比較器11及び12からデータコントローラ2へ出力される比較結果R1及びR2を連続的に出力する。 The pipeline register unit 3 is inserted between the comparators 11 and 12 and the combining operation unit 1. The pipeline register unit 3 stores the comparison results output from the comparators 11 and 12 continuously and temporarily. The pipeline register unit 3 continuously outputs the comparison results R1 and R2 output from the comparators 11 and 12 to the data controller 2 in the same cycle.

よって、本構成によれば、データ処理装置300はパイプライン処理によって高い許容動作周波数を実現できるので、データ処理装置300は実施の形態1よりも高いスループットにて連続的なデータムーブ演算を実行できる。 Therefore, according to this configuration, the data processing device 300 can realize a high allowable operating frequency by the pipeline processing, and therefore the data processing device 300 can execute continuous data move calculation with higher throughput than that in the first embodiment. ..

実施の形態3
次に、実施の形態3にかかるデータ処理装置について説明する。図6に、実施の形態3にかかるデータ処理装置300の構成を模式的に示す。データ処理装置300は、実施の形態1にかかるデータ処理装置100に、比較器13及び14を追加した構成を有する。
Embodiment 3
Next, a data processing device according to the third embodiment will be described. FIG. 6 schematically shows the configuration of the data processing device 300 according to the third embodiment. The data processing device 300 has a configuration in which comparators 13 and 14 are added to the data processing device 100 according to the first embodiment.

比較器13は、入力データベクトルXin及び閾値データベクトルT3を受け取って比較し、比較結果R3を出力する。入力データベクトルXin及び閾値データベクトルT3は、それぞれ入力データベクトルYin及び閾値データベクトルT1に対応する。 The comparator 13 receives and compares the input data vector Xin and the threshold data vector T3, and outputs the comparison result R3. The input data vector Xin and the threshold data vector T3 correspond to the input data vector Yin and the threshold data vector T1, respectively.

比較器14は、入力データベクトルZin及び閾値データベクトルT4を受け取って比較し、比較結果R4を出力する。入力データベクトルZin及び閾値データベクトルT4は、それぞれ入力データベクトルUin及び閾値データベクトルT2に対応する。 The comparator 14 receives and compares the input data vector Zin and the threshold data vector T4, and outputs the comparison result R4. The input data vector Zin and the threshold data vector T4 correspond to the input data vector Uin and the threshold data vector T2, respectively.

結合演算部1は、比較結果ベクトルR1〜R4に対して論理和演算(AND)を行う。これにより、比較結果ベクトルR1〜R4の中の同じ位置の値が「1」(真)となり、バイナリ出力ベクトルBINの対応するビットが「1」となる。 The combination operation unit 1 performs a logical sum operation (AND) on the comparison result vectors R1 to R4. As a result, the value at the same position in the comparison result vectors R1 to R4 becomes "1" (true), and the corresponding bit in the binary output vector BIN becomes "1".

本構成によれば、入力ベクトルの4つのペアに対応可能である。この場合、データ処理装置300は、4階層の決定木に基づくデータ処理に対応できる。 According to this configuration, it is possible to handle four pairs of input vectors. In this case, the data processing device 300 can deal with data processing based on the decision tree of four layers.

なお、入力ベクトルのペアの数は2又は4に限定されるものではなく、入力ベクトルのペアの数は、適宜、3つ、5つ又はより多くてもよい。 The number of input vector pairs is not limited to two or four, and the number of input vector pairs may be three, five, or more as appropriate.

その他の実施の形態
なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、上述の実施の形態では、データコントローラでの演算は、条件付ムーブ演算であるものとして説明した。しかし、これは例示に過ぎない。データコントローラは、加算(ADD)又は減算(SUB)を行う、条件付き加算・減算処理のような他の演算を実行してもよい。
Other Embodiments It should be noted that the present invention is not limited to the above-described embodiments, and can be modified as appropriate without departing from the spirit of the invention. For example, in the above-described embodiment, the operation in the data controller has been described as the conditional move operation. However, this is merely an example. The data controller may perform other operations such as conditional add/subtract operations that perform addition (ADD) or subtraction (SUB).

上述の実施の形態では、比較器11及び12のそれぞれは、同じ閾値を用いて入力データベクトルの値を比較している。しかしながら、データ処理の目的に対応するために、閾値は適宜変更してもよい。また、コンパレータは、各入力値が閾値以下であるか、各入力値が閾値と等しいか、各入力値が閾値と等しくないか、各入力値が閾値よりも大きいか、又は、各入力値が閾値以上であるか、を判定してもよい。 In the above embodiment, each of the comparators 11 and 12 uses the same threshold value to compare the values of the input data vector. However, the threshold value may be appropriately changed to correspond to the purpose of data processing. In addition, the comparator, each input value is less than or equal to the threshold value, each input value is equal to the threshold value, each input value is not equal to the threshold value, each input value is greater than the threshold value, or each input value is You may judge whether it is more than a threshold value.

1 結合演算部
2 データコントローラ
3 パイプラインレジスタ部
11〜14 比較器
100、300 データ処理装置
101 中央演算部(CPU)
102 メモリ
103 プロセッサ
104 バス
1000 データ処理システム
1 Combined Operation Unit 2 Data Controller 3 Pipeline Register Units 11-14 Comparators 100, 300 Data Processing Device 101 Central Processing Unit (CPU)
102 memory 103 processor 104 bus 1000 data processing system

Claims (9)

それぞれが複数の入力データベクトルを受け取って比較結果ベクトルを出力する、複数の比較器と、
比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力する結合演算部と、
前記バイナリ出力ベクトルに基づいてデータ処理を制御するデータコントローラと、を備える、
データ処理装置。
A plurality of comparators, each of which receives a plurality of input data vectors and outputs a comparison result vector;
A combining operation unit that combines the comparison result vectors output from the comparator and outputs a binary output vector,
A data controller that controls data processing based on the binary output vector,
Data processing device.
各比較器は、2つの入力ベクトルを相互に比較し、
一方の入力ベクトルに含まれる値は、他方の入力ベクトルに含まれる対応する値と比較され、
各比較器の比較結果は、2つの値の比較結果を示す値を含む、
請求項1に記載のデータ処理装置。
Each comparator compares two input vectors with each other,
The value contained in one input vector is compared with the corresponding value contained in the other input vector,
The comparison result of each comparator includes a value indicating a comparison result of two values,
The data processing device according to claim 1.
結合演算部は、前記比較結果ベクトルについて論理和演算を行い、
前記比較結果ベクトルの同じ位置の値が、比較結果が真であることを示している場合、前記バイナリ出力ベクトルの対応するビットは「1」となり、
前記比較結果ベクトルの同じ位置の値が、比較結果の少なくとも1つが偽であることを示している場合、前記バイナリ出力ベクトルの対応するビットは「0」となる、
請求項1に記載のデータ処理装置。
The join operation unit performs an OR operation on the comparison result vector,
If the value at the same position in the comparison result vector indicates that the comparison result is true, the corresponding bit in the binary output vector is "1",
If the value at the same position of the comparison result vector indicates that at least one of the comparison results is false, the corresponding bit of the binary output vector is "0".
The data processing device according to claim 1.
前記データコントローラは、第1の入力データベクトル及び第2の入力データベクトルを受け取り、出力データベクトルを出力し、
前記バイナリ出力ベクトルのビットが「1」の場合、前記第1の入力データベクトルにおいて対応する位置の値が、前記出力データベクトルにおいて対応する位置に渡され、
前記バイナリ出力ベクトルのビットが「0」の場合、前記第2の入力データベクトルにおいて対応する位置の値が、前記出力データベクトルにおいて対応する位置に渡される、
請求項3に記載のデータ処理装置。
The data controller receives a first input data vector and a second input data vector and outputs an output data vector,
If the bit of the binary output vector is “1”, the value of the corresponding position in the first input data vector is passed to the corresponding position in the output data vector,
If the bit of the binary output vector is "0", the value of the corresponding position in the second input data vector is passed to the corresponding position in the output data vector,
The data processing device according to claim 3.
前記データコントローラは、スカラー値である第1の入力データ及び第2の入力データベクトルを受け取り、出力データベクトルを出力し、
前記バイナリ出力ベクトルのビットが「1」の場合、前記第1の入力データのスカラー値が、前記出力データベクトルにおいて対応する位置に渡され、
前記バイナリ出力ベクトルのビットが「0」の場合、前記第2の入力データベクトルにおいて対応する位置の値が、前記出力データベクトルにおいて対応する位置に渡される、
請求項3に記載のデータ処理装置。
The data controller receives the first input data and the second input data vector, which are scalar values, and outputs an output data vector,
If the bit of the binary output vector is "1", the scalar value of the first input data is passed to the corresponding position in the output data vector,
If the bit of the binary output vector is "0", the value of the corresponding position in the second input data vector is passed to the corresponding position in the output data vector,
The data processing device according to claim 3.
前記比較結果ベクトルの同じ位置の値を連続的に格納し、かつ、同じサイクルに前記比較器から出力された、格納された前記値を連続的に出力するレジスタ部をさらに備える、
請求項2に記載のデータ処理装置。
Further comprising a register unit for continuously storing the value at the same position of the comparison result vector and continuously outputting the stored value output from the comparator in the same cycle,
The data processing device according to claim 2.
メモリ部と、
バスと、
請求項1に記載のデータ処理装置と、を備える、
データ処理システム。
Memory part,
A bus
The data processing device according to claim 1,
Data processing system.
複数の入力データベクトルを受け取って比較結果ベクトルを出力し、
比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力し、
前記バイナリ出力ベクトルに基づいてデータ処理を制御する、
データ処理方法。
Receives multiple input data vectors and outputs a comparison result vector,
Combining the comparison result vectors output from the comparator to output a binary output vector,
Controlling data processing based on the binary output vector,
Data processing method.
複数の入力データベクトルを受け取って比較結果ベクトルを出力する処理と、
比較器から出力された前記比較結果ベクトルを結合してバイナリ出力ベクトルを出力する処理と、
前記バイナリ出力ベクトルに基づいてデータ処理を制御する処理と、をコンピュータに実行させる、
データ処理プログラム。
A process of receiving a plurality of input data vectors and outputting a comparison result vector,
A process of combining the comparison result vectors output from the comparator and outputting a binary output vector;
Causing a computer to perform a process of controlling data processing based on the binary output vector,
Data processing program.
JP2018235212A 2018-12-17 2018-12-17 Data processing device, data processing system, data processing method and program Pending JP2020112840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018235212A JP2020112840A (en) 2018-12-17 2018-12-17 Data processing device, data processing system, data processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018235212A JP2020112840A (en) 2018-12-17 2018-12-17 Data processing device, data processing system, data processing method and program

Publications (1)

Publication Number Publication Date
JP2020112840A true JP2020112840A (en) 2020-07-27

Family

ID=71667017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018235212A Pending JP2020112840A (en) 2018-12-17 2018-12-17 Data processing device, data processing system, data processing method and program

Country Status (1)

Country Link
JP (1) JP2020112840A (en)

Similar Documents

Publication Publication Date Title
TWI501148B (en) Conditional compare instructions
US20200050918A1 (en) Processing apparatus and processing method
US9557995B2 (en) Data processing apparatus and method for performing segmented operations
CN109684087B (en) Operation method, device and related product
TWI733798B (en) An apparatus and method for managing address collisions when performing vector operations
US20100281483A1 (en) Programmable scheduling co-processor
US8418154B2 (en) Fast vector masking algorithm for conditional data selection in SIMD architectures
US6934938B2 (en) Method of programming linear graphs for streaming vector computation
Green Efficient scalable median filtering using histogram-based operations
JP5370359B2 (en) SIMD type parallel computer system, SIMD type parallel computer method and control program
Véstias et al. A fast and scalable architecture to run convolutional neural networks in low density FPGAs
TW201723883A (en) Fast vector dynamic memory conflict detection
JP6329412B2 (en) SIMD processor
CN112051981B (en) Data pipeline calculation path structure and single-thread data pipeline system
JP2020112840A (en) Data processing device, data processing system, data processing method and program
TWI587137B (en) Improved simd k-nearest-neighbors implementation
CN111831582A (en) Memory management device and method for intelligent processor and electronic equipment
CN104216827B (en) The instruction checked for performing overload
Anderson Transmathematical basis of infinitely scalable pipeline machines
CN111831333A (en) Instruction decomposition method and device for intelligent processor and electronic equipment
Vespa Unraveling the divergence of gpu threads
JP2004334297A (en) Parallel operation processor and parallel operation processing method
Walker et al. Automatic code generation on a MOVE processor using cartesian genetic programming
US9606798B2 (en) VLIW processor, instruction structure, and instruction execution method
Peemen et al. A data-reuse aware accelerator for large-scale convolutional networks