JP6920277B2 - Mixed width SIMD operation with even and odd element operations using a pair of registers for a wide data element - Google Patents
Mixed width SIMD operation with even and odd element operations using a pair of registers for a wide data element Download PDFInfo
- Publication number
- JP6920277B2 JP6920277B2 JP2018502231A JP2018502231A JP6920277B2 JP 6920277 B2 JP6920277 B2 JP 6920277B2 JP 2018502231 A JP2018502231 A JP 2018502231A JP 2018502231 A JP2018502231 A JP 2018502231A JP 6920277 B2 JP6920277 B2 JP 6920277B2
- Authority
- JP
- Japan
- Prior art keywords
- data elements
- destination
- source
- simd
- register
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3885—Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
- G06F9/3887—Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled by a single instruction for multiple data lanes [SIMD]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8007—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors single instruction multiple data [SIMD] multiprocessors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8053—Vector processors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/3001—Arithmetic instructions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/30032—Movement instructions, e.g. MOVE, SHIFT, ROTATE, SHUFFLE
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/30036—Instructions to perform operations on packed data, e.g. vector, tile or matrix operations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30105—Register structure
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30105—Register structure
- G06F9/30109—Register structure having multiple operands in a single register
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30105—Register structure
- G06F9/30112—Register structure comprising data of variable length
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computing Systems (AREA)
- Advance Control (AREA)
- Executing Machine-Instructions (AREA)
- Complex Calculations (AREA)
Description
本開示の態様は、少なくとも1つのベクトルのデータ要素が少なくとも1つの他のベクトルのデータ要素とは異なるビット幅である2つ以上のベクトルを伴う演算に関する。そのような演算は、混合幅演算(mixed-width operation)と呼ばれる。より詳細には、いくつかの態様は、少なくとも1つの第1のベクトルオペランドと第2のベクトルオペランドとを伴う混合幅単一命令複数データ(SIMD)(mixed-width single instruction multiple data)演算に関し、第1のベクトルオペランドまたは第2のベクトルオペランドのうちの少なくとも1つは、偶数または奇数のレジスタのペアに記憶され得るデータ要素を有する。 Aspects of the present disclosure relate to operations involving two or more vectors in which the data element of at least one vector has a bit width different from that of the data element of at least one other vector. Such an operation is called a mixed-width operation. More specifically, some aspects relate to mixed-width single instruction multiple data (SIMD) operations involving at least one first vector operand and a second vector operand. At least one of the first vector operand or the second vector operand has data elements that can be stored in a pair of even or odd registers.
データ並列処理を利用する処理システムにおいては、単一命令複数データ(SIMD)命令が使用され得る。たとえば、データベクトルの2つ以上のデータ要素に対して同じまたは共通のタスクが実行される必要がある場合、データ並列処理が存在する。複数の命令を使用するのではなく、対応する複数のSIMDレーン内の複数のデータ要素に対して実行されるべき同じ命令を定義する単一のSIMD命令を使用することによって、2つ以上のデータ要素に対して並列に共通のタスクが実行され得る。 In a processing system that utilizes data parallel processing, a single instruction and multiple data (SIMD) instructions may be used. For example, data parallelism exists when the same or common task needs to be performed on two or more data elements of a data vector. Two or more data by using a single SIMD instruction that defines the same instruction to be executed for multiple data elements in the corresponding multiple SIMD lanes, rather than using multiple instructions Common tasks can be performed in parallel for elements.
SIMD命令は、ソースベクトルオペランドおよび宛先ベクトルオペランドなどの1つまたは複数のベクトルオペランドを含み得る。各ベクトルオペランドは2つ以上のデータ要素を含む。SIMD命令の場合、同じベクトルオペランドに属するすべてのデータ要素は、一般に、同じビット幅であり得る。しかしながら、いくつかのSIMD命令は混合幅オペランドを指定してよく、第1のベクトルオペランドのデータ要素は第1のビット幅のデータ要素であり得、第2のベクトルオペランドのデータ要素は第2のビット幅のデータ要素であり得、第1のビット幅と第2のビット幅は互いに異なる。混合幅オペランドを含むSIMD命令の実行には、いくつかの課題があり得る。 SIMD instructions can include one or more vector operands, such as source vector operands and destination vector operands. Each vector operand contains two or more data elements. For SIMD instructions, all data elements belonging to the same vector operand can generally have the same bit width. However, some SIMD instructions may specify a mixed width operand, the data element of the first vector operand can be the data element of the first bit width, and the data element of the second vector operand is the second. It can be a bit-width data element, where the first bit width and the second bit width are different from each other. Execution of SIMD instructions that include mixed width operands can present several challenges.
図1A〜図1Cは、混合幅オペランドを有するSIMD命令を実行するための従来の実装形態に伴う課題の例を示す。図1Aを参照すると、SIMD命令100を実行するための第1の従来の実装形態が示されている。SIMD命令100は、64ビット命令セットアーキテクチャ(ISA)をサポートする従来のプロセッサ(図示せず)によって実行され得ると仮定する。これは、SIMD命令100などの命令が、最大64ビットのビット幅を有するオペランドを指定し得ることを意味する。64ビットオペランドは、64ビットレジスタまたは32ビットレジスタのペアに関して指定され得る。
FIGS. 1A-1C show examples of challenges associated with conventional implementations for executing SIMD instructions with mixed width operands. With reference to FIG. 1A, a first conventional implementation for executing
SIMD命令100の目的は、ソースオペランド102の各データ要素に対して同じ命令を実行することである。ソースオペランド102は、0〜7でラベル付けされた8個の8ビットデータ要素を備える64ビットベクトルである。ソースオペランド102は、単一の64ビットレジスタ、または32ビットレジスタのペアに記憶され得る。8個のデータ要素0〜7の各々に対して実行される同じ命令または共通の演算は、たとえば、乗算、二乗関数、左シフト関数、インクリメント関数、加算(たとえば、命令内の一定値もしくは即値フィールドとの、または別のベクトルオペランドによって提供される値との)などであり得、その結果は、結果として得られる8個のデータ要素ごとに、8ビット以上、および最大16ビットのストレージを消費する可能性がある。これは、SIMD命令100の結果が、ソースオペランド102が消費し得るストレージ空間の2倍、すなわち2つの64ビットレジスタ、または32ビットレジスタの2つのペアを消費する可能性があることを意味する。
The purpose of
SIMD命令100を実装するように構成された従来のプロセッサは、64ビットより大きいビット幅のオペランドを指定する命令を含まないので、SIMD命令100は、SIMD命令100Xと100Yとの2つの構成要素に分割され得る。SIMD命令100Xは、ソースオペランド102の偶数0、2、4、および6でラベル付けされたデータ要素(または「偶数番号のデータ要素」)に対して実行されるべき共通の演算を指定する。SIMD命令100Xは、64ビット幅であり、それぞれが上位(H)8ビットおよび下位(L)8ビットで構成されるA、C、E、およびGでラベル付けされた16ビットデータ要素を含む、宛先オペランド104xを指定する。ソースオペランド102の偶数番号の8ビットデータ要素0、2、4、および6に対する共通の演算の結果は、宛先オペランド104xの16ビットデータ要素A、C、E、およびGに対応して書き込まれる。SIMD命令100YはSIMD命令100Xに類似しているが、SIMD命令100Yは、ソースオペランド102の奇数1、3、5、および7でラベル付けされたデータ要素(または「奇数番号のデータ要素」)に対する共通の演算を指定し、その結果は、やはりSIMD命令100Xの宛先オペランド104xと同様に64ビットオペランドである、宛先オペランド104yの16ビットデータ要素B、D、F、Hに書き込まれるという相違点がある。このようにして、SIMD命令100Xおよび100Yの各々は、1つの64ビット宛先オペランドを指定することができ、また、SIMD命令100Xおよび100Yは、ソースオペランド102のデータ要素0〜7の各々に対する共通の演算の実行をともに達成することができる。しかし、SIMD命令100を実装するために必要な2つの別個の命令のために、コード空間が増大する。
Traditional processors configured to implement
図1Bは、構成要素SIMD命令120Xおよび120Yの異なるセットを使用するSIMD命令100の第2の従来の実装形態を示す。SIMD命令120Xおよび120Yは、それぞれソースオペランド102の8ビットデータ要素0〜7の各々に対する共通の演算を指定する。SIMD命令120Xは、結果の下位(L)8ビットが書き込まれる宛先オペランド124xを、宛先オペランド124xの対応する8ビット結果データ要素A〜Hに指定する(一方、結果の上位(H)8ビットは破棄される)。同様に、命令120Yは、結果の上位(H)8ビットが書き込まれる宛先オペランド124yを宛先オペランド124yの対応する8ビットデータ要素A〜Hに指定する(一方、結果の下位(L)8ビットは破棄される)。このSIMD命令100の第2の従来の実装形態では、2つの構成要素SIMD命令120Xおよび120Yのコード空間の増加も問題となる。さらに、理解され得るように、第2の従来の実装形態はまた、ソースオペランド102のデータ要素0〜7の各々の上位(H)8ビット(たとえば、実行命令120X中)または下位(L)8ビット(たとえば、実行命令120Y中)のいずれかを計算および廃棄する際に電力の浪費を招く。
FIG. 1B shows a second conventional implementation of
図1Cは、図1AのSIMD命令100Xおよび100Yといくつかの点で類似している、SIMD命令140Xおよび140Yの構成要素のさらに別のセットを使用するSIMD命令100の第3の従来の実装形態を示す。相違点は、ソースオペランド102のデータ要素のうちの諸データ要素が各SIMD命令による操作を受けるという点である。より詳細には、偶数番号の8ビットデータ要素ではなく、SIMD命令140Xは、ソースオペランド102の下位4個のデータ要素0〜3に対して実行されるべき共通の演算を指定する。結果は宛先オペランド144xの16ビットデータ要素A、B、C、Dに書き込まれる。しかしながら、SIMD命令140Xの実行は、宛先オペランド140Xの全64ビットにわたる下位4個の8ビットデータ要素(32ビットにまたがる)に対する演算の結果を広げること(spreading out)を含む。SIMD命令144yは同様であり、64ビット宛先オペランド144yの16ビットデータ要素E、F、G、Hにわたるソースオペランド102の上位4個の8ビットデータ要素4〜7に対する演算の結果を広げることを指定する。第1および第2の従来の実装形態のようなコードサイズの増加は別として、第3の従来の実装形態において見られるようなこれらのデータ移動を広げることは、クロスバーのような追加のハードウェアを必要とする可能性がある。
FIG. 1C is a third conventional implementation of
したがって、従来の実装形態の前述の欠点を回避する、混合幅SIMD命令の改良された実装形態が必要とされている。 Therefore, there is a need for an improved implementation of the mixed width SIMD instruction that avoids the aforementioned drawbacks of the conventional implementation.
例示的な態様は、第1のビット幅のデータ要素を備える少なくとも1つのソースベクトルオペランドと、第2のビット幅のデータ要素を備える宛先ベクトルオペランドとを有する、混合幅単一命令複数データ(SIMD)命令に関連するシステムおよび方法を含み、第2のビット幅は、第1のビット幅の半分または2倍のいずれかである。これに対応して、ソースベクトルオペランドまたは宛先ベクトルオペランドのうちの1つは、第1のレジスタと第2のレジスタとの、レジスタのペアとして表される。他のベクトルオペランドは単一のレジスタとして表される。第1のレジスタのデータ要素は、単一のレジスタとして表される他のベクトルオペランドの偶数番号のデータ要素に対応し、第2のレジスタのデータ要素は、単一のレジスタとして表される他のベクトルオペランドのデータ要素に対応する。 An exemplary embodiment is a mixed width single instruction multiple data (SIMD) having at least one source vector operand with a first bit width data element and a destination vector operand with a second bit width data element. The second bit width is either half or twice the first bit width, including the system and method associated with the instruction. Correspondingly, one of the source or destination vector operands is represented as a register pair of a first register and a second register. The other vector operands are represented as a single register. The data element of the first register corresponds to the even numbered data element of the other vector operands represented as a single register, and the data element of the second register is the other data element represented as a single register. Corresponds to the data element of the vector operand.
たとえば、例示的な態様は、混合幅単一命令複数データ(SIMD)演算を実行する方法に関連し、本方法は、プロセッサによって、第1のビット幅の第1のセットのソースデータ要素を備える少なくとも1つの第1のソースベクトルオペランドと、第2のビット幅の宛先データ要素を備える少なくとも1つの宛先ベクトルオペランドとを備えるSIMD命令を受信するステップであって、第2のビット幅は第1のビット幅の2倍である、ステップを備える。宛先ベクトルオペランドは、宛先データ要素の第1のサブセットを備える第1のレジスタと、宛先データ要素の第2のサブセットを備える第2のレジスタとを含むレジスタのペアを備える。第1のセットのソースデータ要素の順序に基づいて、本方法は、プロセッサにおいてSIMD命令を実行するステップであって、第1のセットの偶数番号のソースデータ要素から、第1のレジスタ内の宛先データ要素の第1のサブセットを生成するステップと、第1のセットの奇数番号のソースデータ要素から、第2のレジスタ内の宛先データ要素の第2のサブセットを生成するステップとを備えるステップを含む。 For example, an exemplary embodiment relates to a method of performing a mixed width single instruction multiple data (SIMD) operation, which method comprises a first set of source data elements of a first bit width by a processor. A step of receiving a SIMD instruction having at least one first source vector operand and at least one destination vector operand with a second bit width destination data element, the second bit width being the first. It has steps that are twice the bit width. The destination vector operand comprises a pair of registers that includes a first register with a first subset of destination data elements and a second register with a second subset of destination data elements. Based on the order of the source data elements in the first set, the method is a step of executing a SIMD instruction in the processor from the even numbered source data elements in the first set to the destination in the first register. Includes a step of generating a first subset of data elements and a step of generating a second subset of destination data elements in a second register from a first set of odd-numbered source data elements. ..
別の例示的な態様は、混合幅単一命令複数データ(SIMD)演算を実行する方法に関連し、本方法は、プロセッサによって、第1のビット幅のソースデータ要素を備える少なくとも1つのソースベクトルオペランドと、第2のビット幅の宛先データ要素を備える少なくとも1つの宛先ベクトルオペランドとを備えるSIMD命令を受信するステップを備え、第2のビット幅は第1のビット幅の半分である。ソースベクトルオペランドは、ソースデータ要素の第1のサブセットを備える第1のレジスタと、ソースデータ要素の第2のサブセットを備える第2のレジスタとを含むレジスタのペアを備える。宛先データ要素の順序に基づいて、本方法は、プロセッサにおいてSIMD命令を実行するステップであって、第1のレジスタ内のソースデータ要素の対応する第1のサブセットから偶数番号の宛先データ要素を生成するステップと、第2のレジスタ内のソースデータ要素の対応する第2のサブセットから奇数番号の宛先データ要素を生成するステップとを備える、ステップを含む。 Another exemplary embodiment relates to a method of performing a mixed width single instruction multiple data (SIMD) operation, the method comprising at least one source vector comprising a first bit width source data element by the processor. It comprises a step of receiving a SIMD instruction with an operand and at least one destination vector operand with a destination data element of the second bit width, the second bit width being half the first bit width. The source vector operand comprises a register pair that includes a first register with a first subset of source data elements and a second register with a second subset of source data elements. Based on the order of the destination data elements, the method is a step of executing a SIMD instruction in the processor to generate an even numbered destination data element from the corresponding first subset of the source data elements in the first register. A step comprising generating an odd numbered destination data element from a corresponding second subset of source data elements in a second register.
別の例示的な態様は、プロセッサによって実行されると、プロセッサに混合幅単一命令複数データ(SIMD)演算を実行させる、プロセッサによって実行可能な命令を備える非一時的コンピュータ可読記憶媒体に関連する。非一時的コンピュータ可読記憶媒体はSIMD命令を備え、SIMD命令は、第1のビット幅の第1のセットのソースデータ要素を備える少なくとも1つの第1のソースベクトルオペランドと、第2のビット幅の宛先データ要素を備える少なくとも1つの宛先ベクトルオペランドとを備え、第2のビット幅は第1のビット幅の2倍である。宛先ベクトルオペランドは、宛先データ要素の第1のサブセットを備える第1のレジスタと、宛先データ要素の第2のサブセットを備える第2のレジスタとを含むレジスタのペアを備える。第1のセットのソースデータ要素の順序に基づいて、非一時的コンピュータ可読記憶媒体は、第1のセットの偶数番号のソースデータ要素から、第1のレジスタ内の宛先データ要素の第1のサブセットを生成するためのコードと、第1のセットの奇数番号のソースデータ要素から、第2のレジスタ内の宛先データ要素の第2のサブセットを生成するためのコードとを含む。 Another exemplary embodiment relates to a non-temporary computer-readable storage medium with instructions that can be executed by a processor that, when executed by the processor, causes the processor to perform mixed width single instruction multiple data (SIMD) operations. .. The non-temporary computer-readable storage medium comprises SIMD instructions, which include at least one first source vector operand with a first set of source data elements of first bit width and a second bit width. It has at least one destination vector operand with a destination data element, and the second bit width is twice the first bit width. The destination vector operand comprises a pair of registers that includes a first register with a first subset of destination data elements and a second register with a second subset of destination data elements. Based on the order of the source data elements in the first set, the non-temporary computer-readable storage medium is the first subset of the destination data elements in the first register from the even-numbered source data elements in the first set. Contains code to generate a second subset of destination data elements in a second register from a first set of odd-numbered source data elements.
別の例示的な態様は、プロセッサによって実行されると、プロセッサに混合幅単一命令複数データ(SIMD)演算を実行させる、プロセッサによって実行可能な命令を備える非一時的コンピュータ可読記憶媒体に関連し、非一時的コンピュータ可読記憶媒体はSIMD命令を備える。SIMD命令は、第1のビット幅のソースデータ要素を備える少なくとも1つのソースベクトルオペランドと、第2のビット幅の宛先データ要素を備える少なくとも1つの宛先ベクトルオペランドとを備え、第2のビット幅は第1のビット幅の半分である。ソースベクトルオペランドは、ソースデータ要素の第1のサブセットを備える第1のレジスタと、ソースデータ要素の第2のサブセットを備える第2のレジスタとを含むレジスタのペアを備える。宛先データ要素の順序に基づいて、非一時的コンピュータ可読記憶媒体は、第1のレジスタ内のソースデータ要素の対応する第1のサブセットから偶数番号の宛先データ要素を生成するためのコードと、第2のレジスタ内のソースデータ要素の対応する第2のサブセットから奇数番号の宛先データ要素を生成するためのコードとを含む。 Another exemplary embodiment relates to a non-temporary computer-readable storage medium with instructions that can be executed by the processor, causing the processor to perform mixed width single instruction multiple data (SIMD) operations when executed by the processor. , Non-temporary computer readable storage media are equipped with SIMD instructions. The SIMD instruction comprises at least one source vector operand with a first bit width source data element and at least one destination vector operand with a second bit width destination data element, with the second bit width being It is half the width of the first bit. The source vector operand comprises a register pair that includes a first register with a first subset of source data elements and a second register with a second subset of source data elements. Based on the order of the destination data elements, the non-temporary computer-readable storage medium contains the code for generating an even numbered destination data element from the corresponding first subset of the source data elements in the first register. Contains code for generating odd-numbered destination data elements from the corresponding second subset of source data elements in the 2 registers.
添付の図面は、本発明の態様の説明を補助するために提示され、態様の説明のためだけに提供され、本発明の限定ではない。 The accompanying drawings are presented to assist in the description of aspects of the invention and are provided solely for the purpose of describing aspects and are not a limitation of the invention.
本発明の態様は、本発明の特定の態様を対象とする、以下の説明および関連する図面に開示されている。本発明の範囲から逸脱することなく、代替態様が考案され得る。さらに、本発明のよく知られている要素は、本発明の関連する詳細を不明瞭にしないように、詳細には記載されないか、省略される。 Aspects of the invention are disclosed in the following description and related drawings that cover specific aspects of the invention. Alternative embodiments can be devised without departing from the scope of the invention. Moreover, well-known elements of the invention are not described or omitted in detail so as not to obscure the relevant details of the invention.
「例示的」という用語は、本明細書では、「例、事例、または例示としての役割を果たす」ことを意味するために使用される。本明細書において「例示的」と記載されている任意の態様は、必ずしも他の態様よりも好ましいまたは有利であると解釈されるべきではない。同様に、「本発明の態様」という用語は、本発明のすべての態様が議論された特徴、利点、または動作モードを含むことを必要としない。 The term "exemplary" is used herein to mean "act as an example, case, or example." Any aspect described herein as "exemplary" should not necessarily be construed as preferred or advantageous over other aspects. Similarly, the term "aspects of the invention" does not need to include all aspects of the invention the features, advantages, or modes of operation discussed.
本明細書で使用する用語は、特定の態様のみを説明する目的のためのものであり、本発明の態様の限定であることを意図しない。本明細書で使用する単数形「a」、「an」、および「the」は、コンテキストがはっきりと別段に指示しない限り、複数形も含むことが意図される。さらに、「備える(comprises)」、「備えている(comprising)」、「含む(includes)」、および/または「含んでいる(including)」という用語は、本明細書で使用されるとき、述べられた特徴、整数、ステップ、動作、要素、および/または構成要素の存在を明示するが、1つまたは複数の他の特徴、整数、ステップ、動作、要素、構成要素、および/またはそれらのグループの存在または追加を排除しないことが理解されよう。 The terms used herein are for purposes of describing only certain aspects and are not intended to be a limitation of aspects of the invention. The singular forms "a," "an," and "the" as used herein are intended to include the plural unless the context explicitly indicates otherwise. In addition, the terms "comprises," "comprising," "includes," and / or "including," as used herein, are mentioned. Explicitly indicate the existence of a feature, integer, step, action, element, and / or component, but one or more other features, integer, step, action, element, component, and / or a group thereof. It will be understood that it does not preclude the existence or addition of.
さらに、多くの態様は、たとえば、コンピューティングデバイスの要素によって実行されるべきアクションのシーケンスに関して記述される。本明細書で説明する様々なアクションは、特定の回路(たとえば、特定用途向け集積回路(ASIC))によって、1つもしくは複数のプロセッサによって実行されているプログラム命令によって、または両方の組合せによって実行され得ることが認識されよう。加えて、本明細書で説明するアクションのこれらのシーケンスは、実行時に関連するプロセッサに本明細書で説明する機能を実行させるコンピュータ命令の対応するセットを記憶しているコンピュータ可読記憶媒体の任意の形態内に完全に具体化されていると考えられ得る。したがって、本発明の様々な態様は、そのすべてが特許請求される主題の範囲内にあると考えられているいくつかの異なる形態において具体化されてもよい。さらに、本明細書で説明される態様の各々について、任意のそのような態様の対応する形態は、たとえば、記載されたアクションを実行する「ように構成された論理」として本明細書において記載され得る。 In addition, many aspects are described, for example, with respect to a sequence of actions to be performed by an element of a computing device. The various actions described herein are performed by a particular circuit (eg, an application specific integrated circuit (ASIC)), by a program instruction being executed by one or more processors, or by a combination of both. It will be recognized to get. In addition, these sequences of actions described herein can be any computer-readable storage medium that stores the corresponding set of computer instructions that cause the associated processor to perform the functions described herein at run time. It can be considered to be fully embodied within the morphology. Thus, the various aspects of the invention may be embodied in several different forms, all of which are believed to be within the claims. Further, for each of the aspects described herein, the corresponding form of any such aspect is described herein, for example, as "logic configured to" perform the described actions. obtain.
本開示の例示的な態様は、SIMDレーンを横切るデータ移動を回避し、コードサイズを低減する、混合幅SIMD演算の実装形態に関連する。たとえば、SIMD演算を2つ以上の構成要素SIMD命令に分解(たとえば、図1A〜図1CにおけるSIMD命令100の従来の実行)するのではなく、例示的な態様は、1つまたは複数のベクトルオペランドをオペランドのペアとして指定する単一のSIMD命令を含み、これらはレジスタのペアの観点から表され得る。少なくとも1つのベクトルオペランド(ソースオペランドまたは宛先オペランドのいずれか)をレジスタのペアまたはレジスタペアとして指定することによって、2つ以上の構成要素の従来のSIMD命令の代わりに単一の例示的なSIMD命令が使用され得る。したがって、混合幅SIMD演算のコードサイズが低減される。
An exemplary embodiment of the present disclosure relates to an implementation of a mixed width SIMD operation that avoids data movement across SIMD lanes and reduces code size. For example, rather than breaking down a SIMD operation into two or more component SIMD instructions (eg, the traditional execution of
本開示においては、命令が1つまたは複数のレジスタに対して実行されるべき演算を指定する通常の命令フォーマットに従うために、レジスタに関してオペランドを表現することが参照される点に留意されたい。したがって、SIMD命令は、レジスタに関して表される1つまたは複数のオペランドに対して共通の演算が指定されるフォーマットのSIMD命令であり得る。したがって、本開示による例示的な混合幅SIMD命令は、単一のレジスタに関して表される少なくとも1つのベクトルオペランドと、レジスタのペアに関して表される少なくとも1つの他のベクトルオペランドとを含む。これらのレジスタへの言及は、例示的なSIMD命令を備えるプログラムによって使用される論理レジスタまたはアーキテクチャレジスタに関し得る。また、無制限に、物理レジスタファイルの物理レジスタにも関し得る。一般に、レジスタへの言及は、あるサイズのストレージ要素を伝えることを意味する。 It should be noted that in the present disclosure, it is referred to to represent an operand with respect to a register in order to follow the usual instruction format in which an instruction specifies an operation to be performed on one or more registers. Therefore, a SIMD instruction can be a SIMD instruction in a format in which a common operation is specified for one or more operands represented for a register. Thus, the exemplary mixed width SIMD instruction according to the present disclosure includes at least one vector operand represented for a single register and at least one other vector operand represented for a pair of registers. References to these registers may relate to logical or architectural registers used by programs with exemplary SIMD instructions. It can also involve an unlimited number of physical registers in a physical register file. In general, reference to registers means conveying a storage element of a certain size.
したがって、レジスタファイルに結合されたプロセッサにおいて混合幅単一命令複数データ(SIMD)演算を実行する例示的な方法は、第1のビット幅のデータ要素を備える少なくとも1つの第1のベクトルオペランドと、第2のビット幅のデータ要素を備える少なくとも1つの第2のベクトルオペランドとを有するSIMD命令を指定することを含み得る。第1のベクトルオペランドはソースベクトルオペランドであり得、第2のベクトルオペランドは宛先ベクトルオペランドであり得る。それに対応して、ソースベクトルオペランドのデータ要素はソースデータ要素と呼ばれ得、宛先ベクトルオペランドのデータ要素は宛先データ要素と呼ばれ得る。 Therefore, an exemplary method of performing a mixed-width single-instruction multiple-data (SIMD) operation in a processor coupled to a register file is to use at least one first vector operand with a first bit-width data element. It may include specifying a SIMD instruction with at least one second vector operand with a second bit width data element. The first vector operand can be the source vector operand and the second vector operand can be the destination vector operand. Correspondingly, the data element of the source vector operand can be called the source data element, and the data element of the destination vector operand can be called the destination data element.
例示的な混合幅SIMD命令においては、ソースデータ要素と宛先データ要素との間に1対1対応が存在する。一般に、混合幅SIMD命令において指定された演算がソースデータ要素に対して実行されると、特定の対応する宛先データ要素が生成される。たとえば、宛先ベクトルオペランドを形成するためにソースベクトルオペランドを左シフトするための混合幅SIMD演算を考える。この例では、各ソースデータ要素は、ソースデータ要素の左シフトが実行されるときに、特定の宛先データ要素を生成する。 In an exemplary mixed width SIMD instruction, there is a one-to-one correspondence between the source and destination data elements. In general, when the operation specified in the mixed width SIMD instruction is performed on a source data element, a particular corresponding destination data element is generated. For example, consider a mixed width SIMD operation to shift the source vector operand to the left to form a destination vector operand. In this example, each source data element produces a particular destination data element when a left shift of the source data element is performed.
本開示の1つの例示的な態様では、宛先データ要素の第2のビット幅は、ソースデータ要素の第1のビット幅より小さく、具体的には半分のサイズであり得る。この態様では、宛先ベクトルオペランドはレジスタのペアとして表され得、ソースベクトルオペランドは単一のレジスタとして表され得る。 In one exemplary embodiment of the disclosure, the second bit width of the destination data element may be smaller than the first bit width of the source data element, specifically half the size. In this aspect, the destination vector operand can be represented as a pair of registers and the source vector operand can be represented as a single register.
本開示の別の例示的な態様では、宛先データ要素の第2のビット幅は、ソースデータ要素の第1のビット幅より大きく、具体的には2倍のサイズであり得る。この態様では、ソースベクトルオペランドは単一のレジスタとして表され得、宛先ベクトルオペランドはレジスタのペアとして表され得る。 In another exemplary aspect of the disclosure, the second bit width of the destination data element can be greater than, specifically twice the size of the first bit width of the source data element. In this aspect, the source vector operand can be represented as a single register and the destination vector operand can be represented as a pair of registers.
ソースベクトルオペランドおよび宛先ベクトルオペランドのソースデータ要素とベクトルデータ要素との間の特定のマッピングをそれぞれ示すために、データ要素のビット幅がより小さいベクトルオペランドのデータ要素に順序が割り当てられる。たとえば、単一のレジスタとして表されるベクトルオペランドのデータ要素に順序が割り当てられる。順序に基づいて、偶数番号のデータ要素(たとえば、番号0、2、4、6などに対応する)および奇数番号のデータ要素(たとえば、番号1、3、5、7などに対応する)は、単一のレジスタとして表されるベクトルオペランドに対して識別される。他のベクトルオペランドのレジスタのペアは、第1のレジスタおよび第2のレジスタと呼ばれ、それぞれデータ要素の第1のサブセットおよび第2のサブセットを備える。したがって、単一のレジスタとして表されるベクトルオペランドの偶数番号のデータ要素には第1のサブセットまたは第1のレジスタのデータ要素との対応が割り当てられ、奇数番号のデータ要素には第2のサブセットまたは第2のレジスタのデータ要素との対応が割り当てられる。このようにして、指定されたSIMD演算の実行中に、対応する宛先データ要素を生成するために、ソースデータ要素に対してSIMDレーンを横切る大きなデータ移動が回避される。
Orders are assigned to the data elements of vector operands with smaller bit widths of the data elements to indicate the specific mapping between the source and vector data elements of the source and destination vector operands, respectively. For example, an order is assigned to the data elements of a vector operand represented as a single register. Based on the order, even-numbered data elements (for example, corresponding to
例示的な態様はまた、たとえば、第3のビット幅の第3のオペランドおよびそれ以上含む、3つ以上のベクトルオペランドを指定するSIMD演算に関連し得る。レジスタのペアとして表される宛先ベクトルオペランドを生成するために、混合幅SIMD命令用に単一のレジスタとしてそれぞれ表される、2つのソースベクトルオペランドが指定される一例が開示される。多くの他のそのような命令フォーマットは、本開示の範囲内で可能である。説明を簡単にするために、混合幅SIMD演算を実施するための例示的な態様を、オペランドのいくつかの例示的なSIMD命令およびビット幅に関連して説明するが、これらは単に説明のためのものであることに留意する。このように、本明細書で論じられる特徴は、混合幅ベクトル演算のための任意の数のオペランドおよびデータ要素のビット幅に拡張され得る。 Illustrative embodiments may also relate to SIMD operations that specify three or more vector operands, including, for example, a third operand of a third bit width and more. An example is disclosed in which two source vector operands are specified, each represented as a single register for a mixed width SIMD instruction, to generate a destination vector operand represented as a pair of registers. Many other such instruction formats are possible within the scope of this disclosure. For simplicity, exemplary embodiments for performing mixed-width SIMD operations are described in relation to some exemplary SIMD instructions and bit widths of the operands, but these are for illustration purposes only. Keep in mind that it is. Thus, the features discussed herein can be extended to any number of operands and bit widths of data elements for mixed width vector operations.
図2A〜図2Cに、SIMD命令200、220、および240に関する例示的な態様が示されている。これらのSIMD命令200、220、および240の各々は、SIMD命令を実行するように構成されたプロセッサ(たとえば、図4に示されるプロセッサ402)によって実行され得る。より具体的には、これらのSIMD命令200、220、および240の各々は、1つまたは複数のソースベクトルオペランドおよび1つまたは複数の宛先ベクトルオペランドを指定することができ、ソースベクトルオペランドおよび宛先ベクトルオペランドは、レジスタ(たとえば、64ビットレジスタ)に関して表され得る。SIMD命令200、220、および240のソースベクトルオペランドおよび宛先ベクトルオペランドは、それぞれが1つまたは複数のSIMDレーンに該当する、対応するソースデータ要素および宛先データ要素を含む。SIMD命令の実行におけるSIMDレーンの数は、SIMD命令の実行において実行される並列演算の数に対応する。したがって、例示的なSIMD命令200、220、および240を実装するように構成されたプロセッサまたは実行ロジックは、SIMD命令200、220、および240によって指定された並列演算を実施するために必要とされるハードウェア(たとえば、多数の左/右シフタ、加算器、乗算器等を備える算術論理装置(ALU))を含むことができる。
2A-2C show exemplary embodiments of
したがって、図2Aを参照すると、SIMD命令200の実行のための第1の例示的な態様が示されている。一例では、プロセッサは、64ビット命令セットアーキテクチャ(ISA)をサポートすることができると仮定される。SIMD命令200は、単一の64ビットレジスタに関して表されるソースベクトルオペランドのソースデータ要素に対して実行されるべき同じ演算または共通の命令を指定することができる。
Therefore, with reference to FIG. 2A, a first exemplary embodiment for executing
SIMD命令200において指定される同じ演算または共通の命令は、たとえば、8ビットのソースデータ要素に対する二乗関数、左シフト関数、インクリメント関数、一定値による加算などであり得(これは、8個の8ビット左シフタ、8個の8ビット加算器などの論理要素で実装され得る)、対応する8個の結果として得られる宛先データ要素を生成し、これは最大16ビットのストレージを消費し得る。図示されるように、SIMD命令200は、8個の8ビットデータ要素を備えるソースベクトルオペランド202を指定し得る。ソースベクトルオペランド202のこれらの8個の8ビットデータ要素には数値順が割り当てられ得、これは参照番号0〜7で示されている。SIMD命令200の結果は、8個の16ビット宛先データ要素または128ビットをともに使用して表され得、これは単一の64ビットレジスタに記憶することはできない。この問題を処理するためにSIMD命令200を2つ以上の命令に分解するのではなく(たとえば、図1A〜図1Cに示されるSIMD命令100の従来の実装形態のように)、宛先ベクトルオペランドは構成要素ベクトルオペランドのペアとして指定される。構成要素宛先ベクトルオペランドのペアは、対応するレジスタ204x、204yのペアとして表され得る。レジスタのペアは、レジスタファイル内の連続する物理的位置に記憶される必要はなく、連続する論理レジスタ番号を有することさえできる点に留意されたい。このように、SIMD命令200は、構成要素ベクトルオペランドまたはレジスタ204x、204yのペア(たとえば、64ビットレジスタのペア)に関して表される宛先ベクトルオペランドと、単一のレジスタ202として表されるソースベクトルオペランド202とを指定する。
The same operation or common instruction specified in
さらに、ペアの第1のレジスタ204xとして表される第1の構成要素宛先ベクトルオペランドは、ソースベクトルオペランド202の偶数番号のソースデータ要素0、2、4、および6に対して実行されるSIMD命令200の結果の第1のサブセットを含む。これらの結果は、偶数番目のソースデータ要素0、2、4、および6への1対1の対応を有する宛先データ要素A、C、E、およびGによって示されており、これは、宛先データ要素A、C、E、およびGのこの例示的な配置において、結果に関してSIMDレーンを横切る大きな動きが回避されることを意味する。同様に、ペアの第2のレジスタ204yとして表される第2の構成要素宛先ベクトルオペランドは、ソースベクトルオペランド202の奇数番号のソースデータ要素1、3、5、および7に対して実行されるSIMD命令200の結果の第2のサブセットを含む。これらの結果は、奇数番号のソースデータ要素1、3、5、および7への1対1の対応を有する宛先データ要素B、D、F、およびHによって示されており、これもやはり、宛先データ要素B、D、F、およびHのこの例示的な配置において、結果に関してSIMDレーンを横切る大きな動きが回避されることを意味する。したがって、この場合、ソースベクトルオペランド202の偶数番号のソースデータ要素0、2、4、および6は、第1のレジスタ204xの宛先データ要素A、C、E、およびGに対応するか、またはそれを生成し、ソースベクトルオペランド202の奇数番号のソースデータ要素1、3、5、および7は、第2のレジスタ204yの宛先データ要素B、D、F、およびHに対応するか、またはそれを生成する。
In addition, the first component destination vector operand, represented as the
たとえばSIMDレーン0〜7と呼ばれる、各レーンがそれぞれのソースデータ要素0〜7を備える8個の8ビットSIMDレーンを考えると、対応する宛先データ要素A〜Hを生成するために必要な移動量は、同じSIMDレーンまたは隣接するSIMDレーン内に含まれることが分かる。言い換えれば、第1のセットのソースデータ要素(たとえば、ソースデータ要素0〜7)は、それぞれのSIMDレーンにあり、ソースデータ要素の各々から、宛先データ要素(たとえば、対応する宛先データ要素A〜H)が、それぞれのSIMDレーン、またはそれぞれのSIMDレーンに隣接するSIMDレーンにおいて生成される。たとえば、SIMDレーン0、2、4、および6内の偶数番号のソースデータ要素0、2、4、および6はそれぞれ、宛先データ要素A、C、E、およびGを生成し、それらはそれぞれSIMDレーン0〜1、2〜3、4〜5、および6〜7内に含まれる。同様に、SIMDレーン0、2、4、および6内の奇数番号のソースデータ要素1、3、5、および7はそれぞれ、宛先データ要素B、D、F、およびHを生成し、それらはそれぞれSIMDレーン0〜1、2〜3、4〜5、および6〜7内に含まれる。
Considering eight 8-bit SIMD lanes, for example SIMD lanes 0-7, where each lane has its own source data elements 0-7, the amount of travel required to generate the corresponding destination data elements A-H. Can be found to be contained within the same SIMD lane or adjacent SIMD lanes. In other words, the first set of source data elements (eg, source data elements 0-7) are in their respective SIMD lanes, and from each of the source data elements, the destination data element (eg, the corresponding destination data element A-). H) is generated in each SIMD lane or in a SIMD lane adjacent to each SIMD lane. For example, even-numbered
したがって、図2Aの第1の例示的な態様では、混合幅SIMD命令200は、(2つ以上の構成要素SIMD命令ではなく、1つのSIMD命令のみが使用されるので)命令空間またはコード空間の効率的な使用を含み、その実装形態または実行はSIMDレーンを横切る大きなデータ移動を回避する。
Therefore, in the first exemplary aspect of FIG. 2A, the mixed
次に図2Bを参照すると、別の例示的な態様が、混合幅SIMD命令220に関連して示されている。SIMD命令220は、単一のレジスタ222として表される第1のソースベクトルオペランドと、単一のレジスタ223として表される第2のソースベクトルオペランドとの、2つのソースベクトルオペランドを含み、4個の16ビットのソースデータ要素の第1のセットおよび第2のセットをそれぞれ有する。SIMD命令220は、2つのソースベクトルオペランドに対する乗算(たとえば、丸めを伴う)などの同じまたは共通の演算を指定することができ、4個の32ビット結果を生成するために、(レジスタ222内の)第1のセットの4個の16ビットソースデータ要素が、(レジスタ223内の)第2のセットの対応する4個の16ビットソースデータ要素と乗算される(SIMD命令220の実装形態は、4個の16×16乗算器などの論理要素を含むことができる)。これらの4個の32ビット結果を記憶するために128ビットが必要とされるので、宛先ベクトルオペランドは、第1の構成要素宛先ベクトルオペランドと第2の構成要素宛先ベクトルオペランドとの、構成要素ベクトルオペランドのペアに関して指定される(これらは、それに応じて第1の64ビットレジスタ224xと、第2の64ビットレジスタ224yとして表され得る)。SIMD命令220はまた、第2のセットの対応するソースデータ要素を有する第1のセットのソースデータ要素の追加にも適用可能であり、対応する結果は、宛先データ要素ごとに16ビットより多くを消費し得る(32ビットすべてではないとしても)点に留意されたい。
Then, with reference to FIG. 2B, another exemplary embodiment is shown in connection with the mixed
図2Bにおいて、第1および第2のセットのソースデータ要素は、それぞれ0、1、2、3、および0'、1'、2'、3'として代表的に示されている順序を割り当てられる。第1のレジスタ224x内の第1の構成要素宛先ベクトルオペランドは、ソースオペランド222および223の偶数番号のソースデータ要素に対応するSIMD命令220の結果の第1のサブセット(32ビット宛先データ要素AおよびCとして示される)を保持し、同様に、第2のレジスタ224y内の第2の構成要素宛先ベクトルオペランドは、ソースオペランド222および223の奇数番号のソースデータ要素に対応するSIMD命令220の結果の第2のサブセット(32ビットデータ要素BおよびDとして示される)を保持する。この場合、第1のソースベクトルオペランド222および第2のソースベクトルオペランド223の偶数番号のソースデータ要素(0,0')および(2,2')は、それぞれ、第1の宛先ベクトルオペランド224xのデータ要素AおよびCを生成し、第1のソースベクトルオペランド222および第2のソースベクトルオペランド223の奇数番号のデータ要素(1,1')および(3,3')は、それぞれ、第2の宛先ベクトルオペランド224yのデータ要素BおよびDを生成することが分かる。
In Figure 2B, the first and second sets of source data elements are assigned the order typically shown as 0, 1, 2, 3, and 0', 1', 2', 3', respectively. .. The first component destination vector operand in the
再び、図2Bの第2の例示的な態様においては、混合幅SIMD命令220は、2つ以上の構成要素SIMD命令ではなく、単一の混合幅SIMD命令を利用することによって、コード空間効率を達成することが分かる。さらに、この態様においても、SIMDレーンを横切る動きは最小限に抑えられることも分かる。一般に、第1のセットのソースデータ要素および第2のセットのソースデータ要素は、それぞれのSIMDレーンにあり、第1のセットのソースデータ要素の各ソースデータ要素、および第2のセットのソースデータ要素のうちの対応するソースデータ要素から、それぞれのSIMDレーン、またはそれぞれのSIMDレーンに隣接するSIMDレーン内の宛先データ要素を生成する。たとえば、第1のセットのソースデータ要素0〜3(または、第2のセットのソースデータ要素0〜3')を備える4個の16ビットSIMDレーン0〜3を考えると、それぞれ、対応する宛先データ要素A〜Dを生成するための第1および第2のソースデータ要素のためのデータ移動は、同じSIMDレーンおよび多くとも隣接するSIMDレーン内に含まれる(たとえば、SIMDレーン0および2における偶数番号のソースデータ要素(0,0')および(2,2')は、それぞれSIMDレーン0〜1および2〜4において宛先データ要素AおよびCを生成し、同様に、SIMDレーン1および3における奇数番号のソースデータ要素(1,1')、および(3,3')は、それぞれSIMDレーン0〜1および2〜4において宛先データ要素BおよびDを生成する)。
Again, in the second exemplary embodiment of FIG. 2B, the mixed
図2Cは、混合幅SIMD命令240に関する第3の例示的な態様を表す。混合幅SIMD命令200および220とは異なり、混合幅SIMD命令240のソースベクトルオペランドは、構成要素ベクトルオペランドのペアとして指定されるか、またはレジスタのペアとして表される。混合幅SIMD命令220は2つの別個のソースベクトルオペランドに含まれ、1つのソースベクトルオペランドのデータ要素が別のソースベクトルオペランドのデータ要素と相互作用する(たとえば、それと乗算される)ように指定されているため、混合幅SIMD命令240は混合幅SIMD命令220とは異なる点に留意されたい。一方、混合幅SIMD命令240においては、そうしないと2つの別個の命令が消費されてしまうので、構成要素ソースベクトルオペランドのペアが指定される。たとえば、SIMD命令240は、8個の8ビット宛先データ要素の結果を得るために、8個の16ビットソースデータ要素に対して実行されるべき16ビットから8ビットへの右シフト関数の共通の演算を含むことができる(SIMD命令240の実装形態は、8個の8ビット右シフタなどの論理要素を含むことができる)。しかしながら、8個の16ビットソースデータ要素は128ビットを消費するので、従来の実装形態は、2つの構成要素SIMD命令を使用して実行されるべきこの演算を分割することになる。一方、図2Cの例示的な態様では、第1のレジスタ242x内の第1の構成要素ソースベクトルオペランドと、第2のレジスタ242y内の第2の構成要素ソースベクトルオペランドとを備えるソースベクトルオペランドのペアが、SIMD命令240によって指定される。したがって、コード空間が効率的に使用される。
FIG. 2C represents a third exemplary aspect of the mixed
宛先ベクトルオペランドは、この場合は単一の64ビットレジスタ244として表され、SIMD命令240の結果である8個の8ビット宛先データ要素を備える。したがって、レジスタ244内の宛先ベクトルオペランドの宛先データ要素には順序が割り当てられ、これらの要素は参照番号0〜7で示されている。構成要素ソースベクトルオペランドのペアのソースデータ要素(242x、242yのペアとして表される)は、ソースデータ要素A、C、E、およびGの第1のサブセットを備える第1のレジスタ242xが、それぞれレジスタ244内の宛先ベクトルオペランドの偶数番号の宛先データ要素0、2、4、および6に対応する結果を生成し、ソースデータ要素B、D、F、およびHの第2のサブセットを備える第2のレジスタ242yが、それぞれレジスタ244内の宛先ベクトルオペランドの奇数番号の宛先データ要素1、3、5、および7に対応する結果を生成するように配置される。
The destination vector operand, in this case, is represented as a single 64-
したがって、ソースベクトルオペランドが宛先ベクトルオペランドよりも広い場合でも、構成要素ソースベクトルオペランドのペアを指定するか、またはソースベクトルオペランドをレジスタのペアとして表すことによって、コード空間が有効に利用され得、SIMDレーンを横切るデータ移動が最小限に抑えられ得る。SIMD命令240の実行時にSIMDレーンを横切る移動も最小化される。一般に、宛先データ要素はそれぞれのSIMDレーンにあり、宛先データ要素の各々は、それぞれのSIMDレーン、またはそれぞれのSIMDレーンに隣接するSIMDレーン内のソースデータ要素から生成されることが分かる。たとえば、8個の宛先データ要素0〜7に対応する8個の8ビットSIMDレーンを考えると、ソースデータ要素A、C、E、およびGは、SIMDレーン0、2、4、および6内の偶数番号の宛先データ要素に対応する結果を生成するために、それぞれSIMDレーン0〜1、2〜3、4〜5、および6〜7から移動し、ソースデータ要素B、D、F、およびHは、SIMDレーン1、3、5、および7内の偶数番号の宛先データ要素に対応する結果を生成するために、それぞれSIMDレーン0〜1、2〜3、4〜5、および6〜7から移動することが分かる。どちらの場合も、移動は2つのSIMDレーン内に含まれる。
Therefore, even if the source vector operand is wider than the destination vector operand, the code space can be effectively utilized by specifying a pair of component source vector operands or by representing the source vector operand as a pair of registers, SIMD. Data movement across lanes can be minimized. Movement across the SIMD lane when executing
したがって、態様は、本明細書において開示されたプロセス、関数、および/またはアルゴリズムを実施するための様々な方法を含むことが理解されよう。たとえば、図3Aに示されるように、ある態様は、たとえば図2A〜図2Bによる、混合幅単一命令複数データ(SIMD)演算を実行する方法300を含むことができる。
Therefore, it will be appreciated that aspects include various methods for implementing the processes, functions, and / or algorithms disclosed herein. For example, as shown in FIG. 3A, one embodiment can include
ブロック302において、方法300は、プロセッサ(たとえば、以下で説明される図4のプロセッサ402)によって、およびたとえば図2Aを参照して、第1のビット幅(たとえば、8ビット)の第1のセットのソースデータ要素(たとえば、ソースデータ要素0〜7)を備える少なくとも1つの第1のソースベクトルオペランド(たとえば、レジスタ202における)と、第2のビット幅(たとえば、16ビット)の宛先データ要素(たとえば、宛先データ要素A〜H)を備える少なくとも1つの宛先ベクトルオペランド(たとえば、レジスタのペア204x、204yにおける)とを備えるSIMD命令(たとえば、SIMD命令200)を受信するステップを含み、第2のビット幅は第1のビット幅の2倍であり、宛先ベクトルオペランドは、宛先データ要素の第1のサブセット(たとえば、宛先データ要素A、C、E、G)を備える第1のレジスタ(たとえば、204x)と、宛先データ要素の第2のサブセット(たとえば、宛先データ要素B、D、F、H)を備える第2のレジスタとを含むレジスタのペアを備える。
At
ブロック303(ブロック304および306を含むものとして示される)において、方法300は、プロセッサ内で混合幅SIMD命令を実行するステップをさらに含む。具体的には、ブロック304においてソースデータ要素に割り当てられた順序(たとえば、0〜7)を考えると、ブロック306は、プロセッサ内でSIMD命令を実行するステップを含む。さらに詳細においては、ブロック306は、並列に実行され得るブロック306aおよび306bの構成要素からなる。
In block 303 (shown as including
ブロック306aは、第1のセットの偶数番号のソースデータ要素(たとえば、ソースデータ要素0、2、4、6)から、第1のレジスタ(たとえば、第1のレジスタ204x)内の宛先データ要素(たとえば、宛先データ要素A、C、E、G)の第1のサブセットを生成するステップを含む。
ブロック306bは、第1のセットの奇数番号のソースデータ要素(たとえば、ソースデータ要素1、3、5、7)から、第2のレジスタ(たとえば、第2のレジスタ204y)内の宛先データ要素(たとえば、宛先データ要素B、D、F、H)の第2のサブセットを生成するステップを含む。
一般に、方法300のSIMD命令は、第1のセットのソースデータ要素の二乗関数、左シフト関数、インクリメント、または一定値による加算のうちの1つであり得る。コード空間効率は、方法300において単一のSIMD命令を利用することによって達成される。方法300においては、SIMDレーンを横切る移動も最小化され、第1のセットのソースデータ要素はそれぞれのSIMDレーン内にあり、方法300は、ソースデータ要素(たとえば、SIMDレーン0内のソースデータ要素0)のそれぞれから、それぞれのSIMDレーン(たとえば、SIMDレーン0)内の宛先データ要素(たとえば、宛先データ要素A)、またはそれぞれのSIMDレーンに隣接するSIMDレーン(たとえば、SIMDレーン1)を生成するステップを含む。
In general, the SIMD instruction of
別個に示されていないが、方法300はまた、図2BのSIMD命令220を実装するための方法を含むことができ、この方法は、たとえば、ブロック302において、第1のビット幅の第2のセットのソースデータ要素(たとえば、レジスタ222および223内の第1および第2のソースベクトルオペランド)を備える第2のソースベクトルオペランドを受信するステップをさらに備え、第1のセットのソースデータ要素の順序は、第2のセットのソースデータ要素の順序に対応する点にも留意されたい。この場合、ブロック304において割り当てられた順序に基づいて、ブロック306は、プロセッサ内でSIMD命令を実行するステップを含み、第1のセットの偶数番号のソースデータ要素、および第2のセットの偶数番号のソースデータ要素から、第1のレジスタ内の宛先データ要素の第1のサブセットを生成するためのブロック306aと、第1のセットの奇数番号のソースデータ要素および、第2のセットの偶数番号ソースデータ要素から、第2のレジスタ内の宛先データ要素の第2のサブセットを生成するためのブロック306bとを備える。この場合、SIMD命令は、第1のセットのソースデータ要素と、第2のセットの対応するソースデータ要素との乗算または加算であり得、第1のセットのソースデータ要素および第2のセットのソースデータ要素はそれぞれSIMDレーン内にあり、第1のセットのソースデータ要素の各ソースデータ要素と第2のセットのソースデータ要素のうちの対応するソースデータ要素とから、それぞれのSIMDレーン、またはそれぞれのSIMDレーンに隣接するSIMDレーン内の宛先データ要素を生成する。
Although not shown separately,
図3Bを参照すると、本明細書において開示されたプロセス、関数、および/またはアルゴリズムを実行するための別の方法が示されている。たとえば、図3Bに示されるように、方法300は、たとえば図2Cによる、混合幅単一命令複数データ(SIMD)演算を実行する別の方法を含む。
With reference to FIG. 3B, another method for performing the processes, functions, and / or algorithms disclosed herein is shown. For example, as shown in FIG. 3B,
ブロック352において、方法350は、プロセッサ(たとえば、プロセッサ402)によって、第1のビット幅(たとえば、16ビット)のソースデータ要素(たとえば、ソースデータ要素A〜H)を備える少なくとも1つのソースベクトルオペランド(たとえば、レジスタ242x、242yにおける)と、第2のビット幅(たとえば、8ビット)の宛先データ要素(たとえば、宛先データ要素0〜7)を備える少なくとも1つの宛先ベクトルオペランド(たとえば、レジスタ244における)とを備えるSIMD命令(たとえば、SIMD命令240)を受信するステップを含み、第2のビット幅は第1のビット幅の半分であり、ソースベクトルオペランドは、ソースデータ要素の第1のサブセット(たとえば、宛先データ要素0、2、4、6)を備える第1のレジスタ(たとえば、第1のレジスタ242x)と、ソースデータ要素の第2のサブセット(たとえば、宛先データ要素1、3、5、7)を備える第2のレジスタ(たとえば、第2のレジスタ242y)とを含むレジスタのペアを備える。
In
ブロック354において、宛先データ要素に順序が割り当てられ、ブロック356において、SIMD命令が実行される。ブロック356は、サブブロック356aおよび356bを含み、これらはまた、並列に実行され得る。
At
ブロック356aは、第1のレジスタ内のソースデータ要素の対応する第1のサブセット(たとえば、ソースデータ要素A、C、E、G)から、偶数番号の宛先データ要素(たとえば、宛先データ要素0、2、4、6)を生成するステップを含む。
ブロック356bは、第2のレジスタ内のソースデータ要素の対応する第2のサブセット(たとえば、ソースデータ要素B、D、F、H)から、奇数番号の宛先データ要素(たとえば、宛先データ要素1、3、5、7)を生成するステップを含む。
例示的な態様では、方法350のSIMD命令は、ソースデータ要素の右シフト関数であってもよく、宛先データ要素は、それぞれのSIMDレーン(たとえば、SIMDレーン0〜7)内にあり、それぞれのSIMDレーン(たとえば、SIMDレーン0)、またはそれぞれのSIMDレーンに隣接するSIMDレーン(たとえば、SIMDレーン1)内のソースデータ要素(たとえば、ソースデータ要素A)から、宛先データ要素(たとえば、宛先データ要素0)の各々を生成する。
In an exemplary embodiment, the SIMD instruction of
図4を参照すると、例示的な態様によるワイヤレスデバイス400の特定の例示的な態様のブロック図である。ワイヤレスデバイス400は、たとえば図3Aの方法300および図3Bの方法350による、例示的な混合幅SIMD命令の実行をサポートおよび実装するように構成され得る(たとえば、実行ロジックを含む)プロセッサ402を含む。図4に示されるように、プロセッサ402は、メモリ432と通信することができる。プロセッサ402は、例示的なSIMD命令のどのオペランドが表されるかに関してレジスタ(たとえば、論理レジスタ)に対応する物理レジスタを保持するレジスタファイル(図示せず)を含み得る。いくつかの態様では、レジスタファイルにはメモリ432からデータが供給され得る。図示されていないが、1つもしくは複数のキャッシュまたは他のメモリ構造もワイヤレスデバイス400に含まれ得る。
FIG. 4 is a block diagram of a particular exemplary embodiment of the
図4は、プロセッサ402およびディスプレイ428に結合された、ディスプレイコントローラ426も示している。コーダ/デコーダ(コーデック)434(たとえば、オーディオおよび/または音声コーデック)は、プロセッサ402に結合することができる。(モデムを含んでもよい)ワイヤレスコントローラ440などの他の構成要素も示されている。スピーカー436およびマイクロフォン438は、コーデック434に結合することができる。図4は、ワイヤレスコントローラ440をワイヤレスアンテナ442に結合することができることも示している。特定の態様では、プロセッサ402、ディスプレイコントローラ426、メモリ432、コーデック434、およびワイヤレスコントローラ440は、システムインパッケージデバイスまたはシステムオンチップデバイス422に含まれる。
FIG. 4 also shows the
特定の態様では、入力デバイス430および電源444は、システムオンチップデバイス422に結合される。さらに、ある特定の態様では、図4に示されるように、ディスプレイ428、入力デバイス430、スピーカー436、マイクロフォン438、ワイヤレスアンテナ442、および電源444は、システムオンチップデバイス422の外部に位置する。ただし、ディスプレイ428、入力デバイス430、スピーカー436、マイクロフォン438、ワイヤレスアンテナ442、および電源444の各々は、インターフェースまたはコントローラのような、システムオンチップデバイス422の構成要素に結合することができる。
In certain embodiments, the
図4は、ワイヤレス通信デバイスを示しているが、プロセッサ402およびメモリ432はまた、セットトップボックス、音楽プレーヤ、ビデオプレーヤ、エンターテインメントユニット、ナビゲーションデバイス、携帯情報端末(PDA)、固定位置データユニット、通信デバイス、またはコンピュータに統合され得る点に留意されたい。さらに、ワイヤレスデバイス400の少なくとも1つまたは複数の例示的な態様は、少なくとも1つの半導体ダイに統合され得る。
Although Figure 4 shows a wireless communication device, the
当業者であれば、情報および信号は、様々な異なる技術および技法のいずれかを使用して表され得ることを理解するであろう。たとえば、上記の説明を通じて参照され得るデータ、命令、コマンド、情報、信号、ビット、シンボル、およびチップは、電圧、電流、電磁波、磁場もしくは磁性粒子、光場もしくは光学粒子、またはそれらの任意の組合せによって表され得る。 Those skilled in the art will appreciate that information and signals can be represented using any of a variety of different techniques and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced through the above description are voltages, currents, electromagnetic waves, magnetic or magnetic particles, light fields or optical particles, or any combination thereof. Can be represented by.
さらに、当業者は、本明細書において開示された態様に関連して説明された様々な例示的な論理ブロック、モジュール、回路、およびアルゴリズムステップが、電子ハードウェア、コンピュータソフトウェア、またはその両方の組合せとして実装され得ることを理解するであろう。ハードウェアおよびソフトウェアのこの互換性を明確に示すために、種々の例示的な構成要素、ブロック、モジュール、回路、およびステップについて、上記では概してそれらの機能に関して説明してきた。そのような機能がハードウェアとして実装されるか、またはソフトウェアとして実装されるかは、特定のアプリケーションおよびシステム全体に課される設計制約に依存する。当業者は、特定のアプリケーションごとに様々な方法で説明した機能を実装し得るが、そのような実装形態の決定は本発明の範囲から逸脱するものと解釈されるべきではない。 In addition, one of ordinary skill in the art will appreciate the various exemplary logic blocks, modules, circuits, and algorithm steps described in connection with aspects disclosed herein, including electronic hardware, computer software, or a combination thereof. You will understand that it can be implemented as. To articulate this compatibility of hardware and software, various exemplary components, blocks, modules, circuits, and steps have been generally described above with respect to their functionality. Whether such functionality is implemented as hardware or software depends on the design constraints imposed on the particular application and system as a whole. Those skilled in the art may implement the features described in various ways for a particular application, but the determination of such implementations should not be construed as departing from the scope of the invention.
本明細書において開示された態様に関連して説明された方法、シーケンス、および/またはアルゴリズムは、ハードウェア、プロセッサによって実行されるソフトウェアモジュール、またはその2つの組合せにおいて直接的に実施され得る。ソフトウェアモジュールは、RAMメモリ、フラッシュメモリ、ROMメモリ、EPROMメモリ、EEPROMメモリ、レジスタ、ハードディスク、リムーバブルディスク、CD-ROM、または当技術分野で知られている任意の他の形態の記憶媒体内に存在してもよい。例示的な記憶媒体は、プロセッサが記憶媒体から情報を読み取り、かつ記憶媒体に情報を書き込むことができるように、プロセッサに結合される。あるいは、記憶媒体は、プロセッサに一体化され得る。 The methods, sequences, and / or algorithms described in connection with aspects disclosed herein can be implemented directly in hardware, software modules executed by processors, or a combination thereof. The software module resides in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. You may. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium can be integrated into the processor.
したがって、本発明のある態様は、(たとえば、上述の方法300および350による、図2A〜図2CのSIMD命令を実装するための)混合幅SIMD命令を実装するための方法を具体化するコンピュータ可読媒体(たとえば、非一時的コンピュータ可読記憶媒体)を含むことができる。したがって、本発明は図示された例に限定されず、本明細書に記載の機能を実行するための任意の手段が本発明の態様に含まれる。
Thus, certain aspects of the invention embody a computer-readable method for implementing a mixed width SIMD instruction (eg, for implementing the SIMD instructions of FIGS. 2A-2C, according to
前述の開示は本発明の例示的な態様を示しているが、添付の特許請求の範囲によって規定される本発明の範囲から逸脱することなしに、本明細書に様々な変更および修正が行われ得る点に留意されたい。本明細書に記載される本発明の態様に従う方法クレームの機能、ステップ、および/または行為を、任意の特定の順序で実施する必要はない。さらに、本発明の要素は、単数形で記載され、特許請求される場合があるが、単数形への制限が明示的に言及されない限り、複数形が意図される。 Although the aforementioned disclosure illustrates an exemplary embodiment of the invention, various modifications and amendments are made herein without departing from the scope of the invention as defined by the appended claims. Note the gains. The functions, steps, and / or actions of the method claims according to aspects of the invention described herein need not be performed in any particular order. In addition, the elements of the invention are described in the singular and may be claimed, but the plural is intended unless restrictions to the singular are explicitly mentioned.
100 SIMD命令
100X SIMD命令
100Y SIMD命令
102 ソースオペランド
104x 宛先オペランド
104y 宛先オペランド
120X SIMD命令
120Y SIMD命令
200 SIMD命令
202 ソースベクトルオペランド
202 単一のレジスタ
204x 第1のレジスタ
204y 第2のレジスタ
220 SIMD命令
220 混合幅SIMD命令
222 単一のレジスタ
222 ソースオペランド
222 第1のソースベクトルオペランド
223 単一のレジスタ
223 ソースオペランド
223 第2のソースベクトルオペランド
224x 第1のレジスタ
224x 第1の宛先ベクトルオペランド
224y 第2のレジスタ
224y 第2の宛先ベクトルオペランド
240 SIMD命令
240 混合幅SIMD命令
242x 第1のレジスタ
242y 第2のレジスタ
244 レジスタ
300 方法
350 方法
400 ワイヤレスデバイス
402 プロセッサ
422 システムオンチップデバイス
426 ディスプレイコントローラ
428 ディスプレイ
430 入力デバイス
432 メモリ
434 コーダ/デコーダ(コーデック)
436 スピーカー
438 マイクロフォン
440 ワイヤレスコントローラ
442 ワイヤレスアンテナ
444 電源
100 SIMD instructions
100X SIMD instruction
100Y SIMD instruction
102 Source operand
104x destination operand
104y destination operand
120X SIMD instruction
120Y SIMD instruction
200 SIMD instruction
202 Source vector operand
202 single register
204x 1st register
204y Second register
220 SIMD instruction
220 mixed width SIMD instruction
222 single register
222 Source operand
222 First source vector operand
223 single register
223 Source operand
223 Second source vector operand
224x first register
224x 1st destination vector operand
224y second register
224y Second destination vector operand
240 SIMD instruction
240 mixed width SIMD instruction
242x 1st register
242y second register
244 register
300 ways
350 methods
400 wireless devices
402 processor
422 System on Chip Device
426 Display controller
428 display
430 input device
432 memory
434 Coda / Decoder (Codec)
436 speaker
438 microphone
440 wireless controller
442 wireless antenna
444 power supply
Claims (8)
プロセッサによって、
第1のソースレジスタを備える第1のソースベクトルオペランドであって、前記第1のソースレジスタが第1のビット幅の第1のセットのソースデータ要素を備える、第1のソースベクトルオペランドと、
第2のビット幅の宛先データ要素を備える宛先ベクトルオペランドと
を備えるSIMD命令を受信するステップであって、
前記第2のビット幅が前記第1のビット幅の2倍であり、
前記宛先ベクトルオペランドが、前記宛先データ要素の第1のサブセットを備える第1の宛先レジスタと、前記宛先データ要素の第2のサブセットを備える第2の宛先レジスタとを含む宛先レジスタのペアを備え、
前記第1のソースレジスタが、宛先レジスタの前記ペアに対応する単一のレジスタである、ステップと、
前記第1のセットのソースデータ要素の順序に基づいて、前記プロセッサにおいて前記SIMD命令を実行するステップであって、前記第1のセットのソースデータ要素の前記順序は、前記第1のセットのソースデータ要素と前記宛先データ要素との間のマッピングを提供するために割り当てられ、
前記第1のセットの偶数番号のソースデータ要素から、前記第1の宛先レジスタ内の前記宛先データ要素の前記第1のサブセットを生成するステップと、
前記第1のセットの奇数番号のソースデータ要素から、前記第2の宛先レジスタ内の前記宛先データ要素の前記第2のサブセットを生成するステップと
を備える、ステップと
を備え、
前記第1のセットのソースデータ要素がそれぞれのSIMDレーン内にあり、
前記マッピングに従って、前記ソースデータ要素の各々から、前記それぞれのSIMDレーン、または前記それぞれのSIMDレーンに隣接するSIMDレーン内のそれぞれの宛先データ要素を生成する、方法。 Mixed Width Single Instruction A method of performing multiple data (SIMD) operations.
Depending on the processor
A first source vector operand comprising a first source register, wherein the first source register comprises a first set of source data elements with a first bit width.
A step of receiving a SIMD instruction with a destination vector operand with a second bit width destination data element.
The second bit width is twice the first bit width,
The destination vector operand comprises a pair of destination registers including a first destination register comprising a first subset of the destination data elements and a second destination register comprising a second subset of the destination data elements.
A step and the first source register is a single register corresponding to the pair of destination registers.
A step of executing the SIMD instruction in the processor based on the order of the source data elements of the first set, wherein the order of the source data elements of the first set is the source of the first set. Assigned to provide a mapping between a data element and said destination data element
A step of generating the first subset of the destination data elements in the first destination register from the even numbered source data elements of the first set.
A step comprising generating the second subset of the destination data elements in the second destination register from the odd-numbered source data elements of the first set.
The first set of source data elements is in each SIMD lane and
A method of generating from each of the source data elements the respective destination data elements in the respective SIMD lanes or in the SIMD lanes adjacent to the respective SIMD lanes according to the mapping.
プロセッサによって、
第1のビット幅のソースデータ要素を備えるソースベクトルオペランドと、
宛先レジスタを備える宛先ベクトルオペランドであって、前記宛先レジスタが第2のビット幅の宛先データ要素を備える、宛先ベクトルオペランドと
を備えるSIMD命令を受信するステップであって、
前記第2のビット幅が前記第1のビット幅の半分であり、
前記ソースベクトルオペランドが、前記ソースデータ要素の第1のサブセットを備える第1のソースレジスタと、前記ソースデータ要素の第2のサブセットを備える第2のソースレジスタとを含むソースレジスタのペアを備え、
前記宛先レジスタが、ソースレジスタの前記ペアに対応する単一のレジスタである、ステップと、
前記宛先データ要素の順序に基づいて、前記プロセッサにおいて前記SIMD命令を実行するステップであって、前記宛先データ要素の前記順序は、前記ソースデータ要素と前記宛先データ要素との間のマッピングを提供するために割り当てられ、
前記ソースデータ要素の前記第1のサブセットから偶数番号の宛先データ要素を生成するステップと、
前記ソースデータ要素の前記第2のサブセットから奇数番号の宛先データ要素を生成するステップと
を備える、ステップと
を備え、
前記宛先データ要素がそれぞれのSIMDレーン内にあり、
前記マッピングに従って、前記それぞれのSIMDレーン、または前記それぞれのSIMDレーンに隣接するSIMDレーン内のソースデータ要素から、前記宛先データ要素の各々を生成する、方法。 Mixed Width Single Instruction A method of performing multiple data (SIMD) operations.
Depending on the processor
A source vector operand with a first bit width source data element,
A destination vector operand that includes a destination register, the step of receiving a SIMD instruction that includes a destination vector operand with a destination data element of a second bit width.
The second bit width is half of the first bit width.
The source vector operand comprises a pair of source registers including a first source register comprising a first subset of the source data elements and a second source register comprising a second subset of the source data elements.
A step and the destination register is a single register corresponding to the pair of source registers.
A step of executing the SIMD instruction in the processor based on the order of the destination data elements, the order of the destination data elements providing a mapping between the source data elements and the destination data elements. Assigned for
A step of generating an even-numbered destination data element from the first subset of the source data elements,
A step comprising generating an odd-numbered destination data element from the second subset of said source data elements.
The destination data element is in each SIMD lane and
A method of generating each of the destination data elements from the respective SIMD lanes or source data elements in the SIMD lanes adjacent to the respective SIMD lanes according to the mapping.
第1のソースレジスタを備える第1のソースベクトルオペランドであって、前記第1のソースレジスタが第1のビット幅の第1のセットのソースデータ要素を備える、第1のソースベクトルオペランドと、
第2のビット幅の宛先データ要素を備える宛先ベクトルオペランドと
を備えるSIMD命令であって、
前記第2のビット幅が前記第1のビット幅の2倍であり、
前記宛先ベクトルオペランドが、前記宛先データ要素の第1のサブセットを備える第1の宛先レジスタと、前記宛先データ要素の第2のサブセットを備える第2の宛先レジスタとを含む宛先レジスタのペアを備え、
前記第1のソースレジスタが、宛先レジスタの前記ペアに対応する単一のレジスタである、SIMD命令と、
前記第1のセットのソースデータ要素の順序に基づいて、
前記第1のセットの偶数番号のソースデータ要素から、前記第1の宛先レジスタ内の前記宛先データ要素の前記第1のサブセットを生成するためのコードと、
前記第1のセットの奇数番号のソースデータ要素から、前記第2の宛先レジスタ内の前記宛先データ要素の前記第2のサブセットを生成するためのコードと
を備え、前記第1のセットのソースデータ要素の前記順序は、前記第1のセットのソースデータ要素と前記宛先データ要素との間のマッピングを提供するために割り当てられ、
前記第1のセットのソースデータ要素がそれぞれのSIMDレーン内にあり、
前記マッピングに従って、前記ソースデータ要素の各々から、前記それぞれのSIMDレーン、または前記それぞれのSIMDレーンに隣接するSIMDレーン内のそれぞれの宛先データ要素を生成するためのコードを備える、非一時的コンピュータ可読記憶媒体。 A non-temporary computer-readable storage medium with instructions that, when executed by a processor, causes the processor to perform mixed-width, single-instruction, multiple-data (SIMD) operations.
A first source vector operand comprising a first source register, wherein the first source register comprises a first set of source data elements with a first bit width.
A SIMD instruction with a destination vector operand with a second bit width destination data element.
The second bit width is twice the first bit width,
The destination vector operand comprises a pair of destination registers including a first destination register comprising a first subset of the destination data elements and a second destination register comprising a second subset of the destination data elements.
With the SIMD instruction, the first source register is a single register corresponding to the pair of destination registers.
Based on the order of the source data elements in the first set above
A code for generating the first subset of the destination data elements in the first destination register from the even numbered source data elements of the first set.
A code for generating the second subset of the destination data elements in the second destination register from the odd-numbered source data elements of the first set, comprising the code for generating the second subset of the destination data elements, the first set of source data. The order of the elements is assigned to provide a mapping between the first set of source data elements and the destination data elements.
The first set of source data elements is in each SIMD lane and
Non-temporary computer readable, comprising code for generating each destination data element in each SIMD lane, or in a SIMD lane adjacent to each SIMD lane, from each of the source data elements according to the mapping. Storage medium.
第1のビット幅のソースデータ要素を備えるソースベクトルオペランドと、
宛先レジスタを備える宛先ベクトルオペランドであって、前記宛先レジスタが第2のビット幅の宛先データ要素を備える、宛先ベクトルオペランドと
を備えるSIMD命令であって、
前記第2のビット幅が前記第1のビット幅の半分であり、
前記ソースベクトルオペランドが、前記ソースデータ要素の第1のサブセットを備える第1のソースレジスタと、前記ソースデータ要素の第2のサブセットを備える第2のソースレジスタとを含むソースレジスタのペアを備え、
前記宛先レジスタが、ソースレジスタの前記ペアに対応する単一のレジスタである、SIMD命令と、
前記宛先データ要素の順序に基づいて、
前記ソースデータ要素の前記第1のサブセットから偶数番号の宛先データ要素を生成するためのコードと、
前記ソースデータ要素の前記第2のサブセットから奇数番号の宛先データ要素を生成するためのコードと
を備え、前記宛先データ要素の前記順序は、前記ソースデータ要素と前記宛先データ要素との間のマッピングを提供するために割り当てられ、
前記宛先データ要素がそれぞれのSIMDレーン内にあり、
前記マッピングに従って、前記それぞれのSIMDレーン、または前記それぞれのSIMDレーンに隣接するSIMDレーン内のソースデータ要素から、前記宛先データ要素の各々を生成するためのコードを備える、非一時的コンピュータ可読記憶媒体。 A non-temporary computer-readable storage medium with instructions that, when executed by a processor, causes the processor to perform mixed-width, single-instruction, multiple-data (SIMD) operations.
A source vector operand with a first bit width source data element,
A SIMD instruction comprising a destination vector operand with a destination vector operand comprising a destination register, wherein the destination register comprises a destination data element of a second bit width.
The second bit width is half of the first bit width.
The source vector operand comprises a pair of source registers including a first source register comprising a first subset of the source data elements and a second source register comprising a second subset of the source data elements.
With the SIMD instruction, the destination register is a single register corresponding to the pair of source registers.
Based on the order of the destination data elements
A code for generating an even-numbered destination data element from the first subset of the source data elements, and
A code for generating an odd numbered destination data element from the second subset of the source data elements is provided, and the order of the destination data elements is a mapping between the source data elements and the destination data elements. Assigned to provide
The destination data element is in each SIMD lane and
A non-temporary computer-readable storage medium comprising a code for generating each of the destination data elements from the respective SIMD lanes or source data elements in the SIMD lanes adjacent to the respective SIMD lanes according to the mapping. ..
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US14/805,456 US10489155B2 (en) | 2015-07-21 | 2015-07-21 | Mixed-width SIMD operations using even/odd register pairs for wide data elements |
| US14/805,456 | 2015-07-21 | ||
| PCT/US2016/038487 WO2017014892A1 (en) | 2015-07-21 | 2016-06-21 | Mixed-width simd operations having even-element and odd-element operations using register pair for wide data elements |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2018525731A JP2018525731A (en) | 2018-09-06 |
| JP2018525731A5 JP2018525731A5 (en) | 2020-02-20 |
| JP6920277B2 true JP6920277B2 (en) | 2021-08-18 |
Family
ID=56204087
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018502231A Active JP6920277B2 (en) | 2015-07-21 | 2016-06-21 | Mixed width SIMD operation with even and odd element operations using a pair of registers for a wide data element |
Country Status (9)
| Country | Link |
|---|---|
| US (1) | US10489155B2 (en) |
| EP (1) | EP3326060B1 (en) |
| JP (1) | JP6920277B2 (en) |
| KR (1) | KR102121866B1 (en) |
| CN (1) | CN107851010B (en) |
| BR (1) | BR112018001208B1 (en) |
| ES (1) | ES2795832T3 (en) |
| HU (1) | HUE049260T2 (en) |
| WO (1) | WO2017014892A1 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2540943B (en) * | 2015-07-31 | 2018-04-11 | Advanced Risc Mach Ltd | Vector arithmetic instruction |
| US10698685B2 (en) * | 2017-05-03 | 2020-06-30 | Intel Corporation | Instructions for dual destination type conversion, mixed precision accumulation, and mixed precision atomic memory operations |
| CN109298886A (en) * | 2017-07-25 | 2019-02-01 | 合肥君正科技有限公司 | SIMD instruction executes method, apparatus and processor |
| US20190272175A1 (en) * | 2018-03-01 | 2019-09-05 | Qualcomm Incorporated | Single pack & unpack network and method for variable bit width data formats for computational machines |
| US10528346B2 (en) * | 2018-03-29 | 2020-01-07 | Intel Corporation | Instructions for fused multiply-add operations with variable precision input operands |
| CN111324354B (en) * | 2019-12-27 | 2023-04-18 | 湖南科技大学 | Register selection method integrating register pair requirements |
Family Cites Families (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5673321A (en) | 1995-06-29 | 1997-09-30 | Hewlett-Packard Company | Efficient selection and mixing of multiple sub-word items packed into two or more computer words |
| US6202141B1 (en) | 1998-06-16 | 2001-03-13 | International Business Machines Corporation | Method and apparatus for performing vector operation using separate multiplication on odd and even data elements of source vectors |
| US7127593B2 (en) * | 2001-06-11 | 2006-10-24 | Broadcom Corporation | Conditional execution with multiple destination stores |
| US6922716B2 (en) | 2001-07-13 | 2005-07-26 | Motorola, Inc. | Method and apparatus for vector processing |
| US7107305B2 (en) | 2001-10-05 | 2006-09-12 | Intel Corporation | Multiply-accumulate (MAC) unit for single-instruction/multiple-data (SIMD) instructions |
| KR100553252B1 (en) * | 2002-02-01 | 2006-02-20 | 아바고테크놀로지스코리아 주식회사 | Power amplifier of portable terminal |
| US7376812B1 (en) | 2002-05-13 | 2008-05-20 | Tensilica, Inc. | Vector co-processor for configurable and extensible processor architecture |
| US7668897B2 (en) | 2003-06-16 | 2010-02-23 | Arm Limited | Result partitioning within SIMD data processing systems |
| US7275148B2 (en) * | 2003-09-08 | 2007-09-25 | Freescale Semiconductor, Inc. | Data processing system using multiple addressing modes for SIMD operations and method thereof |
| GB2411975B (en) * | 2003-12-09 | 2006-10-04 | Advanced Risc Mach Ltd | Data processing apparatus and method for performing arithmetic operations in SIMD data processing |
| GB2409068A (en) * | 2003-12-09 | 2005-06-15 | Advanced Risc Mach Ltd | Data element size control within parallel lanes of processing |
| US7353244B2 (en) * | 2004-04-16 | 2008-04-01 | Marvell International Ltd. | Dual-multiply-accumulator operation optimized for even and odd multisample calculations |
| US7400271B2 (en) * | 2005-06-21 | 2008-07-15 | International Characters, Inc. | Method and apparatus for processing character streams |
| CN1964490A (en) * | 2005-11-09 | 2007-05-16 | 松下电器产业株式会社 | A filter and filtering method |
| US9235414B2 (en) | 2011-12-19 | 2016-01-12 | Intel Corporation | SIMD integer multiply-accumulate instruction for multi-precision arithmetic |
| WO2013095564A1 (en) * | 2011-12-22 | 2013-06-27 | Intel Corporation | Processors, methods, systems, and instructions to generate sequences of integers in numerical order that differ by a constant stride |
| US10628156B2 (en) | 2013-07-09 | 2020-04-21 | Texas Instruments Incorporated | Vector SIMD VLIW data path architecture |
-
2015
- 2015-07-21 US US14/805,456 patent/US10489155B2/en active Active
-
2016
- 2016-06-21 WO PCT/US2016/038487 patent/WO2017014892A1/en not_active Ceased
- 2016-06-21 BR BR112018001208-4A patent/BR112018001208B1/en active IP Right Grant
- 2016-06-21 HU HUE16732213A patent/HUE049260T2/en unknown
- 2016-06-21 CN CN201680041468.2A patent/CN107851010B/en active Active
- 2016-06-21 EP EP16732213.0A patent/EP3326060B1/en active Active
- 2016-06-21 ES ES16732213T patent/ES2795832T3/en active Active
- 2016-06-21 KR KR1020187001696A patent/KR102121866B1/en active Active
- 2016-06-21 JP JP2018502231A patent/JP6920277B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| WO2017014892A1 (en) | 2017-01-26 |
| US10489155B2 (en) | 2019-11-26 |
| EP3326060A1 (en) | 2018-05-30 |
| KR20180030986A (en) | 2018-03-27 |
| US20170024209A1 (en) | 2017-01-26 |
| CN107851010B (en) | 2021-11-12 |
| JP2018525731A (en) | 2018-09-06 |
| HUE049260T2 (en) | 2020-09-28 |
| CN107851010A (en) | 2018-03-27 |
| BR112018001208B1 (en) | 2023-12-26 |
| ES2795832T3 (en) | 2020-11-24 |
| KR102121866B1 (en) | 2020-06-11 |
| EP3326060B1 (en) | 2020-03-25 |
| BR112018001208A2 (en) | 2018-09-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6920277B2 (en) | Mixed width SIMD operation with even and odd element operations using a pair of registers for a wide data element | |
| US9355061B2 (en) | Data processing apparatus and method for performing scan operations | |
| JP6373425B2 (en) | Instruction to shift multiple bits to the left and pull multiple 1s into multiple lower bits | |
| CN107229463B (en) | Computing equipment and corresponding computing methods | |
| CN107533460B (en) | Compact finite impulse response (FIR) filtering processor, method, system and instructions | |
| TWI752343B (en) | Execution unit circuits, image processors, and methods for performing a sum of absolute difference computation | |
| CN107851013B (en) | Data processing apparatus and method | |
| JP5607832B2 (en) | General logic operation method and apparatus | |
| CN107851016B (en) | vector arithmetic instructions | |
| US20190213006A1 (en) | Multi-functional execution lane for image processor | |
| WO2009131007A1 (en) | Simd parallel computer system, simd parallel computing method, and control program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180123 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190605 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200108 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20200108 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200514 |
|
| A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20200611 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200622 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200923 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20201221 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210413 |
|
| C60 | Trial request (containing other claim documents, opposition documents) |
Free format text: JAPANESE INTERMEDIATE CODE: C60 Effective date: 20210413 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20210423 |
|
| C21 | Notice of transfer of a case for reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C21 Effective date: 20210426 |
|
| 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: 20210705 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210726 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6920277 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |