# US 2022/0012592 A1 · Methods and apparatus to perform weight and activation compression and decompression

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

- Number: US 2022/0012592 A1
- Document ID: US20220012592A1
- Status: Published application
- Kind: A1
- Application number: 17/483,693
- Filed: 2021-09-23
- Published: 2022-01-13
- Earliest claimed: 2021-06-15
- Assignees: Intel Corporation
- Inventors: Nilesh Jain; Menachem Adelman; Raanan Sade; Ravishankar Iyer; Rajesh Poornachandran; Yash Akhauri
- Web page: https://patentgrep.com/patent/US20220012592A1

## CPC

- H03M 7/70: {Type of the data to be coded, other than image and sound}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/08: Learning methods
- H03M 7/6088: {according to the data type}
- G06N 3/045: Combinations of networks
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, apparatus, systems, and articles of manufacture to perform weight and activation compression and decompression are disclosed. An example apparatus includes memory, instructions in the apparatus, and processor circuitry to execute the instructions to execute a compression operation to obtain compressed data corresponding to weights in a weight matrix, and determine meta-data associated with the weight matrix, a first portion of the meta-data indicative of whether the weight matrix is compressed, a second portion of the meta-data indicative of a cache size of the compressed data, and a third portion of the meta-data indicative of the compression operation executed to obtain the compressed data.

## Claims

### Claim 1

An apparatus comprising:
memory;
instructions in the apparatus; and
processor circuitry to execute the instructions to:
execute a compression operation to obtain compressed data corresponding to weights in a weight matrix; and
determine meta-data associated with the weight matrix, a first portion of the meta-data indicative of whether the weight matrix is compressed, a second portion of the meta-data indicative of a cache size of the compressed data, and a third portion of the meta-data indicative of the compression operation executed to obtain the compressed data.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the meta-data is a byte.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the first portion of the meta-data is of a first size, the third portion of the meta-data is of a second size larger than the first size, and the second portion of the meta-data is of a third size larger than the second size.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the first portion of the meta-data is a bit, wherein the processor circuitry is to:
assign a first value to the bit in response to the weight matrix being compressed; and
assign a second value to the bit in response to the weight matrix being uncompressed.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the processor circuitry is to record a quantity of cache lines occupied by the compressed data in the second portion of the meta-data.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein processor circuitry is to:
pack non-zero weights from the matrix into a compressed tile; and
generate a bitmap indicative of respective locations of the non-zero weights in the weight matrix.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the compression operation is a first compression operation of a plurality of compression operations, the weight matrix is a first weight matrix, the compressed data is first compressed data, and the meta-data is first meta-data, wherein the processor circuitry is to:
execute the first compression operation or a second compression operation of the plurality of compression operations to obtain second compressed data associated with a second weight matrix;
determine second meta-data associated with the second weight matrix; and
store the first meta-data and the second meta-data in a first portion of a memory.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the processor circuitry is to:
store the first compressed data in a first set of cache lines of a second portion of the memory; and
store the second compressed data in a second set of cache lines of the second portion of the memory subsequent to the first set of cache lines.

### Claim 9

A non-transitory machine readable medium comprising instructions which, when executed, cause one or more processors to:
execute a compression process to obtain compressed data corresponding to weights in a weight matrix; and
determine meta-data associated with the weight matrix, a first portion of the meta-data indicative of whether the weight matrix is compressed, a second portion of the meta-data indicative of a cache size of the compressed data, and a third portion of the meta-data indicative of the compression process executed to obtain the compressed data.

### Claim 10 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the meta-data is a byte.

### Claim 11 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the first portion of the meta-data is of a first size, the third portion of the meta-data is of a second size larger than the first size, and the second portion of the meta-data is of a third size larger than the second size.

### Claim 12 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the first portion of the meta-data is a bit, wherein the instructions, when executed, cause the one or more processors to:
assign a first value to the bit in response to the weight matrix being compressed; and
assign a second value to the bit in response to the weight matrix being uncompressed.

### Claim 13 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the instructions, when executed, cause the one or more processors to record a quantity of cache lines occupied by the compressed data in the second portion of the meta-data.

### Claim 14 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the compressed data includes non-zero weights from the weight matrix and a bitmap indicative of respective locations of the non-zero weights in the weight matrix.

### Claim 15 (depends on 9)

The non-transitory machine readable medium of claim 9, wherein the compression process is a first compression process, the weight matrix is a first weight matrix, the compressed data is first compressed data, and the meta-data is first meta-data, wherein the instructions, when executed, cause the one or more processors to:
execute the first compression process or a second compression process to obtain second compressed data associated with a second weight matrix;
determine second meta-data associated with the second weight matrix; and
store the first meta-data and the second meta-data in a first cache line of a linear memory.

### Claim 16 (depends on 15)

The non-transitory machine readable medium of claim 15, wherein the instructions, when executed, cause the one or more processors to:
store the first compressed data in a first set of cache lines of the linear memory subsequent to the first cache line; and
store the second compressed data in a second set of cache lines of the linear memory subsequent to the first set of cache lines.

### Claim 17

A method comprising:
executing a compression operation of a plurality of compression operations to obtain compressed data corresponding to weights in a weight matrix; and
determining meta-data associated with the weight matrix, a first portion of the meta-data indicative of whether the weight matrix is compressed, a second portion of the meta-data indicative of a cache size of the compressed data, and a third portion of the meta-data indicative of the compression operation executed to obtain the compressed data.

### Claim 18 (depends on 17)

The method of claim 17, wherein the meta-data is a byte.

### Claim 19 (depends on 17)

The method of claim 17, wherein the first portion of the meta-data is of a first size, the third portion of the meta-data is of a second size larger than the first size, and the second portion of the meta-data is of a third size larger than the second size.

### Claim 20 (depends on 17)

The method of claim 17, wherein the first portion of the meta-data is a bit, wherein determining the meta-data associated with the weight matrix includes:
assigning a first value to the bit in response to the weight matrix being compressed; and
assigning a second value to the bit in response to the weight matrix being uncompressed.

### Claim 21 (depends on 17)

The method of claim 17, wherein determining the meta-data associated with the weight matrix includes recording a quantity of cache lines occupied by the compressed data in the second portion of the meta-data.

### Claim 22 (depends on 17)

The method of claim 17, wherein executing the compression operation includes:
packing non-zero weights from the weight matrix into a compressed array; and
generating a bitmap indicative of respective positions of the non-zero weights in the weight matrix.

### Claim 23 (depends on 17)

The method of claim 17, wherein the compression operation is a first compression operation of the plurality of compression operations, the weight matrix is a first weight matrix, the compressed data is first compressed data, and the meta-data is first meta-data, further including:
executing the first compression operation or a second compression operation of the plurality of compression operations to obtain second compressed data associated with a second weight matrix;
determining second meta-data associated with the second weight matrix; and
storing the first meta-data and the second meta-data in a first portion of a memory.

### Claim 24 (depends on 23)

The method of claim 23, further including:
storing the first compressed data in a first set of cache lines of a second portion of the memory; and
storing the second compressed data in a second set of cache lines of the second portion of the memory subsequent to the first set of cache lines.

### Claim at position 25

-28. (canceled)
