hottub.patents
US 12,307,250 B2#3542269 Most CitedActiveUnited States (USPTO)Utility

Systems and methods for performing 16-bit floating-point matrix dot product instructions

0Forward Citations (#3542269 Global)
0.0/yrCitation Velocity (#3542269 Global)
0.00Citation PageRank (#3542269 Global)
66Prior Art Cited
20Claims (2 Indep. · 18 Dep.)
38Drawings / Sheets

Abstract

Disclosed embodiments relate to computing dot products of nibbles in tile operands. In one example, a processor includes decode circuitry to decode a tile dot product instruction having fields for an opcode, a destination identifier to identify a M by N destination matrix, a first source identifier to identify a M by K first source matrix, and a second source identifier to identify a K by N second source matrix, each of the matrices containing doubleword elements, and execution circuitry to execute the decoded instruction to perform a flow K times for each element (m, n) of the specified destination matrix to generate eight products by multiplying each nibble of a doubleword element (M,K) of the specified first source matrix by a corresponding nibble of a doubleword element (K,N) of the specified second source matrix, and to accumulate and saturate the eight products with previous contents of the doubleword element.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 66 · Forward citations: 0.

Claims (20 — 2 Independent, 18 Dependent)

  1. Claim 1Independent Claim

    A processor comprising: an instruction cache to store a matrix multiplication instruction; a plurality of vector registers to store a plurality of single-precision floating point source data elements of a first matrix comprising M rows by N columns, a first plurality of bfloat16 floating-point source data elements of a second matrix comprising M rows and K columns, and a second plurality of bfloat16 floating point source data elements of a third matrix comprising K rows by N columns; decode circuitry to decode the matrix multiplication instruction, the matrix multiplication instruction including an opcode to indicate a matrix multiplication operation, a first field to indicate a first storage location associated with the plurality of single-precision floating point source data elements, a second field to indicate a second storage location associated with the first plurality of bfloat16 floating-point source data elements, and a third field to indicate a third storage location associated with the second plurality of bfloat16 floating point source data elements, wherein the first, second, and third storage locations are locations in the plurality of vector registers; and execution circuitry coupled with the decode circuitry, the execution circuitry to perform operations in accordance with the matrix multiplication instruction, the execution circuitry to, for each row m of the M rows of the second matrix and each column n of the N columns of the third matrix: generate a dot product from K bfloat16 floating-point source data elements corresponding to the row m of the second matrix and K bfloat16 floating-point source data elements corresponding to the column n of the third matrix, and accumulate the dot product with a single precision floating-point source data element corresponding to a row m of the M rows and a column n of the N columns of the first matrix to generate a single-precision floating-point result data element to be stored in a position of the plurality of vector registers corresponding to the row m and the column n of the first matrix.

  2. Claim 2Depends on #1

    The processor of claim 1, wherein the execution circuitry comprises: a plurality of multipliers to multiply the K bfloat16 floating-point source data elements corresponding to the row m of the second matrix and corresponding K bfloat16 floating-point source data elements corresponding to the column n of the third matrix to generate a plurality of products; and adder circuitry to add the plurality of products to generate the dot product.

  3. Claim 3Depends on #2

    The processor of claim 2, wherein the adder circuitry is additionally to add the dot product and the single precision floating-point source data element.

  4. Claim 4Depends on #1

    The processor of claim 1, further comprising: a control register to store an indication of a rounding mode.

  5. Claim 5Depends on #4

    The processor of claim 4, wherein the execution circuitry is to perform rounding based on instruction fields of some of the instructions regardless of the indication stored in the control register.

  6. Claim 6Depends on #1

    The processor of claim 1, wherein the execution circuitry does not support exceptions due to the matrix multiplication instruction.

  7. Claim 7Depends on #1

    The processor of claim 1, wherein the execution circuitry is to perform an operation corresponding to the matrix multiplication instruction to process denormal values of the second matrix and the third matrix as zero.

  8. Claim 8Depends on #1

    The processor of claim 1, wherein the execution circuitry is to perform an operation corresponding to the instruction to flush denormal values to zero.

  9. Claim 9Depends on #1

    The processor of claim 1, wherein the M rows of the second matrix and the N columns of the third matrix are equal in number.

  10. Claim 10Depends on #1

    The processor of claim 1, wherein each dot product is a single precision floating-point dot product.

  11. Claim 11Independent Claim

    A method comprising: storing a matrix multiplication instruction to an instruction cache; storing a plurality of single-precision floating point source data elements of a first matrix comprising M rows by N columns, a first plurality of bfloat16 floating-point source data elements of a second matrix comprising M rows and K columns, and a second plurality of bfloat16 floating point source data elements of a third matrix comprising K rows by N columns in a plurality of vector registers; decoding the matrix multiplication instruction by decode circuitry, wherein the matrix multiplication instruction includes an opcode to indicate a matrix multiplication operation, a first field to indicate a first storage location associated with the plurality of single-precision floating point source data elements, a second field to indicate a second storage location associated with the first plurality of bfloat 16 floating-point source data elements, and a third field to indicate a third storage location associated with the second plurality of bfloat16 floating point source data elements, wherein the first, second, and third storage locations are locations in the plurality of vector registers; and executing, by execution circuitry coupled with the decode circuitry, the matrix multiplication instruction, wherein the executing is to, for each row m of the M rows of the second matrix and each column n of the N columns of the third matrix: generate a dot product from K bfloat 16 floating-point source data elements corresponding to the row m of the second matrix and K bfloat16 floating-point source data elements corresponding to the column n of the third matrix, and accumulate the dot product with a single precision floating-point source data element corresponding to a row m of the M rows and a column n of the N columns of the first matrix to generate a single-precision floating-point result data element to be stored in a position of the plurality of vector registers corresponding to the row m and the column n of the first matrix.

  12. Claim 12Depends on #11

    The method of claim 11, wherein the executing comprises: multiplying, by a plurality of multipliers of the execution circuitry, the K bfloat16 floating-point source data elements corresponding to the row m of the second matrix and corresponding K bfloat16 floating-point source data elements corresponding to the column n of the third matrix to generate a plurality of products; and adding, by adder circuitry of the execution circuitry, the plurality of products to generate the dot product.

  13. Claim 13Depends on #12

    The method of claim 12, wherein the adder circuitry adds the dot product and the single precision floating-point source data element.

  14. Claim 14Depends on #11

    The method of claim 11, further comprising storing an indication of a rounding mode in a control register.

  15. Claim 15Depends on #14

    The method of claim 14, wherein the executing by the execution circuitry performs rounding based on instruction fields of some of the instructions regardless of the indication stored in the control register.

  16. Claim 16Depends on #11

    The method of claim 11, wherein the execution circuitry does not support exceptions due to the matrix multiplication instruction.

  17. Claim 17Depends on #11

    The method of claim 11, wherein the executing by the execution circuitry processes denormal values of the second matrix and the third matrix as zero.

  18. Claim 18Depends on #11

    The method of claim 11, the executing by the execution circuitry flushes denormal values to zero.

  19. Claim 19Depends on #11

    The method of claim 11, wherein the M rows of the second matrix and the N columns of the third matrix are equal in number.

  20. Claim 20Depends on #11

    The method of claim 11, wherein each dot product is a single precision floating-point dot product.

Technical Overview & Description

CROSS-REFERENCE TO RELATED APPLICATIONS The present patent application is a continuation application claiming priority from U.S. patent application Ser. No. 18/190,761 filed Mar. 27, 2023, which is a continuation application claiming priority from U.S. patent application Ser. No. 17/216,566 filed Mar. 29, 2021, now U.S. Pat. No. 11,614,936, which is a continuation application claiming priority from U.S. patent application Ser. No. 16/186,387 filed Nov. 9, 2018, now U.S. Pat. No. 10,963,246, each of which is incorporated herein by reference in its entirety. FIELD OF INVENTION The field of invention relates generally to computer processor architecture, and, more specifically, to systems and methods for performing 16-bit floating-point matrix dot product instructions. BACKGROUND Matrices are increasingly important in many computing tasks such as machine learning and other bulk data processing. Deep Learning is a class of machine learning algorithms. Deep learning architectures, such as deep neural networks, have been applied to fields including computer vision, speech recognition, natural language processing, audio recognition, social network filtering, machine translation, bioinformatics and drug design. Inference and training, two tools used for deep learning, are tending towards low precision arithmetic. Maximizing throughput of deep learning algorithms and computations may assist in meeting the needs of deep learning processors, for example, those performing deep learning in a data center. Matrix-matrix multiplication (a.k.a., GEMM or General Matrix Multiplication) is a common compute-heavy operation on modern processors. Special hardware for matrix multiplication (e.g., GEMM) is a good option for improving the peak compute (and energy efficiency) of certain applications, such as deep learning. Some of these applications, including deep learning, can operate on input data elements with relatively few bits without losing accuracy, as long as the output elements have

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

Non-Patent Literature (10)

  • Intention to Grant, EP App. No. 21217772.9, Apr. 30, 2024, 6 pages.
  • Corrected Notice of Allowability, U.S. Appl. No. 15/201,442, Jan. 22, 2019, 5 pages.
  • Corrected Notice of Allowability, U.S. Appl. No. 15/201,442, Mar. 11, 2019, 2 pages.
  • Decision to grant a European patent, EP App. No. 19201841.4, Oct. 27, 2022, 2 pages.
  • European Search Report and Search Opinion, EP App. No. 19201841.4, May 27, 2020, 8 pages.
  • European Search Report and Search Opinion, EP App. No. 21217772.9, Apr. 25, 2022, 7 pages.
  • Extended European Search Report and Search Opinion, EP App. No. 23200278.2, Jan. 11, 2024, 09 pages.
  • Intel,
  • “
  • Architecture Instruction Set Extensions Programming Reference