JP7136343B2 - Data processing system, method and program - Google Patents

Data processing system, method and program Download PDF

Info

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
Application number
JP2021515247A
Other languages
Japanese (ja)
Other versions
JP2022500782A (en
Inventor
鶴鳴 孫
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Publication of JP2022500782A publication Critical patent/JP2022500782A/en
Application granted granted Critical
Publication of JP7136343B2 publication Critical patent/JP7136343B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
    • G06F9/3887Concurrent 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic 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.

米国特許第005600843号U.S. Patent No. 005600843

フィールドプログラマブルロジックアンドアプリケーションズにおけるインターナショナルカンファレンス(international Conference on Field Programmable Logic and Applications)で2017年9月に公開されたステファンノルティング(Stephan Nolting)らによる“アドバンストドライバアシスタンスシステムズのためのアプリケーションスペシフィックソフト-コアベクトルプロセッサ(Application-Specific Soft-Core Vector Processor for Advanced Driver Assistance Systems)”"Application-Specific Soft-Core Vectors for Advanced Driver Assistance Systems" by Stephan Nolting et al., published September 2017 at the International Conference on Field Programmable Logic and Applications. Processor (Application-Specific Soft-Core Vector Processor for Advanced Driver Assistance Systems)” チャイニーズジャーナルオブエレクトローニックス(Chinese Journal of Electronics),第26巻第6号第1198-1205頁で2017年11月に公開されたYeyong Pangらによる“CPUアクセラレータとしてのフルリーパイプラインドソフトベクトルプロセッサ(Fully Pipelined Soft Vector Processor as a CPU Accelerator)”“Fully Pipelined Soft Vector Processors as CPU Accelerators” by Yeyong Pang et al. Fully Pipelined Soft Vector Processor as a CPU Accelerator)

従来の技術の最初の課題は、行列転置がベクトル処理装置で一般的にサポートされていないことである。機械学習では、全結合レイヤの逆伝搬など、いくつかのケースで行列転置が使用される。参考文献では、処理装置内で行列を効率的に転置する方法は開示されていない。したがって、行列転置の特定の命令がベクトル処理装置でサポートされていない場合、転置はベクトル処理装置の外部で実行される必要がある。これを行うには、転置する行列を最初にベクトル処理装置内のローカルメモリから処理装置外部の外部メモリに転送する必要がある。転置された結果が外部メモリで準備された後、転置された行列はベクトル処理装置の外部の外部メモリからベクトル処理装置に転送される必要があり、これはデータ転送に多くの時間を浪費する。 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の例示的な実施形態の構造を示すブロック図である。1 is a block diagram showing the structure of a first exemplary embodiment of the present invention; FIG. 第1の例示的な実施形態のローカルメモリの構造を示すブロック図である。Fig. 3 is a block diagram showing the structure of the local memory of the first exemplary embodiment; 第1の例示的な実施形態のローカルメモリの構造を示すブロック図である。Fig. 3 is a block diagram showing the structure of the local memory of the first exemplary embodiment; 第1の例示的な実施形態のプロセッシングエレメントの構造を示すブロック図である。Fig. 3 is a block diagram showing the structure of the processing element of the first exemplary embodiment; 第1の例示的な実施形態の行列転送の構造を示すブロック図である。Fig. 4 is a block diagram showing the structure of matrix transfer of the first exemplary embodiment; 第1の例示的な実施形態のローカルメモリのデータマッピングを示すブロック図である。Figure 3 is a block diagram illustrating data mapping of local memory for the first exemplary embodiment; 第1の例示的な実施形態のローカルメモリのデータマッピングを示すブロック図である。Figure 3 is a block diagram illustrating data mapping of local memory for the first exemplary embodiment; 第1の例示的な実施形態のローカルメモリについての異なるメモリアクセス要求の優先度を示すブロック図である。FIG. 4 is a block diagram illustrating priorities of different memory access requests for the local memory of the first exemplary embodiment; 第1の例示的な実施形態のローカルメモリに対する異なるメモリアクセス要求の優先度を示すブロック図である。FIG. 4 is a block diagram illustrating priorities of different memory access requests to the local memory of the first exemplary embodiment; 従来の方法による行列転置を伴わない2つの連続的なGEMM計算の手順を示すフロー図である。FIG. 2 is a flow diagram showing the procedure for two consecutive GEMM computations without matrix transposition according to conventional methods; 第1の例示的な実施形態の方法による行列転置を伴わない2つの連続的なGEMM計算の手順を示すフロー図である。FIG. 4 is a flow diagram showing the procedure for two consecutive GEMM computations without matrix transposition according to the method of the first exemplary embodiment; 従来の方法による行列転置を伴う2つの連続的なGEMM計算の手順を示すフロー図である。FIG. 2 is a flow diagram showing the procedure for two successive GEMM computations with matrix transposition according to conventional methods; 第1の例示的な実施形態の方法による行列転置を伴う2つの連続的なGEMM計算の手順を示すフロー図である。Fig. 2 is a flow diagram showing the procedure for two successive GEMM computations with matrix transposition according to the method of the first exemplary embodiment; 第1の例示的な実施形態の優先度選択を用いて、同じ期間に動作する2つの要求のメカニズムを示すブロック図である。Fig. 2 is a block diagram showing the mechanism of two requests operating in the same period using the priority selection of the first exemplary embodiment; 本発明の別の例示的な実施形態の構造を示すブロック図である。FIG. 4 is a block diagram showing the structure of another exemplary embodiment of the present invention;

