IP Library Granted Patent US 10,853,065
Granted Patent B2
US 10,853,065 · App. 16/169,456 · Granted Dec 1, 2020

Systems, apparatuses, and methods for chained fused multiply add

Inventors: Jesus Corbal (King City, OR); Robert Valentine (Kiryat Tivon, IL); Roman S. Dubtsov (Novosibirsk, RU); Nikita A. Shustrov (Novosibirsk, RU); Mark J. Charney (Lexington, MA); Dennis R. Bradford (Portland, OR); Milind B. Girkar (Sunnyvale, CA); Edward T. Grochowski (San Jose, CA); Thomas D. Fletcher (Sherwood, OR); Warren E. Ferguson (Beaverton, OR)
Assignee: Intel Corporation
G06F9/3001G06F7/483G06F7/5443G06F9/30036G06F9/30109G06F9/30112
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,853,065
App. No.
16/169,456
Filed
Oct 24, 2018
Granted
Dec 1, 2020
Kind
B2
Art Unit
2183
USPC
712/221
Abstract

Embodiments of systems, apparatuses, and methods for chained fused multiply add. In some embodiments, an apparatus includes a decoder to decode a single instruction having an opcode, a destination field representing a destination operand, a first source field representing a plurality of packed data source operands of a first type that have packed data elements of a first size, a second source field representing a plurality of packed data source operands that have packed data elements of a second size, and a field for a memory location that stores a scalar value. A register file having a plurality of packed data registers includes registers for the plurality of packed data source operands that have packed data elements of a first size, the source operands that have packed data elements of a second size, and the destination operand. Execution circuitry executes the decoded single instruction to perform iterations of packed fused multiply accumulate operations by multiplying packed data elements of the sources of the first type by sub-elements of the scalar value, and adding results of these multiplications to an initial value in a first iteration and a result from a previous iteration in subsequent iterations.

Claims (34)

1. An apparatus comprising:

a decoder to decode a single instruction having an opcode, a destination field representing a destination operand, a first source field representing a plurality of vector source operands of a first type that have data elements of a first size, a second source field representing a plurality of vector source operands that have data elements of a second size, and a field for a location to store a scalar value;

and

execution circuitry to execute the decoded single instruction according to the opcode to perform iterations of fused multiply accumulate operations by multiplying data elements of the sources of the first type by sub-elements of the scalar value, and adding results of these multiplications to an initial value in a first iteration and a result from a previous iteration in subsequent iterations.

2. The apparatus of claim 1 , wherein the instruction is to define the first size and the second size, and the second size is a multiple of two of the first size.

3. The apparatus of claim 1 , wherein the execution circuitry is to perform the fused multiply accumulate operations by, for each data element group of the sources of the first type, multiply each data element of the data element group of the sources of the first type by a corresponding data sub-element from the scalar value, wherein the scalar value corresponds to data position of the scalar for that source of the first type, add each of the multiplications of the data element group of the sources of the first type to generate an iteration result, add to the iteration result an iteration result of the previous iteration or an initial value, and store a final result into a data element position of the destination that corresponds to the location of the scalar data element, wherein a final result is a summation of all of the iteration results and the initial value.

4. The apparatus of claim 1 , wherein when the first size is half of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

5. The apparatus of claim 1 , wherein when the first size is half of the second size, a single addition and saturation check is performed on each of the multiplications.

6. The apparatus of claim 1 , wherein when the first size is a quarter of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

7. The apparatus of claim 1 , wherein when the first size is a quarter of the second size, a single addition and saturation check is performed on each of the multiplications.

8. A method comprising:

hardware decoding a single instruction having an opcode, a destination field representing a destination operand, a first source field representing a plurality of vector source operands of a first type that have data elements of a first size, a second source field representing a plurality of vector source operands that have data elements of a second size, and a field for a location that stores a scalar value; and

executing the decoded single instruction with execution circuitry according to the opcode to perform iterations of fused multiply accumulate operations by multiplying data elements of the sources of the first type by sub-elements of the scalar value, and adding results of these multiplications to an initial value in a first iteration and a result from a previous iteration in subsequent iterations.

9. The method of claim 8 , wherein the instruction to define the first size and the second size, and the second size is a multiple of two of the first size.

10. The method of claim 9 , wherein the execution circuitry performs the fused multiply accumulate operations by, for each data element group of the sources of the first type, multiply each data element of the data element group of the sources of the first type by a corresponding data sub-element from the scalar value, wherein the scalar value corresponds to data position of the scalar for that source of the first type, add each of the multiplications of the data element group of the sources of the first type to generate an iteration result, add to the iteration result an iteration result of the previous iteration or an initial value, and store a final result into a data element position of the destination that corresponds to the location of the scalar data element, wherein the final result is a summation of all of the iteration results and the initial value.

11. The method of claim 9 , wherein when the first size is half of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

12. The method of claim 9 , wherein when the first size is half of the second size, a single addition and saturation check is performed on each of the multiplications.

13. The method of claim 9 , wherein when the first size is a quarter of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

14. The method of claim 9 , wherein when the first size is a quarter of the second size, a single addition and saturation check is performed on each of the multiplications.

15. A non-transitory machine-readable medium storing an instruction which when processed by a processor causes the processor to perform a method, the method comprising:

hardware decoding the instruction having an opcode, a destination field representing a destination operand, a first source field representing a plurality of vector source operands of a first type that have data elements of a first size, a second source field representing a plurality of vector source operands that have data elements of a second size, and a field for a location that stores a scalar value; and

executing the decoded single instruction according to the opcode with execution circuitry to perform iterations of fused multiply accumulate operations by multiplying data elements of the sources of the first type by sub-scalar value, and adding results of these multiplications to an initial value in a first iteration and a result from a previous iteration in subsequent iterations.

16. The non-transitory machine-readable medium of claim 15 , wherein the instruction to define the first size and the second size, and the second size is a multiple of two of the first size.

17. The non-transitory machine-readable medium of claim 15 , wherein the execution circuitry performs the fused multiply accumulate operations by, for each data element group of the sources of the first type, multiply each data element of the data element group of the sources of the first type by a corresponding data sub-element from the scalar value, wherein the scalar value corresponds to packed data position of the scalar for that source of the first type, add each of the multiplications of the data element group of the sources of the first type to generate an iteration result, add to the iteration result an iteration result of the previous iteration or an initial value, and store a final result into a data element position of the destination that corresponds to the location of the scalar data element, wherein the final result is a summation of all of the iteration results and the initial value.

18. The non-transitory machine-readable medium of claim 15 , wherein when the first size is half of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

19. The non-transitory machine-readable medium of claim 15 , wherein when the first size is half of the second size, a single addition and saturation check is performed on each of the multiplications.

20. The non-transitory machine-readable medium of claim 15 , wherein when the first size is a quarter of the second size, a first addition is performed on each of the multiplications and a second addition is performed on a result of the first addition and a result from a previous iteration.

21. The non-transitory machine-readable medium of claim 15 , wherein when the first size is a quarter of the second size, a single addition and saturation check is performed on each of the multiplications.

22. A system comprising:

memory to store a scalar; and

a processor comprising:

a decoder to decode a single instruction having an opcode, a destination field representing a destination operand, a first source field representing a plurality of vector source operands of a first type that have data elements of a first size, a second source field representing a plurality of vector source operands that have data elements of a second size, and a field for a memory location that stores the scalar value;

and

execution circuitry to execute the decoded single instruction according to the opcode to perform iterations of fused multiply accumulate operations by multiplying data elements of the sources of the first type by sub-elements of the scalar value, and adding results of these multiplications to an initial value in a first iteration and a result from a previous iteration in subsequent iterations.

Continuity (2)
Continuation 15299420 · Oct 20, 2016
Related Publication 20190121637A1 · Apr 25, 2019
Cited By (3)
US 12,282,645 US 12,288,043 US 12,506,810