# US 11,120,327 B2 · Compression of kernel data for neural network operations

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

- Number: US 11,120,327 B2
- Document ID: US11120327B2
- Status: Granted
- Kind: B2
- Application number: 15/971,657
- Filed: 2018-05-04
- Published: 2019-11-07
- Granted: 2021-09-14
- Earliest claimed: 2018-05-04
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Liran Fishel; Sung Hee Park; Christopher L. Mills
- Web page: https://patentgrep.com/patent/US11120327B2

## CPC

- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/063: using electronic means
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Embodiments relate to a neural processor circuit that includes a kernel access circuit and multiple neural engine circuits. The kernel access circuit reads compressed kernel data from memory external to the neural processor circuit. Each neural engine circuit receives compressed kernel data from the kernel access circuit. Each neural engine circuit includes a kernel extract circuit and a kernel multiply-add (MAD) circuit. The kernel extract circuit extracts uncompressed kernel data from the compressed kernel data. The kernel MAD circuit receives the uncompressed kernel data from the kernel extract circuit and performs neural network operations on a portion of input data using the uncompressed kernel data.

## Claims

### Claim 1

A neural processor circuit, comprising:
a kernel access circuit coupled to memory external to the neural processor circuit, the kernel access circuit configured to read compressed kernel data from the memory; and
a plurality of neural engine circuits configured to receive compressed kernel data from the kernel access circuit, each of the neural engine circuits comprising:
a kernel extract circuit configured to extract uncompressed kernel data from the compressed kernel data, wherein the compressed kernel data includes a single mask value for each kernel indicative of one or more locations in the kernel where kernel coefficients are non-zero; and
a multiply-add (MAD) circuit coupled to the kernel extract circuit to receive the uncompressed kernel data, the MAD circuit further configured to perform neural network operations on a portion of input data using the uncompressed kernel data.

### Claim 2 (depends on 1)

The neural processor circuit of claim 1, wherein the MAD circuit is configured to perform the neural network operations on the portion of input data using the uncompressed kernel data by:
responsive to a kernel coefficient being non-zero, multiplying a kernel coefficient with a corresponding value of the input data.

### Claim 3 (depends on 1)

The neural processor circuit of claim 1, wherein the kernel extract circuit is further configured to extract at least one of a MAD parameter or a post-processor parameter from the compressed kernel data, the MAD parameter sent to the MAD circuit of each of the neural engine circuits to configure operations of the MAD circuit, the post-processor parameter sent to a post-processor of each of the neural engine circuits to configure operations of the post-processor.

### Claim 4 (depends on 1)

The neural processor circuit of claim 1, wherein the kernel extract circuit comprises:
a reconstruction circuit configured to reconstruct uncompressed kernel data corresponding to each of the neural engine circuits, and
a kernel look-ahead buffer configured to store the uncompressed kernel data.

### Claim 5 (depends on 4)

The neural processor circuit of claim 4, wherein the kernel extract circuit further comprises a look-up table storage configured to store look-up tables storing representative kernel coefficients of kernels identified by index values, and the representative kernel coefficients are determined during a compilation process based on kernel coefficients of original kernel data before compression.

### Claim 6 (depends on 4)

The neural processor circuit of claim 4, wherein the kernel look-ahead buffer is configured to send information on locations of kernel coefficients that are zero in the uncompressed kernel data to the MAD circuit before sending kernel coefficients that are non-zero so that the MAD circuit skips operation associated with the kernel coefficients that are zero.

### Claim 7 (depends on 1)

The neural processor circuit of claim 1, wherein the compressed kernel data comprises a plurality of kernel groups, wherein each of the kernel group includes a mask and values of non-zero kernel coefficients of a single kernel, a mask value of the single kernel derived from at least the mask.

### Claim 8 (depends on 7)

The neural processor circuit of claim 7, wherein a mask value of the single kernel is derived from the mask of the kernel group and a mask of another kernel group.

### Claim 9

A method of operating a neural processor circuit, comprising:
reading, by a kernel access circuit, compressed kernel data from a memory external to the neural processor circuit, wherein the compressed kernel data includes a single mask value for each kernel indicative of one or more locations in the kernel where kernel coefficients are non-zero;
receiving, by a plurality of neural engine circuits, compressed kernel data from the kernel access circuit, each of the neural engine circuits comprising a kernel extract circuit and a multiply-add (MAD) circuit;
extracting, by the kernel extract circuit, uncompressed kernel data from the compressed kernel data; and
performing, by the MAD circuit, neural network operations on a portion of input data using the uncompressed kernel data.

