Fast Attention Calculation
OwnerSergei Chirkunov, Szabolcs CSÉFALVAYinventors
Life of this patent
Estimating the term…
Loading patent…
OwnerSergei Chirkunov, Szabolcs CSÉFALVAYinventors
Estimating the term…
A method of performing an attention calculation in a multithreaded processing system includes a processing unit, coupled with a dedicated cache and a dedicated local memory. The processing unit operates threads grouped into workgroups. A first matrix Q, a second matrix KT, and a third matrix V are inputs. In the cache dedicated to the first processing unit, a portion of the first matrix is stored, as a first matrix subunit. In the local memory dedicated to the first processing unit, a portion of the second matrix is stored, as a second matrix subunit. A portion of the third matrix is stored as a plurality of third matrix subunits. The first matrix subunits are multiplied by the second matrix subunits, to generate a subunit of a first product matrix. A product of (i) a softmax over each row of the first product matrix and (ii) the third matrix are calculated to generate at least a portion of an output of the attention calculation.
A method of performing an attention calculation in a multithreaded processing system, wherein the multithreaded processing system comprises one or more processing units, including a first processing unit, each processing unit coupled with a dedicated cache and a dedicated local memory, and wherein each processing unit is configured to operate a plurality of threads grouped into one or more workgroups, the method comprising:
A multithreaded processing system for performing an attention calculation, the multithreaded processing system comprising:
Dependencies are inferred from the claim text.