(構成の説明)
まず、本発明の第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, data processing system 100 includes central processing unit (CP) 110, vector processing (VP) engine 120, DMA 130, matrix transfer device 140, data storage a first local memory 150 for data storage, a second local memory 160 for data storage, an instruction memory 180 for instruction storage, and an external memory 170 .

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 central processing unit 110 to/from external memory 170. Store/load from Central processing unit 110 controls first and second local memories 150 and 160 to fetch computation data from external memory 170 and prepare all instructions stored in instruction memory 180 . Central processing unit 110 then transmits vector instructions and matrix data to vector processing unit 120 . The vector processor 120 receives instructions and begins computation. The calculations of vector processor 120 are based on one-dimensional systolic patterns. One input is fetched from the first local memory 150 and the other input is fetched from the second local memory 160 . After calculation, the results are stored in the second local memory 160 . There is a path between the first local memory 150 and the second local memory 160 to transfer data between the first local memory 150 and the second local memory 160 via the matrix transfer device 140 be able to. Transfers between the first and second local memories 150, 160 can be normal transfers or transposed transfers. When the computation is finished, the results in second local memory 160 may be transferred to external memory 170 via direct memory access 130 .

ベクトル処理装置120内の詳細なアーキテクチャが図4に示されている。複数の処理装置121のそれぞれは、互いに接続されている。データ値および命令情報を転送するために使用される、中央処理装置110と第1のプロセッシングエレメント121との間の接続が存在する。隣接するプロセッシングエレメント121同士の間に、各プロセッシングエレメント121に情報をブロードキャストするために使用される接続チャネルが存在する。各プロセッシングエレメント121の内部において、乗算および加算を効率的に計算するために、デジタル信号処理装置(DSP)を使用して、より低い電力およびより高い周波数を達成することができる。さらに、中間結果を格納するために、各プロセッシングエレメント121に専用レジスタ125が存在する。各プロセッシングエレメント121は、1つの専用レジスタ125を有する。 A detailed architecture within the vector processor 120 is shown in FIG. Each of the plurality of processing units 121 is connected to each other. A connection exists between the central processing unit 110 and the first processing element 121 that is used to transfer data values and instruction information. Between adjacent processing elements 121 are connecting channels that are used to broadcast information to each processing element 121 . Internal to each processing element 121, a digital signal processor (DSP) can be used to efficiently compute the multiplications and additions to achieve lower power and higher frequencies. In addition, there are dedicated registers 125 in each processing element 121 to store intermediate results. Each processing element 121 has one dedicated register 125 .

ローカルメモリ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 local memory 150 are shown in FIG. There are 16 two-port RAM banks 151 and one first data select unit 153 . A 2-port RAM 151 is used to store data. The first data selection unit 153 selects data transfer with the external memory 170 or the second local memory 160 . There are also outputs as systolic data inputs for the vector processor 120 . Note that the number of 2-port RAM banks of the first local memory 150 in this exemplary embodiment is 16, but could be 8, 32, and so on.

第2のローカルメモリ160のアーキテクチャの詳細は、図3に示されている。2ポートRAMバンク161、第2のデータ選択ユニット162、およびデータリング163が存在する。RAMバンク161の数は、プロセッシングエレメント121の数に等しく、1つのプロセッシングエレメント121は、1つのRAMバンク161に対応する。 Details of the architecture of the second local memory 160 are shown in FIG. There is a two port RAM bank 161, a second data select unit 162 and a data ring 163. The number of RAM banks 161 is equal to the number of processing elements 121 and one processing element 121 corresponds to one RAM bank 161 .

行列転送デバイス140のアーキテクチャの詳細は、図5に示されている。行列転送デバイス140の内部には、アドレスジェネレータ141およびバンク数ジェネレータ142が存在する。第1のローカルメモリ150と第2のローカルメモリ160の構成が異なるため、一方のローカルメモリから他方のローカルメモリに転送されるデータの種類に関係なく、デスティネーションバンクのバンクおよび各バンクのアドレスは、ソースバンクのバンクおよびアドレスとは異なり得る。したがって、アドレスジェネレータ141およびバンク数ジェネレータ142が使用される。 The architectural details of matrix transfer device 140 are shown in FIG. Inside the matrix transfer device 140 are an address generator 141 and a bank number generator 142 . Since the first local memory 150 and the second local memory 160 have different configurations, regardless of the type of data transferred from one local memory to the other local memory, the bank of the destination bank and the address of each bank are , may differ from the bank and address of the source bank. Therefore, address generator 141 and bank number generator 142 are used.

[動作の説明]
次に、図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 external memory 170 to instruction memory 180 . For each application, the application can be compiled into assembly code. Therefore, assembly code is created for each application and stored in instruction memory 180 .

その後、中央処理装置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, central processing unit 110 fetches instructions from instruction memory 180 one by one. Initial data is stored in the first local memory 150 and the second local memory 160 before starting the computation. When performing a generalized matrix multiplication (GEMM) function, the left matrix is stored in the first local memory 150 and the right matrix is stored in the second local memory 160 . For each matrix M*K, the data mapping in the first local memory 150 is explained with reference to FIG. If there are 16 banks of RAM used in the first local memory 150, then D1[0,0] (D1[m,k] represents the mth row and kth column element of the matrix ) is stored at address 0 of bank 0 of the first local memory 150 to store the matrix. For example, data D1[0,1] is stored at address 0 of bank 1 of first local memory 150, and data D1[0,15] is stored at address 0 of bank 15 of first local memory 150, for example. stored in Starting at D1[0,16], data is stored at address 1 of bank 0 of the first local memory 150 .

したがって、アドレスジェネレータ141および対応するバンクは、以下の式によって計算される。
ADDR=(m*K+k)/16
BANK=(m*K+k)%16
Therefore, the address generator 141 and corresponding bank are calculated by the following equations.
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 local memory 160 , the number of RAM banks 161 is equal to the number of processing elements 121 since each processing element 121 corresponds to one RAM bank 161 . In an example where there are 256 processing elements 121, a data mapping method is given with reference to FIG. D2[0,0] is stored at address 0 of bank 0 of the second local memory 160, D2[0,1] is stored at address 0 of bank 1 of the second local memory 160, and so on. is. For D2[1,0], the data is stored at address 1 of bank 0 of the second local memory 160 . For D2[1,1], the data is stored at address 1 of bank 1 of the second local memory 160 . For each matrix K*N, if N is less than the number of PEs 121, unused columns are filled with zeros. If N is greater than the number of PEs 121 , the matrix is cut column by column according to the number of PEs 121 and then mapped to the second local memory 160 . Thus, for element D2[k,n] (where k represents row and n represents column), the address generator and corresponding bank are given by the following equations.
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 local memory 160, a data ring 163 is used to pass data through all the 2-port RAM banks and write/read data to/from the corresponding 2-port RAM banks. For example, if a cache line is 64 bytes and uses 32-bit single precision floating point, there are 16 data items in a cache line. Each data item must be stored in a corresponding 2-port RAM bank 161 .

