EP4418136A2

Systems, apparatuses, and methods for fused multiply add

Abstract

In some embodiments, an apparatus comprises: circuitry to fetch one or more instructions, the one or more instructions to indicate a first source vector comprising a first plurality of integer data elements, a second source vector comprising a second plurality of integer data elements, and one or more accumulation integer data elements, wherein each of the one or more accumulation integer data elements is four times larger than each data element of the first plurality of integer data elements and the second plurality of integer data elements, and wherein the first plurality of integer data elements and the one or more accumulation integer data elements are signed integer data elements and the second plurality of integer data elements are unsigned integer data elements; on-chip storage to store the first plurality of integer data elements, the second plurality of integer data elements, and the one or more accumulation integer data elements; and execution circuitry to execute the one or more instructions to generate one or more result integer data elements. To generate the one or more result integer data elements, the execution circuitry is to: multiply each data element of the first plurality of integer data elements with a corresponding data element of the second plurality of integer data elements to generate a plurality of products, and accumulate the plurality of products in groups of four, each group of four products to be accumulated with a corresponding accumulation integer data element of the one or more accumulation integer data elements with saturation to generate a corresponding one or more result integer data elements.

EP4418136A2, drawing sheet 1
Sheet 1 of 27

Term

10.1 yearsto projected expiry

Projected expiry 20 October 2036, counted from filing; an application has no term until it is granted.

  1. Priority and filed
  2. Published
  3. Today
  4. Projected expiry

16 claims: 5 independent, 11 dependent

  1. 1
    An apparatus, comprising:circuitry to fetch one or more instructions, the one or more instructions to indicate a first source vector comprising a first plurality of integer data elements, a second source vector comprising a second plurality of integer data elements, and one or more accumulation integer data elements, wherein each of the one or more accumulation integer data elements is four times larger than each data element of the first plurality of integer data elements and the second plurality of integer data elements, and wherein the first plurality of integer data elements and the one or more accumulation integer data elements are signed integer data elements and the second plurality of integer data elements are unsigned integer data elements;on-chip storage to store the first plurality of integer data elements, the second plurality of integer data elements, and the one or more accumulation integer data elements;and execution circuitry to execute the one or more instructions to generate one or more result integer data elements, wherein to generate the one or more result integer data elements, the execution circuitry is to: multiply each data element of the first plurality of integer data elements with a corresponding data element of the second plurality of integer data elements to generate a plurality of products, and accumulate the plurality of products in groups of four, each group of four products to be accumulated with a corresponding accumulation integer data element of the one or more accumulation integer data elements with saturation to generate a corresponding one or more result integer data elements.
  2. 4
    The apparatus of any of claims 1 to 3, wherein the on-chip storage comprises at least one of a cache memory and a plurality of registers.
  3. 5
    The apparatus of any of claims 1 to 4, wherein the first plurality of integer data elements and the second plurality of integer data elements comprise 8-bit integer data elements and the one or more accumulation data elements comprise 32-bit integer data elements.
  4. 6
    The apparatus of any of claims 1 to 5, wherein the one or more accumulation integer data elements comprise a plurality of accumulation integer data elements and the one or more result data elements comprise a corresponding plurality of result data elements.
  5. 8
    A computer-implemented method, comprising:fetching one or more instructions, the one or more instructions to indicate a first source vector comprising a first plurality of integer data elements, a second source vector comprising a second plurality of integer data elements, and one or more accumulation integer data elements, wherein each of the one or more accumulation integer data elements is four times larger than each data element of the first plurality of integer data elements and the second plurality of integer data elements, and wherein the first plurality of integer data elements and the one or more accumulation integer data elements are signed integer data elements and the second plurality of integer data elements are unsigned integer data elements;executing the one or more instructions to perform operations, comprising: reading the first plurality of integer data elements, the second plurality of integer data elements, and the one or more accumulation integer data elements from an on-chip storage;and multiplying each data element of the first plurality of integer data elements with a corresponding data element of the second plurality of integer data elements to generate a plurality of products, and accumulating the plurality of products in groups of four, each group of four products to be accumulated with a corresponding accumulation integer data element of the one or more accumulation integer data elements with saturation to generate a corresponding one or more result integer data elements.
  6. 11
    The computer-implemented method of any of claims 8 to 10, wherein the on-chip storage comprises at least one of a cache memory and a plurality of registers.
  7. 12
    The computer-implemented method of any of claims 8 to 11, wherein the first plurality of integer data elements and the second plurality of integer data elements comprise 8-bit integer data elements and the one or more accumulation data elements comprise 32-bit integer data elements.
  8. 13
    The computer-implemented method of any of claims 8 to 12, wherein the one or more accumulation integer data elements comprise a plurality of accumulation integer data elements and the one or more result data elements comprise a corresponding plurality of result data elements.
  9. 15
    A computer program product comprising instructions which, when the program is executed by a processor, cause the processor to carry out the method of any of claims 8 to 14.