JP7837470B2 - Reducing memory bank contention in hardware accelerators - Google Patents
Reducing memory bank contention in hardware acceleratorsInfo
- Publication number
- JP7837470B2 JP7837470B2 JP2025515430A JP2025515430A JP7837470B2 JP 7837470 B2 JP7837470 B2 JP 7837470B2 JP 2025515430 A JP2025515430 A JP 2025515430A JP 2025515430 A JP2025515430 A JP 2025515430A JP 7837470 B2 JP7837470 B2 JP 7837470B2
- Authority
- JP
- Japan
- Prior art keywords
- memory
- bank
- bits
- tile
- access
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0207—Addressing or allocation; Relocation with multidimensional access, e.g. row/column, matrix
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0495—Quantised networks; Sparse networks; Compressed networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Neurology (AREA)
- Memory System (AREA)
- Complex Calculations (AREA)
- Advance Control (AREA)
Description
本明細書は、一般に、ハードウェア集積回路のメモリ動作に関する。
ニューラルネットワークは、ノードの1つまたは複数の層を利用することで、受信した入力についての出力、例えば、分類を生成する機械学習モデルである。いくつかのニューラルネットワークは、出力層に加えて1つまたは複数の隠れ層を含む。いくつかのニューラルネットワークは、画像処理のために構成された畳み込みニューラルネットワーク(CNN)、または音声及び言語処理のために構成された再帰型ニューラルネットワーク(RNN)とすることができる。種々のタイプのニューラルネットワークアーキテクチャを使用して、分類またはパターン認識、データモデリングを伴う予測、及び情報クラスタリングに関する様々なタスクを実行することができる。
This specification generally relates to the memory operation of hardware integrated circuits.
A neural network is a machine learning model that uses one or more layers of nodes to generate an output, such as a classification, for a received input. Some neural networks include one or more hidden layers in addition to the output layer. Some neural networks can be convolutional neural networks (CNNs) configured for image processing, or recurrent neural networks (RNNs) configured for speech and language processing. Various types of neural network architectures can be used to perform a variety of tasks related to classification or pattern recognition, prediction with data modeling, and information clustering.
ニューラルネットワーク層は、対応するパラメータまたは重みのセットを有することができる。重みを使用して、入力(例えば、入力のバッチ)をニューラルネットワーク層を通じて処理し、ニューラルネットワーク推論を計算するための層の対応する出力を生成する。入力のバッチ及びカーネルのセットは、入力及び重みのテンソル、すなわち、多次元アレイとして表すことができる。ハードウェアアクセラレータは、ニューラルネットワークを実装するための専用集積回路である。この回路は、回路の制御ロジックを使用して走査またはアクセスされ得るテンソルの要素に対応した位置を有するメモリを含む。 A neural network layer can have a corresponding set of parameters or weights. The weights are used to process the input (e.g., a batch of inputs) through the neural network layer, generating the corresponding output of the layer for computing neural network inference. The batch of inputs and the set of kernels can be represented as a tensor of inputs and weights, i.e., a multidimensional array. A hardware accelerator is a dedicated integrated circuit for implementing a neural network. This circuit includes memory with locations corresponding to the elements of the tensor, which can be scanned or accessed using the circuit's control logic.
本文書では、ハードウェアアクセラレータのタイルメモリでのメモリバンク競合を低減(または防止)することで、これらの物理メモリバンクの同時アクセスを可能にするための技術について説明する。 This document describes techniques for enabling simultaneous access to physical memory banks by reducing (or preventing) memory bank contention in the tile memory of hardware accelerators.
ハードウェアアクセラレータの計算タイルは、アクセラレータのタイルメモリにアクセスするために使用される要求を受信する。要求のそれぞれについて、i)ビットのシーケンスによって表された論理アドレスが要求内で識別され、ii)第1のビットのサブセットがシーケンスから取得され、iii)第1のビットのサブセットを使用するバンク生成関数に基づいて、識別子が生成される。 The compute tiles of the hardware accelerator receive requests used to access the accelerator's tile memory. For each request, i) a logical address represented by a sequence of bits is identified within the request, ii) a subset of the first bit is taken from the sequence, and iii) an identifier is generated based on a bank generation function using the subset of the first bit.
識別子は、タイルメモリの物理メモリバンクの中の特定のバンクを識別する。各要求は、その要求について生成された個々のバンク識別子(「バンクID」)を使用して処理される。要求を処理することに応答して、複数の別個のメモリバンクが、同一のクロックサイクル(例えば、単一のクロックサイクル)中に同時にアクセスされる。 The identifier identifies a specific bank within the physical memory banks of tile memory. Each request is processed using the individual bank identifier ("bank ID") generated for that request. In response to processing the requests, multiple separate memory banks are accessed simultaneously within the same clock cycle (e.g., a single clock cycle).
本明細書で説明される主題の一態様は、ハードウェアアクセラレータのメモリバンクに同時にアクセスするための、コンピュータで実行される方法に具現化することができる。方法は、複数の要求を受信することを含み、各要求は、ハードウェアアクセラレータのタイルメモリにアクセスするために使用される。複数の要求のそれぞれについて、方法は、要求内で、ビットのシーケンスによって表された個々の論理アドレスを識別することと、ビットのシーケンスから第1のビットのサブセットを取得することと、第1のビットのサブセットを使用するバンク生成関数に基づいて、タイルメモリの複数の物理メモリバンクの中から特定のバンクを識別する個々のバンク識別子を生成することとを含む。方法は、i)要求について生成された個々のバンク識別子を使用して複数の要求のそれぞれを処理することと、ii)複数の要求のそれぞれを処理することに応答して、クロックサイクル中にタイルメモリの複数の別個の物理メモリバンクに同時にアクセスすることと、をさらに含む。 One aspect of the subject matter described herein can be embodied in a method performed by a computer for simultaneously accessing memory banks of a hardware accelerator. The method comprises receiving a plurality of requests, each request used to access the tile memory of the hardware accelerator. For each of the plurality of requests, the method includes identifying an individual logical address represented by a sequence of bits within the request, obtaining a first subset of bits from the sequence of bits, and generating an individual bank identifier that identifies a specific bank from among a plurality of physical memory banks of the tile memory, based on a bank generation function using the first subset of bits. The method further includes i) processing each of the plurality of requests using the individual bank identifiers generated for the requests, and ii) simultaneously accessing a plurality of distinct physical memory banks of the tile memory during a clock cycle in response to processing each of the plurality of requests.
これら及び他の実施態様はそれぞれ、任意選択で以下の特徴のうちの1つまたは複数を含むことができる。例えば、いくつかの実施態様では、複数の別個の物理メモリバンクに同時にアクセスすることは、特定のストライド値について、単一のクロックサイクル中に複数の別個の物理メモリバンクにアクセスすることを含む。特定のストライド値は、同一の物理メモリバンクの特定の行の間の差に等しいメモリアクセスストライドとすることができる。 These and other embodiments may optionally include one or more of the following features. For example, in some embodiments, simultaneous access to multiple separate physical memory banks includes accessing multiple separate physical memory banks within a single clock cycle for a specific stride value. The specific stride value may be a memory access stride equal to the difference between specific rows in the same physical memory bank.
いくつかの実施態様では、複数の別個の物理メモリバンクに同時にアクセスすることは、バンク競合無しに複数の別個の物理メモリバンクにアクセスすることを含む。一態様では、バンク競合は、同一のクロックサイクル中にタイルメモリの同一の物理メモリバンクへのアクセスを2つ以上の要求元が要求するときである。各物理メモリバンクは、複数の行を含むことができ、方法は、複数の要求のそれぞれについて、i)ビットのシーケンスから第2のビットのサブセットを取得することと、ii)第2のビットのサブセットをバンク生成関数への入力として提供することと、iii)バンク生成関数が第2のビットのサブセットに適用されていることに基づいて、タイルメモリの複数の物理メモリバンクの中から特定のバンク内の特定の行を識別する個々の行識別子を生成することと、を含む。 In some embodiments, simultaneous access to multiple separate physical memory banks includes accessing multiple separate physical memory banks without bank contention. In one embodiment, bank contention occurs when two or more requesters request access to the same physical memory bank of tile memory during the same clock cycle. Each physical memory bank may contain multiple rows, and the method includes, for each of the multiple requests, i) obtaining a subset of second bits from a sequence of bits; ii) providing the subset of second bits as input to a bank generation function; and iii) generating individual row identifiers that identify a specific row within a specific bank from among the multiple physical memory banks of tile memory, based on the application of the bank generation function to the subset of second bits.
いくつかの実施態様では、複数の行の各行は、16バイトの幅を含み、タイルメモリのパーティションは、32個の物理メモリバンクを含み、メモリアクセスストライドは、row_width*num_banksに等しい。ビットのシーケンスから第1のビットのサブセットを取得することは、ビットのシーケンス内の最下位ビット(LSB)の中にある2つ以上のビットを取得することを含むことができる。 In some embodiments, each row of multiple rows contains a width of 16 bytes, the partition of tile memory contains 32 physical memory banks, and the memory access stride is equal to row_width * num_banks. Obtaining a first subset of bits from a sequence of bits may include obtaining two or more bits that are in the least significant bit (LSB) of the sequence of bits.
この態様及び他の態様の他の実施態様は、コンピュータ記憶デバイス上に符号化された、方法のアクションを実行するように構成された対応するシステム、装置及びコンピュータプログラムを含む。1つまたは複数のコンピュータのシステムは、動作時にシステムにアクションを実行させる、システムにインストールされたソフトウェア、ファームウェア、ハードウェア、またはそれらの組み合わせによって、そのように構成することができる。1つまたは複数のコンピュータプログラムは、データ処理装置によって実行されると、装置にアクションを実行させる命令を有することによって、そのように構成することができる。 This aspect and other embodiments of other aspects include corresponding systems, devices, and computer programs encoded on a computer storage device and configured to perform actions of the method. One or more computer systems can be configured in this way by software, firmware, hardware, or a combination thereof installed on the system that causes the system to perform actions when in operation. One or more computer programs can be configured in this way by having instructions that, when executed by a data processing device, cause the device to perform actions.
本明細書で説明される主題は、以下の利点のうちの1つまたは複数を実現するように特定の実施形態に実装することができる。バンク競合を引き起こすことなく、タイルメモリのメモリリソースについての複数の要求を処理するために使用可能であるバンク生成関数が開示される。 The subject matter described herein can be implemented in specific embodiments to achieve one or more of the following advantages: A bank generation function is disclosed that can be used to handle multiple requests for memory resources of tile memory without causing bank contention.
バンク生成関数は、2つの要求がタイルメモリの同一の物理メモリバンクへのアクセスを要求しなくなるように、要求のグループ内の各要求について個々のバンクIDを生成するように構成される。バンク生成関数は、同一のクロックサイクル(例えば、単一のクロックサイクル)中にグループ内の各要求の並列処理を可能にするアクセスパターンを提供する。バンク生成関数によって提供されるアクセスパターンにより、メモリアクセスに使用されるストライド値に関係なく複数の要求の同時処理が可能になる。 The bank generation function is configured to generate individual bank IDs for each request within a group of requests, so that no two requests request access to the same physical memory bank of tile memory. The bank generation function provides an access pattern that enables parallel processing of each request within the group within the same clock cycle (e.g., a single clock cycle). The access pattern provided by the bank generation function allows for the simultaneous processing of multiple requests regardless of the stride value used for memory access.
本明細書で説明される主題の1つまたは複数の実施態様の詳細は、添付の図面及び以下の説明に記載されている。主題の他の潜在的な特徴、態様及び利点は、説明、図面、及び特許請求の範囲から明らかになる。 Details of one or more embodiments of the subject matter described herein are given in the accompanying drawings and the following description. Other potential features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims.
様々な図面における同様の参照記号及び符号は、同様の要素を指す。
図1Aは、機械学習ハードウェアアクセラレータなどのハードウェア集積回路にニューラルネットワークモデルを実装するための例示的なコンピューティングシステム100のブロック図である。計算システム100は、1つまたは複数の計算タイル101、ホスト120、及びより高レベルのコントローラ125(「コントローラ125」)を含む。以下でより詳細に説明するように、ホスト120とコントローラ125は協働して、システム100の1つまたは複数の計算タイル101にデータセット及び命令を提供する。
Similar reference symbols and symbols in various drawings refer to the same elements.
Figure 1A is a block diagram of an exemplary computing system 100 for implementing a neural network model on a hardware integrated circuit, such as a machine learning hardware accelerator. The computing system 100 includes one or more compute tiles 101, a host 120, and a higher-level controller 125 ("controller 125"). As will be described in more detail below, the host 120 and the controller 125 work together to provide datasets and instructions to one or more compute tiles 101 of the system 100.
いくつかの実施態様では、ホスト120とコントローラ125は同一のデバイスである。ホスト120とコントローラ125は、別個の機能を実行することもできるが、単一のデバイスパッケージに統合することもできる。例えば、ホスト120とコントローラ125は、複数の計算タイル101を含むハードウェアアクセラレータと相互作用または協働する中央処理装置(CPU)を形成することができる。いくつかの実施態様では、ホスト120、コントローラ125及び複数の計算タイル101は、単一の集積回路ダイ上に含まれるか、またはそのダイ上に形成される。例えば、ホスト120、コントローラ125及び複数の計算タイル101は、機械学習ワークロードを処理するためのニューラルネットワークモデルを実行するように最適化された専用のシステムオンチップ(SoC)を形成することができる。 In some embodiments, the host 120 and the controller 125 are the same device. The host 120 and the controller 125 can perform separate functions, or they can be integrated into a single device package. For example, the host 120 and the controller 125 can form a central processing unit (CPU) that interacts with or collaborates with a hardware accelerator containing multiple compute tiles 101. In some embodiments, the host 120, the controller 125, and the multiple compute tiles 101 are contained on or formed on a single integrated circuit die. For example, the host 120, the controller 125, and the multiple compute tiles 101 can form a dedicated system-on-a-chip (SoC) optimized to run neural network models for processing machine learning workloads.
各計算タイル101は、一般に、コントローラ103を含み、このコントローラは、入力ベクトル102の入力(または活性化)を第1のメモリ108(「メモリ108」)のメモリ位置に格納させるか、またはそのメモリ位置からアクセスさせるための1つまたは複数の制御信号105を提供する。同様に、コントローラ103はまた、重み104の行列構造の重み(またはパラメータ)を第2のメモリ110(「メモリ110」)のメモリ位置に格納させるか、またはそのメモリ位置からアクセスさせるための1つまたは複数の制御信号105を提供することができる。いくつかの実施態様では、入力ベクトル102は、入力テンソルから取得され、他方、重みの行列構造は、パラメータテンソルから取得される。入力テンソル及びパラメータテンソルのそれぞれは、多次元行列またはテンソルなどの多次元データ構造であってもよい。これについては、図6を参照して以下でより詳細に説明する。 Each computational tile 101 generally includes a controller 103, which provides one or more control signals 105 to cause the input (or activation) of the input vector 102 to be stored in a memory location in a first memory 108 ("memory 108") or to be accessed from that memory location. Similarly, the controller 103 may also provide one or more control signals 105 to cause the weights (or parameters) of the weight matrix structure 104 to be stored in a memory location in a second memory 110 ("memory 110") or to be accessed from that memory location. In some embodiments, the input vector 102 is obtained from an input tensor, while the weight matrix structure is obtained from a parameter tensor. The input tensor and parameter tensor, respectively, may be multidimensional data structures such as multidimensional matrices or tensors. This will be described in more detail below with reference to Figure 6.
メモリ108、110の各メモリ位置は、メモリの物理メモリバンクの物理行への対応するマッピングを有する論理アドレスなどの、対応するメモリアドレスによって識別され得る。図1Bの例を参照すると、計算タイル101は、要求130のグループから連続アドレス(例えば、仮想/論理アドレス)のセットを導出し得る。例えば、連続アドレスのセットは、計算タイル101の物理メモリ108に対応する論理メモリを参照して導出することができる。これについてはまた、図4及び図5の実施形態を参照して以下で説明する。 Each memory location in memories 108 and 110 can be identified by a corresponding memory address, such as a logical address having a corresponding mapping to a physical row in the physical memory bank of the memory. Referring to the example in Figure 1B, the compute tile 101 can derive a set of consecutive addresses (e.g., virtual/logical addresses) from a group of requests 130. For example, a set of consecutive addresses can be derived by referring to the logical memory corresponding to the physical memory 108 of the compute tile 101. This will be further described below with reference to embodiments in Figures 4 and 5.
論理メモリは、複数の論理ポート135を有し、各ポートは、メモリ108の物理リソースへのアクセスを要求する異なる要求元に接続されるか、または関連付けられる可能性がある。所与のアクセス要求を処理するために、各ポートについて、タイル101(またはそのコントローラ103)は、その要求内のアドレスに基づいて、要求がルーティングされるバンクを決定する。各バンクについて、計算タイル101はアービタ140を含むことができ、このアービタは、例えば、同一の物理メモリバンクにルーティングされる要求のうちのいくつか(または全て)を緩和するように独自に構成されたバンク生成関数に従って、複数のポートからそのバンクへのアクセスを調停する。論理メモリ、論理メモリのポート、及びアービタは、ソフトウェア、ハードウェア、またはその両方で実装することができる。いくつかの実施態様では、論理メモリ及びそのポート、ならびにアービタは、コントローラ103によって生成された制御信号に基づいて制御される。 The logical memory has multiple logical ports 135, each port potentially connected to or associated with a different requester seeking access to the physical resources of memory 108. To process a given access request, for each port, tile 101 (or its controller 103) determines the bank to which the request is routed, based on the address in the request. For each bank, the compute tile 101 may include an arbiter 140, which arbitrates access to that bank from multiple ports according to a bank generation function configured, for example, to mitigate some (or all) of the requests routed to the same physical memory bank. The logical memory, the ports of the logical memory, and the arbiter can be implemented in software, hardware, or both. In some embodiments, the logical memory and its ports, as well as the arbiter, are controlled based on control signals generated by the controller 103.
メモリ108、110のそれぞれは、一連の物理バンク、ユニット、または任意の他の関連する記憶媒体もしくはデバイスとして実装され得る。メモリ108、110のそれぞれは、1つまたは複数のレジスタ、バッファ、またはその両方を含むことができる。いくつかの実施態様では、メモリ108は入力/活性化メモリであり、他方、メモリ110はパラメータメモリである。いくつかの他の実施態様では、入力または活性化は、メモリ108、メモリ110、またはその両方に格納され、重みは、メモリ110、メモリ108、またはその両方に格納される。例えば、入力及び重みは、特定のニューラルネットワーク計算を容易にするためにメモリ108とメモリ110の間で転送され得る。いくつかの実施態様では、メモリ108及びメモリ110のそれぞれは、タイルメモリと呼ばれる。 Each of the memories 108 and 110 may be implemented as a series of physical banks, units, or any other related storage medium or device. Each of the memories 108 and 110 may contain one or more registers, buffers, or both. In some embodiments, memory 108 is an input/activation memory, while memory 110 is a parameter memory. In some other embodiments, inputs or activations are stored in memory 108, memory 110, or both, and weights are stored in memory 110, memory 108, or both. For example, inputs and weights may be transferred between memory 108 and memory 110 to facilitate certain neural network computations. In some embodiments, each of the memories 108 and 110 is referred to as a tile memory.
各計算タイル101はまた、入力活性化バス106、出力活性化バス107及び計算ユニット112を含み、この計算ユニットは、各セル114a/b/c内に1つまたは複数のハードウェア積和回路(MAC)を有する。コントローラ103は、計算タイル101のメモリに格納されたオペランドを取得するために制御信号105を生成することができる。例えば、コントローラ103は、i)メモリ108に格納された例示的な入力ベクトル102、及びii)メモリ110に格納された重み104を取得するために制御信号105を生成することができる。メモリ108から取得された各入力は、計算ユニット112内の計算セル114a/b/cにルーティングする(例えば、直接ルーティングする)ために、入力活性化バス106に提供される。同様に、メモリ110から取得された各重みは、計算ユニット112のセル114a/b/cにルーティングされる。 Each computation tile 101 also includes an input activation bus 106, an output activation bus 107, and a computation unit 112, which has one or more hardware multiply-accumulate (MAC) circuits within each cell 114a/b/c. A controller 103 can generate control signals 105 to retrieve operands stored in the memory of the computation tile 101. For example, the controller 103 can generate control signals 105 to retrieve i) an exemplary input vector 102 stored in memory 108, and ii) weights 104 stored in memory 110. Each input retrieved from memory 108 is provided to the input activation bus 106 for routing (e.g., direct routing) to computation cells 114a/b/c in the computation unit 112. Similarly, each weight retrieved from memory 110 is routed to cells 114a/b/c in the computation unit 112.
以下で説明するように、各セル114a/b/cは、所与のニューラルネットワーク層の出力を生成するための部分和または累算値を得る計算を実行する。活性化関数を出力のセットに適用して、ニューラルネットワーク層の出力活性化のセットを生成し得る。いくつかの実施態様では、出力または出力活性化は、出力活性化バス107を介した記憶及び/または転送のためにルーティングされる。例えば、出力活性化のセットは、第1の計算タイル101から第2の異なる計算タイル101に転送されて、その第2の計算タイル101でニューラルネットワークの異なる層の入力活性化として処理することができる。 As described below, each cell 114a/b/c performs a computation to obtain a partial sum or cumulative value to generate the output of a given neural network layer. An activation function can be applied to the set of outputs to generate a set of output activations for the neural network layer. In some embodiments, the outputs or output activations are routed for storage and/or transfer via the output activation bus 107. For example, a set of output activations can be transferred from a first computation tile 101 to a second different computation tile 101, where it can be processed as input activations for different layers of the neural network.
一般に、各計算タイル101及びシステム100は、テンソル、行列及び/またはデータアレイなどの多次元データ構造に関連付けられた計算を実行するために追加のハードウェア構造を含むことができる。いくつかの実施態様では、入力ベクトル(またはテンソル)102の入力、及びパラメータテンソルの重み104は、計算タイル101のメモリ108、110にプリロードすることができる。入力及び重みは、ホストインターフェースを介してホスト120(例えば、外部ホスト)から、またはコントローラ125などのより高レベルのコントロールから、特定の計算タイル101に到達するデータ値のセットとして受信される。 Generally, each computation tile 101 and system 100 may include additional hardware structures to perform computations associated with multidimensional data structures such as tensors, matrices, and/or data arrays. In some embodiments, the inputs of input vectors (or tensors) 102 and the weights 104 of a parameter tensor can be preloaded into the memories 108, 110 of the computation tile 101. The inputs and weights are received as a set of data values reaching a particular computation tile 101 from a host 120 (e.g., an external host) via a host interface, or from a higher-level control such as a controller 125.
計算タイル101及びコントローラ103のそれぞれは、1つまたは複数のプロセッサ、処理デバイス、及び様々なタイプのメモリを含むことができる。いくつかの実施態様では、計算タイル101及びコントローラ103のプロセッサは、マイクロプロセッサもしくは中央処理装置(CPU)、グラフィックス処理装置(GPU)、特定用途向け集積回路(ASIC)、または異なるプロセッサの組み合わせなどの、1つまたは複数のデバイスを含む。計算タイル101及びコントローラ103のそれぞれはまた、バッファ、レジスタ、制御回路などの、他の計算リソース及び記憶リソースを含むことができる。これらのリソースは、本明細書で説明される決定及び計算のうちの1つまたは複数を実行するための追加の処理オプションを提供するように協働する。 Each of the compute tile 101 and controller 103 may include one or more processors, processing devices, and various types of memory. In some embodiments, the processors of the compute tile 101 and controller 103 include one or more devices such as a microprocessor or central processing unit (CPU), graphics processing unit (GPU), application-specific integrated circuit (ASIC), or a combination of different processors. Each of the compute tile 101 and controller 103 may also include other computing and storage resources such as buffers, registers, and control circuits. These resources cooperate to provide additional processing options for performing one or more of the decisions and calculations described herein.
いくつかの実施態様では、コントローラ103の処理ユニット(複数可)は、本明細書で説明される1つまたは複数の機能をコントローラ103及び計算タイル101に実行させるためにメモリ内に格納され、プログラムされた命令を実行する。コントローラ103のメモリは、1つまたは複数の非一時的な機械可読記憶媒体を含むことができる。非一時的な機械可読記憶媒体は、ソリッドステートメモリ、ランダムアクセスメモリ(RAM)、読み出し専用メモリ(ROM)、消去可能プログラム可能な読み出し専用メモリ(例えば、EPROM、EEPROM、もしくはフラッシュメモリ)、または情報もしくは命令の格納が可能である任意の他の有形媒体を含むことができる。 In some embodiments, the processing units (or units) of the controller 103 execute programmed instructions stored in memory to cause the controller 103 and the compute tile 101 to perform one or more of the functions described herein. The memory of the controller 103 may include one or more non-temporary machine-readable storage media. These non-temporary machine-readable storage media may include solid-state memory, random-access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (e.g., EPROM, EEPROM, or flash memory), or any other tangible media capable of storing information or instructions.
システム100は、計算タイル101によって実行される特定の計算動作を定義する命令を受信する。いくつかの実施態様では、ホストは、ニューラルネットワーク層で処理するためのパラメータ(すなわち、重み)のセット及び対応する入力を生成することができる。例えば、ホストは、圧縮パラメータ(CSP)のセット、及び、ニューラルネットワーク入力を所与の動作のためのCSPのセット内の非ゼロパラメータにマッピングする対応マッピングベクトル、例えば、非ゼロマップ(NZM)を生成することができる。ホスト120は、ホストインターフェースを介して計算タイル101にパラメータを送信して、そのタイルでさらに処理することを可能にする。コントローラ103は、圧縮パラメータ及び対応マッピングベクトルを含む、受信した重み及び入力に関連付けられたデータストリームを分析するためにプログラムされた命令を実行することができる。 System 100 receives instructions that define a specific computational operation performed by the computation tile 101. In some embodiments, the host can generate a set of parameters (i.e., weights) and corresponding inputs for processing in the neural network layer. For example, the host can generate a set of compressed parameters (CSPs) and corresponding mapping vectors, such as non-zero maps (NZMs), that map the neural network inputs to non-zero parameters in the set of CSPs for a given operation. The host 120 sends the parameters to the computation tile 101 via the host interface, enabling further processing on that tile. The controller 103 can execute programmed instructions to analyze the received weights and the data stream associated with the inputs, including the compressed parameters and corresponding mapping vectors.
コントローラ103は、データストリームの入力及び重みを計算タイル101に格納させる。例えば、コントローラ103は、マッピングベクトル及び圧縮スパースパラメータを計算タイル101のローカルタイルメモリ内に格納することができる。これについては、以下でより詳細に説明する。コントローラ103はまた、動作コード(「オペコード」)を検出するために入力データストリームを分析することができる。システム100は、ベクトル行列乗算、要素別ベクトル演算、及び所与の演算が圧縮スパースパラメータ対非圧縮パラメータ/重みを使用しているかどうかについての動作を示すオペコードタイプなどの、様々なタイプのオペコードをサポートすることができる。 The controller 103 causes the data stream inputs and weights to be stored in the computation tile 101. For example, the controller 103 can store mapping vectors and compressed sparse parameters in the local tile memory of the computation tile 101. This will be explained in more detail below. The controller 103 can also analyze the input data stream to detect operation codes ("opcodes"). The system 100 can support various types of opcodes, such as vector-matrix multiplication, element-wise vector operations, and opcode types that indicate whether a given operation uses compressed sparse parameters versus uncompressed parameters/weights.
1つまたは複数のオペコードに基づいて、コントローラ103は、コンピューティングタイル101のタイルメモリにアクセスするための要求を調停するために、バンク生成関数(以下で説明する)を活性化または実行することができる。例えば、コントローラ103は、2つ以上の要求のそれぞれがタイルメモリの異なる物理バンクに対して処理されるように、バンク生成関数を活用して2つ以上の要求を調停する。コントローラ103は、推論決定がコンピューティングタイル101で実行される前に、コントローラ103でプログラムまたは符号化された所定のバンク選択スキームを利用することができる。 Based on one or more opcodes, the controller 103 may activate or execute a bank generation function (described below) to mediate requests for access to the tile memory of the computing tile 101. For example, the controller 103 may utilize a bank generation function to mediate two or more requests such that each of the requests is processed for a different physical bank of the tile memory. The controller 103 may utilize a predetermined bank selection scheme programmed or encoded in the controller 103 before the inference decision is executed on the computing tile 101.
いくつかの実施態様では、所与の計算動作は、メモリ108のリソースへのアクセスをそれぞれが要求する複数の要求元/アクセス元を伴う。例えば、コンピューティングタイル101で実行される計算ワークロードは、メモリ108の個々のアドレス位置への読み出し及び書き込みアクセスを要求するテンソル走査動作によってメモリアクセス要求を発動することができる。以下で説明するように、これらのアドレス位置は、ワークロードの一部として処理される入力テンソルの要素に対応することができる。 In some embodiments, a given computation operation involves multiple requesters/accessors, each requesting access to resources in memory 108. For example, a computation workload performed on computing tile 101 can trigger memory access requests through tensor traversal operations that request read and write access to individual address locations in memory 108. As described below, these address locations can correspond to elements of an input tensor processed as part of the workload.
テンソルの読み出し/書き込み動作に加えて、ワークロードを処理することはまた、i)データ(例えば、パラメータ)をメモリ108(狭い)からメモリ110(広い)に移動させる、及びii)データをメモリ110(広い)からメモリ108(狭い)に移動させるための読み出しまたは書き込みアクセス要求を処理することを含むことができる。場合によっては、例示的なワークロードを処理するために、第1の計算タイル101は、メモリ108についてのアクセス要求(例えば、読み出し/書き込み要求)を調停及び実行し、ここで要求は、第1の計算タイル101の外部から発信される外部データ通信に基づく。 In addition to tensor read/write operations, processing a workload may also include i) moving data (e.g., parameters) from memory 108 (narrow) to memory 110 (wide), and ii) processing read or write access requests to move data from memory 110 (wide) to memory 108 (narrow). In some cases, to process an exemplary workload, the first compute tile 101 may arbitrate and execute access requests (e.g., read/write requests) for memory 108, where the requests are based on external data communication originating from outside the first compute tile 101.
これらの異なるタイプのアクセス要求は、同一の物理メモリ108へのアクセスを全てが要求する1つまたは複数の計算スレッドに対応する。場合によっては、複数の要求が、単一の計算スレッド(またはクロックサイクル)に対応し得る。開示されたバンク生成関数は、バンク競合を引き起こすことなく、タイルメモリのメモリリソースについての複数の要求を処理するために使用することができる。例えば、バンク生成関数は、2つの要求がタイルメモリの同一の物理メモリバンクへのアクセスを要求しなくなるように、要求のグループ内の各要求について個々のバンクIDを生成するように構成される。 These different types of access requests correspond to one or more compute threads, all requesting access to the same physical memory 108. In some cases, multiple requests may correspond to a single compute thread (or clock cycle). The disclosed bank generation function can be used to handle multiple requests for memory resources in tile memory without causing bank contention. For example, the bank generation function is configured to generate individual bank IDs for each request within a group of requests, such that two requests do not request access to the same physical memory bank of tile memory.
いくつかの実施態様では、バンク生成関数の出力として返されるバンク識別子に基づいて、コントローラ103は、同一のクロックサイクル(例えば、単一のクロックサイクル)中にタイルメモリの異なる物理メモリバンクに対して2つ以上の要求を処理することによって要求を調停することが可能である。バンク生成関数により、コントローラ103は、ストライドがバンク数及びバンクの行内のバイト数の関数であるメモリアクセスなどの、特定の問題に関するストライディングについても、これらの利点を実現することができる。これについては、以下でより詳細に説明する。 In some embodiments, based on the bank identifier returned as the output of the bank generation function, the controller 103 can arbitrate requests by processing two or more requests for different physical memory banks of tile memory within the same clock cycle (e.g., a single clock cycle). The bank generation function allows the controller 103 to achieve these advantages even with respect to striding for specific issues, such as memory access where the stride is a function of the number of banks and the number of bytes in a row within a bank. This will be described in more detail below.
加えて、オペコードに基づいて、コントローラ103は、1つまたは複数の計算セル114a/b/cに関連付けられた専用のデータパスロジックを活性化して、パラメータ及び入力/活性化、ならびに入力/活性化をパラメータのサブセットにマッピングするために使用される対応マッピングベクトルを使用した計算(例えば、スパース計算)を実行することができる。本文書で使用される場合、スパース計算は、ニューラルネットワーク層の重みのセットから生成される圧縮スパースパラメータのセット内の非ゼロの重み値を使用してニューラルネットワーク層について実行されたニューラルネットワーク計算を含む。 In addition, based on the opcode, the controller 103 can activate dedicated data path logic associated with one or more computation cells 114a/b/c to perform computations (e.g., sparse computations) using parameters and inputs/activations, as well as corresponding mapping vectors used to map inputs/activations to subsets of parameters. As used in this document, a sparse computation includes a neural network computation performed on a neural network layer using non-zero weight values in a set of compressed sparse parameters generated from the set of weights of the neural network layer.
いくつかの実施態様では、オペコードは、所与の層のための入力及び重みに関係する動作についての詳細、例えば、その層に関連付けられた1つまたは複数のパラメータテンソルのスパース性を示す。コントローラ103は、i)任意の関連するテンソルスパース性情報を含むオペコードを検出し、ii)そのオペコードに基づいて、ローカル読み出しロジックを使用してタイルメモリ(例えば、メモリ108または110)からパラメータを取得し、iii)それらのパラメータを計算タイル101のセル114a/b/cに配線またはルーティングする。コントローラ103はまた、例示的なデータストリームを分析し、その分析に基づいて、圧縮スパースパラメータのセット、及び入力ベクトルの離散入力を圧縮スパースパラメータ内の個々の非ゼロの重み値にマッピングする対応マッピングベクトルを生成することができる。圧縮スパースパラメータ及び対応マッピングベクトルを生成するための動作及び/またはプロセスがコントローラ103を参照して説明される範囲において、これらの動作及びプロセスのそれぞれは、ホスト120、コントローラ125、またはその両方によって実行することもできる。 In some embodiments, the opcode indicates details about the operation relating to the inputs and weights for a given layer, for example, the sparsity of one or more parameter tensors associated with that layer. The controller 103 i) detects an opcode containing any relevant tensor sparsity information, ii) retrieves parameters from tile memory (e.g., memory 108 or 110) using local read logic based on that opcode, and iii) wires or routes those parameters to cells 114a/b/c of the computed tile 101. The controller 103 can also analyze an exemplary data stream and, based on that analysis, generate a set of compressed sparse parameters and corresponding mapping vectors that map the discrete inputs of the input vectors to individual non-zero weight values within the compressed sparse parameters. To the extent that the operations and/or processes for generating the compressed sparse parameters and corresponding mapping vectors are described with reference to the controller 103, each of these operations and processes may also be performed by the host 120, the controller 125, or both.
いくつかの実施態様では、テンソルインデックスを分析すること、システムメモリ(例えば、SRAM、DRAMなど)内のアドレス空間を読み出して入力及び重み値を取得するためのダイレクトメモリアクセス(DMA)動作を実行すること、圧縮スパースパラメータを生成すること、ならびに対応マッピングベクトルを生成することなどの、動作のうちのいくつか(または全て)をホスト120で実行することにより、各計算タイル101での処理時間の短縮、及びシステム100でのデータスループットの向上が可能になる。例えば、コントローラ125を使用してホスト120でこれらの動作を実行することにより、既に圧縮されたパラメータのセットを所与のタイル計算101に送信することが可能であり、これにより、システム100でルーティングされるデータのサイズ及び量が低減される。 In some embodiments, performing some (or all) of the following operations on the host 120—such as analyzing tensor indices, performing direct memory access (DMA) operations to read address spaces in system memory (e.g., SRAM, DRAM, etc.) to obtain input and weight values, generating compressed sparse parameters, and generating corresponding mapping vectors—reduces processing time at each computation tile 101 and improves data throughput at the system 100. For example, by using the controller 125 to perform these operations on the host 120, it is possible to send an already compressed set of parameters to a given tile computation 101, thereby reducing the size and amount of data routed at the system 100.
図2は、ハードウェア集積回路のメモリと計算セルの間で入力及び出力をルーティングするための例示的な処理パイプライン200を示す。一般に、パイプライン200は、入力バス106を使用して、メモリ108のメモリ位置から取得された入力を1つまたは複数の計算セル114にルーティングし、出力バス107を使用して、1つまたは複数の計算セル114で実行された乗算から生成された出力をメモリ108のメモリ位置にルーティングする。 Figure 2 shows an exemplary processing pipeline 200 for routing inputs and outputs between the memory and compute cells of a hardware integrated circuit. Generally, the pipeline 200 uses an input bus 106 to route inputs obtained from memory locations in memory 108 to one or more compute cells 114, and uses an output bus 107 to route outputs generated from multiplications performed in one or more compute cells 114 to memory locations in memory 108.
パイプライン200は、専用集積回路のハードウェア計算セルの複数のグルーピングのそれぞれに入力バス106が結合される(例えば、直接結合される)ハードウェアアーキテクチャを活用する。システム100は、メモリ108内の位置から第1のオペランドを提供し、メモリ110内の位置から第2のオペランドを提供することができる。オペランド204は、セル114で実行される計算に使用され、セル114は、その計算の結果に対応した出力を生成する。いくつかの実施態様では、計算は、人工ニューラルネットワークのニューラルネットワーク層を通じて入力を処理するためなど、機械学習動作のためのものである。 The pipeline 200 leverages a hardware architecture in which the input bus 106 is coupled (e.g., directly coupled) to each of multiple groupings of hardware computing cells of a dedicated integrated circuit. The system 100 can provide a first operand from a location in memory 108 and a second operand from a location in memory 110. The operand 204 is used for a computation performed in cell 114, which generates an output corresponding to the result of that computation. In some embodiments, the computation is for machine learning operations, such as processing input through the neural network layer of an artificial neural network.
この実施態様では、計算タイル101は、入力特徴マップの入力または活性化(例えば、a0、a1、a2など)に対応した第1のオペランドをセル114のサブセットに提供することができる。例えば、入力ベクトル102の個々の入力は、計算タイル101の入力バス106を介してサブセット内の各MACに提供される。システム100は、複数の計算タイル101にわたってこのブロードキャスト動作を実行して、所与のニューラルネットワーク層についての積を、入力の個々のグルーピング及び対応する重みを使用して各計算タイル101で計算することができる。所与の計算タイル101で、積は、MACの乗算回路を使用して、個々の入力(例えば、a1)と対応する重み(例えば、w1)とをサブセット内の各MACで乗算することによって計算される。 In this embodiment, the computation tile 101 can provide a subset of cells 114 with first operands corresponding to inputs or activations (e.g., a0, a1, a2, etc.) of the input feature map. For example, individual inputs of the input vector 102 are provided to each MAC in the subset via the input bus 106 of the computation tile 101. The system 100 can perform this broadcast operation across multiple computation tiles 101 to compute the product for a given neural network layer at each computation tile 101 using the individual groupings of inputs and their corresponding weights. At a given computation tile 101, the product is computed by multiplying each individual input (e.g., a1) by its corresponding weight (e.g., w1) at each MAC in the subset using the MAC's multiplication circuit.
システム100は、計算ユニット112のセル114a/b/cのサブセット内のセル114a/b/cの各MACで計算される複数の個々の積の累算に基づいて、層の出力を生成することができる。図6を参照して以下で説明されるように、計算タイル101内で実行される乗算動作は、i)入力テンソルの個々の要素に対応するメモリ108のメモリ位置に格納された第1のオペランド(例えば、入力または活性化)、及びii)パラメータテンソルの個々の要素に対応するメモリ110のメモリ位置に格納された第2のオペランド(例えば、重み)を必要とする可能性がある。 System 100 can generate layer outputs based on the accumulation of multiple individual products calculated in each MAC of cells 114a/b/c within a subset of cells 114a/b/c of the computing unit 112. As described below with reference to Figure 6, the multiplication operations performed within the computing tile 101 may require i) a first operand (e.g., input or activation) stored in memory locations in memory 108 corresponding to individual elements of the input tensor, and ii) a second operand (e.g., weight) stored in memory locations in memory 110 corresponding to individual elements of the parameter tensor.
図2の例では、シフトレジスタ202は、シフト機能を提供することができ、このシフト機能で、オペランド204の入力は、入力バス106上にブロードキャストされ、セル114の1つまたは複数のMAC114にルーティングされる。いくつかの実施態様では、シフトレジスタ202は、計算タイル101での1つまたは複数の入力ブロードキャストモードを可能にする。例えば、シフトレジスタ202は、メモリ108から連続的に、例えば1つずつ(第1のブロードキャストモード)、メモリ108から同時に、例えば並列に(第2のブロードキャストモード)、またはこれらのブロードキャストモードの何らかの組み合わせを使用して、入力をブロードキャストするために使用することができる。シフトレジスタ202は、メモリ108の統合機能とすることができ、ハードウェア、ソフトウェア、またはその両方で実装され得る。 In the example in Figure 2, the shift register 202 can provide a shift function, in which the input of operand 204 is broadcast onto the input bus 106 and routed to one or more MACs 114 of cell 114. In some embodiments, the shift register 202 enables one or more input broadcast modes on the compute tile 101. For example, the shift register 202 can be used to broadcast inputs sequentially from memory 108, e.g., one by one (first broadcast mode), simultaneously from memory 108, e.g., in parallel (second broadcast mode), or using any combination of these broadcast modes. The shift register 202 can be an integrated function of memory 108 and can be implemented in hardware, software, or both.
いくつかの実施態様では、オペランド206の重み(w3)は、ゼロの重み値を有し得る。重み(w3)がゼロ値を有するとコントローラ103が判定するときに、処理リソースを節約するために、入力(a2)と重み(w3)との間の乗算をスキップすることができ、その結果、それらのオペランドは、セル114a/b/cにルーティングされることもなく、それらのセルによって消費されることもない。その特定の乗算動作をスキップする判定は、上記で説明したように、入力ベクトルの離散入力(an)をパラメータテンソルの個別の重み(wn)にマッピングするマッピングベクトルに基づくことができる。 In some embodiments, the weight (w3) of operand 206 may have a weight value of zero. When the controller 103 determines that the weight (w3) has a zero value, the multiplication between the input (a2) and the weight (w3) can be skipped to conserve processing resources. As a result, those operands are neither routed to nor consumed by cells 114a/b/c. The determination to skip this particular multiplication operation can be based on a mapping vector that maps the discrete inputs (an) of the input vector to individual weights (wn) of the parameter tensor, as described above.
図3は、メモリ108の物理メモリバンクにアクセスするためのアドレスを生成するために使用される異なる関数302、304についてのメモリ/データ走査の例を示す走査テーブル300を示す。特に、第1のメモリ走査は、第1の関数302について示されており、他方、第2の異なるメモリ走査は、第2の関数304について示されている。いくつかの実施態様では、メモリ108は、1つまたは複数のメモリパーティションを含む。 Figure 3 shows a scan table 300 illustrating examples of memory/data scans for different functions 302 and 304 used to generate addresses for accessing the physical memory banks of memory 108. In particular, the first memory scan is shown for the first function 302, while the second different memory scan is shown for the second function 304. In some embodiments, memory 108 includes one or more memory partitions.
図3の例では、メモリ108のパーティションは、バンク0~31として示されている32個の物理メモリバンク312を含む。各バンクは、例えば、16、24などの、ある数の行を含むことができる。いくつかの実施態様では、計算タイル101が16Bチャンク(例えば、128ビット)でメモリ108からデータにアクセスするように、各行は16バイト(16B)幅である。いくつかの実施態様では、メモリ108は、より多いか、またはより少ない物理メモリバンクを含むことができ、バンクの各行は、16Bを超えるか、または16B未満(例えば、1B)である幅を有することができる。 In the example in Figure 3, the partition of memory 108 includes 32 physical memory banks 312, shown as banks 0 through 31. Each bank can contain a certain number of rows, for example, 16, 24, etc. In some embodiments, each row is 16 bytes (16B) wide so that the compute tile 101 accesses data from memory 108 in 16B chunks (e.g., 128 bits). In some embodiments, memory 108 can contain more or fewer physical memory banks, and each row in a bank can have a width greater than 16B or less than 16B (e.g., 1B).
走査テーブル300は、第1のアドレス306、第2のアドレス308及び第3のアドレス310を含む。第1のアドレス306、第2のアドレス308及び第3のアドレス310のそれぞれの間のメモリ走査距離は、ストライド値に基づくことができる。図3の例では、ストライド値は512である。しかしながら、ストライド値は、他の例では異なり得る。したがって、他のストライド値は、本開示の範囲内である。ストライド動作は、計算システム100が所与のタスクまたは機械学習ワークロードの計算を実行するときに必要とされ得る。ストライド動作は、ストライドパラメータまたはストライド値に基づいてもよい。所与のストライド値が、システム100でプログラム可能であってもよい。例えば、システム100は、特定の推論動作に特有のものとしてシステム100のコンパイラによって知られている特定の問題に関するストライドに基づいて、所与の推論についてのストライドをプログラムすることができる。 The scan table 300 includes a first address 306, a second address 308, and a third address 310. The memory scan distance between each of the first address 306, the second address 308, and the third address 310 can be based on a stride value. In the example in Figure 3, the stride value is 512. However, the stride value may differ in other examples. Therefore, other stride values are within the scope of this disclosure. Stride operation may be required when the computing system 100 performs computation for a given task or machine learning workload. Stride operation may be based on a stride parameter or stride value. A given stride value may be programmable by the system 100. For example, the system 100 can program a stride for a given inference based on a stride for a particular problem known by the system 100's compiler as specific to a particular inference operation.
いくつかの実施態様では、ストライド値は、メモリ108のハードウェア構成、実行されている機械学習動作のタイプ、またはその両方に基づいて決定される。例えば、システム100の計算タイル101を使用して、画像及びビデオコンテンツの圧縮及び/または認識のために調整または使用されるニューラルネットワーク(例えば、畳み込みニューラルネットワーク)を実装することができる。ストライドは、ニューラルネットワークの構成要素であり得る。この例では、機械学習動作は、ニューラルネットワークの層を通じて、その層のための重み/パラメータのセットに対応するフィルタに従って画像を処理することを含む。 In some embodiments, the stride value is determined based on the hardware configuration of memory 108, the type of machine learning operation being performed, or both. For example, a neural network (e.g., a convolutional neural network) can be implemented using the computational tile 101 of system 100, which is tuned or used for image and video content compression and/or recognition. The stride can be a component of the neural network. In this example, the machine learning operation involves processing an image through layers of the neural network according to a filter corresponding to a set of weights/parameters for that layer.
画像、または画像に関連付けられたピクセル値は、メモリ108の物理行及び物理バンクのハードウェア構成を参照して、そのメモリの物理行及び物理バンクにわたって格納することができる。この例では、ストライドは、ニューラルネットワークのフィルタ(またはカーネル)の成分またはパラメータである。ストライドは、画像またはビデオ上をフィルタが移動する量を修正するために使用される。例えば、ストライドが1に設定されている場合、計算タイル101は、フィルタ(複数可)を領域上で一度に1ピクセル(または入力)移動させる。同様に、ストライドが2である場合、計算タイル101は、フィルタ(複数可)を領域上で一度に2ピクセル移動させる。 The image, or the pixel values associated with the image, can be stored across the physical rows and physical banks of memory 108, referencing the hardware configuration of the physical rows and physical banks of that memory. In this example, the stride is a component or parameter of the neural network's filter (or kernel). The stride is used to modify the amount the filter moves across the image or video. For example, if the stride is set to 1, the computation tile 101 moves the filter(s) one pixel (or input) at a time across the region. Similarly, if the stride is 2, the computation tile 101 moves the filter(s) two pixels at a time across the region.
したがって、フィルタは、層のストライド値に基づいてシフトされ得、いくつかの実施態様では、システム100は、画像の異なる領域の入力が対応するドット積を有するまで、異なる層の複数の計算タイル101にわたってこのプロセスを繰り返し実行することができる。ストライド値に基づいて画像の領域の入力にわたってフィルタを移動させることは、そのストライド値に従って、メモリ108内の様々な位置から入力を検索すること、取得すること、またはその他の方法でアクセスすることを含むことができる。 Therefore, the filter may be shifted based on the stride value of the layer, and in some embodiments, the system 100 can repeat this process across multiple computational tiles 101 of different layers until the inputs of different regions of the image have the corresponding dot product. Moving the filter across the inputs of image regions based on the stride value may include searching for, retrieving, or otherwise accessing the inputs from various locations in memory 108 according to that stride value.
上記のように、画像、または画像に関連付けられたピクセル値は、メモリ108の物理行及び物理バンクにわたって格納される。図3の例は、512のストライド値を参照して説明され得る。いくつかの例では、512は、特定の画像処理動作に関連付けられた共通のストライドを表す。動作のタイプに応じて、システム100の計算タイル101は、ある範囲のストライド値に従って、メモリ108にアクセスするための要求を処理することができる。例えば、第1のタイル101は、第1のストライド値に基づいて要求を処理してもよく、他方、第2の異なるタイル101は、第2の異なるストライド値に基づいて要求を処理してもよい。 As described above, images, or pixel values associated with images, are stored across physical rows and physical banks in memory 108. An example in Figure 3 may be illustrated with reference to the stride values 512. In some examples, 512 represents a common stride associated with a particular image processing operation. Depending on the type of operation, the computation tiles 101 of system 100 can process requests to access memory 108 according to a range of stride values. For example, a first tile 101 may process a request based on a first stride value, while a second different tile 101 may process a request based on a second different stride value.
走査テーブル300に示されているように、要求を処理するためのバンクIDを生成するためにバンク生成関数302が使用されるときに、512のアクセスストライドが、タイルメモリの同一の物理メモリバンク314(例えば、バンク0)で繰り返される。これは、バンク競合を示している。本明細書で使用される場合、バンク競合は、同一のクロックサイクル中にタイルメモリの同一の物理メモリバンクへのアクセスを2つ以上の要求元が要求するときに発生する。 As shown in the scan table 300, when the bank generation function 302 is used to generate a bank ID for processing the request, 512 access strides are repeated in the same physical memory bank 314 (e.g., bank 0) of the tile memory. This indicates a bank contention. As used herein, a bank contention occurs when two or more requesters request access to the same physical memory bank of the tile memory during the same clock cycle.
図4を参照して以下で説明するように、バンク生成関数304は、メモリ108のメモリバンク内の物理行にアクセスするための要求を処理することにより、一貫して、または少なくとも実質的に、メモリ108の別個の物理メモリバンクへのアクセスが生じるように構成される。より具体的には、メモリ108にアクセスするための要求のグループ内の各要求について、バンク生成関数304は、要求内のアドレスからのビットを使用して、例えば、単一のクロックサイクル中に、要求のグループが並列に処理されるときに異なる物理メモリバンクへのアクセスを生じさせるバンクIDを生成する。 As described below with reference to Figure 4, the bank generation function 304 is configured to consistently, or at least substantially, generate access to a distinct physical memory bank of memory 108 by processing requests for access to physical rows within the memory bank of memory 108. More specifically, for each request in a group of requests for access to memory 108, the bank generation function 304 uses bits from the address in the request to generate a bank ID that, for example, generates access to a different physical memory bank when the group of requests are processed in parallel during a single clock cycle.
例えば、図3に示されているように、バンク生成関数304は、計算タイル101にメモリ108の異なる物理メモリバンクにアクセスさせるアクセスパターンに基づいて、2つ以上の要求を処理することを可能にする。バンク生成関数304は、メモリアクセスに使用されるストライド値に関係なく、このアクセスパターンを可能にするバンクID及び行IDを生成するように構成される。 For example, as shown in Figure 3, the bank generation function 304 enables the processing of two or more requests based on an access pattern that causes the compute tile 101 to access different physical memory banks of memory 108. The bank generation function 304 is configured to generate bank IDs and row IDs that enable this access pattern, regardless of the stride value used for memory access.
いくつかの実施態様では、バンク生成関数304によって生成されたバンクIDに基づいて、i)第1の要求は、計算タイル101に、第1の物理メモリバンク316、例えば、バンク「0」の行内の16Bにアクセスさせ、ii)第2の要求は、計算タイル101に、第2の異なる物理メモリバンク318、例えばバンク「4」の行内の16Bにアクセスさせ、iii)第3の要求は、計算タイル101に、第3の異なる物理メモリバンク320、例えばバンク「8」の行内の16Bにアクセスさせる。 In some embodiments, based on the bank ID generated by the bank generation function 304, i) a first request causes the compute tile 101 to access 16B in row 1 of the first physical memory bank 316, for example, bank "0"; ii) a second request causes the compute tile 101 to access 16B in row 1 of a second different physical memory bank 318, for example, bank "4"; and iii) a third request causes the compute tile 101 to access 16B in row 1 of a third different physical memory bank 320, for example, bank "8".
第1、第2及び第3の要求のそれぞれは、異なる要求の可能性があり、異なる要求元からの可能性があり、またはその両方である。バンク生成関数304によって可能となったバンクID及び/またはアクセスパターンに基づくと、2つ以上の要求元が同一のクロックサイクル中にタイルメモリの同一の物理メモリバンクへのアクセスを要求する場合は存在しないか、またはそのような場合は実質的に存在しない。したがって、第1、第2及び第3の要求のそれぞれは、メモリ108でバンク競合を発生させることなく、同一のクロックサイクル(例えば、単一のクロックサイクル)中に同時に処理することができる。さらに、第1、第2及び第3の要求のそれぞれは、バンク競合を発生させることなく、ある範囲のストライド値(例えば、512のストライド)について、同一のクロックサイクル(例えば、単一のクロックサイクル)中に同時に処理することができる。 Each of the first, second, and third requests may be a different request, may originate from a different requester, or both. Based on the bank IDs and/or access patterns enabled by the bank generation function 304, there are no cases, or virtually no cases, where two or more requesters request access to the same physical memory bank of tile memory within the same clock cycle. Therefore, each of the first, second, and third requests can be processed simultaneously within the same clock cycle (e.g., a single clock cycle) without causing bank contention in memory 108. Furthermore, each of the first, second, and third requests can be processed simultaneously within the same clock cycle (e.g., a single clock cycle) for a certain range of stride values (e.g., a stride of 512) without causing bank contention.
いくつかの実施態様では、計算タイル101は、格納された出力値が第2の異なるニューラルネットワーク層への入力活性化として取得されるときにメモリ108(例えば、活性化メモリ)がバンク競合に遭遇しないように、出力をルーティング及び格納するように動作可能である。これは、活性化値を参照して以下の段落で説明されるが、メモリ108の物理的位置に書き込まれる(またはそこに格納される)場合がある他のデータタイプ/値に適用される。 In some embodiments, the computation tile 101 can be configured to route and store the output so that the memory 108 (e.g., activation memory) does not encounter bank contention when the stored output value is acquired as an input activation to a second, different neural network layer. This applies to other data types/values that may be written to (or stored in) a physical location in memory 108, as described in the following paragraphs with reference to activation values.
計算タイル101は、計算ユニット112で実行された計算から生じた累算値に活性化関数を適用する非線形ユニットを含むことができる。一例では、非線形ユニットは、計算タイル101の乗算回路及び加算回路の中に含まれるハードウェア回路とすることができる。他の例では、非線形ユニットは、計算タイル101に含まれるが、計算ユニット112の外部にある。 The calculation tile 101 may include a nonlinear unit that applies an activation function to the cumulative values resulting from calculations performed by the calculation unit 112. In one example, the nonlinear unit may be hardware circuitry included within the multiplication and addition circuits of the calculation tile 101. In another example, the nonlinear unit is included in the calculation tile 101 but is outside the calculation unit 112.
非線形ユニットは、その活性化関数を適用して、活性化値のセットを生成する。活性化値は、機械学習ワークロードの出力とすることができる。例えば、活性化値は、メモリ108のメモリバンクにルーティングされ、そのメモリバンクに格納される、第1のニューラルネットワーク層の出力であり得る。これらの活性化値(例えば、第1の層の出力)は、メモリ108のメモリバンクから検索することができ、第2の異なるニューラルネットワーク層を通じて処理するための入力活性化として提供することができる。 The nonlinear unit applies its activation function to generate a set of activation values. These activation values can be the output of a machine learning workload. For example, the activation values may be the output of a first neural network layer, routed to and stored in memory bank 108. These activation values (e.g., the output of the first layer) can be retrieved from memory bank 108 and provided as input activations for processing through a second, different neural network layer.
計算タイル101は、メモリ108の物理行及び物理バンクに活性化値などの出力を格納するために、メモリ108へのアクセス要求(例えば、書き込みアクセス)を発行することができる。いくつかの例では、これらの要求は、活性化を格納する活性化メモリとして使用されるメモリ108のパーティションにルーティングすることができる。いくつかの実施態様では、これらの書き込みアクセス要求は、バンク生成関数304を使用して処理することができ、その結果、システム100は、出力/活性化値が特定の計算タイル101のメモリ108に格納されるときに、そのタイルでのバンク競合に遭遇しない。 The compute tile 101 can issue access requests (e.g., write accesses) to memory 108 to store outputs such as activation values in the physical rows and physical banks of memory 108. In some examples, these requests can be routed to a partition of memory 108 used as activation memory to store activations. In some embodiments, these write access requests can be handled using a bank generation function 304, so that the system 100 does not encounter bank contention in memory 108 when the output/activation values are stored in that compute tile 101.
バンク生成関数304はまた、アクセス要求(例えば、読み出しアクセス)が処理されて出力値を検索またはフェッチするときにバンク競合を低減または防止するために使用することができる。例えば、出力値をフェッチして、第2の異なるニューラルネットワーク層への入力活性化として提供することができる。 The bank generation function 304 can also be used to reduce or prevent bank contention when access requests (e.g., read access) are processed and output values are retrieved or fetched. For example, output values can be fetched and provided as input activations to a second, different neural network layer.
図4は、ハードウェア集積回路でのメモリバンク競合を低減するための例示的なバンク生成関数304を示す。以下で説明するように、バンク生成関数304は、メモリ108のメモリバンク内の物理行にアクセスするための要求により、一貫して、または少なくとも実質的に、メモリ108の別個の物理メモリバンクへのアクセスが生じるように構成される。 Figure 4 shows an exemplary bank generation function 304 for reducing memory bank contention in a hardware integrated circuit. As described below, the bank generation function 304 is configured such that requests to access physical rows in the memory bank of memory 108 consistently, or at least substantially, result in access to a separate physical memory bank of memory 108.
例えば、メモリ108にアクセスするための要求のグループが与えられると、計算タイル101のコントローラ103は、その要求のグループからアドレスのセットを導出することができる。場合によっては、コントローラ103は、要求のグループから連続アドレス(例えば、仮想/論理アドレス)のセットを導出し得る。この連続アドレスのセットが与えられると、バンク生成関数304は、対応するバンク識別子(「バンクID」)のセットを生成するように構成される。例えば、バンク生成関数304は、要求のグループ内の各要求について個々のバンクIDを生成する。 For example, given a group of requests to access memory 108, the controller 103 of the compute tile 101 can derive a set of addresses from that group of requests. In some cases, the controller 103 may derive a set of consecutive addresses (e.g., virtual/logical addresses) from the group of requests. Given this set of consecutive addresses, the bank generation function 304 is configured to generate a corresponding set of bank identifiers ("bank IDs"). For example, the bank generation function 304 generates individual bank IDs for each request within the group of requests.
システム100、または計算タイル101は、メモリ108でバンク競合が発生することなく、1つもしくは複数のクロックサイクルにわたって、または同一のクロックサイクルにわたって、バンクIDのセットを使用して要求のグループを処理することができる。別の言い方をすれば、バンク生成関数304によって生成されたバンクIDのセットに基づいて、計算タイル101は、要求のグループ内の各要求を同時に処理する(例えば、並列に)ことができ、2つの要求が、同一のクロックサイクル中にタイルメモリ108の同一の物理メモリバンクへのアクセスを要求することはない。 System 100, or compute tile 101, can process a group of requests using a set of bank IDs over one or more clock cycles, or over the same clock cycle, without bank contention occurring in memory 108. In other words, based on the set of bank IDs generated by the bank generation function 304, compute tile 101 can process each request in a group of requests simultaneously (e.g., in parallel), and two requests will not request access to the same physical memory bank of tile memory 108 during the same clock cycle.
図4の例では、バンク生成関数304は、アルゴリズム402に基づいて、各要求について個々のバンクIDを生成する。アルゴリズム402は、メモリ108にアクセスするための対応する要求に含まれるアドレスビット404の例示的なシーケンスに基づいてバンクIDを生成する。例えば、計算タイル101は、アドレスビットのシーケンス404を使用して、アルゴリズム402への入力として提供される1つまたは複数の変数について個々の値を取得する。入力変数は、アドレスビットのシーケンス404の異なる部分に対応することができる。 In the example in Figure 4, the bank generation function 304 generates individual bank IDs for each request based on algorithm 402. Algorithm 402 generates bank IDs based on an exemplary sequence of address bits 404 contained in the corresponding request for accessing memory 108. For example, the computation tile 101 uses the sequence of address bits 404 to obtain individual values for one or more variables provided as input to algorithm 402. The input variables can correspond to different parts of the sequence of address bits 404.
第1の変数Aは、ビットの第1の部分から取得され得、第2の変数Bは、ビットの第2の部分から取得され得、第3の変数row_idは、ビットの第3の部分から取得され得、第4の変数byte_in_rowは、ビットの第4の部分から取得され得る。例えば、ビットのシーケンス404は、2つの部分、すなわちi)bytes_in_row(メモリ行内のバイト数)と、ii)row_addressとに分割される入力アドレスとすることができる。バンク生成関数304を使用して、row_addressは、2つの部分、すなわち、i)row_id(例えば、各バンク内のrow_id)と、ii)変数Aとして定義された従来のバンクIDとに分割することができる。row_idの最下位ビット(LSB)は、変数Bとして定義され得る。 The first variable A may be obtained from the first part of the bits, the second variable B from the second part of the bits, the third variable row_id from the third part of the bits, and the fourth variable byte_in_row from the fourth part of the bits. For example, the bit sequence 404 can be an input address divided into two parts: i) bytes_in_row (number of bytes in the memory row) and ii) row_address. Using the bank generation function 304, row_address can be divided into two parts: i) row_id (e.g., row_id in each bank) and ii) the conventional bank ID defined as variable A. The least significant bit (LSB) of row_id may be defined as variable B.
図4の例に示されているように、所与のビットシーケンス404について、シーケンス404のある部分における1つまたは複数のビットは、そのシーケンスの他の部分における1つまたは複数のビットと重複する場合がある。いくつかの実施態様では、入力変数は、要求内の最下位ビット(lsb)または要求内の最上位ビット(msb)に対応することができる。 As shown in the example in Figure 4, for a given bit sequence 404, one or more bits in one part of the sequence may overlap with one or more bits in other parts of the sequence. In some embodiments, the input variable may correspond to the least significant bit (LSB) or the most significant bit (MSB) in the request.
いくつかの実施態様では、バンク生成関数304は、少なくとも、第1の動作のセット412、第2の動作のセット414及び第3の動作のセット416を実行するように構成される。第1及び/または第2の動作のセットを使用して、row_address、row_id、A及びBなどの特定の入力変数を確立することができる。場合によっては、row_addressは、ビット4~15などの、シーケンス404内の特定のビットを抽出するために使用され、他方、row_idは、ビット8~15などの、特定の他のビットを抽出するために使用される。いくつかの実施態様では、これらの変数は、ビットの他の範囲または組み合わせを抽出するために使用され得る。 In some embodiments, the bank generation function 304 is configured to perform at least a first set of operations 412, a second set of operations 414, and a third set of operations 416. The first and/or second set of operations can be used to establish specific input variables such as row_address, row_id, A, and B. In some cases, row_address is used to extract specific bits within sequence 404, such as bits 4-15, while row_id is used to extract other specific bits, such as bits 8-15. In some embodiments, these variables may be used to extract other ranges or combinations of bits.
第3の動作(または動作のセット)416は、rotation_banking_shiftなどのシフトパラメータまたは演算に基づいてビットベクトルを回転させるために使用することができる。ビットベクトルは、バンク生成関数304を使用して実行される動作に基づいて、メモリ108にアクセスするための要求内のアドレスビットのシーケンスから導出され得る。ビットベクトルは、アドレスビットのシーケンス内のmsbまたはアドレスビットのシーケンス内のlsbから導出され得る。例えば、ビットベクトルは、変数Aと変数Bの組み合わせであり得、バンク生成関数304は、この変数の組み合わせに対してrotation_banking_shift演算を適用するように構成される。 A third operation (or set of operations) 416 can be used to rotate a bit vector based on a shift parameter or operation such as rotation_banking_shift. The bit vector can be derived from a sequence of address bits in a request to access memory 108, based on an operation performed using the bank generation function 304. The bit vector can be derived from the msb or lsb in the sequence of address bits. For example, the bit vector could be a combination of variables A and B, and the bank generation function 304 is configured to apply the rotation_banking_shift operation to this combination of variables.
rotation_banking_shift演算は、計算タイル101のメモリ内のバンク数を参照して適用することができる。例えば、rotation_banking_shift演算は、i)演算のシフト値によって指定された量だけmsbビットベクトルをシフトさせるか、またはii)演算のシフト値によって指定された量だけlsbビットベクトルをシフトさせるために使用することができる。システム100は、新しいバンクのバンクIDが特定のグループに属するようにシフト演算を実行する。したがって、第3の動作416により、バンク数、ならびに変数A及び/またはBに関連付けられた任意の行、バンク及びバイトの属性に従って回転後のバンクIDを得ることができる。 The rotation_banking_shift operation can be applied by referencing the number of banks in the memory of the computation tile 101. For example, the rotation_banking_shift operation can be used to either i) shift the MSB bit vector by the amount specified by the shift value of the operation, or ii) shift the LSB bit vector by the amount specified by the shift value of the operation. System 100 performs the shift operation so that the bank ID of the new bank belongs to a specific group. Thus, the third operation 416 can be used to obtain the number of banks, as well as the rotated bank ID according to the attributes of any row, bank, and byte associated with variables A and/or B.
いくつかの実施態様では、システム100は、msbまたはlsbを定義するための最小ビット数を決定する。例えば、システム100は、メモリ108の所与のパーティション内の物理メモリバンクの量に基づいて最小ビット数を決定することができる。例えば、32個の物理メモリバンクが存在する場合、システム100は、32個の数字または32個の行IDを表現するために最小ビット数5が必要であると決定することができる。 In some embodiments, system 100 determines the minimum number of bits required to define an MSB or LSB. For example, system 100 can determine the minimum number of bits based on the number of physical memory banks in a given partition of memory 108. For example, if there are 32 physical memory banks, system 100 can determine that a minimum of 5 bits is required to represent 32 digits or 32 row IDs.
いくつかの実施態様では、バンク生成関数304は、図4の例のアルゴリズム402で示されているように構成化またはコード化される。いくつかの他の実施態様では、メモリ108でバンク競合を引き起こすことなく、計算タイル101で同時に処理可能であるバンクIDのセットを生成するように、修正されたバンク生成関数を(代替コマンドを使用して)構成化またはコード化することができる。例えば、この修正されたバンク生成関数は、メモリ108と比較して、より多いか、またはより少ない物理メモリバンク、及びより多いか、またはより少ない行を含むタイルメモリについて構成化またはコード化することができる。 In some embodiments, the bank generation function 304 is configured or coded as shown in algorithm 402 in the example of Figure 4. In some other embodiments, a modified bank generation function can be configured or coded (using alternative commands) to generate a set of bank IDs that can be processed simultaneously on the computed tile 101 without causing bank contention in memory 108. For example, this modified bank generation function can be configured or coded for tile memory containing more or fewer physical memory banks and more or fewer rows compared to memory 108.
バンク生成関数304は、1つまたは複数の入力を受信し、1つまたは複数の出力を生成するアルゴリズムとすることができる。例えば、上述したように、入力は、1つまたは複数の行についての個々のアドレス(「row_address」)、各バンク内の行の数(「rows_per_bank」)、要求内の最下位ビット(lsb)、lsbの最小ビット量、要求内の最上位ビット(msb)、msbの最小ビット量、バンク回転パラメータ、またはシフトパラメータ(「msb_shift_minus_1」)とすることができる。出力は、メモリ108の物理メモリバンクの個々のバンクID、及びメモリ108の物理メモリバンク内の物理行の個々の行IDとすることができる。より多いか、またはより少ない入力は、本開示の範囲内であり、バンク生成関数304に関連して使用され得る。 The bank generation function 304 can be an algorithm that receives one or more inputs and generates one or more outputs. For example, as described above, the inputs may be individual addresses for one or more rows ("row_address"), the number of rows in each bank ("rows_per_bank"), the least significant bit in the request (LSB), the minimum bit amount of the LSB, the most significant bit in the request (MSB), the minimum bit amount of the MSB, a bank rotation parameter, or a shift parameter ("MSB_shift_minus_1"). The outputs may be individual bank IDs of the physical memory banks of memory 108, and individual row IDs of the physical rows within the physical memory banks of memory 108. More or fewer inputs are within the scope of this disclosure and may be used in connection with the bank generation function 304.
図5は、ハードウェアアクセラレータまたは専用のハードウェア集積回路のタイルメモリにおけるメモリバンク競合を低減するための例示的なプロセス500である。いくつかの実施態様では、プロセス500は、ハードウェアアクセラレータ上に実装されたニューラルネットワーク機械学習モデルについての計算中に実行される。例えば、計算は、専用のニューラルネットワークプロセッサを使用して、画像または音声発話などの、ニューラルネットワーク入力を処理するために実行される。このようなプロセッサは、図1Aを参照して説明した集積回路またはシステム100によって表され得る。 Figure 5 shows an exemplary process 500 for reducing memory bank contention in the tile memory of a hardware accelerator or a dedicated hardware integrated circuit. In some embodiments, process 500 is performed during computations on a neural network machine learning model implemented on a hardware accelerator. For example, computations are performed using a dedicated neural network processor to process neural network inputs, such as images or speech utterances. Such a processor may be represented by the integrated circuit or system 100 described with reference to Figure 1A.
例えば、ハードウェア集積回路は、複数のニューラルネットワーク層を含むCNNを実装するように構成することができる。場合によっては、ニューラルネットワーク層は、グループ畳み込み層を含むことができる。入力は、様々な他のタイプのデジタル画像または関連するグラフィカルデータを含む、上記で説明したような例示的な画像であり得る。少なくとも1つの例では、集積回路は、発話または他のオーディオコンテンツから導出された入力を処理するためのRNNを実装することができる。場合によっては、プロセス500は、他のデータ処理技術と比較して、画像または音声処理出力を生成するためにニューラルネットワーク計算を加速するときのレイテンシ及びスループットの改善を実現可能にする技術の一部である。 For example, a hardware integrated circuit can be configured to implement a CNN containing multiple neural network layers. In some cases, the neural network layers may include group convolutional layers. The input may be an exemplary image, such as those described above, including various other types of digital images or associated graphical data. In at least one example, the integrated circuit can implement an RNN for processing input derived from speech or other audio content. In some cases, process 500 is part of a technique that enables improvements in latency and throughput when accelerating neural network computations to generate image or audio processing output compared to other data processing techniques.
プロセス500は、上記で説明したシステム100を使用して実装または実行することができる。したがって、プロセス500の説明は、システム100の前述したコンピューティングリソースを参照する場合がある。いくつかの例では、プロセス500のステップまたはアクションは、プログラムされたファームウェア命令、ソフトウェア命令、またはその両方によって可能となる。各タイプの命令は、非一時的な機械可読記憶デバイス内に格納されてもよく、本文書で説明されるデバイス及びリソースの1つまたは複数のプロセッサによって実行可能である。 Process 500 can be implemented or executed using the system 100 described above. Therefore, the description of process 500 may refer to the aforementioned computing resources of system 100. In some examples, the steps or actions of process 500 are enabled by programmed firmware instructions, software instructions, or both. Each type of instruction may be stored in a non-temporary machine-readable storage device and is executable by one or more processors of the devices and resources described in this document.
いくつかの実施態様では、プロセス500のステップは、ニューラルネットワーク層の層出力を生成するためにハードウェア回路で実行される。出力は、画像処理または画像認識出力を生成するための機械学習タスクまたは推論ワークロードについての計算の一部とすることができる。上で示したように、集積回路は、様々なタイプのデータ処理出力を生成するための計算を加速するように構成された、専用のニューラルネットワークプロセッサまたはハードウェア機械学習アクセラレータとすることができる。 In some embodiments, the steps of process 500 are performed by hardware circuitry to generate layer outputs for the neural network layer. These outputs can be part of a computation for a machine learning task or inference workload to generate image processing or image recognition outputs. As shown above, the integrated circuit can be a dedicated neural network processor or hardware machine learning accelerator configured to accelerate computations for generating various types of data processing outputs.
再度プロセス500を参照すると、システム100は、システムのメモリリソースにアクセスするための複数の要求を受信する(502)。例えば、複数の要求の各要求を使用して、集積回路またはハードウェアアクセラレータの第1のタイルメモリにアクセスすることができる。いくつかの実施態様では、システム100は、複数のタイルにわたる複数の要求を処理する。例えば、システム100は、集積回路の各計算タイル101で要求の個々のサブセットを処理することができる。 Referring again to process 500, system 100 receives multiple requests to access the system's memory resources (502). For example, each of the multiple requests can be used to access the first tile memory of an integrated circuit or hardware accelerator. In some embodiments, system 100 processes multiple requests across multiple tiles. For example, system 100 can process individual subsets of requests at each compute tile 101 of an integrated circuit.
各要求について、システム100は、ビットのシーケンスによって表された個々の論理アドレスを要求内で識別することができる(504)。上記で説明したように、メモリ108は、行アドレス指定可能とすることができ、その結果、対応する要求内のアドレスに基づいて、メモリバンクの行を識別するか、またはその行にアクセスすることができる。一般に、各要求は、対応する物理アドレスにマッピング可能である論理アドレスを指定する。例えば、システム100のコンパイラは、論理アドレスのセットの、対応する物理アドレスのセットへのマッピングを決定することができ、ここで物理アドレスは、第1のメモリ108内のバンクの位置、または第1のメモリ108内のバンク内の行の位置などの、メモリ内の物理的位置を指定する。 For each request, system 100 can identify individual logical addresses represented by a sequence of bits within the request (504). As described above, memory 108 can be row-addressable, and as a result, a row in a memory bank can be identified or accessed based on the address in the corresponding request. Generally, each request specifies a logical address that can be mapped to a corresponding physical address. For example, the compiler of system 100 can determine the mapping of a set of logical addresses to a set of corresponding physical addresses, where the physical address specifies a physical location in memory, such as the location in a bank in the first memory 108, or the location in a row within a bank in the first memory 108.
各要求について、システム100は、ビットのシーケンスから第1のビットのサブセットを取得することができる(506)。例えば、論理アドレスは、ビットのシーケンス、例えば、8ビット、16ビットなどを含むデータ構造によって指定することができる。いくつかの実施態様では、計算タイル101のコントローラ103は、要求によって指定された論理アドレスを表す各データ構造をスキャンする。データ構造を形成するビットをスキャンすることに応答して、コントローラは、バンク生成関数への入力として使用可能であるビットのサブセットを識別または決定する。いくつかの実施態様では、コントローラは、タイルメモリ108の構成に基づいてビットのサブセットを決定する。 For each request, system 100 can obtain a first subset of bits from a sequence of bits (506). For example, a logical address can be specified by a data structure containing a sequence of bits, e.g., 8 bits, 16 bits, etc. In some embodiments, the controller 103 of the computed tile 101 scans each data structure representing the logical address specified by the request. In response to scanning the bits that make up the data structure, the controller identifies or determines a subset of bits that can be used as input to the bank generation function. In some embodiments, the controller determines the subset of bits based on the configuration of the tile memory 108.
各要求について、システム100は、第1のビットのサブセットを使用するバンク生成関数304に基づいて個々のバンク識別子(「バンクID」)を生成することができる(508)。各個々のバンクIDは、メモリ108の複数の物理メモリバンクの中の特定の物理バンクを識別する。上記で説明したように、各物理メモリバンクは複数の行を含むことができる。各要求について、計算タイル101は、i)ビットのシーケンスから第2のビットのサブセットを取得し、ii)第2のビットのサブセットをバンク生成関数への入力として提供し、iii)バンク生成関数が第2のビットのサブセットに適用されていることに基づいて、タイルメモリの物理メモリバンクの中の特定のバンク内の特定の行を識別する個々の行IDを生成することができる。 For each request, system 100 can generate individual bank identifiers ("bank IDs") based on a bank generation function 304 using a subset of the first bits (508). Each individual bank ID identifies a specific physical bank among the multiple physical memory banks of memory 108. As described above, each physical memory bank may contain multiple rows. For each request, computation tile 101 can i) obtain a subset of the second bits from a sequence of bits, ii) provide the subset of the second bits as input to the bank generation function, and iii) generate individual row IDs that identify a specific row within a specific bank among the physical memory banks of the tile memory, based on the bank generation function being applied to the subset of the second bits.
システム100は、要求について生成された個々のバンクIDを使用して各要求を処理するように構成される(510)。いくつかの実施態様では、計算タイル101は、複数の要求を(例えば、同時に)処理し、要求を処理することに応答して、バンク競合を発生させることなく2つ以上の物理メモリバンクに並列にアクセスする(512)。例えば、計算タイル101のコントローラ103は、第1のメモリ108のアドレス位置から入力ベクトル102を検索するためにメモリ108の物理バンクまたは行にアクセスするための制御信号を生成する。 The system 100 is configured to process each request using individual bank IDs generated for each request (510). In some embodiments, the compute tile 101 processes multiple requests (e.g., simultaneously) and, in response to processing requests, accesses two or more physical memory banks in parallel without causing bank contention (512). For example, the controller 103 of the compute tile 101 generates a control signal to access a physical bank or row of memory 108 to retrieve an input vector 102 from an address location in the first memory 108.
いくつかの実施態様では、計算タイル101は、1つまたは複数の入力ベクトルを検索するための要求のそれぞれを処理することに応答して、単一のクロックサイクル中にタイルメモリの複数の別個の物理メモリバンクに同時にアクセスすることができる。入力ベクトル102は、画像の入力特徴マップに対応することができ、前のニューラルネットワーク層によって生成された活性化などの、ニューラルネットワーク入力の行列構造であり得る。 In some embodiments, the computational tile 101 can simultaneously access multiple separate physical memory banks of the tile memory during a single clock cycle in response to processing each of the requests to retrieve one or more input vectors. The input vector 102 can correspond to an input feature map of an image and may be a matrix structure of neural network inputs, such as activations generated by previous neural network layers.
上述したように、バンク生成関数304は、計算タイル101にメモリ108の異なる物理メモリバンクにアクセスさせるアクセスパターンに基づいて、2つ以上の要求を処理することを可能にする。バンク生成関数304は、メモリアクセスに使用されるストライド値に関係なく、このアクセスパターンを可能にするバンクID及び行IDを生成するように構成される。 As described above, the bank generation function 304 enables the processing of two or more requests based on access patterns that cause the compute tile 101 to access different physical memory banks of memory 108. The bank generation function 304 is configured to generate bank IDs and row IDs that enable these access patterns, regardless of the stride value used for memory access.
とりわけ、バンク生成関数は、メモリアクセスのストライドが同一の物理メモリバンクの特定の行の間の差に等しいときにも、このアクセスパターンを提供することができる。例えば、物理メモリバンクの各行は、16バイトの幅を有することができ、タイルメモリのパーティションは、32個の物理メモリバンクを有することができる。この例では、バンク生成関数は、メモリアクセスストライドがrow_width*num_banks(すなわち、ストライド=512)に等しいときにも、このアクセスパターンを提供することができる。 In particular, the bank generation function can provide this access pattern even when the stride of a memory access is equal to the difference between specific rows in the same physical memory bank. For example, each row in a physical memory bank may have a width of 16 bytes, and a partition of tiled memory may have 32 physical memory banks. In this example, the bank generation function can also provide this access pattern even when the memory access stride is equal to row_width * num_banks (i.e., stride = 512).
図6は、入力テンソル604、パラメータテンソル606の変形、及び出力テンソル608を含むテンソルまたは多次元行列600の例を示す。図6の例では、テンソル600のそれぞれは、個々の要素を含み、ここで各要素は、ニューラルネットワークの所与の層で実行される計算のための個々のデータ値(またはオペランド)に対応することができる。 Figure 6 shows an example of a tensor or multidimensional matrix 600, including an input tensor 604, a variation of the parameter tensor 606, and an output tensor 608. In the example in Figure 6, each of the tensors 600 contains individual elements, where each element can correspond to an individual data value (or operand) for a computation performed in a given layer of the neural network.
例えば、入力テンソル604の各入力は、入力テンソル604の所与の次元に沿った個々の要素に対応することができ、パラメータテンソル606の各重みは、パラメータテンソル606の所与の次元に沿った個々の要素に対応することができ、出力のセット内の各出力値または活性化は、出力テンソル608の所与の次元に沿った個々の要素に対応することができる。関連して、各要素は、所与のテンソル604、606、608の1つまたは複数の次元上で動作するように割り当てられる計算タイル101のメモリ内の個々のメモリ位置またはアドレスに対応することができる。 For example, each input of the input tensor 604 can correspond to an individual element along a given dimension of the input tensor 604, each weight of the parameter tensor 606 can correspond to an individual element along a given dimension of the parameter tensor 606, and each output value or activation in the set of outputs can correspond to an individual element along a given dimension of the output tensor 608. In connection with this, each element can correspond to an individual memory location or address in the memory of the computation tile 101, which is allocated to operate on one or more dimensions of the given tensors 604, 606, and 608.
所与のニューラルネットワーク層で実行された計算は、出力活性化を含み得る層出力を得るために、1つまたは複数のプロセッサクロックサイクルで、入力/活性化テンソル604とパラメータ/重みテンソル606とを乗算することを含むことができる。活性化テンソル604と重みテンソル606を乗算することは、1つまたは複数の部分和を得るためにテンソル604の要素からの活性化とテンソル606の要素からの重みとを乗算することを含む。図6の例示的なテンソル606は、未修正パラメータテンソル、修正パラメータテンソル、またはそれらの組み合わせとすることができる。いくつかの実施態様では、各パラメータテンソル606は、特定のスパース性活用技術に基づいて導出される非ゼロのCSP値を含む、修正パラメータテンソルに対応する。 The computation performed on a given neural network layer may include multiplying the input/activation tensor 604 and the parameter/weight tensor 606 in one or more processor clock cycles to obtain a layer output that may include output activations. Multiplying the activation tensor 604 and the weight tensor 606 involves multiplying the activations from the elements of tensor 604 by the weights from the elements of tensor 606 to obtain one or more partial sums. The exemplary tensor 606 in Figure 6 can be an unmodified parameter tensor, a modified parameter tensor, or a combination thereof. In some embodiments, each parameter tensor 606 corresponds to a modified parameter tensor containing non-zero CSP values derived based on a specific sparsity exploitation technique.
システム100のプロセッサコアは、i)ある多次元テンソル604、606内の離散要素に対応するスカラー、ii)ある多次元テンソル604、606の同一のもしくは異なる次元に沿った複数の離散要素609を含む値のベクトル(例えば、入力ベクトル102)、またはiii)これらの組み合わせに対して動作することができる。ある多次元テンソルにおける、離散要素609、または複数の離散要素609のそれぞれは、テンソルの次元性に応じて、X、Y座標(2D)を使用して、またはX、Y、Z座標(3D)を使用して表すことができる。 The processor core of system 100 can operate on i) scalars corresponding to discrete elements in a multidimensional tensor 604, 606, ii) a vector of values containing multiple discrete elements 609 along the same or different dimensions of a multidimensional tensor 604, 606 (e.g., input vector 102), or iii) a combination of these. Each of the discrete elements 609, or multiple discrete elements 609, in a multidimensional tensor can be represented using X,Y coordinates (2D) or X,Y,Z coordinates (3D), depending on the dimensionality of the tensor.
システム100は、バッチ入力と対応する重み値との乗算から生成された積に対応する複数の部分和を計算することができる。上記のように、システム100は、多くのクロックサイクルにわたって積(例えば、部分和)の累算を実行することができる。例えば、積の累算は、本文書で説明される技術に基づいて、1つまたは複数の計算タイルのランダムアクセスメモリ、共有メモリ、またはスクラッチパッドメモリ内で実行することができる。いくつかの実施態様では、入力重み乗算は、入力テンソル604の行またはスライスなどの、入力ベクトル102の離散入力と各重み要素とを乗算した積和として書き込まれ得る。この行またはスライスは、入力テンソル604の第1の次元610、または入力テンソル604の第2の異なる次元615などの、所与の次元を表すことができる。 System 100 can compute multiple partial sums corresponding to the product generated from the multiplication of batch inputs with their corresponding weight values. As described above, System 100 can perform the accumulation of products (e.g., partial sums) over many clock cycles. For example, the accumulation of products can be performed in random-access memory, shared memory, or scratchpad memory of one or more computation tiles based on the techniques described in this document. In some embodiments, the input weight multiplication can be written as a sum of products obtained by multiplying the discrete inputs of the input vector 102 by each weight element, such as a row or slice of the input tensor 604. This row or slice can represent a given dimension, such as a first dimension 610 of the input tensor 604, or a second different dimension 615 of the input tensor 604.
いくつかの実施態様では、例示的な計算のセットを使用して、畳み込みニューラルネットワーク層の出力を計算することができる。CNN層の計算は、3D入力テンソル604と少なくとも1つの3Dフィルタ(重みテンソル606)との間で2D空間畳み込みを実行することを含むことができる。例えば、1つの3Dフィルタ606を3D入力テンソル604上に畳み込むことで、2D空間平面620または625を得ることができる。この計算は、入力ベクトル102を含む入力ボリュームの特定の次元についてのドット積の総和を計算することを含むことができる。 In some embodiments, the output of a convolutional neural network layer can be computed using an exemplary set of calculations. The computation of the CNN layer may include performing a 2D spatial convolution between a 3D input tensor 604 and at least one 3D filter (weight tensor 606). For example, a 2D spatial plane 620 or 625 can be obtained by convolving one 3D filter 606 onto the 3D input tensor 604. This computation may include calculating the sum of dot products over a specific dimension of the input volume containing the input vector 102.
例えば、空間平面620は、次元610に沿った入力から計算された積の総和の出力値を含むことができ、他方、空間平面625は、次元615に沿った入力から計算された積の総和の出力値を含むことができる。空間平面620及び625のそれぞれにおける出力値の積の総和を生成するための計算は、i)計算セル114a/b/cで、ii)メモリ110の共有バンクに結合された算術演算器を使用してメモリ110で直接、iii)またはその両方で実行することができる。いくつかの実施態様では、累算値の削減のための様々な技術を使用して、削減動作を合理化し、メモリ110のメモリセル(または位置)で直接実行してもよい。 For example, spatial plane 620 may contain the output value of the sum of products calculated from inputs along dimension 610, while spatial plane 625 may contain the output value of the sum of products calculated from inputs along dimension 615. The calculation to generate the sum of products of the output values in spatial planes 620 and 625 can be performed i) in calculation cells 114a/b/c, ii) directly in memory 110 using arithmetic units coupled to a shared bank of memory 110, iii) or both. In some embodiments, the reduction operation may be streamlined and performed directly in memory cells (or locations) of memory 110 using various techniques for reducing the cumulative value.
本明細書で説明される主題及び機能動作の実施形態は、デジタル電子回路で、有形に具現化されたコンピュータソフトウェアもしくはファームウェアで、本明細書で開示される構造及びその構造的同等物を含むコンピュータハードウェアで、またはそれらの1つもしくは複数の組み合わせで実装することができる。本明細書で説明される主題の実施形態は、1つまたは複数のコンピュータプログラム、すなわち、データ処理装置による実行のために、またはデータ処理装置の動作を制御するために、有形の非一時的なプログラムキャリア上に符号化されたコンピュータプログラム命令の1つまたは複数のモジュールとして実装することができる。 The subject matter and functional embodiments described herein can be implemented in digital electronic circuits, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed herein and their structural equivalents, or in one or more combinations thereof. Embodiments of the subject matter described herein can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-temporary program carrier for execution by a data processing device or for controlling the operation of a data processing device.
代替的に、または追加的に、プログラム命令は、データ処理装置による実行のために適切な受信装置に伝送するための情報を符号化するために生成される、人工的に生成された伝播信号、例えば機械的に生成された電気信号、光信号または電磁信号に符号化することができる。コンピュータ記憶媒体は、機械可読記憶デバイス、機械可読記憶基盤、ランダムもしくはシリアルアクセスメモリデバイス、またはそれらの1つもしくは複数の組み合わせとすることができる。 Alternatively, or additionally, program instructions can be encoded into artificially generated propagating signals, such as mechanically generated electrical signals, optical signals, or electromagnetic signals, which are generated to encode information for transmission to a suitable receiving device for execution by a data processing device. Computer storage media can be machine-readable storage devices, machine-readable storage substrates, random or serial access memory devices, or a combination of one or more of these.
「コンピューティングシステム」という用語は、例として、プログラマブルプロセッサ、コンピュータ、または複数のプロセッサもしくはコンピュータを含む、データを処理するためのあらゆる種類の装置、デバイス、及び機械を包含する。装置は、専用論理回路、例えば、FPGA(フィールドプログラマブルゲートアレイ)またはASIC(特定用途向け集積回路)を含むことができる。装置はまた、ハードウェアに加えて、対象のコンピュータプログラムのための実行環境を構築するコード、例えば、プロセッサファームウェア、プロトコルスタック、データベース管理システム、オペレーティングシステム、またはそれらの1つもしくは複数の組み合わせを構成するコードを含むことができる。 The term "computing system" encompasses all kinds of devices, machines, and equipment for processing data, including, for example, programmable processors, computers, or multiple processors or computers. A device may include dedicated logic circuits, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits). In addition to hardware, a device may also include code that constitutes the execution environment for the target computer program, such as processor firmware, protocol stacks, database management systems, operating systems, or one or more of these.
コンピュータプログラム(プログラム、ソフトウェア、ソフトウェアアプリケーション、モジュール、ソフトウェアモジュール、スクリプト、またはコードと呼ばれるか、または記載される場合もある)は、コンパイル型言語もしくはインタプリタ型言語、または宣言型言語もしくは手続き型言語を含む、任意の形態のプログラミング言語で書くことができ、独立型プログラムとして、またはモジュール、コンポーネント、サブルーチン、もしくはコンピューティング環境での使用に適した他のユニットとしてなど、任意の形態でデプロイすることができる。 Computer programs (sometimes called, or written as, programs, software, software applications, modules, software modules, scripts, or code) can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and can be deployed in any form, such as as standalone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
コンピュータプログラムは、ファイルシステム内のファイルに対応してもよいが、必ずしもその必要はない。プログラムは、他のプログラムもしくはデータ、例えば、マークアップ言語の文書に格納された1つもしくは複数のスクリプトを保持するファイルの一部に、対象のプログラム専用の単一のファイルに、または、複数の協調ファイル、例えば、1つもしくは複数のモジュール、サブプログラムもしくはコードの一部を格納するファイルに格納することができる。コンピュータプログラムは、1つのコンピュータ上で、または1つの場所に位置するかもしくは複数の場所にわたって分散され、通信ネットワークによって相互接続される複数のコンピュータ上で実行されるようにデプロイすることができる。 Computer programs may, but do not necessarily, correspond to files in a file system. A program can be stored in a single file dedicated to the program itself, or in multiple collaborative files, such as a file containing one or more scripts stored within a markup language document, or in a file containing one or more modules, subprograms, or parts of code, alongside other programs or data. Computer programs can be deployed to run on a single computer, or on multiple computers located in one location or distributed across multiple locations and interconnected by a communication network.
本明細書で説明されるプロセス及び論理フローは、1つまたは複数のプログラマブルコンピュータが1つまたは複数のコンピュータプログラムを実行して入力データに作用し、出力を生成することにより機能を実行することによって実行することができる。プロセス及び論理フローはまた、専用論理回路、例えば、FPGA(フィールドプログラマブルゲートアレイ)、またはASIC(特定用途向け集積回路)、またはGPGPU(汎用グラフィックス処理装置)によって実行することができ、装置はまた、それら専用論理回路として実装することができる。 The processes and logic flows described herein can be executed by one or more programmable computers executing one or more computer programs to act on input data and generate outputs, thereby performing their functions. The processes and logic flows can also be executed by dedicated logic circuits, such as FPGAs (Field-Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), or GPGPUs (General-Purpose Graphics Units), and the devices can also be implemented as these dedicated logic circuits.
コンピュータプログラムの実行に適したコンピュータは、汎用もしくは専用のマイクロプロセッサもしくはその両方、またはいずれかの他の種類の中央処理装置を含み、例として、それらに基づくことができる。一般に、中央処理装置は、読み出し専用メモリまたはランダムアクセスメモリ、あるいはその両方から命令及びデータを受信する。コンピュータの要素には、命令を実施または実行するための中央処理装置、ならびに命令及びデータを格納するための1つまたは複数のメモリデバイスがある。一般に、コンピュータはまた、データを格納するための1つまたは複数の大容量記憶デバイス、例えば磁気ディスク、光磁気ディスク、もしくは光ディスクを含むか、または、それらからデータを受信するもしくはそれらにデータを送信する、あるいはその両方のために動作可能に結合される。しかし、コンピュータがそのようなデバイスを有している必要はない。さらに、例をいくつか挙げるならば、コンピュータは、他のデバイス、例えば携帯電話、パーソナルデジタルアシスタント(PDA)、携帯オーディオまたはビデオプレーヤー、ゲームコンソール、全地球測位システム(GPS)受信機、またはポータブルストレージデバイス、例えばユニバーサルシリアルバス(USB)フラッシュドライブに組み込むことができる。 A computer suitable for running computer programs includes, for example, a general-purpose or dedicated microprocessor, or both, or any other type of central processing unit, and can be based on them. Generally, the central processing unit receives instructions and data from read-only memory or random-access memory, or both. The elements of a computer include a central processing unit for executing or running instructions, and one or more memory devices for storing instructions and data. Generally, a computer also includes one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or is operablely coupled for receiving data from or transmitting data to them, or both. However, a computer is not required to have such devices. Furthermore, to give some examples, a computer can be incorporated into other devices, such as mobile phones, personal digital assistants (PDAs), portable audio or video players, game consoles, Global Positioning System (GPS) receivers, or portable storage devices, such as Universal Serial Bus (USB) flash drives.
コンピュータプログラム命令及びデータを格納するのに適したコンピュータ可読媒体は、例として、半導体メモリデバイス、例えば、EPROM、EEPROM及びフラッシュメモリデバイス、磁気ディスク、例えば、内蔵ハードディスクまたはリムーバブルディスク、光磁気ディスク、ならびにCD ROM及びDVD-ROMディスクなどの、あらゆる形態の不揮発性メモリ、媒体及びメモリデバイスを含む。プロセッサ及びメモリは、専用論理回路によって補完されるか、または専用論理回路に内蔵される可能性がある。 Computer-readable media suitable for storing computer program instructions and data include, for example, all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be complemented by or integrated into dedicated logic circuits.
ユーザとのインタラクションを提供するために、本明細書で説明される主題の実施形態は、ユーザに情報を表示するためのディスプレイデバイス、例えばLCD(液晶画面)モニタ、及びユーザがコンピュータへの入力を提供することを可能にするキーボード及びポインティングデバイス、例えばマウスまたはトラックボールを有するコンピュータに実装することができる。他の種類のデバイスもまた、ユーザとのインタラクションを提供するために使用することができる。例えば、ユーザに提供されるフィードバックは、あらゆる形式の感覚的フィードバック、例えば視覚フィードバック、聴覚フィードバック、または触覚フィードバックとすることができ、ユーザからの入力は、音響入力、音声入力、または触覚入力など、あらゆる形式で受信することができる。加えて、コンピュータは、ユーザによって使用されるデバイスにドキュメントを送受信することによって、例えば、ウェブブラウザから受信した要求に応答してユーザのクライアントデバイス上のウェブブラウザにウェブページを送信することによって、ユーザとインタラクトすることができる。 To provide user interaction, embodiments of the subject matter described herein can be implemented in a computer having a display device for displaying information to the user, such as an LCD (liquid crystal display) monitor, and a keyboard and pointing device, such as a mouse or trackball, that allows the user to provide input to the computer. Other types of devices can also be used to provide user interaction. For example, the feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, such as acoustic input, voice input, or tactile input. In addition, the computer can interact with the user by sending and receiving documents to and from devices used by the user, for example, by sending a web page to a web browser on the user's client device in response to a request received from a web browser.
本明細書で説明される主題の実施形態は、例えばデータサーバとしてのバックエンドコンポーネントを含むコンピューティングシステム、またはミドルウェアコンポーネント、例えばアプリケーションサーバを含むコンピューティングシステム、またはフロントエンドコンポーネント、例えば本明細書で説明される主題の実施態様とユーザがインタラクトすることを可能にするためのグラフィカルユーザインターフェースもしくはウェブブラウザを有するクライアントコンピュータを含むコンピューティングシステム、または1つもしくは複数のそのようなバックエンド、ミドルウェア、もしくはフロントエンドコンポーネントの任意の組み合わせで実装することができる。システムの構成要素は、デジタルデータ通信の任意の形態または媒体、例えば、通信ネットワークによって相互接続することができる。通信ネットワークの例は、ローカルエリアネットワーク(「LAN」)、及び広域ネットワーク(「WAN」)、例えば、インターネットを含む。 Embodiments of the subject matter described herein can be implemented as a computing system including, for example, a backend component as a data server, or a computing system including a middleware component, for example, an application server, or a computing system including a frontend component, for example, a client computer having a graphical user interface or a web browser to enable a user to interact with the embodiment of the subject matter described herein, or in any combination of one or more such backend, middleware, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication, for example, a communication network. Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), for example, the Internet.
コンピューティングシステムは、クライアント及びサーバを含むことができる。クライアントとサーバは、一般に互いに離れており、通常、通信ネットワークを介して相互作用する。クライアントとサーバの関係は、個々のコンピュータ上で動作し、互いにクライアントとサーバの関係を有するコンピュータプログラムによって生じる。 A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via a communication network. The client-server relationship arises from computer programs running on individual computers that have a client-server relationship with one another.
本明細書には多くの具体的な実施態様の詳細が含まれているが、これらはいずれかの発明の範囲または特許請求され得るものの範囲の制限として解釈されるべきではなく、むしろ、特定の発明の特定の実施形態に特有であり得る特徴の説明として解釈されるべきである。本明細書において個別の実施形態の文脈で説明された特定の特徴はまた、単一の実施形態において組み合わせて実装することもできる。逆に、単一の実施形態の文脈で説明された様々な特徴は、別々に、または任意の好適な副次的組み合わせで、複数の実施形態において実装することもできる。さらに、特徴が特定の組み合わせにおいて機能すると上記で説明される場合があり、当初はそのように特許請求される場合もあるが、特許請求された組み合わせからの1つまたは複数の特徴が、場合によっては組み合わせから削除される場合があり、特許請求された組み合わせが、副次的組み合わせまたは副次的組み合わせの変形を対象とする場合がある。 This specification includes details of many specific embodiments, but these should not be interpreted as limitations on the scope of any invention or claim, but rather as descriptions of features that may be specific to a particular embodiment of a particular invention. Certain features described in this specification in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments, separately or in any preferred secondary combination. Furthermore, features may be described above as functioning in a particular combination, and may initially be claimed as such; however, one or more features from the claimed combination may, in some cases, be removed from the combination, and the claimed combination may cover secondary combinations or variations of secondary combinations.
同様に、動作は、特定の順序で図面に示されるが、これは、望ましい結果を達成するために、そのような動作が図示された特定の順序でもしくは連続的な順序で実行されること、または例示した全ての動作が実行されることを必要とするものと理解されるべきではない。特定の状況では、マルチタスク及び並列処理が有利であり得る。さらに、上記で説明した実施形態における様々なシステムモジュール及びコンポーネントの分離は、全ての実施形態でのそのような分離を要求しているものと理解されるべきではなく、記載のプログラムコンポーネント及びシステムは、一般に、単一のソフトウェア製品に一体化され得る、または複数のソフトウェア製品にパッケージ化され得ると理解されるべきである。 Similarly, while operations are shown in a specific order in the drawings, this should not be understood as requiring that such operations be performed in a specific illustrated or sequential order, or that all illustrated operations be performed, in order to achieve the desired result. In certain situations, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and the described program components and systems should generally be understood as being able to be integrated into a single software product or packaged into multiple software products.
主題の特定の実施形態が説明されてきた。他の実施形態は、以下の特許請求の範囲内である。例えば、特許請求の範囲に記載されたアクションを異なる順序で実行しても、依然として望ましい結果を達成することができる。一例として、添付の図に示されたプロセスは、望ましい結果を達成するために、示された特定の順序、または連続的な順序を必ずしも必要としない。特定の実施態様では、マルチタスク及び並列処理が有利であり得る。 Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the desired results can still be achieved even if the actions described in the claims are performed in a different order. As an example, the process shown in the accompanying figures does not necessarily require the specific or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.
Claims (10)
前記ハードウェアアクセラレータのタイルメモリにアクセスするためにそれぞれが使用される複数の要求を受信することと、
前記複数の要求のそれぞれについて、
前記要求内で、ビットのシーケンスによって表された個々の論理アドレスを識別することと、
前記ビットのシーケンスから第1のビットのサブセットを取得することと、
前記第1のビットのサブセットを使用するバンク生成関数に基づいて、前記タイルメモリの複数の物理メモリバンクの中から特定のバンクを識別する個々のバンク識別子を生成することとを含み、前記方法は、さらに、
前記要求について生成された前記個々のバンク識別子を使用して前記複数の要求のそれぞれを処理することと、
前記複数の要求のそれぞれを処理することに応答して、クロックサイクル中に前記タイルメモリの複数の別個の物理メモリバンクに同時にアクセスすることと、を含む、方法。 A method performed by a computer for simultaneously accessing the memory banks of a hardware accelerator,
The system receives multiple requests, each used to access the tile memory of the aforementioned hardware accelerator.
For each of the aforementioned multiple requirements,
Within the aforementioned request, the individual logical addresses represented by a sequence of bits are identified,
Obtaining a subset of the first bit from the sequence of bits,
The method further includes generating individual bank identifiers that identify a particular bank from among a plurality of physical memory banks of the tile memory, based on a bank generation function that uses a subset of the first bits, and the method further includes
Processing each of the multiple requests using the individual bank identifiers generated for the aforementioned requests,
A method comprising simultaneously accessing a plurality of separate physical memory banks of the tile memory during a clock cycle in response to processing each of the plurality of requests.
特定のストライド値について、単一のクロックサイクル中に前記複数の別個の物理メモリバンクにアクセスすることを含む、請求項1に記載の方法。 Simultaneous access to the aforementioned multiple separate physical memory banks is
The method according to claim 1, comprising accessing the plurality of separate physical memory banks during a single clock cycle for a specific stride value.
バンク競合無しに前記複数の別個の物理メモリバンクにアクセスすることを含む、請求項3に記載の方法。 Simultaneous access to the aforementioned multiple separate physical memory banks is
The method according to claim 3, comprising accessing the plurality of separate physical memory banks without bank contention.
前記複数の要求のそれぞれについて、
前記ビットのシーケンスから第2のビットのサブセットを取得することと、
前記第2のビットのサブセットを前記バンク生成関数への入力として提供することと、
前記バンク生成関数が前記第2のビットのサブセットに適用されていることに基づいて、前記タイルメモリの前記複数の物理メモリバンクの中から前記特定のバンク内の特定の行を識別する個々の行識別子を生成することと、を含む、請求項5に記載の方法。 Each physical memory bank includes multiple rows, and the method further includes,
For each of the aforementioned multiple requirements,
Obtaining a subset of the second bit from the sequence of bits,
The above-mentioned subset of the second bits is provided as input to the bank generation function,
The method according to claim 5, comprising generating individual row identifiers that identify a specific row in a specific bank from among the plurality of physical memory banks of the tile memory, based on the bank generation function being applied to a subset of the second bits.
前記タイルメモリのパーティションは、32個の物理メモリバンクを含み、
前記メモリアクセスストライドは、row_width*num_banksに等しい、請求項6に記載の方法。 Each of the aforementioned rows has a width of 16 bytes,
The partition of the tile memory includes 32 physical memory banks,
The method according to claim 6, wherein the memory access stride is equal to row_width * num_banks.
前記ビットのシーケンス内の最下位ビット(LSB)の中にある2つ以上のビットを取得することを含む、請求項1に記載の方法。 Obtaining a subset of the first bits from the sequence of bits is:
The method according to claim 1, comprising obtaining two or more bits in the least significant bit (LSB) of the sequence of bits.
ハードウェアアクセラレータと、
処理デバイスと、
命令を格納するための非一時的な機械可読記憶媒体と、を含み、前記命令は、前記処理デバイスに請求項1~8のいずれか1項に記載された方法を実行させるように実行可能である、システム。 It is a system,
Hardware accelerators and
Processing device and
A system comprising a non-temporary machine-readable storage medium for storing instructions, wherein the instructions are executable to cause the processing device to perform the method described in any one of claims 1 to 8 .
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2022/076500 WO2024058810A1 (en) | 2022-09-15 | 2022-09-15 | Reducing memory bank conflicts in a hardware accelerator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2025530341A JP2025530341A (en) | 2025-09-11 |
| JP7837470B2 true JP7837470B2 (en) | 2026-03-30 |
Family
ID=83598555
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2025515430A Active JP7837470B2 (en) | 2022-09-15 | 2022-09-15 | Reducing memory bank contention in hardware accelerators |
Country Status (6)
| Country | Link |
|---|---|
| EP (1) | EP4569411A1 (en) |
| JP (1) | JP7837470B2 (en) |
| KR (1) | KR20250050063A (en) |
| CN (1) | CN119816819A (en) |
| TW (2) | TWI864897B (en) |
| WO (1) | WO2024058810A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025244642A1 (en) * | 2024-05-23 | 2025-11-27 | Intel Corporation | Multifunctional memory in neural network accelerator |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004258966A (en) | 2003-02-26 | 2004-09-16 | Sony Corp | Memory control device and method, image data processing device, recording medium, and program |
| JP2011077947A (en) | 2009-09-30 | 2011-04-14 | Fujitsu Ltd | Turbo decoding device and communication device |
| JP2020166861A (en) | 2019-03-28 | 2020-10-08 | インフィニオン テクノロジーズ アクチエンゲゼルシャフトInfineon Technologies AG | Access to memory configured to store image data cubes |
Family Cites Families (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6643765B1 (en) * | 1995-08-16 | 2003-11-04 | Microunity Systems Engineering, Inc. | Programmable processor with group floating point operations |
| US7398362B1 (en) * | 2005-12-09 | 2008-07-08 | Advanced Micro Devices, Inc. | Programmable interleaving in multiple-bank memories |
| WO2013071183A1 (en) * | 2011-11-11 | 2013-05-16 | Tabula, Inc. | Content addressable memory in integrated circuit |
| TWI549056B (en) * | 2011-12-08 | 2016-09-11 | 微軟技術授權有限責任公司 | Application compatibility with library operating systems |
| KR102202575B1 (en) * | 2013-12-31 | 2021-01-13 | 삼성전자주식회사 | Memory management method and apparatus |
| US11222260B2 (en) * | 2017-03-22 | 2022-01-11 | Micron Technology, Inc. | Apparatuses and methods for operating neural networks |
| US20200202198A1 (en) * | 2018-12-21 | 2020-06-25 | Waymo Llc | Neural network processor |
| US11037050B2 (en) * | 2019-06-29 | 2021-06-15 | Intel Corporation | Apparatuses, methods, and systems for memory interface circuit arbitration in a configurable spatial accelerator |
| JP7525597B2 (en) * | 2019-12-19 | 2024-07-30 | グーグル エルエルシー | Hardware circuits for accelerating neural network computations |
| US11295206B2 (en) * | 2020-02-07 | 2022-04-05 | Google Llc | Interleaving memory requests to accelerate memory accesses |
| US11533658B2 (en) * | 2020-02-24 | 2022-12-20 | Qualcomm Incorporated | Compressed measurement feedback using an encoder neural network |
| US12056382B2 (en) * | 2020-05-26 | 2024-08-06 | Qualcomm Incorporated | Inference in memory |
-
2022
- 2022-09-15 WO PCT/US2022/076500 patent/WO2024058810A1/en not_active Ceased
- 2022-09-15 CN CN202280099892.8A patent/CN119816819A/en active Pending
- 2022-09-15 JP JP2025515430A patent/JP7837470B2/en active Active
- 2022-09-15 EP EP22786253.9A patent/EP4569411A1/en active Pending
- 2022-09-15 KR KR1020257007732A patent/KR20250050063A/en active Pending
-
2023
- 2023-07-20 TW TW112127069A patent/TWI864897B/en active
- 2023-07-20 TW TW113141024A patent/TWI889583B/en active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004258966A (en) | 2003-02-26 | 2004-09-16 | Sony Corp | Memory control device and method, image data processing device, recording medium, and program |
| JP2011077947A (en) | 2009-09-30 | 2011-04-14 | Fujitsu Ltd | Turbo decoding device and communication device |
| JP2020166861A (en) | 2019-03-28 | 2020-10-08 | インフィニオン テクノロジーズ アクチエンゲゼルシャフトInfineon Technologies AG | Access to memory configured to store image data cubes |
Also Published As
| Publication number | Publication date |
|---|---|
| TWI864897B (en) | 2024-12-01 |
| KR20250050063A (en) | 2025-04-14 |
| TWI889583B (en) | 2025-07-01 |
| CN119816819A (en) | 2025-04-11 |
| WO2024058810A1 (en) | 2024-03-21 |
| TW202414200A (en) | 2024-04-01 |
| EP4569411A1 (en) | 2025-06-18 |
| JP2025530341A (en) | 2025-09-11 |
| TW202509760A (en) | 2025-03-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zhang et al. | BoostGCN: A framework for optimizing GCN inference on FPGA | |
| JP7525597B2 (en) | Hardware circuits for accelerating neural network computations | |
| CN113760531A (en) | Scheduler, method of operating scheduler, and accelerator apparatus including scheduler | |
| TWI844116B (en) | Exploiting data sparsity at a machine-learning hardware accelerator | |
| KR20190084705A (en) | Neural network processing unit including approximate multiplier and system on chip including the same | |
| JP7834166B2 (en) | Hardware-accelerated optimization group: Convolutional-based neural network model | |
| CN113469354A (en) | Memory-constrained neural network training | |
| CN114265673A (en) | Spatial slicing of a compute array with shared control | |
| CN114912590A (en) | Processor, method of operating the processor, and electronic device including the processor | |
| JP2026041746A (en) | Neural network architecture for implementing group convolutions | |
| JP7413549B2 (en) | Shared scratchpad memory with parallel load stores | |
| JP7837470B2 (en) | Reducing memory bank contention in hardware accelerators | |
| CN114239794A (en) | Operation method and electronic device | |
| JP7251416B2 (en) | Information processing program and information processing method | |
| TWI842584B (en) | Computer implemented method and computer readable storage medium | |
| US12327175B2 (en) | Collaborative sensor data processing by deep learning accelerators with integrated random access memory | |
| TW202435122A (en) | Tensor mapping unit for a hardware integrated circuit | |
| KR20250150136A (en) | Byte Stream Processing Pipeline for Hardware Integrated Circuits |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250325 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250325 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20260204 |
|
| 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: 20260217 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20260317 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7837470 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |