# US 2021/0174176 A1 · Flexible precision neural inference processing unit

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0174176 A1
- Document ID: US20210174176A1
- Status: Published application
- Kind: A1
- Application number: 16/705,565
- Filed: 2019-12-06
- Published: 2021-06-10
- Earliest claimed: 2019-12-06
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Andrew S. Cassidy; Rathinakumar Appuswamy; John V. Arthur; Pallab Datta; Steve Esser; Myron D. Flickner; Jeffrey McKinstry; Dharmendra S. Modha; Jun Sawada; Brian Taba
- Web page: https://patentgrep.com/patent/US20210174176A1

## CPC

- G06N 3/063: using electronic means
- G06F 15/8053: {Vector processors}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06N 3/048: Activation functions
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Neural inference chips are provided. A neural core of the neural inference chip comprises a vector-matrix multiplier; a vector processor; and an activation unit operatively coupled to the vector processor. The vector-matrix multiplier, vector processor, and/or activation unit is adapted to operate at variable precision.

## Claims

### Claim 1

A neural inference chip comprising a neural core, the neural core comprising:
a vector-matrix multiplier adapted to
receive a weight matrix having a weight matrix precision,
receive an input activation vector having an input activation vector precision, and
compute a partial sum vector by multiplying the input activation vector by the weight matrix, the partial sum vector having a partial sum vector precision;
a vector processor adapted to
receive one or more partial sum vector from one or more vector source, the one or more vector source including the vector-matrix multiplier, and
perform one or more vector function on the one or more partial sum vector to yield a vector processor output vector, the vector processor output vector having a precision equal to the partial sum vector precision; and
an activation unit operatively coupled to the vector processor and adapted to
apply an activation function to the vector processor output vector, yielding an output activation vector having an output activation precision, wherein
the vector-matrix multiplier, vector processor, and/or activation unit is adapted to operate at variable precision.

### Claim 2 (depends on 1)

The neural inference chip of claim 1, further comprising:
at least one network interconnecting the neural core with at least one additional neural core,
the at least one network adapted to deliver synaptic weights and/or input activations to the neural cores at variable precision.

### Claim 3 (depends on 2)

The neural inference chip of claim 2, wherein the at least one network is further adapted to vary the weight matrix precision and dimension, input activation vector precision and dimension, and/or the output activation vector precision and dimension while maintaining constant bandwidth.

### Claim 4 (depends on 1)

The neural inference chip of claim 1, wherein the neural core further comprises:
at least one memory, the at least one memory being adapted to store weight matrices, input activation vectors, and/or output activation vectors at variable precision.

### Claim 5 (depends on 4)

The neural inference chip of claim 4, wherein the at least one memory is further adapted to vary the weight matrix precision and dimension, input activation vector precision and dimension, and/or the output activation vector precision and dimension while maintaining constant storage utilization.

### Claim 6 (depends on 1)

The neural inference chip of claim 1, wherein the vector-matrix multiplier is further adapted to vary the weight matrix precision and dimension and/or the input activation vector precision and dimension while maintaining constant bandwidth.

### Claim 7 (depends on 6)

The neural inference chip of claim 6, wherein the vector-matrix multiplier is further adapted to compute a variable number of multiplications per cycle at variable precision, wherein the variable number of multiplications per cycle and variable precision are inversely proportional.

### Claim 8 (depends on 1)

The neural inference chip of claim 1, wherein the activation function is adapted to re-range the vector processor output vector.

### Claim 9 (depends on 8)

The neural inference chip of claim 8, wherein applying the activation function comprises applying a saturating function.

### Claim 10 (depends on 9)

The neural inference chip of claim 9, wherein the saturating function has as least one bound corresponding to the output activation precision.

### Claim 11 (depends on 8)

The neural inference chip of claim 8, wherein applying the activation function comprises truncating one or more least significant bits.

### Claim 12 (depends on 1)

The neural inference chip of claim 1, wherein the variable precision is selected from 2 bit, 4 bit, 8 bit, 16 bit, and 32 bit.

### Claim 13 (depends on 1)

The neural inference chip of claim 1, wherein the variable precision is selectable at runtime.

### Claim 14 (depends on 1)

The neural inference chip of claim 1, wherein the variable precision is selectable for each layer of a neural network.

### Claim 15 (depends on 1)

The neural inference chip of claim 1, wherein the weight matrix precision is equal to the activation vector precision.

### Claim 16 (depends on 15)

The neural inference chip of claim 15, wherein the partial sum vector precision is not equal to the output activation precision.

### Claim 17 (depends on 1)

The neural inference chip of claim 1, wherein the partial sum vector precision is higher than the weight matrix precision and/or the activation vector precision.

### Claim 18 (depends on 15)

The neural inference chip of claim 15, wherein the output activation precision is equal to the weight matrix precision.

### Claim 19

A method comprising:
receiving a weight matrix having a first precision;
receiving an activation vector having the first precision;
computing a vector-matrix multiplication of the weight matrix and the activation vector, yielding a partial sum vector a second precision;
performing one or more vector functions on the partial sum vector to yield a vector processor output vector having the second precision; and
applying an activation function to the vector processor output vector, yielding an output activation vector having a third precision, wherein
at least one of the first, second, and third precision is varied at runtime.

### Claim 20 (depends on 19)

The method of claim 19, further comprising:
varying at least one of the first, second, and third precision for computation of each layer of a neural network.
