Method and system for performing low-power and low-latency multi-precision computations
By pairing ALU channels within the SIMD block to generate a single-level interleaved computing unit, the delay and power consumption issues caused by the three-level channel interleaved architecture are solved, enabling efficient multi-precision calculations and low-power processor design. .
Patent Information
- Application Number
- CN201610918142.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-10-21
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2038-03-10
AI Technical Summary
Conventional vector shader processors within existing SIMD blocks have increased power consumption and silicon area due to the register hardware and latency overhead caused by the three-level channel interleaved architecture, and there are performance bottlenecks in multi-precision calculations.
By pairing multiple ALU channels to create a single-level interleaved computing unit, utilizing two ALUs to complete double-precision or beyond-instruction calculations reduces loop count and eliminates two flip-flop levels in the pipeline, thereby reducing latency and power consumption. .
It achieves reduced delay and power consumption in multi-precision calculations while improving processor performance, reducing silicon area occupation, and improving instruction execution efficiency.
Smart Images

Figure BDA0001135732070000051 
Figure BDA0001135732070000071 
Figure HDA0001135732080000011
Abstract
Description
Background Art
[0001] A conventional vector shader processor within a single instruction / multiple data (SIMD) block includes four pipeline lanes (e.g., X, Y, Z, and W lanes) with arithmetic logic units (ALUs) that are interleaved with each other in each cycle for a total of three additional stages. Considering the internal ALU latency of 5 to 8 cycles within and between corresponding pipeline stages, there is a significant silicon footprint and power consumption overhead for each additional pipeline stage in the SIMD block that supports an operation / calculation.
[0002] That is, each ALU contains the single cycle difference between the ALUs of adjacent channels. The use of a three-level channel interleaved architecture (i.e., channel time shifting) allows the implementation of common vector dot product operations, but introduces additional pipeline hierarchical registers. This architecture can also be used for 64-bit floating point operations by using 32-bit ALUs in adjacent SIMD channels. Since the use of a three-level channel interleaved architecture introduces three additional pipeline stages, this results in register hardware and latency overhead in a single vector shader processor. Therefore, since most register flip-flops contain data and are often bi-state triggered, the three pipeline stages consume useful power. An embodiment of a three-level interleaved channel architecture can be found in U.S. Patent No. 8,468,191, which is incorporated herein by reference as if fully stated. BRIEF DESCRIPTION OF THE DRAWINGS
[0003] A more detailed understanding may be obtained from the following description given in conjunction with the accompanying drawings, in which:
[0004] Figure 1 is a block diagram of an example apparatus in which one or more disclosed embodiments may be implemented;
[0005] Figure 2A is a diagram of an embodiment of a conventional SIMD device with three-level channel interleaving for performing multi-precision calculations;
[0006] Figure 2B is a diagram of an embodiment SIMD device with paired lanes and single level interleaving for performing multiple precision computations;
[0007] Figure 3A is an embodiment of a conventional 64-bit floating point implementation using four 32-bit ALUs interleaved in three levels with half-rate performance;
[0008] Figure 3B is an embodiment pipeline diagram for performing 64-bit precision computations versus 32-bit precision computations with half rate performance in a SIMD block having paired channels and a single level of interleaving in the paired channels;
[0009] Figure 4 is an embodiment pipeline diagram for performing 64-bit precision computations with quarter rate performance versus 32-bit precision including clock-gated paired SIMD channels with a single level of interleaving in the paired channels;
[0010] Figure 5A is an embodiment pipeline diagram for performing a first pass of more than two-pass single-precision and double-precision computations in SIMD lanes with a single level of interleaving in pairs of lanes; and
[0011] Figure 5B is an embodiment pipeline diagram for performing a second pass of over two-pass single-precision and double-precision computations in SIMD lanes with a single level of interleaving among pairs of lanes. DETAILED DESCRIPTION
[0012] Although a more detailed description of the embodiment is provided below, a method and apparatus for performing multi-precision calculations with reduced latency and low power consumption is disclosed in brief. For double-precision and transcendental instructions, more than one single-precision multiplier is utilized. Therefore, four arithmetic logic units (ALUs) are utilized together to complete the double-precision or transcendental instruction calculations of a thread. By utilizing the dependencies between two rather than four ALUs, and utilizing additional iterations, the transcendental instruction calculations of a thread can be completed in a number of cycles less than a conventional solution. For double-precision multiplication-addition instruction calculations, two additional multipliers are utilized between two ALUs. Therefore, the same processing volume can be achieved while eliminating the dependencies between four ALUs, thereby reducing latency and saving silicon area by eliminating two trigger levels in the pipeline. In addition, since the execution time / delay of the instruction and the required pipeline registers can be reduced, the instruction can be executed in the entire SIMD data path under power saving.
[0013] A method for performing multiple precision computations in a plurality of arithmetic logic units (ALUs) is disclosed. The method includes pairing a first single instruction / multiple data (SIMD) block channel device with a second SIMD block channel device to produce a first block pair having a single level of interleaving between the first and second channel devices. Pairing a third SIMD block channel device with a fourth SIMD block channel device to produce a second block pair having a single level of interleaving between the third and fourth channel devices. A plurality of source inputs are received at the first block pair and the second block pair. The first block pair computes a first result, and the second block pair computes a second result.
[0014] A device for performing multi-precision computation is disclosed. The device includes a first arithmetic logic unit (ALU), a second ALU, a third ALU, and a fourth ALU. The second ALU is operatively connected to the first ALU, wherein the first ALU is paired with the second ALU having a single-level interleaving as a first computational unit configured to receive a plurality of inputs and compute a first result. The fourth ALU is operatively connected to the third ALU, wherein the third ALU is paired with the fourth ALU having a single-level interleaving as a second computational unit configured to receive the plurality of inputs and compute a second result.
[0015] A non-transitory computer readable medium having recorded thereon instructions that, when executed by a computing device, cause the computing device to perform disclosed operations. The operations include pairing a first single instruction / multiple data (SIMD) block channel device with a second SIMD block channel device to produce a first block pair having a single level of interleaving between the first and second channel devices. Pairing a third SIMD block channel device with a fourth SIMD block channel device to produce a second block pair having a single level of interleaving between the third and fourth channel devices. A plurality of source inputs are received at the first block pair and the second block pair. The first block pair computes a first result, and the second block pair computes a second result.
[0016] Figure 1 1 is a block diagram of an example device 100 in which one or more disclosed embodiments may be implemented. Device 100 may include a computer, such as a desktop computer, a tablet computer, a gaming device, a handheld device, a set-top box, a television, or a mobile phone. Device 100 includes a processor 102, a memory 104, a storage device 106, one or more input devices 108, and one or more output devices 110. Device 100 may also optionally include an input driver 112 and an output driver 114. It should be appreciated that device 100 may include Figure 1 Additional components not shown in the figure.
[0017] The processor 102 may include a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU on the same die, or one or more processor cores, where each processor core may be a CPU or a GPU. The memory 104 may be on the same die as the processor 102, or may be located separately from the processor 102. The memory 104 may include volatile or non-volatile memory, such as random access memory (RAM), dynamic RAM, or cache memory.
[0018] Storage device 106 may include fixed or removable storage devices, such as a hard drive, solid-state drive, optical disk, or flash drive. Input device 108 may include a keyboard, keypad, touch screen, touch pad, detector, microphone, accelerometer, gyroscope, biometric scanner, or network connection (e.g., wireless LAN card for transmission and / or reception of wireless IEEE 802 signals). Output device 110 may include a display, a speaker, a printer, a tactile feedback device, one or more lights, an antenna, or a network connection (e.g., a wireless LAN card for transmission and / or reception of wireless IEEE 802 signals).
[0019] The input driver 112 communicates with the processor 102 and the input device 108, and permits the processor 102 to receive input from the input device 108. The output driver 114 communicates with the processor 102 and the output device 110, and permits the processor 102 to send output to the output device 110. It should be noted that the input driver 112 and the output driver 114 are optional components, and the device 100 will operate in the same manner when the input driver 112 and the output driver 114 do not exist. Although the described embodiment includes a main display, the main display is not required. Therefore, only a source video device can be included. In this way, the control area can be an office environment with multiple portable devices and no main display.
[0020] Figure 2A 2 is a diagram of an embodiment of a conventional SIMD device 200A with three levels of channel interleaving for performing multi-precision calculations. Device 200A includes a plurality of ALU channels W, Z, Y, and X (labeled as 202, 204, 206, and 208). Channel ALUs 202, 204, 206, and 208 are, for example, multiply-add units (MADDs). Arrangement generator 250 communicates with ALUs 202, 204, 206, and 208 to provide inputs to ALUs 202, 204, 206, and 208. Figure 2A As shown in , ALU 202 may provide a result to ALU 204 , ALU 204 may provide a result to ALU 206 , and ALU 206 may provide a result to ALU 208 .
[0021] Figure 2B2 is a diagram of an embodiment SIMD device 200B with paired channels and single-level interleaving for performing multiple precision calculations. Similar to device 200A, device 200B includes multiple ALU channels W, Z, Y and X (labeled as 202, 204, 206 and 208). Channel ALUs 202, 204, 206 and 208 are, for example, multiplication-addition units (MADDs). Arrangement generator 250 communicates with ALUs 202, 204, 206 and 208 to provide inputs to ALUs 202, 204, 206 and 208. As shown in FIG. 2, due to the single-cycle time-shift operation mode, ALU 202 provides the result to ALU 204, and ALU 206 provides the result to ALU 208.
[0022] The following mapping table (i.e., Table 1) represents an embodiment mapping of values for each channel. That is, the sources (e.g., src_a, src_b, and src_c) map to the values or functions in Table 1, where Mad_f_32 is a 32-bit chained multiply-add operation equal to A*B+C. The variables V0, V1, and V2 are the selected vector register contents used as source operands in the calculation.
[0023]
[0024] Table 1
[0025] Figure 3A is an embodiment of a conventional 64-bit floating point implementation 300A versus 32-bit floating point operations using four 32-bit ALUs interleaved in three levels with half rate performance. Figure 3A Depiction Figure 2A Detailed diagram of device 200A using a conventional three-level interleaved pipeline with eight (i.e., C0 to C7) major cycles / stages for performing 64-bit precision calculations versus 32-bit precision calculations at half rate. Respectively, two channels (Z and X) provide 64-bit results, while channels W and Y perform operations two cycles earlier to support the Z and X channels (i.e., C1 to C2 and C3 to C4). During the remainder of the operation, the W and Y channels toggle idle and consume power without producing relevant results. Due to the three-level interleaving, the Y and X channels operate two cycles later than the W channel, which introduces additional latency and pipeline registers. Floating point normalization is performed on the results in clock cycles C6 and C7, and then the results are output to the output registers of channels Z and X.
[0026] Figure 3B is an example pipeline diagram 305 for performing 64-bit precision computations versus 32-bit precision computations with half rate performance in a SIMD block having paired channels and a single level of interleaving within the paired channels. FIG305 describes Figure 2BThe device 200B of FIG. 10 has a reduced number of required cycles and 32-bit channels that are partially clock-gated during operation. Therefore, this structure introduces SIMD channel pairing and only single-level (i.e., 1-level) interleaving. Moreover, power consumption can be reduced by clock-gating idle pipeline cycles and idle channels. Figure 3B Includes channels W, Z, Y, and X, which may be associated with ALUs 202, 204, 206, and 208, respectively. Figure 2A In contrast to the conventional device 200A depicted in FIG, the channels are interleaved with one clock shift in each pair (e.g., 1 extra stage instead of 3). Multiple source inputs (e.g., src_a, src_b, and src_c) are combined together in a data arrangement cycle C0 to prepare operands for subsequent calculation cycles. Operations on the inputs can be performed during clock cycles (e.g., C1, C2, C3, C4, and C5) to obtain the final result using adder 310, multiplier 320, or multiplexer (MUX) 330.
[0027] like Figure 3B As shown in , the W channel result and the Y channel result are calculated in clock cycle C1. The W channel result is provided to the ALU 204 in the Z channel in clock cycle C2. The Y channel result is also provided to the ALU 208 in the X channel in clock cycle C2. After this, on subsequent C2, C3, C4 and C5 cycles, both the W and Y channels are dynamically clock gated to block any data changes and transfers, thereby providing power savings. Channels Z and X continue to operate in normal mode on cycles C2 to C5, providing calculations for their respective output registers. Similar to Figure 3A , a floating point normalization is performed on the result in the last two clock cycles (C4 and C5 in this case) and the result is then output to the output registers of channels Z and X. Although the dynamic clock gating circuitry is not shown, the instruction opcode decoder and appropriate state machines can generate any clock gating control sequence on a per-channel and per-stage basis.
[0028] Figure 4 is an embodiment pipeline diagram 400 for performing 64-bit precision computations with quarter-rate performance versus 32-bit precision including clock-gated pairs of SIMD channels with a single level of interleaving therein. Figure 4 Contains channels W, Z, Y, and X, which are associated with ALUs 202, 204, 206, and 208, respectively. Figure 2A In contrast to the conventional device depicted in Figure 4 The channels depicted in are interleaved with one clock shift in each pair (e.g., 1 extra stage instead of 3), similar to Figure 2BDevice 200B. Multiple source inputs (e.g., src_a, src_b, and src_c) are combined together in a data arrangement cycle C0 to calculate a result. Operations on the inputs can be performed during clock cycles (e.g., C1, C2, C3, C4, and C5) to obtain a final result using adder 410 or multiplier 420.
[0029] like Figure 4 , the Y channel result is calculated during clock cycles C1 and C2. The Y channel result is provided to the ALU 208 in the X channel in clock cycle C2. The result from clock cycle C1 in the X channel is summed with the src_c input in clock cycle C2. Channels W and Z are not used and are dynamically clock gated, (i.e., idle and turned on when needed), except for clock cycle C5 in channel Z, where the result is copied from channel X to the output register for channel Z. Therefore, the results are output at the output registers of channels X and Z.
[0030] Figures 5A to 5B is an embodiment pipeline diagram 500 for performing more than two-pass single precision computations on SIMD blocks with paired lanes using a single level interleaving in paired lanes. Figure 5A is an example pipeline diagram for performing a first pass of more than two-pass single-precision and double-precision computations in SIMD lanes with a single level of interleaving in pairs of lanes, and Figure 5B is an embodiment pipeline diagram for performing a second pass of over two-pass single-precision and double-precision computations in SIMD lanes with a single level of interleaving among pairs of lanes.
[0031] The following mapping table (ie, Table 2) indicates the mapping for each channel of the two-pass implementation of the transcendental function. That is, the sources (eg, src_a, src_b, and src_c) are mapped to the values or functions in Table 2.
[0032]
[0033] Table 2
[0034] Figure 5A Channels W, Z, Y, and X are included, which are associated with ALUs 202, 204, 206, and 208, for example, respectively. Multiple source inputs (e.g., src_a, src_b, and src_c) are combined together in a data placement cycle C0 to prepare data for subsequent result calculations. Operations on the inputs can be performed during clock cycles (e.g., C1, C2, C3, C4, and C5) to obtain the final result using adders 510, multipliers 520, and lookup tables (labeled as Δx, slope 1, slope 2, slope 3, and point lookup tables (LUTs)).
[0035] See also Figure 5A, operations are performed on channels Z and X during the first pass (e.g., pass 0 or transcendence pass 0 in Table 2) in clock cycles C1 and C2. For example, lookup tables Δx, slope 2, and slope 3 are utilized during C1. During clock cycle C2, the results of Δx and slope 3 are multiplied and then added to the result from slope 2. The resulting results for channels Z and X for pass 0 are returned to src_a in C3 for use during the second pass (i.e., pass 1). Unused channels W and Y are clock gated and do not consume dynamic power. Cycles C3 to C5 in active channels Z and X may also be clock gated or skipped along with idle channels W and Y.
[0036] See now Figure 5B , the operation is performed during the second pass (e.g., Pass 1 or Beyond Pass 1 in Table 2) in clock cycles C1, C2, and C3. For example, during clock cycle C1, the lookup tables Δx, slope 1, and point are utilized. The results of the Δx lookup table and slope 1 are multiplied, and the result is added to the results of the point lookup tables in the W and Y channels. During C2, the Z channel result from Pass 0 is multiplied by src_b, and the result is added to src_c. Also during C2, the X channel result from Pass 0 is multiplied by src_b, and the result is added to src_c.
[0037] During clock cycle C3, the resulting results from clock cycles C1 and C2 are added together in the Z and X channels to provide results in the Z and X channels. For example, in the Z channel, the result from C2 is multiplied by Δx 2 , and in clock cycle C1 its result is added to the result from the W channel. And during clock cycle C3, in the X channel, the result from C2 is multiplied by Δx 2 , and add its result to the result from the Y channel in clock cycle C1. Figure 5B As shown in , in loop C4 to C5, the W and Y channels are not in effect, and clock gating techniques can be applied to reduce dynamic power. In addition, the results in the Z and X channels undergo floating point normalization in loops C4 and C5, and then are output to the output registers of the Z and X channels as results.
[0038] It will be appreciated that many variations are possible based on the disclosure herein. Although features and elements are described above in particular combinations, each feature or element may be used alone without the other features and elements, or in various combinations with or without the other features and elements.
[0039] The provided methods may be implemented in a general purpose computer, a processor, or a processor core. Suitable processors include, for example, a general purpose processor, a special purpose processor, a conventional processor, a digital signal processor (DSP), a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) circuit, any other type of integrated circuit (IC), and / or a state machine. These processors may be manufactured by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data including a netlist (these instructions can be stored on a computer readable medium). The result of this processing may be a mask article that is subsequently used in a semiconductor manufacturing process to manufacture a processor that implements aspects of the present invention.
[0040] The methods or flow charts provided herein may be implemented in a computer program, software or firmware incorporated in a computer-readable storage medium for execution by a general-purpose computer or processor. Examples of computer-readable storage media include read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs).
Claims
1. A method for performing multi-precision calculations in a plurality of arithmetic logic units, comprising: pairing a first SIMB channel device with a second SIMB channel device to generate a first block pair having a single level interleaving between the first SIMB channel device and the second SIMB channel device; pairing a third SIMB channel device with a fourth SIMB channel device to generate a second block pair having a single level interleaving between the third SIMB channel device and the fourth SIMB channel device; receiving a plurality of source inputs at the first block pair and the second block pair; calculating a first result by the first block pair, wherein the first SIMD channel device provides the calculated result to the second SIMD channel device; as well as A second result is calculated by the second block pair, wherein the third SIMD channel device provides its calculation result to the fourth SIMD channel device, wherein the calculation of the second result is performed simultaneously in the same number of clock time cycles as the calculation performed by the first block pair, and wherein the calculation performed in the first block pair to calculate the first result is performed in the same clock time cycle as the corresponding calculation performed in the second block pair.
2. The method of claim 1, further comprising clock gating one or more of the SIMB channel devices during cycles in which the SIMB channel devices are not used for computation.
3. The method of claim 1, further comprising outputting the first result at an output register of the first SIMD channel device.
4. The method of claim 1, further comprising outputting the first result at an output register of the second SIMD channel device.
5. The method of claim 1, further comprising outputting the second result at an output register of the third SIMD channel device.
6. The method of claim 1, further comprising outputting the second result at an output register of the fourth SIMD channel device. The method of claim 1 , wherein the first result and the second result are the same result.
8. The method of claim 1, further comprising performing normalization on the first result and the second result.
9. The method of claim 1, wherein the first result is produced in a first pass of a transcendental operation and utilized by the first block pair to compute a third result for output.
10. The method of claim 9, wherein the second result is produced in the first pass of transcendental operations and utilized by the second block pair to compute a fourth result for output.
11. An apparatus for performing multi-precision calculations, comprising: First arithmetic logic unit; a second arithmetic logic unit operatively connected to the first arithmetic logic unit, wherein the first arithmetic logic unit is paired with the second arithmetic logic unit having a single level of interleaving as a first computation unit configured to receive a plurality of inputs and compute a first result, wherein the first arithmetic logic unit provides its computation result to the second arithmetic logic unit; A third arithmetic logic unit; as well as a fourth arithmetic logic unit operatively connected to the third arithmetic logic unit, wherein the third arithmetic logic unit is paired with the fourth arithmetic logic unit having a single-level interleaving as a second calculation unit configured to receive the plurality of inputs and calculate a second result, wherein the third arithmetic logic unit provides its calculation result to the fourth arithmetic logic unit, and wherein the second computation unit computes the second result simultaneously in the same number of clock time cycles as the first computation unit, and wherein the computations performed in the first computation unit to compute the first result are performed in the same clock time cycles as corresponding computations performed in the second computation unit.
12. The apparatus of claim 11, further comprising an arrangement generator operatively connected to the first arithmetic logic unit, the second arithmetic logic unit, the third arithmetic logic unit, and the fourth arithmetic logic unit to provide the plurality of inputs to respective arithmetic logic units.
13. The apparatus of claim 11 , further comprising a clock gating device operatively coupled to the first arithmetic logic unit, the second arithmetic logic unit, the third arithmetic logic unit, and the fourth arithmetic logic unit for clock gating one or more of the arithmetic logic units during cycles in which the arithmetic logic units are not used for calculations.
14. The apparatus of claim 11, wherein the first arithmetic logic unit, the second arithmetic logic unit, the third arithmetic logic unit, and the fourth arithmetic logic unit include respective output registers.
15. The apparatus of claim 14, wherein the first result is output at the output register of the first arithmetic logic unit.
16. The apparatus of claim 14, wherein the first result is output at the output register of the second arithmetic logic unit.
17. The apparatus of claim 14, wherein the second result is output at the output register of the third arithmetic logic unit.
18. The apparatus of claim 14, wherein the second result is output at the output register of the fourth arithmetic logic unit.
19. An apparatus as described in claim 11, wherein the first result is generated in a first pass of transcendental operations and is used by the first computing unit to calculate a third result for output, and the second result is generated in the first pass of transcendental operations and is used by the second computing unit to calculate a fourth result for output.
20. A non-transitory computer-readable medium having recorded thereon instructions which, when executed by a computing device, cause the computing device to perform operations comprising: pairing a first SIMB channel device with a second SIMB channel device to generate a first block pair having a single level interleaving between the first SIMB channel device and the second SIMB channel device; pairing a third SIMB channel device with a fourth SIMB channel device to generate a second block pair having a single level interleaving between the third SIMB channel device and the fourth SIMB channel device; receiving a plurality of source inputs at the first block pair and the second block pair; calculating a first result by the first block pair, wherein the first SIMD channel device provides the calculated result to the second SIMD channel device; as well as A second result is calculated by the second block pair, wherein the third SIMD channel device provides the calculated result to the fourth SIMD channel device, wherein the calculation of the second result is performed simultaneously in the same number of clock time cycles as the calculation performed by the first block pair, and wherein the calculation performed in the first block pair to calculate the first result is performed in the same clock time cycle as the corresponding calculation performed in the second block pair.
Citation Information
Patent Citations
Method and system for multi-precision computation
US8468191B2
SIMD processor with reduction unit
EP1936492A1
Digital signal processors with configurable dual-MAC and dual-ALU
US20050198472A1
Interconnected arithmetic logic units
US20130346462A1
Digital signal processing block
US9081634B1