左右の行列を第1のローカルメモリ150および第2のローカルメモリ160に格納した後、計算は一次元シストリック方式で実行される。GEMM計算の場合、左側の行列がD1(M,K)で、右側の行列がD2(K,N)であるとすると、乗算結果はRES(M,N)になる。RES[m,n]の各エレメントについて、次の計算が実行される。

Figure 0007136343000001
D1[0,0]は、ローカルメモリ150から読み取られ、プロセッシングエレメント121に転送される。D2[0,0]は、第2のローカルメモリ160から読み取られ、プロセッシングエレメント121のための他の入力オペランドとなる。計算後、D1[0,0]とD2[0,0]の乗算は専用レジスタに格納される。D1[0,0]は、シストリック方式で第2のプロセッシングエレメント121に転送される。D2[0,1]は、第2のローカルメモリ160から読み取られる。D1[0,0]とD2[0,1]は、乗算の2つのオペランドである。D1[0,0]*D2[0,1]の結果は、専用レジスタ125に格納される。後のプロセッシングエレメント121については、D1[0,0]は常にシストリックの方法で転送される。最後に、D1[0,0]は、すべてのプロセッシングエレメント121を介して転送される。実際、各プロセッシングエレメント121のデータフローは完全に同じである。したがって、1つのプロセッシングエレメント121のデータフローを以下に簡単に説明する。 After storing the left and right matrices in the first local memory 150 and the second local memory 160, the computation is performed in a one-dimensional systolic manner. For GEMM computation, if the left matrix is D1(M,K) and the right matrix is D2(K,N), the multiplication result is RES(M,N). For each element of RES[m,n], the following computations are performed.
Figure 0007136343000001
D1[0,0] is read from local memory 150 and transferred to processing element 121 . D2[0,0] is read from the second local memory 160 and becomes another input operand for the processing element 121; After computation, the multiplication of D1[0,0] and D2[0,0] is stored in a dedicated register. D1[0,0] is transferred to the second processing element 121 in a systolic fashion. D2[0,1] is read from the second local memory 160; D1[0,0] and D2[0,1] are the two operands of the multiplication. The result of D1[0,0]*D2[0,1] is stored in special purpose register 125. FIG. For later processing elements 121, D1[0,0] is always transferred in a systolic manner. Finally, D1[0,0] is transferred through all processing elements 121 . In fact, the data flow for each processing element 121 is exactly the same. Therefore, the data flow for one processing element 121 is briefly described below.

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 PEs 121 , the next data item is read from the first local memory 150 . The left matrix is read in row-major order. So, for example, D1[0,1] is read from the first local memory 150 and sent to the first processing element 121, and D2[1,0] is sent to the second local memory 121 in the first processing element 121. Read from memory 160 . Then D1[0,1]*D2[1,0] is calculated. The previous result of D1[0,0]*D2[0,0] is read from the special purpose register 125 and added to the result of D1[0,1]*D2[1,0]. The sum is stored again in dedicated register 125 . By repeating this, the first element RES[0,0] of the first processing element 121 can be acquired. Similarly, all elements within the first processing element 121 can be computed. After computing the elements, the results are sent to the two-port RAM bank 161 in the second local memory 160 .

以下、第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 local memory 150 and the second local memory 160 will be described below. There are four cases. The first case is a normal transfer from first local memory 150 to second local memory 160 . Assuming that the matrix size stored in the second local memory 160 is K×N, N processing elements 121 are used and each RAM bank is K deep. As noted above, when N is less than the number of processing elements 121 (eg, 256), unused columns are filled with zeros. Thus, D2[0,0] in second local memory 160 maps to the first element of the first RAM bank in local memory 150 . D2[0,1] in the second local memory 160 is mapped to the first element of the second RAM in the first local memory 150; However, for D2[0,n] in the second local memory 160, if n is greater than the number of banks supported by the first local memory 150, the first local memory 150 and the second local memory The addresses and banks within 160 are different. For other element address and bank mappings, the calculation method is shown in the following equations, where DST_ADDR and DST_BANK are the destination address and bank respectively. In this case the destination address and bank are in the first local memory 150 . SRC_ADDR and SRC_BANK represent the source address and source bank, where the source address and source bank are in the second local memory 160 . SRC_NUM_BANK is the number of 2-port RAM banks 161 in the second local memory 160 and DST_NUM_BANK is the number of 2-port RAM banks 151 supported in the first local memory 150 .
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 elements 121, for data transfer between the first local memory 150 and the second local memory 160, in the first clock cycle, D2[0,0], D2[0 ,1] . . . D2[0,15] are retrieved from the RAM 161 of each processing element 121 and transferred to the first local memory 150 via the data ring. D2[0,0], D2[0,1] . Local memory 150 can be written. In the second clock cycle, D2[0,16], D2[0,17], D2[0,18]... D2[0,31] are fetched from the RAM bank 161 of the corresponding processing element 121 It is transferred to the first local memory 150 via the data ring 163 . D2[0,16], D2[0,17] . can be written. Similarly, in each clock cycle, 16 data items are read from the RAM bank 161 of the corresponding processing element 121, then transferred via the data ring 163, and finally stored in the first local memory 150. be done.

第2のケースは、第1のローカルメモリ150から第2のローカルメモリ160への通常の転送である。同様に、アドレスおよびバンクジェネレータは上記と同じであるが、唯一の違いは、ソースが第1のローカルメモリ150になり、デスティネーションが第2のローカルメモリ160になることである。 The second case is a normal transfer from first local memory 150 to second local memory 160 . Similarly, the address and bank generators are the same as above, the only difference being that the source will be the first local memory 150 and the destination will be the second local memory 160 .

第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 local memory 150 to the second local memory 160 . Assuming the matrix [N,M] is stored in the first local memory 150 , this matrix is transposed to size [M,N] and stored in the second local memory 160 . For example, D1[0,0] of the first local memory 150 is mapped to address 0 of bank 0 of the second local memory 160 . D1[0,1] of the second local memory 160 is mapped to address 1 of bank 0 of the second local memory 160 . The following formula shows the calculation method for the mapping of addresses of other elements and banks.
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 local memory 160 . Therefore, to generate a 16×16 block on the second local memory 160 side every 16 clock cycles, we need D2[0,0], D2[1,1], D2 of the first local memory 150 [2,2]...D2[15,15] need to find corresponding elements. The corresponding address of D2[0,0] is address 0 of bank 0, the corresponding address of D2[1,1] is address (N+1)/16 of bank 1, and the corresponding address of D2[2,2] is The address to be used is the bank 2 address (N.times.2+2)/16. Similarly, the corresponding location for D2[15,15] is bank 15 address (N×15+15)/16. Therefore, 16 data items can be fetched in one clock cycle. At the second clock cycle, the corresponding elements of D2[1,0], D2[2,1], D2[3,2] . The corresponding address of D2[1,0] is bank 0 address N/16 and the corresponding address of D2[2,1] is bank 1 address (N×2+1)/16. Similarly, the corresponding location in D2[0,15] is bank 15, address 0. These mapping methods allow the first local memory 150 address of the 16×16 block of local memory 160 to be known. Each clock cycle, 16 elements fetched from the first local memory 150 are transposed and stored in the second local memory 160 . For example, in the first cycle, D2[0,0], D2[1,1], D2[2,2] . . . D2[15,15] are diagonal, so the transposed result is the same. For the second local memory 160, the address for bank 0 is 0, the address for bank 1 is 1, and so on. D2[1,0], D2[2,1], D2[3,2] . . . D2[0,15] are fetched from the first local memory 150 in the second clock cycle. For D2[1,0], the transposed result must be stored in bank 1 at address 0, D2[2,1] must be stored in bank 2 at address 1, D2[3 , 2] must be stored in bank 3 at address 2. Similarly, all data can be stored in 16 banks of the second local memory 160 in one clock cycle.

第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 local memory 150 can be expressed as the following equation, where CNT is the count of each 16 clock cycles of a 16×16 block and SRC_BANK is the count of the first local memory 150 It means which bank.
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 local memory 160; Here a vertical scan of 16×16 blocks in the second local memory 160 is used.
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 local memory 150 can be obtained by the following formula.
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 local memory 150 is given above. Next, the address and bank generator of the second local memory 160 will be described. Since scanning the source matrix is vertical scanning in the second local memory 160 , scanning the transposed matrix is horizontal scanning in the second local memory 160 . Therefore, the base address and base bank can be calculated as follows.
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 local memory 160 to the first local memory 150 . Assuming the matrix [M,N] is stored in the second local memory 160 , this matrix needs to be transposed to [N,M] and stored in the first local memory 150 . For example, D2[0,0] of the second local memory 160 continues to map to address 0 of bank 0 of the first local memory 150 . D2[0,1] of the second local memory 160 is mapped to address 1 of bank 0 of the first local memory 150 . The following formula shows the calculation method for the mapping of addresses of other elements and banks.
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 local memory 150 in one clock cycle. To avoid this problem, a cyclic data mapping method is used. The transfer is based on 16x16 blocks, which means that after accessing one 16x16 block of data, the 16x16 block is shifted to the next 16x16 block. The top left 16x16 block is transferred first and takes 16 clock cycles. D2[0,0], D2[1,1], D2[2,2] . These elements are stored in different banks of the first local memory 150 . D2[0,0] is stored in the first RAM of the first local memory 150, D2[1,1] is stored in the second RAM of the local memory, and so on. Therefore, we can store these 16 data items in the first local memory 150 in one clock cycle. In the second clock cycle, D2[0,1], D2[1,2], D2[2,3] . Read from RAM bank 161 . These elements are also stored in different banks of the first local memory 150 . Therefore, we can store these 16 data in the first local memory 150 in one clock cycle. The address generator is the same as in the third case, the only difference is that in the third case it is transferred from the first local memory 150 to the second local memory 160, whereas in this fourth case the second is transferred from the first local memory 160 to the first local memory 150 . Therefore, the source and destination addresses have been swapped.

第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 local memory 160, transfers between the external memory 170 and the second local memory 160 and transfers between the first local memory 150 and the second local memory 160 are possible. The priority is determined by the data selection unit 162 if multiple transfer requests are received in the same clock cycle. A description of this operation is provided below with reference to the flow chart of FIG. The first priority is data transfer from external memory 170 to second local memory 160 . This is because the data must be retrieved from the external memory 170 if the data is valid. A second priority is the transfer from the second local memory 160 to the external memory 170 . The third priority is the transfer from the first local memory 150 to the second local memory 160 and the last priority is the transfer from the second local memory 160 to the first local memory 150. .

第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 data selection unit 153 is used. If multiple transfer requests are received in the same clock cycle, selection is made based on priority, as shown in FIG. The first priority is data transfer from external memory 170 to first local memory 150 . A second priority is the transfer from the first local memory 150 to the external memory 170 . The third priority is the transfer from the second local memory 160 to the first local memory 150 and the last priority is the transfer from the first local memory 150 to the second local memory 160. .

連続した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 local memory 150 and matrix B stored in the second local memory 160 . After storing matrix A in the first local memory 150 and matrix B in the local memory 160 , the computation is performed and the result is stored in the second local memory 160 . If the second GEMM is C*D=E, the matrix C needs to be stored in the first local memory 150 as a systolic one-dimensional input. To store the matrix C in the first local memory 150 , the result must first be sent to the external memory 170 and then transferred from the external memory to the first local memory 150 . Matrix D is then stored in the second local memory 160 and computation begins. Finally, the calculation result is obtained and transferred to the external memory 170 .

しかしながら、われわれの方法では、われわれは行列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 local memory 160 to the first local memory 150 . Therefore, we can omit the transfer of matrix C to external memory 170 . FIG. 11 shows the processing procedure. The computation of the first GEMM can be parallelized when storing the matrix D of the second GEMM.

同様に、第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, central processing unit 110 transposes matrix C in external memory 170 . The transposed matrix of C is then transferred to the first local memory 150, matrix D is transferred to the second local memory 160, and the second GEMM can begin operation.

しかしながら、本開示の方法では、行列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 local memory 160 to the first local memory 150, but also allows the transposition to be completed during the transfer. Therefore, the transfer of matrix C to external memory 170 can be performed with fewer operations. Furthermore, the transfer time to the central processing unit can be shortened. FIG. 13 shows the processing procedure.

上記の例では、同じローカルメモリ(すなわち、第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 local memory 150 or second local memory 160). However, in some implementations these processes may occur. For example, after computing the first GEMM A*B=C, the result of matrix C needs to be transferred to external memory 170 . Meanwhile, the result also needs to be transferred to the first local memory 150 for the next GEMM, C*D=E. In this case, transfers between the second local memory 160 and the external memory 170 have higher priority. As shown in FIG. 14, data transfer from/to external memory 170 has several bubble cycles, and these bubble cycles are used to You can perform transfers between

[効果の説明]
次に、本例示的な実施形態の効果について説明する。
[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 data ring 163 inside the accelerator. , so there is no need to perform transposition on the host side.

さらに、例示的な実施形態は、データ転送および計算が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, data processing system 100 includes central processing unit (CP) 110, vector processing (VP) engine 120, DMA 130, first local memory 150 for data storage, It includes a second local memory 160 for data storage, an instruction memory 180 for instruction storage, and an external memory 170 .

上記のプログラムは、上記の機能を部分的に実行するためのものであってもよい。上記のプログラムは、上記の機能を実行するために、コンピュータシステムにすでに記録されているプログラムと組み合わされた、いわゆる差分ファイル(差分プログラム)であってもよい。 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 data processing system 110 central processing unit (CP)
120 vector processor (VP)
121 Processing Element (PE)
125 Dedicated Registers 130 Direct Memory Access (DMA)
140 matrix transfer device 141 address generator 142 bank number generator 150 first local memory 153 first data selection unit 160 second local memory 161 RAM bank 162 second data selection unit 163 data ring 170 external memory 180 instruction memory

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および第2のローカルメモリユニット間でデータを転送するときに、前記データに対して行列転置を実行することができる、
請求項に記載のデータ処理システム。
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 .
前記行列転送ユニットは、ソースメモリおよびデスティネーションメモリのためのメモリアドレスを生成するように構成されたアドレスジェネレータを備え、前記ソースメモリは前記第1のローカルメモリユニットおよび前記第2のローカルメモリユニットの一方であり、前記デスティネーションメモリは前記第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 .
前記第2のローカルメモリユニットは、データをリングブロードキャストするように構成されたデータリングを有し、前記データリングは、複数のメモリ要求が受信されたときに、前記所定の選択優先度を使用して前記ダイレクトメモリアクセスユニットを介して前記第1のローカルメモリユニットおよび前記外部メモリユニットにデータを転送する、
請求項1からのいずれか一項に記載のデータ処理システム。
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および第2のローカルメモリユニットはそれぞれ、データが格納される複数の2ポートRAMバンクを含み、前記第1のローカルメモリユニットの前記2ポートRAMバンクの数は、前記第2のローカルメモリユニットの前記2ポートRAMバンクの数に等しい、
請求項1からのいずれか一項に記載のデータ処理システム。
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のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続されたダイレクトメモリアクセスユニットと、前記第1および第2のローカルメモリユニット間で電子的に接続され、前記第1および第2のローカルメモリユニット間でデータを転送するように構成された行列転送ユニットと、を備え、前記方法は、
前記ベクトル処理装置によって、前記中央処理装置から受信した命令に基づいて動作を実行することと、
前記命令メモリユニットによって、命令を格納することと、
前記第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のローカルメモリユニット、前記命令メモリユニット、および前記外部メモリユニットに電子的に接続されたダイレクトメモリアクセスユニットと、前記第1および第2のローカルメモリユニット間で電子的に接続され、前記第1および第2のローカルメモリユニット間でデータを転送するように構成された行列転送ユニットと、を備え、前記プログラムは、
前記ベクトル処理装置に、前記中央処理装置から受信した命令に基づいて動作を実行させ、
前記命令メモリユニットに、命令を格納させ、
前記第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.
JP2021515247A 2018-09-18 2018-09-18 Data processing system, method and program Active JP7136343B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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