Matrix computation engine
AssigneeApple Inc.
InventorsEric Bainville, Tal Uliel, Erik Norden, Jeffry E. Gonion, Ali Sazegari
Life of this patent
Estimating the term…
Abstract
In an embodiment, a matrix computation engine is configured to perform matrix computations (e.g. matrix multiplications). The matrix computation engine may perform numerous matrix computations in parallel, in an embodiment. More particularly, the matrix computation engine may be configured to perform numerous multiplication operations in parallel on input matrix elements, generating resulting matrix elements. In an embodiment, the matrix computation engine may be configured to accumulate results in a result memory, performing multiply-accumulate operations for each matrix element of each matrix.
Claims15
An apparatus comprising:
- a processor configured to fetch a first instruction;
- and
- a computation engine coupled to the processor, wherein:
- the computation engine comprises at least two input memories configured to store input vectors of elements and an output memory configured to accumulate an output vector of elements;
- and
- the computation engine comprises a multiply accumulation (MAC) circuit coupled to the at least two input memories and configured to perform a multiply-accumulate operation on vectors of elements having a first size responsive to the first instruction, generating the output vector of elements for the output memory;
- and
- the computation engine comprises a lookup table programmed to map first elements of a second size less than the first size to second elements of the first size, wherein the first elements are provided from at least one of the input memories, and wherein the second elements are one of the vectors of elements having the first size that are provided to the MAC circuit, and wherein the lookup table is stored in one of the at least two input memories.
A matrix computation engine comprising:
- a circuit configured to perform a matrix multiplication operation on a first vector operand and a second vector operand responsive to an instruction issued to the matrix computation engine by a processor that is coupled to the matrix computation engine, producing a resulting output vector;
- wherein the circuit is configured to operate on matrix elements having a second size greater than a first size;
- the matrix computation engine includes a lookup table to map first matrix elements having the first size to second matrix elements having the second size, wherein the second matrix elements are provided as the first vector operand;
- and
- one or more operand memories coupled to the circuit and storing the second vector operand and a third vector operand, wherein the third vector operand has the first matrix elements of the first size, wherein the second vector operand and the third vector operand are read from the one or more operand memories to perform the matrix multiplication operation during use, and wherein the matrix computation engine is configured to map the first matrix elements to the second matrix elements to generate the first vector operand, and wherein the lookup table is stored in one of the one or more operand memories.
A method comprising:
- reading a first vector of first elements from a first operand memory in a computation engine, the first elements having a first size;
- using a lookup table in the computation engine to map each of the first elements of the first vector to second elements having a second size greater than the first size, wherein the second elements form a second vector;
- performing multiply-accumulate operations in the computation engine on the second vector of second elements and a third vector of third elements read from a second operand memory, wherein the lookup table is stored in one of the first operand memory or the second operand memory;
- and
- issuing a computation instruction to the computation engine from a processor that is coupled to the computation engine to cause the multiply-accumulate operations to be performed by the computation engine.
Dependencies are inferred from the claim text.