### Claim 10 (depends on 9)

The method of claim 9, wherein the performing the neural network operations on the portion of input data using the uncompressed kernel data comprises:
responsive to a kernel coefficient being non-zero, multiplying a kernel coefficient with a corresponding value of the input data.

### Claim 11 (depends on 9)

The method of claim 9, further comprising:
extracting at least one of a MAD parameter or a post-processor parameter from the compressed kernel data;
sending the MAD parameter sent to the MAD circuit of each of the neural engine circuits to configure operations of the MAD circuit; and
sending the post-processor parameter a post-processor of each of the neural engine circuits to configure operations of a post-processor.

### Claim 12 (depends on 9)

The method of claim 9, wherein the extracting the uncompressed kernel from the compressed kernel data comprises:
reconstructing uncompressed kernel data corresponding to each of the neural engine circuits; and
storing the uncompressed kernel data in a kernel look-ahead buffer.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
storing representative kernel coefficients of kernels identified by index values into look-up table storage;
sending, by the kernel look-ahead buffer, information on locations of kernel coefficients that are zero in the uncompressed kernel data to the MAD circuit before sending kernel coefficients that are non-zero so that the MAD circuit skips operation associated with the kernel coefficients that are zero.

### Claim 14 (depends on 9)

The method of claim 9, wherein the compressed kernel data comprises a plurality of kernel groups, wherein each of the kernel group includes a mask and values of non-zero kernel coefficients of a single kernel, a mask value of the single kernel derived from at least the mask.

### Claim 15

An integrated circuit (IC) system comprising a neural processor circuit, the neural processor circuit comprising:
a kernel access circuit coupled to memory external to the neural processor circuit, the kernel access circuit configured to read compressed kernel data from the memory; and
a plurality of neural engine circuits configured to receive compressed kernel data from the kernel access circuit, each of the neural engine circuits comprising:
a kernel extract circuit configured to extract uncompressed kernel data from the compressed kernel data, wherein the compressed kernel data includes a single mask value for each kernel indicative of one or more locations in the kernel where kernel coefficients are non-zero; and
a multiply-add (MAD) circuit coupled to the kernel decompression circuit to receive the uncompressed kernel data, the MAD circuit further configured to perform neural network operations on a portion of input data using the uncompressed kernel data.

### Claim 16 (depends on 15)

The IC system of claim 15, wherein the MAD circuit is configured to perform the neural network operations on the portion of input data using the uncompressed kernel data by:
responsive to a kernel coefficient being non-zero, multiplying a kernel coefficient with a corresponding value of the input data.

### Claim 17 (depends on 15)

The IC system of claim 15, wherein the kernel extract circuit is further configured to extract at least one of a MAD parameter or a post-processor parameter from the compressed kernel data, the MAD parameter sent to the MAD circuit of each of the neural engine circuits to configure operations of the MAD circuit, the post-processor parameter sent to a post-processor of each of the neural engine circuits to configure operations of the post-processor.

### Claim 18 (depends on 15)

The IC system of claim 15, wherein the kernel extract circuit comprises:
a reconstruction circuit configured to reconstruct uncompressed kernel data corresponding to each of the neural engine circuits, and
a kernel look-ahead buffer configured to store the uncompressed kernel data.

### Claim 19 (depends on 18)

The IC system of claim 18, wherein the kernel extract circuit further comprises look-up table storage configured to store look-up tables storing representative kernel coefficients of kernels identified by index values, and the kernel look-ahead buffer is configured to send information on locations of kernel coefficients that are zero in the uncompressed kernel data to the MAD circuit before sending kernel coefficients that are non-zero so that the MAD circuit skips operation associated with the kernel coefficients that are zero.

### Claim 20 (depends on 15)

The IC system of claim 15, wherein the compressed kernel data comprises a plurality of kernel groups, wherein each of the kernel group includes a mask and values of non-zero kernel coefficients of a single kernel, a mask value of the single kernel derived from at least the mask.
