JP7136343B2 - Data processing system, method and program - Google Patents
Data processing system, method and program Download PDFInfo
- Publication number
- JP7136343B2 JP7136343B2 JP2021515247A JP2021515247A JP7136343B2 JP 7136343 B2 JP7136343 B2 JP 7136343B2 JP 2021515247 A JP2021515247 A JP 2021515247A JP 2021515247 A JP2021515247 A JP 2021515247A JP 7136343 B2 JP7136343 B2 JP 7136343B2
- Authority
- JP
- Japan
- Prior art keywords
- unit
- local memory
- data
- memory
- memory unit
- 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
- 238000012545 processing Methods 0.000 title claims description 119
- 238000000034 method Methods 0.000 title claims description 26
- 230000015654 memory Effects 0.000 claims description 337
- 239000011159 matrix material Substances 0.000 claims description 87
- 238000012546 transfer Methods 0.000 claims description 61
- 239000013598 vector Substances 0.000 claims description 46
- 230000017105 transposition Effects 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 15
- 238000004364 calculation method Methods 0.000 description 11
- 238000013506 data mapping Methods 0.000 description 6
- 238000013500 data storage Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000013507 mapping Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000010801 machine learning Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000003491 array Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 3
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011773 genetically engineered mouse model Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3885—Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
- G06F9/3887—Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units controlled by a single instruction for multiple data lanes [SIMD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/3001—Arithmetic instructions
Description
本発明は、一般に、一次元配列アーキテクチャに基づき、特に、行列転置計算を含む連続行列処理に使用されるデータ処理システム、方法、およびプログラムに関するものである。 The present invention relates generally to data processing systems, methods, and programs based on one-dimensional array architectures and, more particularly, to continuous matrix processing, including matrix transpose calculations.
機械学習は、多くの研究分野における高いパフォーマンスのために、近年非常に人気がある。機械学習用のますます多くのアプリケーションが開発されるにつれて、計算の複雑さが大幅に増している。したがって、効率的なデータ処理が非常に重要である。計算効率を向上させるために、ベクトル処理の並列処理を増やすことは非常に有益であり、したがって好ましい。 Machine learning has become very popular in recent years due to its high performance in many research areas. As more and more applications for machine learning are developed, the computational complexity increases significantly. Efficient data processing is therefore very important. Increasing the parallelism of vector processing to improve computational efficiency is highly beneficial and therefore preferred.
ベクトル処理では、主な概念はベクトルパターンでデータを処理することである。行列データを処理するために、各ベクトルレーンに算術論理演算装置(ALU)を含めたベクトルレーンが使用される。計算データを保存するために、各ベクトルレーンにはローカルメモリが含まれている必要がある。さらに、オンチップローカルメモリとオフチップ外部メモリとの間でデータを転送するために、ダイレクトメモリアクセス(DMA)を使用することができる。最後に、全体的な制御ロジックについては、中央制御ユニットがシステムで使用されることが好ましい。上記の概念に基づいて、いくつかのベクトル処理装置の設計は、特許文献1、非特許文献1、および非特許文献2に記載されている。 In vector processing, the main concept is to process data in vector patterns. Vector lanes containing an arithmetic logic unit (ALU) in each vector lane are used to process the matrix data. Each vector lane must contain local memory to store computational data. Additionally, direct memory access (DMA) can be used to transfer data between on-chip local memory and off-chip external memory. Finally, for the overall control logic, a central control unit is preferably used in the system. Based on the above concepts, several vector processor designs are described in US Pat.
機械学習では、最も一般的な計算の1つが行列計算である。汎用行列乗算(GEMM)は、順方向と逆方向の両方の伝搬で使用される。GEMM機能を実行する場合、すべてのソースデータをメモリから取得する必要があり、各エレメントからフェッチされたデータを十分に活用するために、二次元のプロセッシングエレメントが使用される。ただし、二次元配列の欠点は、計算の実際の行列サイズがサポートされている二次元配列のサイズよりもはるかに小さい場合、未使用のプロセッシングエレメントの計算リソースが無駄になることである。別の方法として、柔軟性が高いため、一次元配列を使用することもできる。 In machine learning, one of the most common computations is matrix computation. Generalized Matrix Multiplication (GEMM) is used in both forward and backward propagation. When performing the GEMM function, all source data must be retrieved from memory, and two-dimensional processing elements are used to fully exploit the data fetched from each element. However, a drawback of 2D arrays is that if the actual matrix size of the computation is much smaller than the supported 2D array size, the computational resources of unused processing elements are wasted. Alternatively, one-dimensional arrays can be used as they are more flexible.
従来の技術の最初の課題は、行列転置がベクトル処理装置で一般的にサポートされていないことである。機械学習では、全結合レイヤの逆伝搬など、いくつかのケースで行列転置が使用される。参考文献では、処理装置内で行列を効率的に転置する方法は開示されていない。したがって、行列転置の特定の命令がベクトル処理装置でサポートされていない場合、転置はベクトル処理装置の外部で実行される必要がある。これを行うには、転置する行列を最初にベクトル処理装置内のローカルメモリから処理装置外部の外部メモリに転送する必要がある。転置された結果が外部メモリで準備された後、転置された行列はベクトル処理装置の外部の外部メモリからベクトル処理装置に転送される必要があり、これはデータ転送に多くの時間を浪費する。 A first problem with the prior art is that matrix transposition is not generally supported in vector processors. In machine learning, matrix transpose is used in several cases, such as backpropagation of fully connected layers. The reference does not disclose how to efficiently transpose the matrix within the processor. Therefore, if the particular instruction for matrix transposition is not supported by the vector processor, the transposition must be performed outside the vector processor. To do this, the matrix to be transposed must first be transferred from local memory within the vector processor to external memory outside the processor. After the transposed result is prepared in the external memory, the transposed matrix needs to be transferred from the external memory outside the vector processor to the vector processor, which wastes a lot of time in data transfer.
2つ目の課題は、主に2つのタイプで構成されるデータ転送が多いことである。1つはローカルメモリ自体の間の転送であり、もう1つはローカルメモリと外部メモリとの間の転送である。外部メモリは現在のベクトル処理装置で常に使用できるとは限らないため、ローカルメモリと外部メモリとの間のデータ転送には通常バブルサイクルがある。また、ローカルメモリと外部メモリとの間でデータ転送を行う場合、バブルサイクルが複数ある場合でも、要求が1つずつ連続して提示されるため、他の転送要求を処理できず、これにより計算システム全体のスループット性能が低下する。 The second problem is that many data transfers are mainly composed of two types. One is the transfer between the local memory itself and the other is the transfer between the local memory and the external memory. Data transfers between local memory and external memory usually have bubble cycles because external memory is not always available in current vector processing units. Also, when transferring data between local memory and external memory, even if there are multiple bubble cycles, the requests are presented one after another in succession, making it impossible to process other transfer requests. Overall system throughput performance is degraded.
本発明の1つの例示的な目的は、行列転置が従来のベクトル処理エンジンでサポートされていない(上記で特定された)第1の課題を解決することができる行列転置装置を提供することである。 One exemplary object of the present invention is to provide a matrix transposing device that can solve the first problem (identified above) that matrix transposing is not supported in conventional vector processing engines. .
本発明の別の例示的な目的は、1つのローカルメモリに対する複数の要求を同時に受け入れることができない(上記で特定された)第2の課題を解決することができる並列システムを提供することである。 Another exemplary object of the present invention is to provide a parallel system that can solve the second problem (identified above) of not being able to accept multiple requests for a single local memory simultaneously. .
本開示の第1の態様は、中央処理装置と、前記中央処理装置に電子的に接続され、前記中央処理装置から受信した命令に基づいて動作を実行するように構成されたベクトル処理装置と、前記中央処理装置に電子的に接続され、命令を格納するように構成された命令メモリユニットと、外部メモリユニットと、前記中央処理装置に電子的に接続され、一次元シストリックデータを格納するように構成された第1のローカルメモリユニットと、前記ベクトル処理装置に電子的に接続され、行列データを格納するように構成された第2のローカルメモリユニットと、前記第1のローカルメモリユニット、前記第2のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続され、前記外部メモリユニット内のデータにアクセスするように構成されたダイレクトメモリアクセスユニットと、を備えるデータ処理システムを提供し、データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される。 A first aspect of the present disclosure is a central processing unit; a vector processing unit electronically coupled to the central processing unit and configured to perform operations based on instructions received from the central processing unit; an instruction memory unit electronically connected to the central processing unit and configured to store instructions; an external memory unit electronically connected to the central processing unit and configured to store one-dimensional systolic data; a second local memory unit electronically coupled to said vector processing device and configured to store matrix data; said first local memory unit; a second local memory unit, said instruction memory unit, and a direct memory access unit electronically coupled to said external memory unit and configured to access data in said external memory unit. and data is transferred through the direct memory access unit with timing based on a predetermined selection priority.
本開示の第2の態様は、データ処理システムのための方法を提供する。前記データ処理システムは、中央処理装置と、前記中央処理装置に電子的に接続されたベクトル処理装置と、前記中央処理装置に電子的に接続された命令メモリユニットと、外部メモリユニットと、前記中央処理装置に電子的に接続された第1のローカルメモリユニットと、前記ベクトル処理装置に電子的に接続された第2のローカルメモリユニットと、前記第1のローカルメモリユニット、前記第2のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続されたダイレクトメモリアクセスユニットと、を備える。前記方法は、前記ベクトル処理装置によって、前記中央処理装置から受信した命令に基づいて動作を実行することと、前記命令メモリユニットによって、命令を格納することと、前記第1のローカルメモリユニットによって、一次元シストリックデータを格納することと、前記第2のローカルメモリユニットによって、行列データを格納することと、前記ダイレクトメモリアクセスユニットによって、前記外部メモリユニット内のデータにアクセスすることと、を含む。データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される。 A second aspect of the disclosure provides a method for a data processing system. The data processing system includes a central processing unit, a vector processing unit electronically connected to the central processing unit, an instruction memory unit electronically connected to the central processing unit, an external memory unit, and a a first local memory unit electronically connected to a processing device; a second local memory unit electronically connected to said vector processing device; said first local memory unit; said second local memory; a direct memory access unit electronically connected to said instruction memory unit and said external memory unit. The method includes: performing operations based on instructions received from the central processing unit by the vector processing unit; storing instructions by the instruction memory unit; storing instructions by the first local memory unit; storing one-dimensional systolic data; storing matrix data by the second local memory unit; and accessing data in the external memory unit by the direct memory access unit. . Data is transferred through the direct memory access unit with timing based on predetermined selection priorities.
本開示の第3の態様は、データ処理システムのためのプログラムを提供する。前記データ処理システムは、中央処理装置と、前記中央処理装置に電子的に接続されたベクトル処理装置と、前記中央処理装置に電子的に接続された命令メモリユニットと、外部メモリユニットと、前記中央処理装置に電子的に接続された第1のローカルメモリユニットと、前記ベクトル処理装置に電子的に接続された第2のローカルメモリユニットと、前記第1のローカルメモリユニット、前記第2のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続されたダイレクトメモリアクセスユニットと、を備え、前記プログラムは、前記ベクトル処理装置に、前記中央処理装置から受信した命令に基づいて動作を実行させ、前記命令メモリユニットに、命令を格納させ、前記第1のローカルメモリユニットに、一次元シストリックデータを格納させ、前記第2のローカルメモリユニットに、行列データを格納させ、前記ダイレクトメモリアクセスユニットに、前記外部メモリユニット内のデータにアクセスさせる。データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される。 A third aspect of the present disclosure provides a program for a data processing system. The data processing system includes a central processing unit, a vector processing unit electronically connected to the central processing unit, an instruction memory unit electronically connected to the central processing unit, an external memory unit, and a a first local memory unit electronically connected to a processing device; a second local memory unit electronically connected to said vector processing device; said first local memory unit; said second local memory; a direct memory access unit electronically connected to said instruction memory unit and said external memory unit, said program instructing said vector processing unit to act on instructions received from said central processing unit. , causing the instruction memory unit to store instructions, causing the first local memory unit to store one-dimensional systolic data, causing the second local memory unit to store matrix data, and causing the direct A memory access unit is caused to access data in the external memory unit. Data is transferred through the direct memory access unit with timing based on predetermined selection priorities.
本発明の1つの効果は、行列転置がローカルメモリ内で実行され得ることである。この効果の理由は、行列転置のための特定の命令を作成できるためである。 One advantage of the present invention is that matrix transposition can be performed in local memory. The reason for this effect is the ability to create specific instructions for matrix transposition.
ベクトル処理装置はこの命令を受信すると、一方のローカルメモリからもう一方のローカルメモリへのデータの転送を開始する。転送中に、ソースメモリとデスティネーションメモリのためのマッピングされたアドレスが計算されるため、ソース行列からの各データ項目がデスティネーション行列に転置された方法で入力される。 When the vector processor receives this command, it begins transferring data from one local memory to the other. During the transfer, each data item from the source matrix is entered in the destination matrix in a transposed manner, as the mapped addresses for the source and destination memories are calculated.
2つ目の効果は、2つのローカルメモリと外部メモリとの間のデータを同じ期間内に転送できることである。 A second advantage is that data can be transferred between the two local memories and the external memory within the same period.
この効果の理由は、優先度要求選択方式が実装されているため、優先度の高いデータ転送のバブルサイクル中に優先度の低いデータ転送を実行できるためである。 The reason for this effect is that a priority request selection scheme is implemented so that a low priority data transfer can be performed during the bubble cycle of a high priority data transfer.
(構成の説明)
まず、本発明の第1の例示的な実施形態を、添付の図面を参照して以下に詳述する。
(Description of configuration)
First, a first exemplary embodiment of the present invention will be detailed below with reference to the accompanying drawings.
図1を参照すると、本発明の第1の例示的な実施形態では、データ処理システム100は、中央処理装置(CP)110、ベクトル処理(VP)エンジン120、DMA130、行列転送デバイス140、データ記憶用の第1のローカルメモリ150、データ記憶用の第2のローカルメモリ160、命令記憶用の命令メモリ180、および外部メモリ170を含む。
Referring to FIG. 1, in a first exemplary embodiment of the present invention,
CP110は、MIPS処理装置、または同様のアーキテクチャ処理装置であってもよく、算術計算などの基本的な命令をサポートするサポートし、中央処理装置110内の汎用レジスタを用いて外部メモリ170への/からの格納/ロードを行う。中央処理装置110は、第1および第2のローカルメモリ150,160を制御して、外部メモリ170から計算データをフェッチし、また、命令メモリ180に格納されたすべての命令を準備する。次に、中央処理装置110は、ベクトル命令および行列データをベクトル処理装置120に送信する。ベクトル処理装置120は、命令を受け取り、計算を開始する。ベクトル処理装置120の計算は、一次元シストリックパターンに基づいている。一方の入力は第1のローカルメモリ150からフェッチされ、他方の入力は第2のローカルメモリ160からフェッチされる。計算後、結果は第2のローカルメモリ160に格納される。第1のローカルメモリ150と第2のローカルメモリ160との間にパスがあり、行列転送デバイス140を介して、第1のローカルメモリ150と第2のローカルメモリ160との間でデータを転送することができる。第1および第2のローカルメモリ150,160間の転送は、通常の転送または転置転送であり得る。計算が終了すると、第2のローカルメモリ160内の結果は、ダイレクトメモリアクセス130を介して外部メモリ170に転送されてもよい。
CP 110, which may be a MIPS processor, or similar architecture processor, supports supporting basic instructions such as arithmetic calculations, and uses general purpose registers within
ベクトル処理装置120内の詳細なアーキテクチャが図4に示されている。複数の処理装置121のそれぞれは、互いに接続されている。データ値および命令情報を転送するために使用される、中央処理装置110と第1のプロセッシングエレメント121との間の接続が存在する。隣接するプロセッシングエレメント121同士の間に、各プロセッシングエレメント121に情報をブロードキャストするために使用される接続チャネルが存在する。各プロセッシングエレメント121の内部において、乗算および加算を効率的に計算するために、デジタル信号処理装置(DSP)を使用して、より低い電力およびより高い周波数を達成することができる。さらに、中間結果を格納するために、各プロセッシングエレメント121に専用レジスタ125が存在する。各プロセッシングエレメント121は、1つの専用レジスタ125を有する。
A detailed architecture within the
ローカルメモリ150のアーキテクチャの詳細を図2に示す。16個の2ポートRAMバンク151と1個の第1のデータ選択ユニット153がある。2ポートRAM151は、データを格納するために使用される。第1のデータ選択ユニット153は、外部メモリ170または第2のローカルメモリ160とのデータ転送を選択する。ベクトル処理装置120のためのシストリックデータ入力としての出力もある。この例示的な実施形態における第1のローカルメモリ150の2ポートRAMバンクの数は16個であるが、8個や32個などであってもよいことに留意されたい。
The architectural details of
第2のローカルメモリ160のアーキテクチャの詳細は、図3に示されている。2ポートRAMバンク161、第2のデータ選択ユニット162、およびデータリング163が存在する。RAMバンク161の数は、プロセッシングエレメント121の数に等しく、1つのプロセッシングエレメント121は、1つのRAMバンク161に対応する。
Details of the architecture of the second
行列転送デバイス140のアーキテクチャの詳細は、図5に示されている。行列転送デバイス140の内部には、アドレスジェネレータ141およびバンク数ジェネレータ142が存在する。第1のローカルメモリ150と第2のローカルメモリ160の構成が異なるため、一方のローカルメモリから他方のローカルメモリに転送されるデータの種類に関係なく、デスティネーションバンクのバンクおよび各バンクのアドレスは、ソースバンクのバンクおよびアドレスとは異なり得る。したがって、アドレスジェネレータ141およびバンク数ジェネレータ142が使用される。
The architectural details of
[動作の説明]
次に、図10から図13のフローチャートを参照して、本例示的な実施形態の一般的な動作を詳細に説明する。
[Explanation of operation]
The general operation of the exemplary embodiment will now be described in detail with reference to the flowcharts of FIGS. 10-13.
まず、ダイレクトメモリアクセスユニット(DMA)は、命令を外部メモリ170から命令メモリ180に転送する。アプリケーションごとに、アプリケーションをアセンブリコードにコンパイルできる。したがって、アセンブリコードは、アプリケーションごとに作成され、命令メモリ180に格納される。
First, a direct memory access unit (DMA) transfers instructions from
その後、中央処理装置110は、命令メモリ180から命令を1つずつフェッチする。初期データは、計算を開始する前に、第1のローカルメモリ150および第2のローカルメモリ160に格納される。汎用行列乗算(GEMM)機能を実行する場合、左側の行列は第1のローカルメモリ150に格納され、右側の行列は第2のローカルメモリ160に格納される。各行列M*Kについて、第1のローカルメモリ150におけるデータマッピングは、図6を参照して説明される。第1のローカルメモリ150に使用されるRAMの16個のバンクがある場合、D1[0,0](D1[m,k]は、行列のm番目の行およびk番目の列のエレメントを表す)は、行列を格納するために第1のローカルメモリ150のバンク0のアドレス0に格納される。例えば、データD1[0,1]は、第1のローカルメモリ150のバンク1のアドレス0に格納され、データD1[0,15]は、例えば、第1のローカルメモリ150のバンク15のアドレス0に格納される。D1[0,16]から開始して、データは、第1のローカルメモリ150のバンク0のアドレス1に格納される。
After that,
したがって、アドレスジェネレータ141および対応するバンクは、以下の式によって計算される。
ADDR=(m*K+k)/16
BANK=(m*K+k)%16
Therefore, the
ADDR=(m*K+k)/16
BANK=(m*K+k)%16
第2のローカルメモリ160のデータマッピングについては、各プロセッシングエレメント121が1つのRAMバンク161に対応しているため、RAMバンク161の数はプロセッシングエレメント121の数に等しい。256個のプロセッシングエレメント121が存在する例では、図7を参照してデータマッピング方法が与えられる。D2[0,0]は、第2のローカルメモリ160のバンク0のアドレス0に格納され、D2[0,1]は、第2のローカルメモリ160のバンク1のアドレス0に格納され、以下同様である。D2[1,0]の場合、データは第2のローカルメモリ160のバンク0のアドレス1に格納される。D2[1,1]の場合、データは第2のローカルメモリ160のバンク1のアドレス1に格納される。各行列K*Nについて、NがPE121の数よりも小さい場合、未使用の列はゼロで埋められる。NがPE121の数よりも大きい場合、行列は、PE121の数に従って列ごとにカットされ、次いで、第2のローカルメモリ160にマッピングされる。したがって、エレメントD2[k,n](kは行を表し、nは列を表す)の場合、アドレスジェネレータおよび対応するバンクは以下の式で得られる。
ADDR=k
BANK=n
For data mapping of the second
ADDR=k
BANK=n
行列を第2のローカルメモリ160に格納するために、データリング163を使用して、すべての2ポートRAMバンクを介してデータを渡し、対応する2ポートRAMバンクへ/からデータを書き込む/読み取る。例えば、キャッシュラインが64バイトで、32ビットの単精度浮動小数点を使用する場合、1つのキャッシュラインに16個のデータ項目がある。各データ項目は、対応する2ポートRAMバンク161に格納される必要がある。
To store the matrix in the second
左右の行列を第1のローカルメモリ150および第2のローカルメモリ160に格納した後、計算は一次元シストリック方式で実行される。GEMM計算の場合、左側の行列がD1(M,K)で、右側の行列がD2(K,N)であるとすると、乗算結果はRES(M,N)になる。RES[m,n]の各エレメントについて、次の計算が実行される。
D1[0,0]がすべてのPE121を介して転送された後、次のデータ項目が第1のローカルメモリ150から読み取られる。左側の行列は、行優先順に読み取られる。したがって、例えば、D1[0,1]は、第1のローカルメモリ150から読み取られて第1のプロセッシングエレメント121に送信され、D2[1,0]は、第1のプロセッシング121において第2のローカルメモリ160から読み取られる。その後、D1[0,1]*D2[1,0]が計算される。D1[0,0]*D2[0,0]の前の結果は、専用レジスタ125から読み取られ、D1[0,1]*D2[1,0]の結果に追加される。合計は、専用レジスタ125に再び格納される。これを繰り返し行うことにより、第1のプロセッシングエレメント121の第1のエレメントRES[0,0]を取得することができる。同様に、第1のプロセッシングエレメント121内のすべてのエレメントを計算することができる。エレメントを計算した後、結果は、第2のローカルメモリ160内の2ポートRAMバンク161に送信される。
After D1[0,0] has been transferred through all
以下、第1のローカルメモリ150と第2のローカルメモリ160との間のデータ転送について説明する。4つのケースがある。第1のケースは、第1のローカルメモリ150から第2のローカルメモリ160への通常の転送である。第2のローカルメモリ160に格納された行列サイズがK×Nであると仮定すると、N個のプロセッシングエレメント121が使用され、各RAMバンクの深さはKである。上記のように、Nがプロセッシングエレメント121の数(例えば256)よりも小さい場合、未使用の列はゼロで埋められる。したがって、第2のローカルメモリ160内のD2[0,0]は、ローカルメモリ150内の第1のRAMバンクの第1のエレメントにマッピングされる。第2のローカルメモリ160内のD2[0,1]は、第1のローカルメモリ150内の第2のRAMの第1のエレメントにマッピングされる。しかしながら、第2のローカルメモリ160内のD2[0,n]について、nが第1のローカルメモリ150によってサポートされるバンクの数よりも大きい場合、第1のローカルメモリ150および第2のローカルメモリ160内のアドレスおよびバンクは、異なる。他のエレメントのアドレスとバンクのマッピングについて、計算方法が以下の式に示され、ここで、DST_ADDRとDST_BANKは、それぞれデスティネーションアドレスとバンクである。この場合、デスティネーションアドレスおよびバンクは、第1のローカルメモリ150にある。SRC_ADDRおよびSRC_BANKは、ソースアドレスおよびソースバンクを表し、この場合、ソースアドレスおよびソースバンクは、第2のローカルメモリ160にある。SRC_NUM_BANKは、第2のローカルメモリ160内の2ポートRAMバンク161の数であり、DST_NUM_BANKは、第1のローカルメモリ150でサポートされる2ポートRAMバンク151の数である。
DST_ADDR=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)/DST_NUM_BANK
DST_BANK=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)%DST_NUM_BANK
Data transfer between the first
DST_ADDR=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)/DST_NUM_BANK
DST_BANK=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)% DST_NUM_BANK
実際の状況では、各クロックサイクルで、キャッシュラインが512ビットであると想定して512ビットのデータが転送される。32ビットの単精度浮動小数点の場合、1つのデータ項目は32ビットであるため、1クロックサイクルで16個のデータ項目が転送される。256個のプロセッシングエレメント121が存在すると仮定すると、第1のローカルメモリ150と第2のローカルメモリ160との間のデータ転送について、第1のクロックサイクルにおいて、D2[0,0],D2[0,1]…D2[0,15]が各プロセッシングエレメント121のRAM161から取り出され、データリングを介して第1のローカルメモリ150に転送される。D2[0,0],D2[0,1]…D2[0,15]は、第1のローカルメモリ150の異なるバンクに格納されるので、これらのデータ項目を、同じクロックサイクルにおいて第1のローカルメモリ150に書き込むことができる。第2のクロックサイクルにおいて、D2[0,16],D2[0,17],D2[0,18]…D2[0,31]が、対応するプロセッシングエレメント121のRAMバンク161から取り出されて、データリング163を介して第1のローカルメモリ150に転送される。D2[0,16],D2[0,17]…D2[0,31]はローカルメモリ150の異なるバンクに格納されるので、これらのデータ項目を、同じクロックサイクルにおいて第1のローカルメモリ150に書き込むことができる。同様に、各クロックサイクルにおいて、16個のデータ項目が、対応するプロセッシングエレメント121のRAMバンク161から読み取られ、次いで、データリング163を介して転送され、最後に、第1のローカルメモリ150に格納される。
In a practical situation, on each clock cycle, 512 bits of data are transferred assuming the cache line is 512 bits. For 32-bit single precision floating point, one data item is 32 bits, so 16 data items are transferred in one clock cycle. Assuming there are 256 processing
第2のケースは、第1のローカルメモリ150から第2のローカルメモリ160への通常の転送である。同様に、アドレスおよびバンクジェネレータは上記と同じであるが、唯一の違いは、ソースが第1のローカルメモリ150になり、デスティネーションが第2のローカルメモリ160になることである。
The second case is a normal transfer from first
第3のケースは、転置された行列が第1のローカルメモリ150から第2のローカルメモリ160に転送されることである。行列[N,M]が第1のローカルメモリ150に格納されていると仮定すると、この行列は[M,N]のサイズに転置され、第2のローカルメモリ160に格納される。例えば、第1のローカルメモリ150のD1[0,0]は、第2のローカルメモリ160のバンク0のアドレス0にマッピングされる。第2のローカルメモリ160のD1[0,1]は、第2のローカルメモリ160のバンク0のアドレス1にマッピングされる。他のエレメントのアドレスとバンクのマッピングについて、計算方法を以下の式に示す。
DST_ADDR=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)%DST_NUM_BANK
DST_BANK=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)/DST_NUM_BANK
A third case is that the transposed matrix is transferred from the first
DST_ADDR=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)% DST_NUM_BANK
DST_BANK=(SRC_ADDR*SRC_NUM_BANK+SRC_BANK)/DST_NUM_BANK
転送は引き続き16×16ブロックに基づいている。しかしながら、この16×16ブロックは、第2のローカルメモリ160にある。したがって、16クロックサイクルごとに第2のローカルメモリ160の側に16×16ブロックを生成するには、われわれは第1のローカルメモリ150のD2[0,0],D2[1,1],D2[2,2]…D2[15,15]の対応するエレメントを見つける必要がある。D2[0,0]の対応するアドレスはバンク0のアドレス0であり、D2[1,1]の対応するアドレスはバンク1のアドレス(N+1)/16であり、D2[2,2]の対応するアドレスはバンク2のアドレス(N×2+2)/16である。同様に、D2[15,15]の対応する位置は、バンク15のアドレス(N×15+15)/16である。したがって、1クロックサイクルで16個のデータ項目をフェッチできる。第2のクロックサイクルでは、D2[1,0],D2[2,1],D2[3,2]…D2[0,15]の対応するエレメントが、第1のローカルメモリ150に見出される。D2[1,0]の対応するアドレスはバンク0のアドレスN/16であり、D2[2,1]の対応するアドレスはバンク1のアドレス(N×2+1)/16である。同様に、D2[0,15]の対応する位置は、バンク15のアドレス0である。これらのマッピング方法により、ローカルメモリ160の16×16ブロックの第1のローカルメモリ150のアドレスを知ることができる。各クロックサイクルにおいて、第1のローカルメモリ150からフェッチされた16個のエレメントが転置され、第2のローカルメモリ160に格納される。例えば、第1のサイクルでは、D2[0,0],D2[1,1],D2[2,2]…D2[15,15]は対角線であるため、転置された結果は同じである。第2のローカルメモリ160の場合、バンク0のアドレスは0であり、バンク1のアドレスは1であり、以下同様である。第2のクロックサイクルでは、D2[1,0],D2[2,1],D2[3,2]…D2[0,15]が第1のローカルメモリ150からフェッチされる。D2[1,0]の場合、転置された結果はバンク1のアドレス0に格納される必要があり、D2[2,1]はバンク2のアドレス1に格納される必要があり、D2[3,2]はバンク3のアドレス2に格納される必要がある。同様に、すべてのデータを、1クロックサイクルで第2のローカルメモリ160の16個のバンクに格納することができる。
Transfers are still based on 16x16 blocks. However, this 16×16 block resides in the second
第1のローカルメモリ150のアドレスジェネレータは、以下の式として表すことができ、ここで、CNTは、16×16ブロックの各16クロックサイクルのカウントであり、SRC_BANKは、第1のローカルメモリ150のどのバンクかを意味する。
SRC_ADDR_IN_B16=(N*(SRC_BANK+CNT)+SRC_BANK)/16 if SRC_BANK+CNT<=15
SRC_ADDR_IN_B16=(N*(SRC_BANK+CNT-16)+SRC_BANK)/16 if SRC_BANK+CNT>15
The address generator of the first
SRC_ADDR_IN_B16=(N*(SRC_BANK+CNT)+SRC_BANK)/16 if SRC_BANK+CNT<=15
SRC_ADDR_IN_B16=(N*(SRC_BANK+CNT-16)+SRC_BANK)/16 if SRC_BANK+CNT>15
16×16ブロックの基本アドレスは2つの部分で構成され、1つの部分はdelta_vとしてマークされた16×16ブロックの垂直方向の動きに対応し、もう1つの部分はdelta_hとしてマークされた16×16ブロックの水平方向の動きに対応する。B16_vertical_numは、第2のローカルメモリ160内の16×16ブロックの垂直アドレスを表す。ここでは、第2のローカルメモリ160内の16×16ブロックの垂直スキャンが使用される。
B16_vertical_num=(B16_vertical_num<M/16)?B16_vertical_num+1:0
Delta_v=(B16_vertical_num<M/16)?(Delta_v+N):0
Delta_h=(B16_vertical_num==0)?(Delta_h+1):Delta_h
SRC_B16_ADDR=Delta_v+Delta_h
The base address of a 16x16 block consists of two parts, one part corresponds to the vertical movement of the 16x16 block marked as delta_v, and the other part is the 16x16 marked as delta_h. Corresponds to horizontal movement of the block. B16_vertical_num represents the vertical address of the 16×16 block in the second
B16_vertical_num=(B16_vertical_num<M/16)? B16_vertical_num+1:0
Delta_v=(B16_vertical_num<M/16)? (Delta_v+N): 0
Delta_h=(B16_vertical_num==0)? (Delta_h+1): Delta_h
SRC_B16_ADDR = Delta_v + Delta_h
したがって、第1のローカルメモリ150の16個のバンクの最終アドレスを、以下の式で得ることができる。
SRC_ADDR=SRC_ADDR_IN_B16+SRC_B16_ADDR
Therefore, the final address of the 16 banks of the first
SRC_ADDR = SRC_ADDR_IN_B16 + SRC_B16_ADDR
第1のローカルメモリ150のアドレスジェネレータは、上記で与えられている。次に、第2のローカルメモリ160のアドレスおよびバンクジェネレータについて説明する。ソース行列のスキャンは、第2のローカルメモリ160における垂直スキャンであるため、転置された行列のスキャンは、第2のローカルメモリ160における水平スキャンである。したがって、基本アドレスと基本バンクを次のように計算できる。
DST_ADDR_IN_B16=(DST_BANK%16-CNT) if DST_BANK%16-CNT>=0
DST_ADDR_IN_B16=(DST_BANK%16-CNT+16) if DST_BANK%16-CNT<0
DST_B16_ADDR=(DST_B16_BANK<N/16)?DST_B16_ADDR:(DST_B16_ADDR+16)
DST_ADDR=DST_ADDR_IN_B16+DST_B16_ADDR
The address generator for the first
DST_ADDR_IN_B16=(DST_BANK%16-CNT) if DST_BANK%16-CNT>=0
DST_ADDR_IN_B16 = (DST_BANK%16-CNT+16) if DST_BANK%16-CNT<0
DST_B16_ADDR=(DST_B16_BANK<N/16)? DST_B16_ADDR: (DST_B16_ADDR+16)
DST_ADDR = DST_ADDR_IN_B16 + DST_B16_ADDR
第4のケースは、転置された行列が第2のローカルメモリ160から第1のローカルメモリ150に転送されることである。行列[M,N]が第2のローカルメモリ160に格納されていると仮定すると、この行列は[N,M]に転置されて第1のローカルメモリ150に格納される必要がある。例えば、第2のローカルメモリ160のD2[0,0]は、第1のローカルメモリ150のバンク0のアドレス0に引き続きマッピングされる。第2のローカルメモリ160のD2[0,1]は、第1のローカルメモリ150のバンク0のアドレス1にマッピングされる。他のエレメントのアドレスとバンクのマッピングについて、計算方法を以下の式に示す。
DST_ADDR=(SRC_BANK*M+SRC_ADDR)/DST_NUM_BANK
DST_BANK=(SRC_BANK*M+SRC_ADDR)%DST_NUM_BANK
A fourth case is that the transposed matrix is transferred from the second
DST_ADDR=(SRC_BANK*M+SRC_ADDR)/DST_NUM_BANK
DST_BANK=(SRC_BANK*M+SRC_ADDR) %DST_NUM_BANK
D2[0,0],D2[0,1]…D2[0,15]のデータが各プロセッシングエレメント121のRAM161から取得された場合、16個のデータ項目は第1のローカルメモリ150の同じRAMバンクに格納される。したがって、われわれはこれらの16個のデータエレメントを1クロックサイクルで第1のローカルメモリ150に格納することはできない。この問題を回避するために、サイクリックデータマッピング方法が使用される。転送は16×16ブロックに基づいており、これは、1個の16×16ブロックのデータにアクセスした後に、16×16ブロックが次の16×16ブロックにシフトされることを意味する。左上の16×16ブロックが最初に転送され、16クロックサイクルかかる。第1のクロックサイクルにおいて、D2[0,0],D2[1,1],D2[2,2]…D2[15,15]が、第2のローカルメモリ160のRAM161から読み取られる。これらのエレメントは、第1のローカルメモリ150の異なるバンクに格納される。D2[0,0]は第1のローカルメモリ150の第1のRAMに格納され、D2[1,1]はローカルメモリの第2のRAMに格納され、以下同様である。したがって、われわれはこれらの16個のデータ項目を1クロックサイクルで第1のローカルメモリ150に格納することができる。第2のクロックサイクルにおいて、D2[0,1],D2[1,2],D2[2,3]…D2[14,15]およびD2[15,0]が、第2のローカルメモリ160のRAMバンク161から読み取られる。これらのエレメントはまた、第1のローカルメモリ150の異なるバンクに格納される。したがって、われわれはこれらの16個のデータを1クロックサイクルで第1のローカルメモリ150に格納することができる。アドレスジェネレータは第3のケースと同じであるが、唯一の違いは、第3のケースでは第1のローカルメモリ150から第2のローカルメモリ160に転送されるが、この第4のケースでは第2のローカルメモリ160から第1のローカルメモリ150に転送されることである。したがって、ソースとデスティネーションのアドレスが交換されている。
If the data in D2[0,0], D2[0,1] . stored in a bank. Therefore, we cannot store these 16 data elements in the first
第2のローカルメモリ160に関しては、外部メモリ170と第2のローカルメモリ160との間の転送、および第1のローカルメモリ150と第2のローカルメモリ160との間の転送が可能である。同じクロックサイクルで複数の転送要求を受信した場合、優先度はデータ選択ユニット162によって決定される。この動作の説明は、図8のフローチャートを参照して以下に説明される。第1の優先事項は、外部メモリ170から第2のローカルメモリ160へのデータ転送である。これは、データが有効である場合、データを外部メモリ170から取得しなければならないためである。第2の優先事項は、第2のローカルメモリ160から外部メモリ170への転送である。第3の優先事項は、第1のローカルメモリ150から第2のローカルメモリ160への転送であり、最後の優先事項は、第2のローカルメモリ160から第1のローカルメモリ150への転送である。
Regarding the second
第1のローカルメモリ150に関して、第1のデータ選択ユニット153が使用される。同じクロックサイクルで複数の転送要求を受信した場合、図9に示すように、優先度に基づいて選択が実行される。第1の優先事項は、外部メモリ170から第1のローカルメモリ150へのデータ転送である。第2の優先事項は、第1のローカルメモリ150から外部メモリ170への転送である。第3の優先事項は、第2のローカルメモリ160から第1のローカルメモリ150への転送であり、最後の優先事項は、第1のローカルメモリ150から第2のローカルメモリ160への転送である。
For the first local memory 150 a first
連続したGEMMの場合(例えば、第1のGEMMはA*B=Cであり、第2のGEMMはC*D=Eである)。以下、図10を参照して説明する。第1のGEMMはA*B=Cであり、行列Aは第1のローカルメモリ150に格納され、行列Bは第2のローカルメモリ160に格納される。行列Aを第1のローカルメモリ150に格納し、行列Bをローカルメモリ160に格納した後、計算が実行され、結果が第2のローカルメモリ160に格納される。第2のGEMMがC*D=Eである場合、行列Cは、シストリック一次元入力として第1のローカルメモリ150に格納される必要がある。行列Cを第1のローカルメモリ150に格納するために、結果は、最初に外部メモリ170に送信され、次に外部メモリから第1のローカルメモリ150に転送されなければならない。その後、行列Dが第2のローカルメモリ160に格納され、計算が開始される。最後に、計算結果が取得され、外部メモリ170に転送される。
For consecutive GEMMs (eg, the first GEMM is A*B=C and the second GEMM is C*D=E). Description will be made below with reference to FIG. The first GEMM is A*B=C, with matrix A stored in the first
しかしながら、われわれの方法では、われわれは行列Cを第2のローカルメモリ160から第1のローカルメモリ150に直接転送することができる。したがって、われわれは行列Cの外部メモリ170への転送を省くことができる。処理手順を図11に示す。第1のGEMMの計算は、第2のGEMMの行列Dを格納するときに並列化できる。
However, in our method we can transfer the matrix C directly from the second
同様に、第2のGEMMがC.T*D=Eであり、ここでC.TがCの転置行列である場合、従来の方法において、手順が図12に示されている。第1のGEMMを計算については、手順は図10に示されるものと同じである。Cを外部メモリに格納した後、中央処理装置110は、外部メモリ170内の行列Cを転置する。その後、Cの転置行列が第1のローカルメモリ150に転送され、行列Dが第2のローカルメモリ160に転送され、第2のGEMMが動作を開始することができる。
Similarly, the second GEMM is C.I. T*D=E, where C. If T is the transposed matrix of C, in the conventional method, the procedure is shown in FIG. For computing the first GEMM, the procedure is the same as shown in FIG. After storing C in external memory,
しかしながら、本開示の方法では、行列Cを第2のローカルメモリ160から第1のローカルメモリ150に直接転送することができるだけでなく、転送中に転置を終了することができる。したがって、行列Cの外部メモリ170への転送を、より少ない動作で実行することができる。さらに、中央処理装置への転送時間を短縮できる。処理手順を図13に示す。
However, the method of the present disclosure not only allows the matrix C to be directly transferred from the second
上記の例では、同じローカルメモリ(すなわち、第1のローカルメモリ150または第2のローカルメモリ160)に対する同時要求はない。ただし、一部の実装では、これらのプロセスが発生する場合がある。例えば、第1のGEMMであるA*B=Cを計算した後、行列Cの結果は、外部メモリ170に転送される必要がある。その間、結果はまた、次のGEMMであるC*D=Eのために第1のローカルメモリ150に転送される必要がある。この場合、第2のローカルメモリ160と外部メモリ170との間の転送がより高い優先度を有する。図14に示すように、外部メモリ170から/へのデータ転送はいくつかのバブルサイクルを有するので、これらのバブルサイクルを利用して、第1のローカルメモリ150と第2のローカルメモリ160との間の転送を実行することができる。
In the example above, there are no concurrent requests to the same local memory (ie, first
[効果の説明]
次に、本例示的な実施形態の効果について説明する。
[Explanation of effect]
Next, the effect of this exemplary embodiment will be described.
本例示的な実施形態は、2つのローカルメモリに対してマッピングアドレスが周期的に与えられるように構成されているので、アクセラレータ内部のデータリング163を介して転置方式でデータを転送することが可能であり、したがって、ホスト側で転置を実行する必要がない。
The exemplary embodiment is configured such that mapping addresses are provided periodically to the two local memories so that data can be transferred in a permuted manner via the
さらに、例示的な実施形態は、データ転送および計算が2つの異なるチャネルを使用するように構成され、これにより、連続的な行列計算が可能になり、並列に実行することができる。さらに、前の行列計算のデータ転送を、次の行列計算の計算と同時に実行することができる。 Further, the exemplary embodiment is configured such that data transfer and computation use two different channels, allowing serial matrix computations to be performed in parallel. Furthermore, the data transfer of the previous matrix calculation can be performed concurrently with the calculation of the next matrix calculation.
さらに、ローカルメモリごとに同じ期間に複数の書き込み/読み取り要求を実行できるため、ローカルメモリと外部メモリとの間の通信のバブルサイクルを利用できる。 In addition, multiple write/read requests can be performed in the same period per local memory, thus taking advantage of the bubble cycle of communication between local memory and external memory.
図15を参照すると、別の例示的な実施形態では、データ処理システム100は、中央処理装置(CP)110、ベクトル処理(VP)エンジン120、DMA130、データ記憶用の第1のローカルメモリ150、データ記憶用の第2のローカルメモリ160、命令記憶用の命令メモリ180、および外部メモリ170を含む。
15, in another exemplary embodiment,
上記のプログラムは、上記の機能を部分的に実行するためのものであってもよい。上記のプログラムは、上記の機能を実行するために、コンピュータシステムにすでに記録されているプログラムと組み合わされた、いわゆる差分ファイル(差分プログラム)であってもよい。 The above program may be for partially executing the above functions. The above program may be a so-called difference file (difference program) combined with a program already recorded in the computer system to perform the above functions.
上記のデータ処理システムのすべてまたは一部の機能は、ASIC(特定用途向け集積回路)、PLD(プログラマブルロジックデバイス)、FPGA(フィールドプログラマブルゲートアレイ)などのハードウェアを利用することによって実行され得る。 All or part of the functions of the data processing system described above may be performed by utilizing hardware such as ASICs (Application Specific Integrated Circuits), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays) and the like.
それに加えて、上記の例示的な実施形態の特徴は、本発明の範囲から逸脱しない範囲内で、周知の特徴で適切に置き換えることができる。さらに、本発明の技術的範囲は、上記の例示的な実施形態に限定されず、本発明の範囲から逸脱しない範囲内で様々な修正を行うことができる。 Additionally, features of the exemplary embodiments described above may be appropriately replaced with well-known features without departing from the scope of the invention. Moreover, the technical scope of the present invention is not limited to the exemplary embodiments described above, and various modifications can be made without departing from the scope of the present invention.
本発明は、画像または動画処理プラットフォームや深層学習プラットフォームなどの、大量のベクトルまたは行列計算を含むデータ処理装置に適用可能である。 The present invention is applicable to data processing apparatus involving large amounts of vector or matrix computations, such as image or video processing platforms and deep learning platforms.
100 データ処理システム
110 中央処理装置(CP)
120 ベクトル処理装置(VP)
121 プロセッシングエレメント(PE)
125 専用レジスタ
130 ダイレクトメモリアクセス(DMA)
140 行列転送デバイス
141 アドレスジェネレータ
142 バンク数ジェネレータ
150 第1のローカルメモリ
153 第1のデータ選択ユニット
160 第2のローカルメモリ
161 RAMバンク
162 第2のデータ選択ユニット
163 データリング
170 外部メモリ
180 命令メモリ
100
120 vector processor (VP)
121 Processing Element (PE)
125
140
Claims (7)
前記中央処理装置に電子的に接続され、前記中央処理装置から受信した命令に基づいて動作を実行するように構成されたベクトル処理装置と、
前記中央処理装置に電子的に接続され、命令を格納するように構成された命令メモリユニットと、
外部メモリユニットと、
前記中央処理装置に電子的に接続され、一次元シストリックデータを格納するように構成された第1のローカルメモリユニットと、
前記ベクトル処理装置に電子的に接続され、行列データを格納するように構成された第2のローカルメモリユニットと、
前記第1のローカルメモリユニット、前記第2のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続され、前記外部メモリユニット内のデータにアクセスするように構成されたダイレクトメモリアクセスユニットと、
前記第1および第2のローカルメモリユニット間で電子的に接続され、前記第1および第2のローカルメモリユニット間でデータを転送するように構成された行列転送ユニットと、
を備え、
データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される、
データ処理システム。 a central processing unit;
a vector processing unit electronically coupled to the central processing unit and configured to perform operations based on instructions received from the central processing unit;
an instruction memory unit electronically connected to the central processing unit and configured to store instructions;
an external memory unit;
a first local memory unit electronically connected to the central processing unit and configured to store one-dimensional systolic data;
a second local memory unit electronically connected to the vector processing unit and configured to store matrix data;
a direct memory electronically coupled to the first local memory unit, the second local memory unit, the instruction memory unit, and the external memory unit and configured to access data in the external memory unit; an access unit;
a matrix transfer unit electronically connected between the first and second local memory units and configured to transfer data between the first and second local memory units;
with
data is transferred through the direct memory access unit with timing based on a predetermined selection priority;
data processing system.
請求項1に記載のデータ処理システム。 The matrix transfer unit is capable of performing matrix transposition on the data when transferring data between the first and second local memory units.
The data processing system of claim 1 .
請求項2に記載のデータ処理システム。 The matrix transfer unit comprises an address generator configured to generate memory addresses for a source memory and a destination memory, the source memory being one of the first local memory unit and the second local memory unit. one and the destination memory is the other of the first local memory unit and the second local memory unit;
3. The data processing system of claim 2 .
請求項1から3のいずれか一項に記載のデータ処理システム。 The second local memory unit has a data ring configured to ring broadcast data, the data ring using the predetermined selection priority when multiple memory requests are received. transferring data to the first local memory unit and the external memory unit via the direct memory access unit using
4. A data processing system according to any one of claims 1-3 .
請求項1から4のいずれか一項に記載のデータ処理システム。 The first and second local memory units each include a plurality of 2-port RAM banks in which data is stored, and the number of 2-port RAM banks in the first local memory unit is equal to the number of the 2-port RAM banks in the second local memory. equal to the number of said two-port RAM banks of a unit;
5. A data processing system according to any one of claims 1-4 .
前記ベクトル処理装置によって、前記中央処理装置から受信した命令に基づいて動作を実行することと、
前記命令メモリユニットによって、命令を格納することと、
前記第1のローカルメモリユニットによって、一次元シストリックデータを格納することと、
前記第2のローカルメモリユニットによって、行列データを格納することと、
前記ダイレクトメモリアクセスユニットによって、前記外部メモリユニット内のデータにアクセスすることと、
前記行列転送ユニットは、前記第1および第2のローカルメモリユニット間でデータを転送するときに、前記データに対して行列転置を実行することと、
を含み、
データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される、
方法。 A method for a data processing system, said data processing system comprising: a central processing unit; a vector processing unit electronically connected to said central processing unit; a memory unit; an external memory unit; a first local memory unit electronically connected to said central processing unit; a second local memory unit electronically connected to said vector processing unit; a direct memory access unit electronically connected to the local memory unit, the second local memory unit, the instruction memory unit, and the external memory unit; and electronically between the first and second local memory units a matrix transfer unit connected to and configured to transfer data between the first and second local memory units, the method comprising:
performing operations by the vector processing unit based on instructions received from the central processing unit;
storing instructions by the instruction memory unit;
storing one-dimensional systolic data by the first local memory unit;
storing matrix data by the second local memory unit;
accessing data in the external memory unit by the direct memory access unit;
the matrix transfer unit performing matrix transposition on the data when transferring data between the first and second local memory units;
including
data is transferred through the direct memory access unit with timing based on a predetermined selection priority;
Method.
前記ベクトル処理装置に、前記中央処理装置から受信した命令に基づいて動作を実行させ、
前記命令メモリユニットに、命令を格納させ、
前記第1のローカルメモリユニットに、一次元シストリックデータを格納させ、
前記第2のローカルメモリユニットに、行列データを格納させ、
前記ダイレクトメモリアクセスユニットに、前記外部メモリユニット内のデータにアクセスさせ、
前記行列転送ユニットに、前記第1および第2のローカルメモリユニット間でデータを転送するときに、前記データに対して行列転置を実行させ、
データが、所定の選択優先度に基づくタイミングで、前記ダイレクトメモリアクセスユニットを介して転送される、
プログラム。 A program for a data processing system, said data processing system comprising: a central processing unit; a vector processing unit electronically connected to said central processing unit; a memory unit; an external memory unit; a first local memory unit electronically connected to said central processing unit; a second local memory unit electronically connected to said vector processing unit; a direct memory access unit electronically connected to the local memory unit, the second local memory unit, the instruction memory unit, and the external memory unit; and electronically between the first and second local memory units a matrix transfer unit connected to and configured to transfer data between the first and second local memory units, the program comprising:
causing the vector processing unit to perform operations based on instructions received from the central processing unit;
storing instructions in the instruction memory unit;
causing the first local memory unit to store one-dimensional systolic data;
storing matrix data in the second local memory unit;
causing the direct memory access unit to access data in the external memory unit;
causing the matrix transfer unit to perform a matrix transpose on the data when transferring the data between the first and second local memory units;
data is transferred through the direct memory access unit with timing based on a predetermined selection priority;
program.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2018/035246 WO2020059156A1 (en) | 2018-09-18 | 2018-09-18 | Data processing system, method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2022500782A JP2022500782A (en) | 2022-01-04 |
JP7136343B2 true JP7136343B2 (en) | 2022-09-13 |
Family
ID=69886750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021515247A Active JP7136343B2 (en) | 2018-09-18 | 2018-09-18 | Data processing system, method and program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7136343B2 (en) |
WO (1) | WO2020059156A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115114575B (en) * | 2022-08-30 | 2023-01-31 | 中国人民解放军国防科技大学 | Vector processor-oriented image-to-matrix row conversion method, device and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002041445A (en) | 2000-05-19 | 2002-02-08 | Matsushita Electric Ind Co Ltd | Highly efficient dma controller |
JP2008158699A (en) | 2006-12-21 | 2008-07-10 | Toshiba Corp | Processor |
JP2017507405A (en) | 2014-02-20 | 2017-03-16 | インテル・コーポレーション | Workload batch submission mechanism for graphic processing units |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08115594A (en) * | 1994-10-18 | 1996-05-07 | Oki Electric Ind Co Ltd | Data readout, transferring and refreshing method for dual port drams |
JP2003280982A (en) * | 2002-03-20 | 2003-10-03 | Seiko Epson Corp | Data transfer device for multi-dimensional memory, data transfer program for multi-dimensional memory and data transfer method for multi-dimensional memory |
-
2018
- 2018-09-18 WO PCT/JP2018/035246 patent/WO2020059156A1/en active Application Filing
- 2018-09-18 JP JP2021515247A patent/JP7136343B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002041445A (en) | 2000-05-19 | 2002-02-08 | Matsushita Electric Ind Co Ltd | Highly efficient dma controller |
JP2008158699A (en) | 2006-12-21 | 2008-07-10 | Toshiba Corp | Processor |
JP2017507405A (en) | 2014-02-20 | 2017-03-16 | インテル・コーポレーション | Workload batch submission mechanism for graphic processing units |
Also Published As
Publication number | Publication date |
---|---|
JP2022500782A (en) | 2022-01-04 |
WO2020059156A1 (en) | 2020-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210149820A1 (en) | Two address translations from a single table look-aside buffer read | |
CN114238204B (en) | Reconfigurable parallel processing | |
US11775313B2 (en) | Hardware accelerator for convolutional neural networks and method of operation thereof | |
US11693660B2 (en) | Data processing apparatus having streaming engine with read and read/advance operand coding | |
WO2019128404A1 (en) | Matrix multiplier | |
US20210406021A1 (en) | Dual data streams sharing dual level two cache access ports to maximize bandwidth utilization | |
US11269638B2 (en) | Exposing valid byte lanes as vector predicates to CPU | |
TW202209157A (en) | Vector processor architectures | |
US11221982B2 (en) | Superimposing butterfly network controls for pattern combinations | |
US20230053842A1 (en) | Streaming engine with flexible streaming engine template supporting differing number of nested loops with corresponding loop counts and loop offsets | |
US20180011709A1 (en) | Stream reference register with double vector and dual single vector operating modes | |
US11804858B2 (en) | Butterfly network on load data return | |
JP7136343B2 (en) | Data processing system, method and program | |
Yousefzadeh et al. | Energy-efficient in-memory address calculation | |
US10956361B2 (en) | Processor core design optimized for machine learning applications | |
JP2008102599A (en) | Processor | |
US11669489B2 (en) | Sparse systolic array design | |
JPH09153030A (en) | Two-dimensional discrete cosine transformation circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210318 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220524 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220725 |
|
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: 20220802 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220815 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7136343 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |