System and method for executing instructions to convert to 16-bit floating point format
By designing the extraction, decoding and execution circuit for the processor, the conversion of single-precision elements to 16-bit floating point format is realized, which solves the problem of low conversion efficiency in the existing technology and improves the performance and power efficiency of the processor. Suitable for applications such as machine learning.
Patent Information
- Application Number
- CN202110484218.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-11-09
- Filing Date
- 2019-10-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-10-30
AI Technical Summary
It is difficult to efficiently convert a single-precision floating-point vector to a 16-bit floating-point format with existing technology, especially when truncation and rounding are required, affecting processor performance and power efficiency, especially in applications such as machine learning. .
A processor system is designed, including an extraction circuit, a decoding circuit and an execution circuit. By extracting the operation code in the instruction, the single-precision elements are converted into a 16-bit floating point format, and truncated and rounded when necessary, and stored in In the target vector, balanced vector length conversion is supported, suitable for 128-bit, 256-bit or 512-bit vector registers.
Increased memory usage and bandwidth efficiency improves processor performance and power efficiency, especially in machine learning and other applications that require large-scale data operations.
Smart Images

Figure CN113076139B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 201911045764.1 and name “System and method for executing instructions to convert into 16-bit floating point format”. Technical Field
[0002] The field of the invention relates generally to computer processor architecture and, more particularly, to systems and methods for executing instructions to convert to a 16-bit floating point format. Background Art
[0003] An instruction set, or instruction set architecture (ISA), is the part of a computer architecture that is relevant to programming and may include native data types, instructions, register architecture, addressing modes, memory architecture, interrupt and exception handling, and external input and output (I / O). An instruction set includes one or more instruction formats. A given instruction format defines various fields (number of bits, position of bits) to specify the operation to be performed and the (one or more) operands on which the operation is to be performed, etc. A given instruction is formulated using a given instruction format and specifies the operation and operand. An instruction stream is a specific sequence of instructions, where each instruction in the sequence is an occurrence of a certain instruction in a certain instruction format.
[0004] Scientific, financial, general purpose, automatic vectorization, RMS (recognition, mining and synthesis) / visual and multimedia applications (e.g., 2D / 3D graphics, image processing, video compression / decompression, speech recognition algorithms and audio manipulation) often require the same operation to be performed on a large number of data items (referred to as "data parallelism"). Single instruction multiple data (Single Instruction Multiple Data, SIMD) refers to a class of instructions that enables a processor to perform the same operation on multiple data items. SIMD technology is particularly suitable for such processors: these processors can logically divide the bits in the register into several fixed-size data elements, each data element representing a separate value. For example, the bits in a 512-bit register can be specified as source operands to be operated as sixteen separate 32-bit single-precision floating-point data elements. As another example, the bits in a 256-bit register can be specified as source operands to be operated as sixteen separate 16-bit floating-point packed data elements, eight separate 32-bit packed data elements (double-word size data elements) or thirty-two separate 8-bit data elements (byte (B) size data elements). Such data is called a packed data type or a vector data type, and the operands of this data type are called packed data operands or vector operands. In other words, a packed data item or vector refers to a sequence of packed data elements; and a packed data operand or vector operand is a source or target operand of a SIMD instruction (also called a packed data instruction or a vector instruction).
[0005] As an example, a class of SIMD instructions specifies a single vector operation to be performed on two source vector operands in a vertical manner, to generate a target vector operand with the same size, with the same number of data elements and in the same order of data elements. The data element in the source vector operand is called the source data element, and the data element in the target vector operand is called the target or result data element. These source vector operands have the same size and comprise the data elements of the same width, so that they comprise the same number of data elements. The source data elements in the same bit position in the two source vector operands form the pair of data elements (also referred to as corresponding data elements; that is, the data elements in the data element position 0 of each source operand are corresponding, the data elements in the data element position 1 of each source operand are corresponding, etc. and so on). The operation specified by the SIMD instruction is performed on each pair of these pairs of source data elements to generate the result data elements of the matching number, so that every pair of source data elements has a corresponding result data element. Because the operations are vertical and because the result vector operands are the same size, have the same number of data elements and the result data elements are stored in the same data element order as the source vector operands, the result data elements are in the same bit positions in the result vector operands as their corresponding pairs of source data elements in the source vector operands. In addition to this exemplary type of SIMD instruction, there are various other types of SIMD instructions.
[0006] Some applications that process vectors with single precision can use 16-bit floating point format vectors instead with almost equivalent performance. Summary of the invention
[0007] According to a first aspect of the present disclosure, a processor is provided, comprising: an extraction circuit, the extraction circuit being used to extract an instruction, the instruction having a field, the field being used to specify an opcode and a first source vector including N single-precision elements and a position of a target vector including at least N 16-bit floating-point elements, the opcode instructing an execution circuit to convert each element of the first source vector into a 16-bit floating-point format and store each converted element into a corresponding position of the target vector, the conversion including truncation and rounding when necessary; a decoding circuit, the decoding circuit being used to decode the instruction; and an execution circuit, the execution circuit being used to respond to the instruction according to the opcode.
[0008] According to a second aspect of the present disclosure, a system is provided, comprising a processor and a memory, wherein the processor comprises: an extraction circuit, the extraction circuit being used to extract an instruction, the instruction having a field, the field being used to specify an opcode and a first source vector comprising N single-precision elements and a position of a target vector comprising at least N 16-bit floating-point elements, the opcode instructing an execution circuit to convert each element of the first source vector into a 16-bit floating-point format and store each converted element into a corresponding position of the target vector, the conversion including truncation and rounding when necessary; a decoding circuit, the decoding circuit being used to decode the instruction; and an execution circuit, the execution circuit being used to respond to the instruction according to the opcode.
[0009] According to a third aspect of the present disclosure, a method executed by a processor is provided, the method comprising: extracting an instruction using an extraction circuit, the instruction having a field for specifying an opcode and a first source vector including N single-precision elements and a position of a target vector including at least N 16-bit floating-point elements, the opcode instructing an execution circuit to convert each element of the first source vector into a 16-bit floating-point format and store each converted element into a corresponding position of the target vector, the conversion including truncation and rounding when necessary; decoding the instruction using a decoding circuit; and responding to the instruction according to the opcode using the execution circuit.
[0010] According to a fourth aspect of the present disclosure, a machine-readable medium is provided, the machine-readable medium comprising code, which, when executed, enables a machine to perform the method according to the third aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a block diagram illustrating a processing component for executing a format conversion instruction according to one embodiment;
[0012] Figure 2A is a block diagram illustrating execution of a format conversion instruction according to one embodiment;
[0013] Figure 2B is a block diagram illustrating execution of a format conversion instruction according to one embodiment;
[0014] Figure 2C is a block diagram illustrating execution of a format conversion instruction according to one embodiment;
[0015] Figure 2D is a block diagram illustrating the execution of a 2-input format conversion instruction according to an embodiment;
[0016] Figure 3A is a pseudo code illustrating an exemplary execution of a format conversion instruction according to an embodiment;
[0017] Figure 3B is a pseudo code illustrating an exemplary execution of a 2-input format conversion instruction according to an embodiment;
[0018] Figure 3C According to one embodiment, a Figure 3A and 3B Pseudocode of the helper function;
[0019] Figure 4A is a process flow diagram illustrating a processor responding to a format conversion instruction according to an embodiment;
[0020] Figure 4B is a flowchart illustrating a process of a processor responding to an input format conversion instruction according to an embodiment;
[0021] Figure 5A is a block diagram illustrating the format of a Format Convert (VCVTNEPS2BF16) instruction according to one embodiment;
[0022] Figure 5B is a block diagram illustrating the format of a 2-Input Format Convert (VCVTNE2PS2BF16) instruction according to one embodiment;
[0023] Figure 6A-6B is a block diagram illustrating a generic vector friendly instruction format and instruction templates thereof according to some embodiments of the present invention;
[0024] Fig. 6A is a block diagram illustrating a generic vector friendly instruction format and class A instruction templates thereof according to some embodiments of the present invention;
[0025] Figure 6B is a block diagram illustrating a generic vector friendly instruction format and class B instruction templates thereof according to some embodiments of the present invention;
[0026] Fig. 7A is a block diagram illustrating an exemplary specific vector friendly instruction format according to some embodiments of the present invention;
[0027] Figure 7B is a block diagram illustrating fields of a particular vector friendly instruction format that make up a full opcode field according to one embodiment;
[0028] Figure 7C is a block diagram illustrating fields of a particular vector friendly instruction format that make up a register index field according to one embodiment;
[0029] Fig.7D is a block diagram illustrating fields of a particular vector friendly instruction format that constitute an enhanced operation field according to one embodiment;
[0030] Figure 8 is a block diagram of a register architecture according to one embodiment;
[0031] Fig.9A is a block diagram illustrating both an exemplary in-order pipeline and an exemplary register renaming, out-of-order issue / execution pipeline, according to some embodiments;
[0032] Fig. 9B is a block diagram illustrating both an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue / execution architecture core to be included in a processor in accordance with some embodiments;
[0033] Figures 10A-10B A block diagram illustrating a more specific exemplary in-order core architecture, which would be one of several logic blocks in a chip (including other cores of the same type and / or different types);
[0034] Fig. 10A is a block diagram of a single processor core and its connection to an on-chip interconnect network and to its local subset of a level 2 (L2) cache in accordance with some embodiments;
[0035] Fig. 10B According to some embodiments Fig. 10A An expanded view of a portion of a processor core in ;
[0036] Fig.11 is a block diagram of a processor that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to some embodiments;
[0037] Figure 12-Figure 15 is a block diagram of an exemplary computer architecture;
[0038] Fig.12 A block diagram of a system is shown according to some embodiments;
[0039] Fig.13 is a block diagram of a first more specific exemplary system according to some embodiments;
[0040] Fig.14 is a block diagram of a second more specific exemplary system according to some embodiments;
[0041] Fig.15 is a block diagram of a system on a chip (SoC) according to some embodiments; and
[0042] Fig.16 is a block diagram contrasted with using a software instruction converter to convert binary instructions in a source instruction set to binary instructions in a target instruction set according to some embodiments. DETAILED DESCRIPTION
[0043] In the following description, many specific details are set forth. However, it is to be understood that some embodiments may be implemented without these specific details. In other cases, well-known circuits, structures, and techniques are not shown in detail to avoid obscuring the understanding of this description.
[0044] References in the specification to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include features, structures, or characteristics, but each embodiment may not necessarily include the particular feature, structure, or characteristic. In addition, such phrases do not necessarily refer to the same embodiment. In addition, when a feature, structure, or characteristic is described with respect to one embodiment, it is considered to be within the knowledge of those skilled in the art to implement such feature, structure, or characteristic with respect to other embodiments (if explicitly described).
[0045] As described above, applications that process vectors with single precision sources can also have nearly equivalent performance using 16-bit floating point format vectors instead. Disclosed herein and illustrated by the accompanying drawings are vector packed data format conversion instructions (VCVTNEPS2BF16 and VCVTNE2PS2BF16) that implement format conversion of one or two source vectors. The VCVTNEPS2BF16 mnemonic indicates: "VCVT" = Vector ConVerT, "NE" = Round to Nearest Even ( N earest E ven), "PS" = packed single precision source, "2" = to, and "BF16" = BF loat16. The 2-input version of this instruction extracts two source vectors with N single precision elements each and generates a destination vector with 2 times N elements in 16-bit floating point format. The 2-input version allows a balanced solution where an N-element source vector is converted into an N-element destination vector. Using this balanced solution, all operands, whether they are source or destination operands, can be stored in the same type of vector register, whether it is a 128-bit, 256-bit, or 512-bit vector register. At least reference Figure 8 An exemplary processor register file is illustrated and described.
[0046] The exposed format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instructions are expected to achieve comparable quality compared to algorithms using single precision for both source and destination elements, but with reduced memory usage and memory bandwidth requirements, which will help improve performance and power efficiency, especially in machine learning scenarios.
[0047] Related floating point formats
[0048] The 16-bit floating point formats used by the disclosed embodiments include bfloat16 (defined by Google Inc. of Mountain View, California), which is sometimes referred to herein as "bf16" or "BF16"; and binary16 (promulgated by the Institute of Electrical and Electronics Engineers as IEEE754-2008), which is sometimes referred to herein as "half precision" or "fp16". The 32-bit floating point formats used by the disclosed embodiments include binary32 (also promulgated as part of IEEE754-2008), which is sometimes referred to herein as "single precision" or "fp32".
[0049] Table 1 lists some relevant features and distinctions between related data formats. As shown in the table, all three formats include a sign bit. binary32, binary16, and bfloat16 have exponent widths of 8, 5, and 8 bits, respectively, and have significand (sometimes referred to herein as "mantissa" or "fraction") bits of 24, 11, and 8, respectively. One advantage of bfloat16 over fp16 is that we can truncate fp32 numbers and have valid bfloat16 numbers.
[0050] Table 1
[0051] Format Bit symbol index Valid Number Binary32 32 1 8-bit 24-bit Binary16 16 1 5-digit 11th place Bfloat16 16 1 8-bit 8-bit
[0052] A processor implementing the disclosed format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instruction will include extraction circuitry to extract an instruction having fields to specify an opcode and the locations of the first source, second source (for the 2-input version), and destination vectors. Figure 5A-5B , 6A-6B and 7A-7D further illustrate and describe the format of the format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instruction. The specified source and destination vectors may be located in vector registers or in memory. The opcode instructs the execution circuit to convert each element of the specified source vector to a 16-bit floating point, including truncation and rounding (if necessary), and store each converted element in a corresponding position of the specified destination vector. Such a processor will also include: a decoding circuit for decoding the extracted instruction; and an execution circuit for responding to the instruction according to the opcode. At least reference Figure 1-2D , Figures 9A-9B and Figures 10A-10B The execution circuit is further described and illustrated below.
[0053] Figure 11 is a block diagram illustrating processing components for executing format conversion (or) instructions according to some embodiments. As shown, computing system 100 includes storage device 101 to store (one or more) format conversion instructions 103 to be executed. In some embodiments, computing system 100 is a SIMD processor to simultaneously process multiple elements of a packed data vector.
[0054] In operation, format conversion instruction(s) 103 are fetched from storage device 101 by fetch circuit 105. Format conversion instruction(s) 103 have fields not shown here to specify an opcode and a first source vector including N single precision elements and a location of a destination vector including at least N 16-bit floating point elements, the opcode instructing the execution circuit to convert each element of the specified source vector to 16-bit floating point format, including truncation and rounding (if necessary), and to store each converted element into a corresponding location of the specified destination vector. At least reference is made to Figure 5A-5B , 6A-6B and 7A-7D further illustrate and describe the format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instruction format.
[0055] The extracted format conversion instruction 107 is decoded by the decoding circuit 109, which decodes the extracted format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instruction 107 into one or more operations. In some embodiments, this decoding includes generating a plurality of micro-operations to be executed by the execution circuit (e.g., the execution circuit 117). The decoding circuit 109 also decodes the instruction suffix and prefix (if used).
[0056] Execution circuitry 117, which has access to register file and memory 115, responds to instruction 111 according to the opcode, and hereinafter at least with reference to Figures 2A-2D , 3A-3C, 4A-4B, 9A-9B and 10A-10B to further describe and illustrate it.
[0057] In some embodiments, register renaming, register allocation and / or scheduling circuitry 113 provides functionality for one or more of the following: 1) renaming logical operand values to physical operand values (e.g., a register alias table in some embodiments), 2) assigning status bits and flags to decoded instructions, and 3) scheduling decoded format conversion (VCVTNEPS2BF16 or VCVTNE2PS2BF16) instructions 111 for execution on execution circuitry 117 out of an instruction pool (e.g., using a reservation station in some embodiments).
[0058] In some embodiments, write back circuitry 119 writes back the results of executed instructions. Write back circuitry 119 and register renaming / scheduling circuitry 113 are optional, as indicated by their dashed borders, in that they may occur at different times, or not at all.
[0059] Figure 2A 1 is a block diagram illustrating the execution of a format conversion () instruction according to one embodiment. As shown in the figure, a computing device 200 (e.g., a processor) receives, extracts, and decodes (the extraction and decoding circuits are not shown here, but at least reference is made to Figure 1 and Figures 9A-9B 2 . The format conversion instruction 201 includes fields to specify an opcode 202 (VCVTNEPS2BF16) and the location of a first source vector 206 including N single precision elements and a destination vector 204 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements.
[0060] Here, N is equal to 4, and the specified first source 212 and target 218 vectors both have four elements. However, the source and target vectors are not balanced because they have different widths. Software can issue an unbalanced format conversion instruction 201 by assigning vectors of different sizes to the source and target vectors, such as by assigning a 256-bit ymm vector as the source and a 128-bit xmm vector as the target. Figure 2B-2D The diagram shows a scenario where balancing is achieved by assigning vectors of the same type to both the source and the target. Figure 8 An exemplary processor register file is further illustrated and described below.
[0061] In some embodiments, the format conversion instruction 201 further includes a mask {k} 208 and a zeroing control {z} 210. Figure 5A , 6A 6B and 7A-7D further illustrate and describe the format of the format conversion instruction 201 having an opcode of VCVTNEPS2BF16. Also shown are a designated first source vector 212, execution circuitry 214, and a designated destination vector 218, wherein execution circuitry 214 includes conversion circuitry 216A-D.
[0062] In operation, a computing device 200 (e.g., a processor) uses fetch and decode circuitry (not shown) to fetch and decode instruction 201, the instruction 201 having fields to specify an opcode 202 and the locations of first source 206 and destination 204 vectors, the opcode instructing the computing device (e.g., the processor) to convert each element of the specified first source vector 212 to a 16-bit floating point format (e.g., bfloat16), with converter circuits 216A-D including truncation and rounding (if necessary), and to store each converted element into a corresponding location of the specified destination vector 218. As described at least with reference to Figure 5A , 6A As further illustrated and described in FIG. 6B and FIG. 7A-7D , the instruction 201 may specify a different vector length in other embodiments, such as 128 bits, 512 bits, or 1024 bits. The execution circuit 214 here responds to the instruction according to the operation code 202 .
[0063] Figure 2B 1 is a block diagram illustrating the execution of a format conversion () instruction according to one embodiment. As shown in the figure, a computing device 220 (e.g., a processor) receives, extracts and decodes (the extraction and decoding circuits are not shown here, but at least reference is made to Figure 1 and Figures 9A-9B 2BF16) and a first source vector 226 including N single-precision elements and a destination vector 224 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements.
[0064] Here, balancing is achieved by assigning registers of the same type as the specified first source 232 and destination 238. However, the specified destination vector 238, which is half the width of the specified first source vector 232, has twice as many entries. In operation, the converted entries are written to the first four destination entries, and zeros are written to the remaining four entries.
[0065] In some embodiments, the format conversion instruction 221 also includes a mask {k} 228 and a zeroing control {z} 230. Figure 5A , 6A 6B and 7A-7D further illustrate and describe the format of the format conversion instruction 221 having an opcode of VCVTNEPS2BF16. Also shown are a designated first source vector 232, an execution circuit 234, and a designated destination vector 238, wherein the execution circuit 214 includes conversion circuits 236A-D.
[0066] In operation, the computing device 220 (e.g., a processor) uses fetch and decode circuitry (not shown) to fetch and decode instruction 221, the instruction 221 having fields to specify an opcode 222 (i.e., VCVTNEPS2BF16) and the locations of the first source 226 and target 224 vectors, the opcode instructing the computing device 220 (e.g., the processor) to use converters 236A-D in the execution circuitry 234 to convert each element of the specified first source vector 232 to a 16-bit floating point format (e.g., bfloat16), the converter circuits 236A-D including truncation and rounding (if necessary), and store each converted element in a corresponding position of the specified target vector 218. Here, the corresponding target vector position includes the first four elements, and zeros are written to the remaining four elements. As at least referenced Figure 5A , 6A As further illustrated and described in FIG. 6B and FIG. 7A-7D , instruction 221 may specify a different vector length in other embodiments, such as 128 bits, 512 bits, or 1024 bits. Execution circuit 234 responds to the instruction according to opcode 202 .
[0067] Figure 2C 1 is a block diagram illustrating the execution of a format conversion () instruction according to one embodiment. As shown in the figure, a computing device 240 (e.g., a processor) receives, extracts and decodes (the extraction and decoding circuits are not shown here, but at least reference is made to Figure 1 and Figures 9A-9B 241, which includes fields to specify an opcode 242 (VCVTNEPS2BF16) and the location of a first source vector 246 including N single-precision elements and a destination vector 244 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements.
[0068] Here, balancing is achieved by assigning registers of the same type as the specified first source 252 and destination 258 vectors. However, the specified destination vector 258, which is half the width of the specified first source vector 252, has twice as many entries. In operation, the converted entries are written to the first four destination entries, and zeros are written to the remaining four entries. Zeroing is done in Figure 2C This is not shown in the example, but will be done implicitly in this embodiment.
[0069] Implicit zeroing is the default treatment for masked elements in some embodiments. In other embodiments, an architectural model-specific register (MSR) is programmed by software to control whether zeroing or masking is applied to masked elements. In still other embodiments, zeroing behavior is specified by a format conversion instruction.
[0070] In some embodiments, the format conversion instruction 241 also includes a mask {k} 248 and a zeroing control {z} 250. Figure 5A , 6A -6B and 7A-7D further illustrate and describe the format of the format conversion instruction 241 having an opcode of VCVTNEPS2BF16.
[0071] Also shown are a designated first source vector 252, execution circuitry 254, and a designated destination vector 258, wherein execution circuitry 214 includes conversion circuitry 256A-D.
[0072] In operation, the computing device 240 (e.g., a processor) uses extraction and decoding circuits (not shown) to extract and decode instructions 241, which have fields to specify an opcode 242 (i.e., VCVTNEPS2BF16) and the locations of the first source 246 and target 244 vectors, and the opcode instructs the computing device 240 (e.g., a processor) to use converters 256A-D in the execution circuit 254 to convert each element of the specified first source vector 252 into a 16-bit floating point format (e.g., bfloat16), and the converter circuits 256A-D include truncation and rounding (if necessary), and store each converted element in a corresponding position of the specified target vector 258. Here, the corresponding target vector position includes the first four elements, and zeros are implicitly written to the remaining four elements. Implicit zeroing is the default treatment for masked elements in some embodiments. In other embodiments, a model-specific register (MSR) on the structure will be programmed by software to control whether zeroing or masking is applied to masked elements. In yet other embodiments, the zeroing behavior is specified by a format conversion instruction.
[0073] As at least reference Figure 5A , 6A As further illustrated and described in FIG. 6B and FIG. 7A-7D , the instruction 241 may specify a different vector length in other embodiments, such as 128 bits, 512 bits, or 1024 bits. The execution circuit 254 here responds to the instruction according to the operation code 242 .
[0074] Figure 2D 1 is a block diagram illustrating the execution of a format conversion (VCVTNE2PS2BF16) instruction according to one embodiment. As shown, a computing device 260 (e.g., a processor) receives, extracts, and decodes (the extraction and decoding circuits are not shown here, but at least reference is made to Figure 1 and Figures 9A-9B2 (to illustrate and describe) format conversion instruction 261, which includes fields to specify an opcode 262 (VCVTNE2PS2BF16) and the location of first and second source vectors 266 and 268 including N single-precision elements and a destination vector 264 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements. Here, N is equal to 4 and the specified destination vector 264 includes 8 elements.
[0075] Here, the width of the target vector is half that of the source vector, but balance is achieved by assigning two source vectors whose elements are to be converted and written to the target. In operation, the converted entries from the specified first source 272A are written to the first four entries of the specified target 278, and the converted entries from the specified second source 272B are written to the last four entries of the specified target 278.
[0076] In some embodiments, the format conversion instruction 261 also includes a mask {k} 268 and a zeroing control {z} 270. Figure 5A , 6A -6B and 7A-7D further illustrate and describe the format of the format conversion instruction 261 having an opcode of VCVTNEPS2BF16.
[0077] Also shown are designated first and second source vectors 272A-B, execution circuitry 274 including conversion circuitry 276A-H, and designated destination vector 278.
[0078] In operation, the computing device 260 (e.g., a processor) uses fetch and decode circuitry (not shown) to fetch and decode instruction 261, which has fields to specify an opcode 262 (i.e., VCVTNE2PS2BF16) and the locations of first and second source 266 and 268 and destination 264 vectors, the opcode instructing the computing device 260 (e.g., the processor) to use converters 276A-H in execution circuitry 274 to convert each element of the specified first and second source vectors 272A-B to a 16-bit floating point format (e.g., bfloat16), the converter circuits 276A-H including truncation and rounding (if necessary), and store each converted element into a corresponding location of the specified destination vector 278. Here, the first four elements of the specified destination 278 correspond to the specified first source 272A, and the last four elements of the specified destination 278 correspond to the specified second source 272B. As at least referenced Figure 5A , 6AAs further illustrated and described in FIG. 6B and FIG. 7A-7D , instruction 261 may specify a different vector length in other embodiments, such as 128 bits, 512 bits, or 1024 bits. Execution circuit 274 responds to the instruction according to operation code 262 .
[0079] Figure 3A 301 is a pseudo code illustrating an exemplary execution of a format conversion (VCVTNEPS2BF16) instruction according to one embodiment. As shown, the format conversion instruction 301 has fields to specify an opcode 302 (VCVTNEPS2BF16) and the location of the first source 306 (src) and the destination 304 (dest) vectors, which can be any of 128 bits, 256 bits, and 512 bits according to a constant VL instantiated in the code and representing a "vector length". In some embodiments, the instruction 301 also has fields to specify a mask 308 and a zeroing control 310. The pseudo code 315 also shows the use of a write mask to control whether each target element is masked, masked elements are zeroed or merged (as at least referenced). Figure 5A , 6A -6B and 7A-7D further illustrate and describe, some embodiments of the format conversion instruction include fields to specify the mask and control whether to zero or merge). At least with reference to Figure 2A-2C , 4A and 9A-9B further illustrate and describe the execution of the format conversion instruction 301.
[0080] Figure 3B 335 is a pseudocode illustrating an exemplary execution of a 2-input format conversion () instruction according to one embodiment. As shown, the format conversion instruction 321 has fields to specify an opcode 322 (VCVTNE2PS2BF16) and the locations of the first source 326 (src1), the second source 328 (src2), and the destination 324 (dest) vectors. The destination vector can be any one of 128 bits, 256 bits, and 512 bits according to the constant VL. Here, the source vector location can be in a memory or in a register. In some embodiments, the format conversion instruction 321 has fields to specify a write mask {k} 330 and a zeroing control {z} 331. Pseudocode 335 also shows the use of a write mask to control whether each target element is masked, and the masked elements are zeroed or merged (as at least referenced). Figure 5A , 6A -6B and 7A-7D further illustrate and describe, in some embodiments, the format conversion instruction includes fields to specify the mask and control whether to zero or merge). At least with reference to Figure 2D , 4B 9A-9B further illustrate and describe the execution of the format conversion instruction 321.
[0081] Figure 3C According to one embodiment, a Figure 3A-3B Here, pseudocode 354 defines a helper function, convert_fp32_to_bfloat16(), which converts from binary32 format to bfloat16 format.
[0082] Pseudocode 340 illustrates that the disclosed embodiment is different from a simple conversion that only truncates the lower sixteen bits of a binary32 number, and advantageously performs rounding of normal numbers and takes into account rounding bias. The code shows that the format conversion instruction has improved rounding behavior compared to just truncation. The rounding behavior of the disclosed embodiment promotes more accurate calculations compared to conversions performed by truncation. In some embodiments, the execution circuit complies with the rounding behavior according to the rounding rules promulgated as IEEE 754, such as "NE" indicating rounding to the nearest even number. In some embodiments, the rounding behavior is specified by the instruction, such as by including the suffix "NE" in the opcode to indicate rounding to the nearest even number. In other embodiments, the rounding behavior adopts a default behavior like "NE". In other other embodiments, the rounding behavior is controlled by an architectural model-specific register (MSR) configured by software.
[0083] Pseudo-code 340 also illustrates that the disclosed embodiments perform truncation when necessary, such as when an input to a function is not-a-data (NaN).
[0084] At least for reference Figures 2A-2D , 3A-3B, 4A-4B and 9A-9B further illustrate and describe the execution of the format conversion instruction.
[0085] Figure 4A 401 is a process flow diagram illustrating a processor responding to a format conversion () instruction according to one embodiment. The format conversion instruction 401 includes fields to specify an opcode 402 (VCVTNEPS2BF16) and the location of a first source vector 406 including N single-precision elements and a destination vector 404 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements.
[0086] As shown, the processor responds to the decoded format conversion instruction by executing flow 400. At 421, the processor uses the extraction circuit to extract the instruction, which has a field to specify an opcode (e.g., VCVTNEPS2BF16) and a first source vector including N single-precision elements and a location of a target vector including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements, and the opcode instructs the execution circuit to convert each element of the specified source vector into a 16-bit floating point, the conversion including truncation and rounding (if necessary), and store each converted element in a corresponding position of the specified target vector. At 423, the processor uses the decoding circuit to decode the extracted instruction. In some embodiments, the processor schedules the execution of the decoded instruction at 425. At 427, the processor uses the execution circuit to respond to the instruction according to the opcode. In some embodiments, the processor submits the result of the executed instruction at 429. Operations 425 and 429 are optional, as indicated by their dashed borders, because they can occur at different times, or not at all.
[0087] Figure 4B 4 is a process flow diagram illustrating a processor responding to a 2-input format conversion () instruction according to one embodiment. The format conversion instruction 451 includes fields to specify an opcode 452 (VCVTNE2PS2BF16) and the location of first and second source vectors 456 and 462 including N single-precision elements and a destination vector 454 including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements.
[0088] Note that the present invention is not intended to be limited to any particular mnemonic for the opcode. Here, VCVTNEPS2BF16 is selected as a mnemonic with letters representing various instruction characteristics. For example, "VCVT" is selected to indicate a vector conversion ( V ector C on V er T ). As another example, "NE" is chosen to indicate that the rounding mode promulgated by IEEE 754 (here Nearest Even) is selected. "2PS" means 2-Pack Single. "2" means "to". Finally, "BF16" means bfloat16.
[0089] As shown, the processor responds to the decoded format conversion instruction by executing flow 450. At 471, the processor uses the extraction circuit to extract the instruction, which has a field to specify the opcode (e.g., VCVTNE2PS2BF16) and the location of the first and second source vectors including N single-precision elements and the target vector including at least N 16-bit floating point (e.g., bfloat16 or binary16) elements, and the opcode instructs the execution circuit to convert each element of the specified source first and second vectors into 16-bit floating point, the conversion including truncation and rounding (if necessary), and store each converted element into the corresponding position of the specified target vector. At 473, the processor uses the decoding circuit to decode the extracted instruction. In some embodiments, the processor schedules the execution of the decoded instruction at 475. At 477, the processor uses the execution circuit to respond to the instruction according to the opcode. In some embodiments, the processor submits the result of the executed instruction at 479. Operations 475 and 479 are optional, as indicated by their dashed borders, because they can occur at different times, or not at all.
[0090] Figure 5A 1 is a block diagram illustrating the format of a format conversion (VCVTNEPS2BF16) instruction according to an embodiment. As shown, the format conversion instruction 500 includes fields for specifying an opcode 502 (VCVTNEPS2BF16) and the location of a target 504 and a first source 506 vector. The source and target vectors may each be located in a register or in a memory.
[0091] The opcode 502 is shown as including an asterisk, which indicates that various optional fields may be added to the opcode as a prefix or suffix. That is, the format conversion instruction 500 also includes optional parameters to affect instruction behavior, including mask {k} 508, zeroing control {z} 510, element format 514, vector size (N) 516, and rounding mode 518. One or more of the instruction decorations 508, 510, 514, 516, and 518 may be specified using a prefix or suffix of the opcode 502.
[0092] In some embodiments, one or more of the optional instruction decorations 508, 510, 514, 516, and 518 are encoded in an immediate field (not shown) that is optionally included with the instruction 500. In some embodiments, one or more of the optional instruction decorations 508, 510, 514, 516, and 518 are specified via a configuration register, such as a model specific register (MSR) included in the instruction set architecture.
[0093] At least for reference Figure 5B , 6A -6B and 7A-7D further illustrate and describe the format of the format conversion instruction 500.
[0094] Figure 5B is a block diagram illustrating the format of a 2-input format conversion (VCVTNE2PS2BF16) instruction according to one embodiment. As shown, the format conversion instruction 550 includes fields for specifying the locations of an opcode 552 (VCVTNE2PS2BF16) and a target 554, a first source 556, and a second source 552 vector. The source and target vectors may each be located in a register or in memory.
[0095] The opcode 552 is shown as including an asterisk, which indicates that various optional fields may be added to the opcode as a prefix or suffix. That is, the format conversion instruction 550 also includes optional parameters to affect the instruction behavior, including mask {k} 558, zeroing control {z} 560, element format 564, vector size (N) 566, and rounding mode 568. One or more of the instruction decorations 558, 560, 564, and 566 may be specified using a prefix or suffix of the opcode 552.
[0096] In some embodiments, one or more of the optional instruction modifiers 558, 560, 564, 566, and 568 are encoded in an immediate field (not shown) that is optionally included with the instruction 550. In some embodiments, one or more of the optional instruction modifiers 558, 560, 564, 566, and 568 are specified via a configuration register, such as a model specific register (MSR) included in the instruction set architecture.
[0097] At least for reference Figure 5A , 6A -6B and 7A-7D further illustrate and describe the format of format conversion instruction 550.
[0098] Instruction Set
[0099] The instruction set may include one or more instruction formats. A given instruction format may define various fields (e.g., the number of bits, the position of bits) to specify the operation to be performed (e.g., opcode) and the (one or more) operation objects and / or other (one or more) data fields (e.g., mask) on which the operation is to be performed, etc. Some instruction formats are further decomposed by the definition of instruction templates (or subformats). For example, the instruction templates of a given instruction format may be defined as having different subsets of the fields of the instruction format (the included fields are usually in the same order, but at least some may have different bit positions because the included fields are less) and / or defined as interpreting given fields differently. Thus, each instruction of the ISA is expressed using a given instruction format (and, if defined, expressed in a given one of the instruction templates of the instruction format) and includes fields for specifying operations and operation objects. For example, an exemplary ADD instruction has a specific opcode and instruction format, the instruction format including an opcode field to specify the opcode and an operand field to select the operand (source 1 / destination and source 2); and the appearance of this ADD instruction in the instruction stream will have specific content in the operand field to select the specific operand. A set of SIMD extensions known as Advanced Vector Extensions (AVX) (AVX1 and AVX2) and using the Vector Extension (VEX) encoding scheme have been released and / or published (e.g., see 64 and IA-32 Architectures Software Developer's Manual, September 2014; and see Advanced Vector Extensions Programming Reference, October 2014).
[0100] Example instruction format
[0101] Embodiments of the (one or more) instructions described herein may be implemented in different formats. In addition, exemplary systems, architectures, and pipelines are described in detail below. Embodiments of the (one or more) instructions may be executed on such systems, architectures, and pipelines, but are not limited to those described in detail.
[0102] Generic vector friendly instruction format
[0103] The vector friendly instruction format is an instruction format suitable for vector instructions (eg, having certain fields specific to vector operations). Although embodiments are described in which both vector and scalar operations are supported by the vector friendly instruction format, alternative embodiments use only the vector friendly instruction format for vector operations.
[0104] Figure 6A-6B is a block diagram illustrating a generic vector friendly instruction format and instruction templates thereof according to some embodiments of the present invention. Fig. 6A is a block diagram illustrating a generic vector friendly instruction format and class A instruction templates thereof according to some embodiments of the present invention; and Figure 6B 600 is a block diagram illustrating a generic vector friendly instruction format and its class B instruction templates according to some embodiments of the present invention. Specifically, class A and class B instruction templates are defined for the generic vector friendly instruction format 600, both of which include a no memory access 605 instruction template and a memory access 620 instruction template. The term "generic" in the context of the vector friendly instruction format refers to the fact that the instruction format is not bound to any particular instruction set.
[0105] Although embodiments of the present invention will be described in which the vector friendly instruction format supports the following: 64-byte vector operand length (or size) with either 32-bit (4-byte) or 64-bit (8-byte) data element width (or size) (thus, a 64-byte vector consists of 16 doubleword-sized elements or 8 quadword-sized elements); 64-byte vector operand length (or size) with either 16-bit (2-byte) or 8-bit (1-byte) data element width (or size); 32-byte vector operand length (or size) with either 32-bit (4-byte), 64-bit (8-byte) data element width (or size); 4-bit (8-byte), 16-bit (2-byte), or 8-bit (1-byte) data element width (or size); and 16-byte vector operand length (or size) with 32-bit (4-byte), 64-bit (8-byte), 16-bit (2-byte), or 8-bit (1-byte) data element width (or size); however, alternative embodiments may support more, fewer, and / or different vector operand sizes (e.g., 256-byte vector operands) with more, fewer, or different data element widths (e.g., 128-bit (16-byte) data element width).
[0106] Fig. 6A The category A instruction templates in include: 1) within the no memory access 605 instruction template, the no memory access, full rounding control type operation 610 instruction template and the no memory access, data transformation type operation 615 instruction template are shown; and 2) within the memory access 620 instruction template, the memory access, transient 625 instruction template and the memory access, non-transient 630 instruction template are shown. Figure 6B The category B instruction templates include: 1) within the no memory access 605 instruction template, the no memory access, write mask control, partial rounding control type operation 612 instruction template and the no memory access, write mask control, vsize type operation 617 instruction template are shown; and 2) within the memory access 620 instruction template, the memory access, write mask control 627 instruction template is shown.
[0107] The generic vector friendly instruction format 600 includes Figure 6A-6BThe following fields are listed below in the order shown.
[0108] Format field 640 - A specific value in this field (the instruction format identifier value) uniquely identifies the vector friendly instruction format, and thus identifies occurrences of instructions in the vector friendly instruction format in an instruction stream. As such, this field is optional, as it is not required for instruction sets that only have the generic vector friendly instruction format.
[0109] Basic operation field 642 - its content distinguishes different basic operations.
[0110] Register index field 644 - its contents specify the location of the source and target operands, either in registers or in memory, either directly or through address generation. These include a sufficient number of bits to select N registers from a PxQ (e.g., 32x512, 16x128, 32x1024, 64x1024) register file. While in one embodiment N may be up to three source and one target registers, alternative embodiments may support more or fewer source and target registers (e.g., may support up to two sources, one of which also serves as a target, may support up to three sources, one of which also serves as a target, may support up to two sources and one target).
[0111] Modifier field 646 - its content distinguishes occurrences of instructions in the generic vector instruction format that specify memory access from those that do not; that is, distinguishes between no memory access 605 instruction templates and memory access 620 instruction templates. Memory access operations read and / or write to the memory hierarchy (in some cases using values in registers to specify source and / or target addresses), while non-memory access operations do not read and / or write to the memory hierarchy (e.g., the source and target are registers). While in one embodiment this field also selects between three different ways to perform memory address calculations, alternative embodiments may support more, fewer, or different ways to perform memory address calculations.
[0112] Enhanced operation field 650 - its content distinguishes which of a number of different operations is to be performed in addition to the basic operation. This field is context dependent. In some embodiments, this field is divided into a category field 668, an alpha field 652, and a beta field 654. The enhanced operation field 650 allows a common group of operations to be performed in a single instruction instead of 2, 3, or 4 instructions.
[0113] Scale Factor Field 660 - its content allows the content of the Index field to be scaled for memory address generation (e.g., for a memory address using 2 缩放比例 * address generation of index + base).
[0114] Displacement field 662A - its contents are used as part of memory address generation (e.g., for a 缩放比例 * Address generation of index + base + displacement).
[0115] Displacement Factor Field 662B (note that the juxtaposition of displacement field 662A directly above displacement factor field 662B indicates that one or the other is used) - its contents are used as part of address generation; it specifies the displacement factor to be scaled by the size (N) of the memory access - where N is the number of bytes in the memory access (e.g., for a memory access using 2 缩放比例 * address generation of index + base + scaled displacement). Redundant low-order bits are ignored, and therefore, the contents of the displacement factor field are multiplied by the total size of the memory operand (N) to generate the final displacement to be used to calculate the effective address. The value of N is determined by the processor hardware at runtime based on the full opcode field 674 (described later herein) and the data manipulation field 654C. The displacement field 662A and the displacement factor field 662B are optional because they are not used for the no memory access 605 instruction template, and / or different embodiments may implement only one or neither of the two.
[0116] Data element width field 664 - its contents distinguish which of several data element widths is used (in some embodiments for all instructions; in other embodiments for only some of the instructions). This field is optional in that it is not needed if only one data element width is supported and / or some aspect of the opcode is used to support the data element width.
[0117] Write mask field 670 - its content controls, on a per data element position basis, whether that data element position in the target vector operand reflects the result of the base and enhanced operations. Class A instruction templates support merge-write masking, while class B instruction templates support both merge-write masking and zero-write masking. When merged, the vector mask allows any set of elements in the target to be protected from updates during the execution of any operation (specified by the base and enhanced operations); in one embodiment, the old value of each element of the target whose corresponding mask bit has a 0 is preserved. In contrast, the zero-vector mask allows any set of elements in the target to be zeroed during the execution of any operation (specified by the base and enhanced operations); in one embodiment, an element in the target is set to 0 when the corresponding mask bit has a 0 value. A subset of this functionality is the ability to control the vector length of the operation being performed (i.e., the span of elements modified, from first to last); however, the elements modified do not have to be contiguous. Thus, the write mask field 670 allows partial vector operations, including loads, stores, arithmetic, logical, and the like. Although embodiments of the invention have been described in which the contents of write mask field 670 select the one of several write mask registers that contains the write mask to be used (whereby the contents of write mask field 670 indirectly identify the masking to be performed), alternative embodiments alternatively or additionally allow the contents of mask write field 670 to directly specify the masking to be performed.
[0118] Immediate field 672 - its content allows the specification of an immediate. This field is optional in that it is not present in implementations that do not support the generic vector friendly format and it is not present in instructions that do not use immediate.
[0119] Category field 668 - its content distinguishes different categories of instructions. Figure 6A-6B , the contents of this field select between Class A and Class B instructions. Figure 6A-6B In , rounded squares are used to indicate that a specific value exists in a field (e.g. Figure 6A-6B 668A and Category B 668B for Category field 668, respectively.
[0120] Instruction template for category A
[0121] In the case of the non-memory access 605 instruction templates of class A, the alpha field 652 is interpreted as the RS field 652A, whose content distinguishes which of the different enhanced operation types is to be performed (e.g., rounding 652A.1 and data transformation 652A.2 are specified for the no memory access rounding type operation 610 and no memory access data transformation type operation 615 instruction templates, respectively), while the beta field 654 distinguishes which of the specified type of operation is to be performed. In the no memory access 605 instruction templates, the scale field 660, the displacement field 662A, and the displacement scale field 662B are not present.
[0122] No memory access instruction templates – full rounding controlled operations
[0123] In the no memory access full round control type operation 610 instruction template, the beta field 654 is interpreted as a round control field 654A, whose content (one or more) provides static rounding. Although in the described embodiment of the present invention, the round control field 654A includes a suppress all floating-point exception (SAE) field 656 and a round operation control field 658, alternative embodiments may support encoding both of these concepts into the same field or may have only one or the other of these concepts / fields (e.g., may only have a round operation control field 658).
[0124] SAE field 656 - its content distinguishes whether exception event reporting is disabled; when the content of the SAE field 656 indicates that suppression is enabled, the given instruction does not report any kind of floating point exception flags and does not raise any floating point exception handler.
[0125] Round operation control field 658 - its contents distinguish which of a set of rounding operations is to be performed (e.g., round up, round down, round toward zero, and round toward nearest). Thus, the round operation control field 658 allows the rounding mode to be changed on a per-instruction basis. In some embodiments where the processor includes a control register for specifying the rounding mode, the contents of the round operation control field 658 override the register value.
[0126] No memory access instruction templates – data transformation operations
[0127] In the no memory access data transform type operation 615 instruction template, the beta field 654 is interpreted as a data transform field 654B, the content of which distinguishes which of several data transforms is to be performed (eg, no data transform, swizzle, broadcast).
[0128] In the case of a class A memory access 620 instruction template, the alpha field 652 is interpreted as an eviction hint field 652B, the content of which distinguishes which of the eviction hints is to be used (in Fig. 6A , transient 652B.1 and non-transient 652B.2 are specified for the memory access transient 625 instruction template and the memory access non-transient 630 instruction template, respectively, and the beta field 654 is interpreted as a data manipulation field 654C, the content of which distinguishes which of several data manipulation operations (also called primitives) is to be performed (e.g., no manipulation; broadcast; upconversion of the source; and downconversion of the destination). The memory access 620 instruction template includes a scaling field 660 and optionally includes a displacement field 662A or a displacement factor field 662B.
[0129] Vector memory instructions perform vector loads from memory and vector stores to memory, with support for conversions. Like conventional vector instructions, vector memory instructions transfer data to / from memory in a per-data-element manner, where the actual elements transferred are specified by the contents of the vector mask selected as the write mask.
[0130] Memory Access Instruction Templates – Transient
[0131] Transient data is data that is likely to be reused soon enough to benefit from caching. However, this is a hint, and different processors may implement it in different ways, including ignoring the hint completely.
[0132] Memory Access Instruction Templates – Non-Transient
[0133] Non-transient data is data that is unlikely to be reused quickly enough to benefit from being cached in the level 1 cache and should be given eviction priority. However, this is a hint, and different processors may implement it in different ways, including ignoring the hint entirely.
[0134] Instruction template for category B
[0135] In the case of class B instruction templates, the alpha field 652 is interpreted as a write mask control (Z) field 652C, the content of which distinguishes whether the write masking controlled by the write mask field 670 should be merge or zero.
[0136] In the case of a non-memory access 605 instruction template of class B, a portion of the beta field 654 is interpreted as an RL field 657A, the contents of which distinguish which of the different enhanced operation types are to be performed (e.g., rounding 657A.1 and vector length (VSIZE) 57A.2 are specified for the no memory access, write mask control, partial rounding control type operation 612 instruction template and the no memory access, write mask control, VSIZE type operation 617 instruction template, respectively), while the remainder of the beta field 654 distinguishes which of the specified type of operation is to be performed. In the no memory access 605 instruction template, the scale field 660, the displacement field 662A, and the displacement scale field 662B are not present.
[0137] In the no memory access, write mask control, partial round control type operation 610 instruction template, the remainder of the beta field 654 is interpreted as the round operation field 659A and exception event reporting is disabled (the given instruction does not report any kind of floating point exception flag and does not trigger any floating point exception handler).
[0138] Round operation control field 659A - As with round operation control field 658, its contents distinguish which of a set of rounding operations is to be performed (e.g., round up, round down, round toward zero, and round toward nearest). Thus, round operation control field 659A allows the rounding mode to be changed on a per-instruction basis. In some embodiments where the processor includes a control register for specifying the rounding mode, the contents of round operation control field 659A override the register value.
[0139] In the no memory access, write mask control, VSIZE type operation 617 instruction template, the remainder of the beta field 654 is interpreted as a vector length field 659B, the contents of which distinguish which of several data vector lengths to operate on (e.g., 128, 256, or 512 bytes).
[0140] In the case of a memory access 620 instruction template of class B, a portion of the beta field 654 is interpreted as a broadcast field 657B, the content of which distinguishes whether a broadcast-type data operation is to be performed, while the remainder of the beta field 654 is interpreted as a vector length field 659B. The memory access 620 instruction template includes a scaling field 660 and optionally a displacement field 662A or a displacement factor field 662B.
[0141] For the generic vector friendly instruction format 600, the full opcode field 674 is shown as including the format field 640, the basic operation field 642, and the data element width field 664. Although one embodiment is shown in which the full opcode field 674 includes all of these fields, the full opcode field 674 includes only some of these fields in embodiments that do not support all of these fields. The full opcode field 674 provides an operation code (opcode).
[0142] The enhanced operation field 650, the data element width field 664, and the write mask field 670 allow these features to be specified on a per-instruction basis in the generic vector friendly instruction format.
[0143] The combination of writing the mask field and the data element width field creates typed instructions because they allow the mask to be applied based on different data element widths.
[0144] The various instruction templates found within categories A and B are beneficial in different situations. In some embodiments of the present invention, different processors or different cores within a processor may support only category A, only category B, or both categories. For example, a high-performance general-purpose out-of-order core intended for general-purpose computing may support only category B, a core intended primarily for graphics and / or scientific (throughput) computing may support only category A, and a core intended for both may support both (of course, a core with some mix of templates and instructions from both categories, but not all templates and instructions from both categories, is within the scope of the present invention). In addition, a single processor may include multiple cores, all of which support the same category or different cores support different categories. For example, in a processor with separate graphics and general-purpose cores, one of the graphics cores intended primarily for graphics and / or scientific computing may support only category A, while one or more of the general-purpose cores may be a high-performance general-purpose core with out-of-order execution and register renaming intended for general-purpose computing that supports only category B. Another processor that does not have a separate graphics core may include one or more general-purpose in-order or out-of-order cores that support both category A and category B. Of course, in different embodiments of the invention, features from one category may also be implemented in another category. A program written in a high-level language will be placed (e.g., just-in-time or statically compiled into) a variety of different executable forms, including: 1) a form with only instructions of the (one or more) categories supported by the target processor for execution; or 2) a form with replacement routines written using different combinations of instructions of all categories and with control flow code that selects the routine to be executed based on the instructions supported by the processor currently executing the code.
[0145] Exemplary specific vector friendly instruction format
[0146] Fig. 7A is a block diagram illustrating an exemplary specific vector friendly instruction format according to some embodiments of the invention. Fig. 7A A specific vector friendly instruction format 700 is shown that is specific in the sense that it specifies the location, size, interpretation, and order of fields, as well as the values of some of these fields. The specific vector friendly instruction format 700 can be used to extend the x86 instruction set so that some of the fields are similar or identical to those used in the existing x86 instruction set and its extensions (e.g., AVX). This format is consistent with the prefix encoding field, real opcode byte field, MOD R / M field, SIB field, displacement field, and immediate field of the existing x86 instruction set with extensions. The figure shows the vector friendly instruction format 700 from Fig. 7A The fields from Figure 6 are mapped to the fields from Figure 6.
[0147] It should be understood that while embodiments of the present invention are described with reference to the specific vector friendly instruction format 700 in the context of the generic vector friendly instruction format 600 for illustrative purposes, the present invention is not limited to the specific vector friendly instruction format 700 unless otherwise stated. For example, the generic vector friendly instruction format 600 contemplates a variety of possible sizes for various fields, while the specific vector friendly instruction format 700 is shown as having fields of specific sizes. As a specific example, while the data element width field 664 is shown as a one-bit field in the specific vector friendly instruction format 700, the present invention is not limited thereto (that is, the generic vector friendly instruction format 600 contemplates other sizes of the data element width field 664).
[0148] The generic vector friendly instruction format 600 includes Fig. 7A The following fields are listed below in the order shown.
[0149] EVEX prefix (bytes 0-3) 702 - encoded in four-byte form.
[0150] Format field 640 (EVEX byte 0, bits [7:0]) - The first byte (EVEX byte 0) is the format field 640 and it contains 0x62 (a unique value used to distinguish the vector friendly instruction format in some embodiments).
[0151] The second through fourth bytes (EVEX bytes 1-3) include several bit fields that provide specific capabilities.
[0152] REX field 705 (EVEX byte 1, bits [7-5]) - consists of the EVEX.R bit field (EVEX byte 1, bits [7]-R), the EVEX.X bit field (EVEX byte 1, bits [6]-X), and the 657BEX byte 1, bits [5]-B). The EVEX.R, EVEX.X, and EVEX.B bit fields provide the same functionality as the corresponding VEX bit fields and are encoded using inverse form, i.e., ZMM0 is encoded as 1111B and ZMM15 is encoded as 0000B. The other fields of the instruction encode the lower three bits of the register index as is known in the art, so that Rrrr, Xxxx, and Bbbb can be formed by adding EVEX.R, EVEX.X, and EVEX.B.
[0153] REX' 710A - This is the first portion of the REX' field 710 and is the EVEX.R' bit field (EVEX byte 1, bit [4] - R') used to encode the upper 16 or lower 16 of the extended 32 register set. In some embodiments, this bit and other bits as shown below are stored in bit-reversed format to distinguish from the BOUND instruction (in the well-known x86 32-bit mode), which has a true opcode byte of 62 but does not accept a value of 11 in the MOD field in the MOD R / M field (described below); alternative embodiments of the present invention do not store this bit and the other bits indicated below in reverse format. The value 1 is used to encode the lower 16 registers. In other words, R'Rrrr is formed by combining EVEX.R', EVEX.R, and other RRRs from other fields.
[0154] Opcode map field 715 (EVEX byte 1, bits [3:0] - mmmm) - its contents encode the implied dominant opcode type (0F, 0F 38, or 0F 3).
[0155] Data element width field 664 (EVEX byte 2, bit [7] - W) - represented by the symbol EVEX.W. EVEX.W is used to define the granularity (size) of the data type (32-bit data element or 64-bit data element).
[0156] EVEX.vvvv 720 (EVEX byte 2, bits [6:3] - vvvv) - The effects of EVEX.vvvv may include the following: 1) EVEX.vvvv encodes the first source register operand specified in inverted (one's complement) form and is valid for instructions with 2 or more source operands; 2) EVEX.vvvv encodes the destination register operand specified in inverted form for certain vector shifts; or 3) EVEX.vvvv does not encode any operand, the field is reserved and should contain 1111b. Thus, the EVEX.vvvv field 720 encodes the 4 low-order bits of the first source register specifier stored in inverted (one's complement) form. Depending on the instruction, an additional different EVEX bit field is used to extend the specifier size to 32 registers.
[0157] EVEX.U 668 Class field (EVEX byte 2, bit [2] - U) - If EVEX.U = 0, it indicates class A or EVEX.U0; if EVEX.U = 1, it indicates class B or EVEX.U1.
[0158] Prefix encoding field 725 (EVEX byte 2, bits [1:0]-pp) - provides additional bits for the basic operation field. In addition to providing support for legacy SSE instructions in EVEX prefix format, this also has the benefit of compacting the SIMD prefix (the EVEX prefix only requires 2 bits, rather than requiring a byte to express the SIMD prefix). In one embodiment, to support legacy SSE instructions that use SIMD prefixes (66H, F2H, F3H) in both legacy and EVEX prefix formats, these legacy SIMD prefixes are encoded into the SIMD prefix encoding field; and are expanded to legacy SIMD prefixes at runtime before being provided to the encoder's PLA (so the PLA can execute both legacy and EVEX formats of these legacy instructions without modification). Although newer instructions can directly use the contents of the EVEX prefix encoding field as an opcode extension, some embodiments extend in a similar manner for consistency, but allow these legacy SIMD prefixes to specify different meanings. Alternative embodiments may redesign the PLA to support 2-bit SIMD prefix encodings, thereby not requiring expansion.
[0159] Alpha field 652 (EVEX byte 3, bit [7] - EH; also referred to as EVEX.EH, EVEX.rs, EVEX.RL, EVEX.WriteMaskControl, and EVEX.N; also illustrated as α) - As previously described, this field is context-dependent.
[0160] Beta field 654 (EVEX byte 3, bits [6:4] – SSS; also called EVEX.s 2-0,EVEX.r 2-0 , EVEX.rr1, EVEX.LL0, EVEX.LLB; also illustrated with βββ) – As mentioned earlier, this field is context-dependent.
[0161] REX' 710B - This is the remainder of the REX' field 710 and is the EVEX.V' bit field (EVEX byte 3, bit [3] - V') that can be used to encode the upper 16 or lower 16 of the extended 32 register set. This bit is stored in a bit-reversed format. A value of 1 is used to encode the lower 16 registers. In other words, V'VVVV is formed by combining EVEX.V', EVEX.vvvv.
[0162] Write mask field 670 (EVEX byte 3, bits [2:0] - kkk) - its contents specify the index of a register in the write mask register as previously described. In some embodiments, a particular value EVEX.kkk = 000 has special behavior that implies that no write mask is used for a particular instruction (this can be accomplished in a variety of ways, including using a write mask that is hardwired to all ones or hardware that bypasses the masking hardware).
[0163] The real opcode field 730 (byte 4) is also called the opcode byte. A portion of the opcode is specified in this field.
[0164] The MOD R / M field 740 (byte 5) includes a MOD field 742, a Reg field 744, and an R / M field 746. As previously described, the content of the MOD field 742 distinguishes between memory access and non-memory access operations. The role of the Reg field 744 can be summarized into two cases: encoding a target register operand or a source register operand or being treated as an opcode extension and not being used to encode any instruction operand. The role of the R / M field 746 can include the following: encoding an instruction operand that references a memory address or encoding a target register operand or a source register operand.
[0165] Scale, Index, Base (SIB) Byte (Byte 6) - As previously described, the contents of the scale field 660 are used for memory address generation. SIB.xxx 754 and SIB.bbb 756 - The contents of these fields have been referenced previously for register indexes Xxxx and Bbbb.
[0166] Displacement field 662A (bytes 7-10) - When the MOD field 742 contains 10, bytes 7-10 are the displacement field 662A and it operates the same as a traditional 32-bit displacement (disp32) and works on a byte granularity.
[0167] Displacement Factor Field 662B (Byte 7) - When the MOD field 742 contains 01, byte 7 is the displacement factor field 662B. The location of this field is the same as that of the traditional x86 instruction set 8-bit displacement (disp8), which works on a byte granularity. Because disp8 is sign-extended, it can only address between -128 and 127 byte offsets; in terms of a 64-byte cache line, disp8 uses 8 bits, which can be set to only four really useful values -128, -64, 0, and 64; because a larger range is often needed, disp32 is used; however, disp32 requires 4 bytes. Unlike disp8 and disp32, the displacement factor field 662B is a reinterpretation of disp8; when the displacement factor field 662B is used, the actual displacement is determined by the contents of the displacement factor field multiplied by the size (N) of the memory operand access. This type of displacement is called disp8*N. This reduces the average instruction length (a single byte is used for the displacement, but with a much larger range). This compressed displacement is based on the following assumption: the effective displacement is a multiple of the granularity of the memory access, and therefore, the redundant low-order bits of the address offset do not need to be encoded. In other words, the displacement factor field 662B replaces the traditional x86 instruction set 8-bit displacement. Thus, the displacement factor field 662B is encoded in the same manner as the x86 instruction set 8-bit displacement (therefore there is no change in the ModRM / SIB encoding rules), with the only exception that disp8 is overloaded to disp8*N. In other words, there is no change in the encoding rules or encoding length, but only in the hardware's interpretation of the displacement value (the hardware needs to scale the displacement according to the size of the memory operation object to obtain the byte address offset). The immediate field 672 operates as described above.
[0168] Full opcode field
[0169] Figure 7B is a block diagram illustrating the fields of a particular vector friendly instruction format 700 that make up a full opcode field 674, according to some embodiments. Specifically, the full opcode field 674 includes a format field 640, a basic operation field 642, and a data element width (W) field 664. The basic operation field 642 includes a prefix encoding field 725, an opcode map field 715, and a real opcode field 730.
[0170] Register Index Field
[0171] Figure 7Cis a block diagram illustrating the fields of a particular vector friendly instruction format 700 that make up the register index field 644, according to some embodiments. Specifically, the register index field 644 includes a REX field 705, a REX' field 710, a MODR / M.reg field 744, a MODR / Mr / m field 746, a VVVV field 720, a xxx field 754, and a bbb field 756.
[0172] Enhanced Action Field
[0173] Fig.7D 668A); when it contains 1, it indicates EVEX.U1 (category B 668B). When U=0 and the MOD field 742 contains 11 (indicating a no memory access operation), the alpha field 652 (EVEX byte 3, bit [7] - EH) is interpreted as the rs field 652A. When the rs field 652A contains 1 (round 652A.1), the beta field 654 (EVEX byte 3, bits [6:4] - SSS) is interpreted as the round control field 654A. The round control field 654A includes a one-bit SAE field 656 and a two-bit round operation field 658. When the rs field 652A contains 0 (data transformation 652A.2), the beta field 654 (EVEX byte 3, bits [6:4]-SSS) is interpreted as a three-bit data transformation field 654B. When U=0 and the MOD field 742 contains 00, 01, or 10 (indicating a memory access operation), the alpha field 652 (EVEX byte 3, bits [7]-EH) is interpreted as an eviction hint (EH) field 652B and the beta field 654 (EVEX byte 3, bits [6:4]-SSS) is interpreted as a three-bit data manipulation field 654C.
[0174] When U=1, the alpha field 652 (EVEX byte 3, bit [7]-EH) is interpreted as a write mask control (Z) field 652C. When U=1 and the MOD field 742 contains 11 (indicating a no memory access operation), a portion of the beta field 654 (EVEX byte 3, bit [4]-S 0 ) is interpreted as RL field 657A; when it contains 1 (round 675A.1), the remainder of beta field 654 (EVEX byte 3, bits [6-5]-S 2-1 ) is interpreted as the round operation field 659A, and when the RL field 657A contains 0 (VSIZE 657.A2), the remainder of the beta field 654 (EVEX byte 3, bits [6-5] -S2-1 ) is interpreted as the vector length field 659B (EVEX byte 3, bits [6-5] - L 1-0 ). When U=1 and the MOD field 742 contains 00, 01, or 10 (indicating a memory access operation), the beta field 654 (EVEX byte 3, bits [6:4] - SSS) is interpreted as the vector length field 659B (EVEX byte 3, bits [6-5] - L 1-0 ) and broadcast field 657B (EVEX byte 3, bit [4]-B).
[0175] Exemplary Register Architecture
[0176] Figure 8 is a block diagram of a register architecture 800 according to some embodiments. In the illustrated embodiment, there are 32 512-bit wide vector registers 810; these registers are referred to as zmm0 through zmm31. The low-order 256 bits of the low 16 zmm registers are overlaid on registers ymm0-16. The low-order 128 bits of the low 16 zmm registers (the low-order 128 bits of the ymm registers) are overlaid on registers xmm0-15. The specific vector friendly instruction format 700 operates on these overlaid register files as shown in the following table.
[0177]
[0178] In other words, the vector length field 659B selects between a maximum length and one or more other shorter lengths, each of which is half the previous length; and instruction templates without a vector length field 659B operate on the maximum vector length. Additionally, in one embodiment, the class B instruction templates of the specific vector friendly instruction format 700 operate on packed or scalar single / double precision floating point data and packed or scalar integer data. Scalar operations are operations performed on the lowest order data element position in a zmm / ymm / xmm register; higher order data element positions are either kept the same as they were before the instruction, or are zeroed, depending on the embodiment.
[0179] Write mask registers 815 - In the illustrated embodiment, there are 8 write mask registers (k0 through k7), each 64 bits in size. In an alternative embodiment, the size of the write mask registers 815 is 16 bits. As previously mentioned, in some embodiments, vector mask register k0 may be used as a write mask; while the encoding that would normally indicate k0 is used for a write mask, it selects a hardwired write mask of 0xffff, effectively disabling write masking for that instruction.
[0180] General purpose registers 825 - In the illustrated embodiment, there are sixteen 64-bit general purpose registers that are used with existing x86 addressing modes to address memory operands. These registers are referenced by the names RAX, RBX, RCX, RDX, RBP, RSI, RDI, RSP, and R8 through R15.
[0181] Scalar floating point stack register file (x87 stack) 845, on which is aliased the MMX packed integer flat register file 850 - in the illustrated embodiment, the x87 stack is an eight-element stack used to perform scalar floating point operations on 32 / 64 / 80-bit floating point data using the x87 instruction set extension; while the MMX registers are used to perform operations on 64-bit packed integer data, as well as to hold operands for some operations performed between MMX and XMM registers.
[0182] Alternative embodiments may use wider or narrower registers. In addition, alternative embodiments may use more, fewer or different register files and registers.
[0183] Exemplary Core Architectures, Processors, and Computer Architectures
[0184] Processor cores may be implemented in different ways, for different purposes, and in different processors. For example, implementations of such cores may include: 1) a general-purpose in-order core intended for general-purpose computing; 2) a high-performance general-purpose out-of-order core intended for general-purpose computing; 3) a special-purpose core intended primarily for graphics and / or scientific (throughput) computing. Different processor implementations may include: 1) a CPU including one or more general-purpose in-order cores intended for general-purpose computing and / or one or more general-purpose out-of-order cores intended for general-purpose computing; and 2) a coprocessor including one or more special-purpose cores intended primarily for graphics and / or scientific (throughput) computing. Such different processors lead to different computer system architectures, which may include: 1) coprocessors on a separate chip from the CPU; 2) coprocessors in the same package as the CPU, on a separate die; 3) coprocessors on the same die as the CPU (in which case such coprocessors are sometimes referred to as dedicated logic, such as integrated graphics and / or scientific (throughput) logic, or as dedicated cores); and 4) systems on a chip, which may include the described CPUs (sometimes referred to as application core(s) or application processor(s), the coprocessors described above, and additional functionality on the same die. An exemplary core architecture is described next, followed by a description of an exemplary processor and computer architecture.
[0185] Exemplary Core Architecture
[0186] In-order and out-of-order core block diagram
[0187] Fig.9A is a block diagram illustrating both an exemplary in-order pipeline and an exemplary register renaming, out-of-order issue / execution pipeline according to some embodiments of the invention. Fig. 9B is a block diagram illustrating both an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue / execution architecture core to be included in a processor according to some embodiments of the invention. Figures 9A-9B The solid line boxes in illustrate the in-order pipeline and in-order core, while the optional addition of dashed line boxes illustrates the register renaming, out-of-order issue / execution pipeline and core. Considering that the in-order aspect is a subset of the out-of-order aspect, the out-of-order aspect will be described.
[0188] exist Fig.9A , the processor pipeline 900 includes an extraction stage 902, a length decoding stage 904, a decoding stage 906, an allocation stage 908, a renaming stage 910, a scheduling (also called dispatch or issue) stage 912, a register read / memory read stage 914, an execution stage 916, a write back / memory write stage 918, an exception handling stage 922, and a commit stage 924.
[0189] Fig. 9B A processor core 990 is shown including a front end unit 930 coupled to an execution engine unit 950, and both are coupled to a memory unit 970. The core 990 may be a reduced instruction set computing (RISC) core, a complex instruction set computing (CISC) core, a very long instruction word (VLIW) core, or a hybrid or alternative core type. As another option, the core 990 may be a special purpose core, such as a network or communication core, a compression engine, a coprocessor core, a general purpose computing graphics processing unit (GPGPU) core, a graphics core, and the like.
[0190] The front end unit 930 includes a branch prediction unit 932, which is coupled to an instruction cache unit 934, which is coupled to an instruction translation lookaside buffer (TLB) 936, which is coupled to an instruction fetch unit 938, which is coupled to a decode unit 940. The decode unit 940 (or decoder) can decode the instruction and generate one or more micro-operations, microcode entry points, micro-instructions, other instructions or other control signals as outputs, which are decoded from the original instruction, or otherwise reflect the original instruction, or are derived from the original instruction. The decode unit 940 can be implemented using a variety of different mechanisms. Examples of suitable mechanisms include, but are not limited to, lookup tables, hardware implementations, programmable logic arrays (PLA), microcode read only memories (ROM), and the like. In one embodiment, core 990 includes a microcode ROM or other medium that stores microcode for certain macroinstructions (eg, in decode unit 940 or otherwise within front end unit 930 ). Decode unit 940 is coupled to rename / allocator unit 952 in execution engine unit 950 .
[0191] The execution engine unit 950 includes a rename / allocator unit 952 coupled to a retirement unit 954 and a set of one or more scheduler units 956. The (one or more) scheduler units 956 represent any number of different schedulers, including reservation stations, central instruction windows, etc. The (one or more) scheduler units 956 are coupled to (one or more) physical register file units 958. Each of the physical register file units 958 represents one or more physical register files, different of which store one or more different data types, such as scalar integers, scalar floating points, packed integers, packed floating points, vector integers, vector floating points, status (e.g., an instruction pointer as the address of the next instruction to be executed), etc. In one embodiment, the physical register file units 958 include vector register units, write mask register units, and scalar register units. These register units can provide architectural vector registers, vector mask registers, and general purpose registers. The physical register file(s) unit(s) 958 are overlaid with the retirement unit(s) 954 to illustrate various ways in which register renaming and out-of-order execution may be implemented (e.g., using reorder buffer(s) and retirement register file(s); using future file(s), history buffer(s) and retirement register file(s); using register maps and pools of registers; etc.). The retirement unit(s) 954 and the physical register file(s) unit(s) 958 are coupled to execution cluster(s) 960. The execution cluster(s) 960 include a set of one or more execution units 962 and a set of one or more memory access units 964. The execution units 962 may perform various operations (e.g., shifts, additions, subtractions, multiplications) on various types of data (e.g., scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some embodiments may include several execution units dedicated to a particular function or set of functions, other embodiments may include only one execution unit or multiple execution units that all perform all functions. Scheduler unit(s) 956, physical register file unit(s) 958, and execution cluster(s) 960 are shown as potentially multiple because some embodiments create separate pipelines for certain types of data / operations (e.g., a scalar integer pipeline, a scalar floating point / packed integer / packed floating point / vector integer / vector floating point pipeline, and / or a memory access pipeline, each with its own scheduler unit, physical register file unit, and / or execution cluster—and in the case of a separate memory access pipeline, some embodiments are implemented where only the execution cluster of this pipeline has memory access unit(s) 964). It should also be understood that where separate pipelines are used, one or more of these pipelines may be out-of-order issue / execution, with the rest being in-order.
[0192] The set of memory access units 964 is coupled to a memory unit 970, which includes a data TLB unit 972, which is coupled to a data cache unit 974, which is coupled to a level 2 (L2) cache unit 976. In one exemplary embodiment, the memory access unit 964 may include a load unit, a store address unit, and a store data unit, each of which is coupled to the data TLB unit 972 in the memory unit 970. The instruction cache unit 934 is further coupled to a level 2 (L2) cache unit 976 in the memory unit 970. The L2 cache unit 976 is coupled to one or more other levels of cache and ultimately to the main memory.
[0193] As an example, the exemplary register renaming, out-of-order issue / execution core architecture may implement pipeline 900 as follows: 1) instruction fetch 938 performs fetch and length decode stages 902 and 904; 2) decode unit 940 performs decode stage 906; 3) rename / allocator unit 952 performs allocate stage 908 and rename stage 910; 4) (one or more) scheduler units 956 perform schedule stage 912; 5) (one or more) physical register file units 958 and memory units 970 perform register read / memory read stage 914; execution cluster 960 performs execute stage 916; 6) memory unit 970 and (one or more) physical register file units 958 perform write back / memory write stage 918; 7) various units may be involved in exception handling stage 922; and 8) retirement unit 954 and (one or more) physical register file units 958 perform commit stage 924.
[0194] Core 990 may support one or more instruction sets (e.g., the x86 instruction set (with some extensions that have been added with newer versions); the MIPS instruction set of MIPS Technologies, Inc. of Sunnyvale, California; the ARM instruction set of ARM Holdings, Inc. of Sunnyvale, California (with optional additional extensions, such as NEON)), including the instruction(s) described herein. In one embodiment, core 990 includes logic to support packed data instruction set extensions (e.g., AVX1, AVX2), thereby allowing operations used by many multimedia applications to be performed using packed data.
[0195] It should be understood that a core may support multithreading (executing two or more parallel sets of operations or threads), and may support multithreading in a variety of ways, including time-sliced multithreading, simultaneous multithreading (where a single physical core provides a logical core for each thread that the physical core is multithreading at the same time), or a combination thereof (e.g., time-sliced fetch and decode followed by simultaneous multithreading, such as Hyperthreading technology).
[0196] Although register renaming is described in the context of out-of-order execution, it should be understood that register renaming can be used in an in-order architecture. Although the illustrated embodiment of the processor also includes separate instruction and data cache units 934 / 974 and a shared L2 cache unit 976, alternative embodiments may have a single internal cache for both instructions and data, such as a level 1 (L1) internal cache, or multiple levels of internal cache. In some embodiments, the system may include a combination of internal caches and external caches external to the core and / or processor. Alternatively, all caches may be external to the core and / or processor.
[0197] Specific Exemplary In-Order Core Architecture
[0198] Figures 10A-10B The figure shows a block diagram of a more specific exemplary in-order core architecture, which will be one of several logic blocks in a chip (including other cores of the same type and / or different types). The logic block communicates with some fixed function logic, memory I / O interfaces and other necessary I / O logic through a high bandwidth interconnect network (e.g., a ring network), depending on the application.
[0199] Fig. 10A 1 is a block diagram of a single processor core and its connection to an on-chip interconnect network 1002 and to its local subset 1004 of a level 2 (L2) cache according to some embodiments of the present invention. In one embodiment, the instruction decoder 1000 supports the x86 instruction set with a packed data instruction set extension. The L1 cache 1006 allows low latency access to cache memory into the scalar and vector units. Although in one embodiment (to simplify the design), the scalar unit 1008 and the vector unit 1010 use separate register sets (scalar registers 1012 and vector registers 1014, respectively) and data transferred between them is written to memory and then read back from the level 1 (L1) cache 1006, alternative embodiments of the present invention may use different schemes (e.g., using a single register set or including a communication path that allows data to be transferred between two register files without being written and read back).
[0200] The local subset 1004 of the L2 cache is part of the global L2 cache, which is divided into separate local subsets, one for each processor core. Each processor core has a direct access path to its own local subset 1004 of the L2 cache. Data read by the processor core is stored in its L2 cache subset 1004 and can be quickly accessed, in parallel with other processor cores accessing their own local L2 cache subsets. Data written by the processor core is stored in its own L2 cache subset 1004 and is flushed from other subsets when necessary. The ring network ensures the consistency of shared data. The ring network is bidirectional to allow agents such as processor cores, L2 caches, and other logic blocks to communicate with each other within the chip. Each ring data path is 1012 bits wide in each direction.
[0201] Fig. 10B According to some embodiments of the present invention Fig. 10A An expanded view of a portion of a processor core in . Fig. 10B The L1 data cache 1006A portion of the L1 cache 1004 is included, as well as more details about the vector unit 1010 and vector registers 1014. Specifically, the vector unit 1010 is a 16-wide vector processing unit (VPU) (see 16-wide ALU 1028) that executes one or more of integer, single-precision floating point, and double-precision floating point instructions. The VPU supports swizzling register inputs using the swizzle unit 1020, numerical conversion using numerical conversion units 1022A-B, and copying of memory inputs using the copy unit 1024. Write mask register 1026 allows assertion of result vector writes.
[0202] Fig.11 is a block diagram of a processor 1100 that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to some embodiments of the invention. Fig.11 The solid line box in the figure illustrates a processor 1100 having a single core 1102A, a system agent 1110, and a set of one or more bus controller units 1116, while the optional addition of the dashed line box illustrates an alternative processor 1100 having multiple cores 1102A-N, a set of one or more integrated memory control units 1114 in the system agent unit 1110, and dedicated logic 1108.
[0203] Thus, different implementations of processor 1100 may include: 1) a CPU where dedicated logic 1108 is integrated graphics and / or scientific (throughput) logic (which may include one or more cores) and cores 1102A-N are one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, or a combination of both); 2) a coprocessor where cores 1102A-N are a large number of dedicated cores intended primarily for graphics and / or scientific (throughput); and 3) a coprocessor where cores 1102A-N are a large number of general purpose in-order cores. Thus, processor 1100 may be a general purpose processor, a coprocessor, or a dedicated processor, such as a network or communication processor, a compression engine, a graphics processor, a GPGPU (general purpose graphics processing unit), a high throughput many integrated core (MIC) coprocessor (including 30 or more cores), an embedded processor, and the like. The processor may be implemented on one or more chips. Processor 1100 may be part of and / or implemented on one or more substrates using any of a number of process technologies, such as BiCMOS, CMOS, or NMOS.
[0204] The memory hierarchy may include one or more levels of cache within the core, a set or one or more shared cache units 1106, and external memory (not shown) coupled to the set of integrated memory controller units 1114. The set of shared cache units 1106 may include (one or more) intermediate level caches, such as level 2 (L2), level 3 (L3), level 4 (4), or other level caches, last level caches (LLC), and / or combinations thereof. While in one embodiment a ring-based interconnect unit 1112 interconnects the integrated graphics logic 1108 (the integrated graphics logic 1108 is an example of dedicated logic and is also referred to herein as dedicated logic), the set of shared cache units 1106, and the system agent unit 1110 / (one or more) integrated memory controller units 1114, alternative embodiments may interconnect such units using any number of well-known techniques. In one embodiment, coherency is maintained between the one or more cache units 1106 and the cores 1102A-N.
[0205] In some embodiments, one or more of the cores 1102A-N may be capable of multithreading. The system agent 1110 includes those components that coordinate and operate the cores 1102A-N. The system agent unit 1110 may include, for example, a power control unit (PCU) and a display unit. The PCU may be or may include logic and components required to regulate the power state of the cores 1102A-N and the integrated graphics logic 1108. The display unit is used to drive one or more externally connected displays.
[0206] The cores 1102A-N may be homogeneous or heterogeneous with respect to the architectural instruction set; that is, two or more of the cores 1102A-N may be capable of executing the same instruction set, while others may be capable of executing only a subset of the instruction set or a different instruction set.
[0207] Exemplary Computer Architecture
[0208] Figure 12-Figure 15 is a block diagram of an exemplary computer architecture. Other system designs and configurations known in the art for laptop computers, desktop computers, handheld PCs, personal digital assistants, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), graphics devices, video game devices, set-top boxes, microcontrollers, cellular phones, portable media players, handheld devices, and various other electronic devices are also suitable. In short, many systems or electronic devices that can contain processors and / or other execution logic disclosed herein are generally suitable.
[0209] Reference now Fig.12, which shows a block diagram of a system 1200 according to one embodiment of the present invention. The system 1200 includes one or more processors 1210, 1215, which are coupled to a controller hub 1220. In one embodiment, the controller hub 1220 includes a graphics memory controller hub (GMCH) 1290 and an input / output hub (IOH) 1250 (which may be on separate chips); the GMCH 1290 includes memory and a graphics processor coupled to a memory 1240 and a coprocessor 1245; and the IOH 1250 couples an input / output (I / O) device 1260 to the GMCH 1290. Alternatively, one or both of the memory and graphics controller are integrated within the processor (as described herein), the memory 1240 and the coprocessor 1245 are directly coupled to the processor 1210, and the controller hub 1220 and the IOH 1250 are in a single chip.
[0210] The optional nature of the additional processor 1215 is Fig.12 Each processor 1210 , 1215 may include one or more of the processing cores described herein and may be some version of processor 1100 .
[0211] The memory 1240 may be, for example, a dynamic random-access memory (DRAM), a phase change memory (PCM), or a combination of the two. For at least one embodiment, the controller hub 1220 communicates with (one or more) 1210, 1215 via a multi-drop bus (e.g., frontside bus (FSB)), a point-to-point interface (e.g., QuickPath Interconnect (QPI)), or a similar connection 1295.
[0212] In one embodiment, the coprocessor 1245 is a special purpose processor, such as a high throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, an embedded processor, etc. In one embodiment, the controller hub 1220 may include an integrated graphics accelerator.
[0213] There may be a variety of differences between the physical resources 1210, 1215 in terms of a range of value metrics including architectural characteristics, microarchitectural characteristics, thermal characteristics, power consumption characteristics, and the like.
[0214] In one embodiment, the processor 1210 executes instructions that control general types of data processing operations. Embedded within these instructions may be coprocessor instructions. The processor 1210 recognizes these coprocessor instructions as types that should be executed by an attached coprocessor 1245. Therefore, the processor 1210 issues these coprocessor instructions (or control signals representing coprocessor instructions) to the coprocessor 1245 on a coprocessor bus or other interconnect. The coprocessor(s) 1245 accept and execute the received coprocessor instructions.
[0215] Reference now Fig.13 , which shows a block diagram of a first more specific exemplary system 1300 according to an embodiment of the present invention. Fig.13 As shown in , multiprocessor system 1300 is a point-to-point interconnect system and includes a first processor 1370 and a second processor 1380 coupled via a point-to-point interconnect 1350. Each of processors 1370 and 1380 may be some version of processor 1100. In some embodiments, processors 1370 and 1380 are processors 1210 and 1215, respectively, and coprocessor 1338 is coprocessor 1245. In another embodiment, processors 1370 and 1380 are processor 1210 and coprocessor 1245, respectively.
[0216] Processors 1370 and 1380 are shown as including integrated memory controller (IMC) units 1372 and 1382, respectively. Processor 1370 also includes point-to-point (PP) interfaces 1376 and 1378 as part of its bus controller unit; similarly, second processor 1380 includes PP interfaces 1386 and 1388. Processors 1370, 1380 can exchange information via point-to-point (PP) interface 1350 using PP interface circuits 1378, 1388. Fig.13 As shown in FIG. 1 , IMCs 1372 and 1382 couple the processors to respective memories, namely, memory 1332 and memory 1334 , which may be portions of main memory locally attached to the respective processors.
[0217] Processors 1370, 1380 may each exchange information with a chipset 1390 via individual PP interfaces 1352, 1354 using point-to-point interface circuits 1376, 1394, 1386, 1398. Chipset 1390 may optionally exchange information with a coprocessor 1338 via a high-performance interface 1392. In one embodiment, coprocessor 1338 is a special-purpose processor, such as a high-throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, an embedded processor, or the like.
[0218] A shared cache (not shown) may be included in either processor, or external to both processors but connected to the processors via the PP interconnect so that local cache information of either or both processors may be stored in the shared cache when the processors are placed in a low power mode.
[0219] Chipset 1390 may be coupled to first bus 1316 via interface 1396. In one embodiment, first bus 1316 may be a Peripheral Component Interconnect (PCI) bus, or a bus such as a PCI Express bus or another third generation I / O interconnect bus, although the scope of the invention is not limited in this regard.
[0220] like Fig.13 As shown in , various I / O devices 1314 may be coupled to the first bus 1316, and a bus bridge 1318 coupling the first bus 1316 to a second bus 1320. In one embodiment, one or more additional processors 1315, such as a coprocessor, a high throughput MIC processor, a GPGPU, an accelerator (e.g., a graphics accelerator or a digital signal processing (DSP) unit), a field programmable gate array, or any other processor, are coupled to the first bus 1316. In one embodiment, the second bus 1320 may be a low pin count (LPC) bus. Various devices may be coupled to the second bus 1320, including, for example, a keyboard and / or mouse 1322, communication devices 1327, and a storage unit 1328, such as a disk drive or other mass storage device, which in one embodiment may include instructions / code and data 1330. In addition, an audio I / O 1324 may be coupled to the second bus 1320. Note that other architectures are possible. For example, instead of Fig.13 In addition to the point-to-point architecture, the system can implement a multi-point branch bus or other such architecture.
[0221] Reference now Fig.14 , which shows a block diagram of a second more specific exemplary system 1400 according to an embodiment of the present invention. Fig.13 and Fig.14 Like elements in the text are numbered likewise, and Fig.13 Some aspects of Fig.14 Omitted to avoid ambiguity Fig.14 other aspects.
[0222] Fig.14The diagram illustrates that processors 1370, 1380 may include integrated memory and I / O control logic ("CL") 1472 and 1482, respectively. Thus, CL 1472, 1482 includes an integrated memory controller unit and includes I / O control logic. Fig.14 The figure shows that not only the memory 1332, 1334 is coupled to the CL 1472, 1482, but also the I / O device 1414 is coupled to the control logic 1472, 1482. The legacy I / O device 1415 is coupled to the chipset 1390.
[0223] Reference now Fig.15 , which shows a block diagram of a SoC 1500 according to an embodiment of the present invention. Fig.11 Similar elements in the figure are labeled similarly. In addition, dashed boxes are optional features on more advanced SoCs. Fig.15 , interconnect unit(s) 1502 are coupled to: application processor 1510, which includes a set of one or more cores 1102A-N, and (one or more) shared cache units 1106, wherein cores 1102A-N include cache units 1104A-N; system agent unit 1110; (one or more) bus controller units 1116; (one or more) integrated memory controller units 1114; a set or one or more coprocessors 1520, which may include integrated graphics logic, image processors, audio processors, and video processors; static random access memory (SRAM) unit 1530; direct memory access (DMA) unit 1532; and display unit 1540 for coupling to one or more external displays. In one embodiment, coprocessor(s) 1520 include special purpose processors, such as network or communication processors, compression engines, GPGPUs, high throughput MIC processors, embedded processors, and the like.
[0224] Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementations. Embodiments of the present invention may be implemented as a computer program or program code executed on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0225] Program code, such as Fig.13The code 1330 shown in , can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the present application, the processing system includes any system with a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC) or a microprocessor.
[0226] Program code can be implemented with high-level procedural or object-oriented programming languages to communicate with the processing system. If desired, program code can also be implemented with assembly or machine language. In fact, the mechanism described herein is not limited to any specific programming language in scope. In any case, the language can be a compiled or interpreted language.
[0227] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium representing various logic within a processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. Such representations, known as "IP cores," may be stored on a tangible machine-readable medium and provided to various customers or manufacturing facilities to load into the manufacturing machines that actually make the logic or processor.
[0228] Such machine-readable storage media may include, but are not limited to, a non-transitory tangible arrangement of an article manufactured or formed by a machine or device, including a storage medium such as a hard disk, any other type of disk, including a floppy disk, an optical disk, a compact disk read-only memory (CD-ROM), a compact disk rewritable (CD-RW), and a magneto-optical disk, a semiconductor device such as a read-only memory (ROM), a random access memory (RAM), such as a dynamic random access memory (DRAM), a static random access memory (SRAM), an erasable programmable read-only memory (EEPROM), a flash memory, an electrically erasable programmable read-only memory (EEPROM), a phase change memory (PCM), a magnetic card or an optical card, or any other type of medium suitable for storing electronic instructions.
[0229] Therefore, embodiments of the present invention also include non-transitory tangible machine-readable media containing instructions or design data, such as hardware description language (HDL), that define the features of the structures, circuits, devices, processors and / or systems described herein. Such embodiments may also be referred to as program products.
[0230] Emulation (including binary conversion, code deformation, etc.)
[0231] In some cases, the instruction converter can be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter can convert instructions (e.g., using static binary conversion, dynamic binary conversion including dynamic compilation), deform, simulate or otherwise convert instructions into one or more other instructions to be processed by the core. The instruction converter can be implemented with software, hardware, firmware or a combination thereof. The instruction converter can be on the processor, outside the processor, or partly on the processor and partly outside the processor.
[0232] Fig.161 is a block diagram comparing the use of a software instruction converter to convert binary instructions in a source instruction set into binary instructions in a target instruction set according to some embodiments of the present invention. In the illustrated embodiment, the instruction converter is a software instruction converter, although alternatively, the instruction converter can be implemented in software, firmware, hardware, or various combinations thereof. Fig.16 It is shown that a program in a high-level language 1602 can be compiled using an x86 compiler 1604 to generate x86 binary code 1606 that can be natively executed by a processor having at least one x86 instruction set core 1616. A processor having at least one x86 instruction set core 1616 represents any processor that can perform substantially the same functions as an Intel processor having at least one x86 instruction set core by compatibly executing or otherwise processing (1) a substantial portion of the instruction set of an Intel x86 instruction set core or (2) an object code version of an application or other software running on an Intel processor having at least one x86 instruction set core to achieve substantially the same results as an Intel processor having at least one x86 instruction set core. The x86 compiler 1604 represents a compiler that can be operated to generate x86 binary code 1606 (e.g., object code) that can be executed on a processor having at least one x86 instruction set core 1616 with or without additional link processing. Similarly, Fig.16 It is shown that the program of the high-level language 1602 can be compiled using an alternative instruction set compiler 1608 to generate an alternative instruction set binary code 1610 that can be natively executed by a processor 1614 that does not have at least one x86 instruction set core (e.g., a processor having a core that executes the MIPS instruction set of MIPS Technologies, Inc. of Sunnyvale, California and / or an ARM instruction set of ARM Holdings, Inc. of Sunnyvale, California). The instruction converter 1612 is used to convert the x86 binary code 1606 into code that can be natively executed by the processor 1614 that does not have an x86 instruction set core. This converted code is unlikely to be the same as the alternative instruction set binary code 1610 because an instruction converter that can do this is difficult to make; however, the converted code will implement general operations and be composed of instructions from the alternative instruction set. Thus, the instruction converter 1612 represents software, firmware, hardware, or a combination thereof that allows a processor or other electronic device that does not have an x86 instruction set processor or core to execute the x86 binary code 1606 through simulation, emulation, or any other process.
[0233] Further examples
[0234] Example 1 describes an exemplary processor, comprising: an extraction circuit for extracting an instruction, the instruction having a field specifying an opcode and a position of a first source vector including N single-precision elements and a target vector including at least N 16-bit floating-point elements, the opcode instructing an execution circuit to convert each element of the specified source vector into a 16-bit floating-point format and store each converted element into a corresponding position of the specified target vector, the conversion including truncation and rounding as necessary; a decoding circuit for decoding the extracted instruction; and an execution circuit for responding to the instruction according to the opcode.
[0235] Example 2 includes the essence of the exemplary processor as described in Example 1, wherein: the instruction also specifies the location of a second source vector including N single-precision elements; the specified target vector includes 2 times N 16-bit floating-point elements, the first half and the second half of which correspond to the first source vector and the second source vector, respectively; and the opcode instructs the processor to convert each element of the specified first and second source vectors into a 16-bit floating-point format, and store each converted element into a corresponding position of the specified target vector, and the conversion includes truncation and rounding when necessary.
[0236] Example 3 includes the essence of the exemplary processor as described in Example 1, wherein the location of each specified source vector and destination vector is in a register or in a memory.
[0237] Example 4 includes the substance of the exemplary processor as described in Example 1, wherein the 16-bit floating point format includes a sign bit, an 8-bit exponent, and a mantissa, the mantissa including 7 explicit bits and an eighth implicit bit.
[0238] Example 5 includes the substance of the exemplary processor as described in Example 1, wherein N is specified by the instruction and has a value of one of 4, 8, 16 and 32.
[0239] Example 6 includes the substance of the exemplary processor of Example 1, wherein when the execution circuit performs rounding, it performs according to a nearest even rounding rule.
[0240] Example 7 includes the substance of the exemplary processor as described in Example 1, wherein the 16-bit floating point format is bfloat16 or binary16.
[0241] Example 8 includes the substance of the exemplary processor of Example 1, wherein the execution circuit generates all N elements of the specified target in parallel.
[0242] Example 9 describes an exemplary method performed by a processor, the method comprising: using an extraction circuit to extract an instruction, the instruction having a field specifying an opcode and a location of a first source vector including N single-precision elements and a target vector including at least N 16-bit floating-point elements, the opcode instructing the execution circuit to convert each element of the specified source vector into a 16-bit floating-point format and store each converted element into a corresponding location of the specified target vector, the conversion including truncation and rounding as necessary; using a decoding circuit to decode the extracted instruction; and using the execution circuit to respond to the instruction according to the opcode.
[0243] Example 10 includes the essence of the exemplary method as described in Example 9, wherein: the instruction also specifies the location of a second source vector including N single-precision elements; the specified target vector includes 2 times N 16-bit floating-point elements, the first half and the second half of which correspond to the first source vector and the second source vector, respectively; and the opcode instructs the execution circuit to convert each element of the specified first and second source vectors into a 16-bit floating-point format, and store each converted element into a corresponding position of the specified target vector, and the conversion includes truncation and rounding when necessary.
[0244] Example 11 includes the essence of the exemplary method as described in Example 9, wherein the location of each specified source vector and destination vector is in a register or in a memory.
[0245] Example 12 includes the essence of the exemplary method as described in Example 9, wherein the 16-bit floating point format includes a sign bit, an 8-bit exponent, and a mantissa, the mantissa including 7 explicit bits and an eighth implicit bit.
[0246] Example 13 includes the essence of the exemplary method as described in Example 9, wherein N is specified by the instruction and has a value of one of 4, 8, 16 and 32.
[0247] Example 14 includes the essence of the exemplary method of Example 9, wherein when the execution circuit performs rounding, it performs according to the rounding rule promulgated as IEEE 754 round to nearest even.
[0248] Example 15 includes the essence of the exemplary method as described in Example 9, wherein the 16-bit floating point format is bfloat16 or binary16.
[0249] Example 16 includes the substance of the exemplary method of Example 9, wherein the execution circuit generates all N elements of the specified target in parallel.
[0250] Example 17 describes an exemplary non-transitory machine-readable medium containing instructions that, when executed by a processor, cause the processor to respond by: extracting an instruction using an extraction circuit, the instruction having a field specifying an opcode and a location of a first source vector including N single-precision elements and a target vector including at least N 16-bit floating-point elements, the opcode instructing an execution circuit to convert each element of the specified source vector to a 16-bit floating-point format and store each converted element in a corresponding location of the specified target vector, the conversion including truncation and rounding as necessary; decoding the extracted instruction using a decoding circuit; and responding to the instruction using the execution circuit according to the opcode.
[0251] Example 18 includes the substance of the exemplary non-transitory machine-readable medium as described in Example 17, wherein: the instruction also specifies the location of a second source vector comprising N single-precision elements; the specified target vector comprises 2 times N 16-bit floating-point elements, the first half and the second half of which correspond to the first source vector and the second source vector, respectively; and the opcode instructs the execution circuit to convert each element of the specified first and second source vectors into a 16-bit floating-point format, and store each converted element into a corresponding position of the specified target vector, the conversion including truncation and rounding if necessary.
[0252] Example 19 includes the substance of the exemplary non-transitory machine-readable medium as described in Example 17, wherein the location of each specified source vector and destination vector is in a register or in a memory.
[0253] Example 20 includes the substance of the exemplary non-transitory machine-readable medium of Example 17, wherein when the execution circuit performs rounding, it performs according to a nearest even rounding rule.
Claims
1. A processor, comprising: a decoding unit, the decoding unit being used to decode a format conversion instruction, the format conversion instruction being used to indicate a position of a first source operand, a position of a second source operand, a target register, a write mask register, and a mask type, the first source operand comprising a first plurality of 32-bit single-precision floating-point data elements, the second source operand comprising a second plurality of 32-bit single-precision floating-point data elements, the write mask register being used to store a plurality of mask bits, each mask bit corresponding to a data element position in the target register, the mask type being a return-to-zero mask or a merge mask; as well as an execution unit, the execution unit being coupled to the decoding unit, the execution unit being configured to execute the decoded format conversion instruction to perform the following operations: for each of the first plurality of 32-bit single-precision floating-point data elements of the first type, converting the 32-bit single-precision floating-point data element to a 16-bit floating-point data element using round-to-nearest-even rounding behavior, and storing the resulting data element in a corresponding data element position in a first half of the result in the target register if a mask bit of the plurality of mask bits corresponding to the data element position is set, otherwise storing a masked data element in the data element position, and For each of the second plurality of 32-bit single-precision floating-point data elements of the first type, convert the 32-bit single-precision floating-point data element to a 16-bit floating-point data element using a round-to-nearest-even rounding behavior, and store a resulting data element in a corresponding data element position in a second half of the result in the destination register if a mask bit of the plurality of mask bits corresponding to the data element position is set, otherwise store a masked data element in the data element position, the resulting data element stored in the destination register having a format including one sign bit, eight exponent bits, and seven explicit mantissa bits, the masked data element being a zero value if the masking type is a zero mask, and the masked data element being a retained value if the masking type is a merge mask, wherein the first type is a normal number.
2. The processor according to claim 1, wherein: The format is the BF16 format.
3. The processor according to claim 1, wherein: The first half of the result is the low-order half of the result, and the second half of the result is the high-order half of the result.
4. The processor according to claim 1, wherein: The location of the first source operand is a register location or a memory location.
5. The processor according to claim 1, wherein: The first source operand and the second source operand consist of a same number of bits, wherein the same number of bits is 128, 256 or 512 bits.
6. The processor of claim 1, wherein: Any non-normal data elements in the first plurality of 32-bit single-precision floating-point data elements and the second plurality of 32-bit single-precision floating-point data elements are considered to have a value of zero.
7. The processor according to claim 1, wherein: The round-to-nearest-even rounding behavior is used, regardless of the rounding behavior specified by the control register.
8. The processor of claim 1, wherein: The format includes an implicit mantissa bit.
9. The processor of claim 1, wherein: The first type excludes zero.
10. The processor of claim 1, wherein: The first type excludes outliers.
11. The processor of claim 1, wherein: The first type excludes infinity.
12. The processor of claim 1, wherein: The first type excludes NaNs.
