IP Library Granted Patent US 12,288,142
Granted Patent B2
US 12,288,142 · App. 17/397,653 · Granted Apr 29, 2025

Sparsity-aware compute-in-memory

Inventors: Ren Li (San Diego, CA); Ankit Srivastava (San Diego, CA); Seyed Arash Mirhaj (Poway, CA); Sameer Wadhwa (San Diego, CA)
Assignee: QUALCOMM Incorporated
G06N20/00H03K19/20H03M7/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,288,142
App. No.
17/397,653
Granted
Apr 29, 2025
Kind
B2
Abstract

Certain aspects of the present disclosure provide techniques for performing machine learning computations in a compute in memory (CIM) array comprising a plurality of bit cells, including: determining that a sparsity of input data to a machine learning model exceeds an input data sparsity threshold; disabling one or more bit cells in the CIM array based on the sparsity of the input data prior to processing the input data; processing the input data with bit cells not disabled in the CIM array to generate an output value; applying a compensation to the output value based on the sparsity to generate a compensated output value; and outputting the compensated output value.

Claims (94)

1. A method, comprising:

disabling one or more bit cells in a compute-in-memory (CIM) array based on a sparsity of input data for a machine learning model prior to processing the input data;

determining that a sparsity of weight data for the machine learning model exceeds a weight data sparsity threshold;

resequencing the weight data according to the sparsity of the weight data;

disabling one or more bit cells in the CIM array based on the resequenced weight data;

resequencing the input data based on the resequenced weight data;

processing the input data with bit cells not disabled in the CIM array to generate an output value;

applying a compensation to the output value based on the sparsity of the input data to generate a compensated output value; and

outputting the compensated output value.

2. The method of claim 1 , wherein disabling one or more bit cells in the CIM array based on the sparsity of the input data prior to processing the input data comprises disabling each row of the CIM array for which an associated activation input value is 0.

3. The method of claim 1 , wherein the compensation is applied in a digital domain.

4. The method of claim 1 , further comprising:

determining whether the input data comprises binary input data or multibit input data;

setting bit cells of the CIM array to an AND operation mode if the input data comprises multibit input data; and

setting bit cells of the CIM array to an XNOR operation mode if the input data comprises binary input data.

5. The method of claim 1 , wherein resequencing the weight data according to the sparsity of the weight data comprises:

resequencing rows of a CIM array weight matrix according to a sparsity of each row in the CIM array weight matrix; and

resequencing columns of the CIM array weight matrix according to a sparsity of each column in the CIM array weight matrix.

6. The method of claim 5 , wherein disabling one or more bit cells in the CIM array based on the resequenced weight data comprises disabling one or more tiles of bit cells, wherein each tile of the one or more tiles comprises a plurality of bit cells with weight values of 0.

7. The method of claim 1 , further comprising:

compressing the resequenced weight data by removing any weight with a value of 0; and

storing the compressed resequenced weight data in a memory.

8. The method of claim 7 , further comprising:

retrieving the compressed resequenced weight data from the memory;

decompressing the compressed resequenced weight data; and

writing the decompressed resequenced weight data to the CIM array prior to processing the input data with the bit cells not disabled in the CIM array to generate the output value.

9. The method of claim 1 , wherein determining the sparsity of the input data comprises determining a count of activation inputs in the input data with an activation input value of 0.

10. The method of claim 1 , further comprising determining that the sparsity of the input data to the machine learning model exceeds an input data sparsity threshold.

11. A method, comprising:

resequencing weight data for a machine learning model according to a sparsity of the weight data, wherein the sparsity of the weight data exceeds a weight data sparsity threshold;

disabling one or more bit cells in a compute-in-memory (CIM) array based on the resequenced weight data;

resequencing input data based on the resequenced weight data;

processing the input data with bit cells not disabled in the CIM array to generate an output value;

applying a compensation to the output value based on the sparsity to generate a compensated output value; and

outputting the compensated output value.

12. The method of claim 11 , wherein:

disabling one or more bit cells in the CIM array based on the resequenced weight data comprises disabling one or more tiles of bit cells, and

each tile of the one or more tiles comprises a plurality of bit cells with weight values of 0.

13. The method of claim 11 , further comprising:

compressing the resequenced weight data by removing any weight with a value of 0; and

storing the compressed resequenced weight data in a memory.

14. The method of claim 13 , further comprising:

retrieving the compressed resequenced weight data from the memory;

decompressing the compressed resequenced weight data; and

writing the decompressed resequenced weight data to the CIM array prior to processing the input data with bit cells not disabled in the CIM array to generate the output value.

15. A processing system, comprising:

a memory comprising computer-executable instructions; and

one or more processors configured to execute the computer-executable instructions and cause the processing system to:

disable one or more bit cells in a compute-in-memory (CIM) array based on a sparsity of input data for a machine learning model prior to processing the input data;

determine that a sparsity of weight data for the machine learning model exceeds a weight data sparsity threshold;

resequence the weight data according to the sparsity of the weight data;

disable one or more bit cells in the CIM array based on the resequenced weight data;

resequence the input data based on the resequenced weight data;

process the input data with bit cells not disabled in the CIM array to generate an output value;

apply a compensation to the output value based on the sparsity of the input data to generate a compensated output value; and

output the compensated output value.

16. The processing system of claim 15 , wherein in order to disable one or more bit cells in the CIM array based on the sparsity of the input data prior to processing the input data, the one or more processors are further configured to disable each word line of the CIM array for which an associated activation input value is 0.

17. The processing system of claim 15 , wherein the compensation is applied in a digital domain.

18. The processing system of claim 15 , wherein the one or more processors are further configured to:

determine whether the input data comprises binary input data or multibit input data;

set bit cells of the CIM array to an AND operation mode if the input data comprises multibit input data; and

set bit cells of the CIM array to an XNOR operation mode if the input data comprises binary input data.

19. The processing system of claim 15 , wherein in order to resequence the weight data according to the sparsity of the weight data, the one or more processors are further configured to:

resequence rows of a CIM array weight matrix according to a sparsity of each row in the CIM array weight matrix; and

resequence columns of the CIM array weight matrix according to a sparsity of each column in the CIM array weight matrix.

20. The processing system of claim 19 , wherein in order to disable one or more bit cells in the CIM array based on the resequenced weight data, the one or more processors are further configured to disable one or more tiles of bit cells, wherein each tile of the one or more tiles comprises a plurality of bit cells with weight values of 0.

21. The processing system of claim 15 , wherein the one or more processors are further configured to:

compress the resequenced weight data by removing any weight with a value of 0; and

store the compressed resequenced weight data in a memory.

22. The processing system of claim 21 , wherein the one or more processors are further configured to:

retrieve the compressed resequenced weight data from the memory;

decompress the compressed resequenced weight data; and

write the decompressed resequenced weight data to the CIM array prior to processing the input data with the bit cells not disabled in the CIM array to generate the output value.

23. The processing system of claim 15 , wherein in order to determine the sparsity of the input data, the one or more processors are further configured to determine a count of activation inputs in the input data with an activation input value of 0.

24. The processing system of claim 15 , wherein the one or more processors are further configured to determine that the sparsity of the input data to the machine learning model exceeds an input data sparsity threshold.

25. A processing system, comprising:

a memory comprising computer-executable instructions; and

one or more processors configured to execute the computer-executable instructions and cause the processing system to:

resequence weight data for a machine learning model according to a sparsity of the weight data, wherein the sparsity of the weight data exceeds a weight data sparsity threshold;

disable one or more bit cells in a compute-in-memory (CIM) array based on the resequenced weight data;

resequence input data based on the resequenced weight data;

process the input data with bit cells not disabled in the CIM array to generate an output value;

apply a compensation to the output value based on the sparsity to generate a compensated output value; and

output the compensated output value.

26. The processing system of claim 25 , wherein:

in order to disable one or more bit cells in the CIM array based on the resequenced weight data, the one or more processors are further configured to disable one or more tiles of bit cells, and

each tile of the one or more tiles comprises a plurality of bit cells with weight values of 0.

27. The processing system of claim 25 , wherein the one or more processors are further configured to:

compress the resequenced weight data by removing any weight with a value of 0; and

store the compressed resequenced weight data in a memory.

28. The processing system of claim 27 , wherein the one or more processors are further configured to:

retrieve the compressed resequenced weight data from the memory;

decompress the compressed resequenced weight data; and

write the decompressed resequenced weight data to the CIM array prior to processing the input data with bit cells not disabled in the CIM array to generate the output value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 27, 2022
From: LI, REN; SRIVASTAVA, ANKIT; MIRHAJ, SEYED ARASH; WADHWA, SAMEER
To: QUALCOMM INCORPORATED
Reel/Frame 060640/0007 →
Continuity (1)
Related Publication 20230049323A1 · Feb 16, 2023
References Cited (30)
US 10176435B1 · Sarkar · 2019 [cited by examiner]
US 11955167B2 · Gu · 2024 [cited by examiner]
US 20180164866A1 · Turakhia · 2018 [cited by examiner]
US 20180293691A1 · Nurvitadhi · 2018 [cited by examiner]
US 20200274894A1 · Argoeti · 2020 [cited by examiner]
US 20210027722A1 · Rao · 2021 [cited by examiner]
US 20210193196A1 · Augustine · 2021 [cited by examiner]
US 20210248467A1 · Mohamed · 2021 [cited by examiner]
US 20210248822A1 · Choi · 2021 [cited by examiner]
US 20220188600A1 · Li · 2022 [cited by examiner]
US 20220284952A1 · Wang · 2022 [cited by examiner]
US 20220405933A1 · Tajbakhsh · 2022 [cited by examiner]
US 20230008550A1 · Bock · 2023 [cited by examiner]
US 20230049323A1 · Li · 2023 [cited by examiner]
US 20230252299A1 · Kundu · 2023 [cited by examiner]
US 20230325665A1 · Langhammer · 2023 [cited by examiner]
US 20230376765A1 · Wagholikar · 2023 [cited by examiner]
US 20240103519A1 · Mene · 2024 [cited by examiner]
US 20240160269A1 · Jha · 2024 [cited by examiner]
US 20240201949A1 · Sayyaparaju · 2024 [cited by examiner]
CN 111026700A · 2020 [cited by applicant]
CN 111079919A · 2020 [cited by applicant]
KR 20210059623A · 2021 [cited by applicant]
WO 2019246064A1 · 2019 [cited by applicant]
Fangxin L., et al., “SME: ReRAM-Based Sparse-Multiplication-Engine to Squeeze-Out Bit Sparsity of Neural Network”, Mar. 2, 2021, pp. 417-424 (Year: 2021). [cited by examiner]
Yang T.H., et al., “Sparse ReRAM Engine Joint Exploration of Activation and Weight Sparsity in Compressed Neural Networks”, Proceedings of the 2020 Chi Conference on Human Factors in Computing Systems, ACMPUB27, New Yor… [cited by examiner]
Fangxin L., et al., “SME: ReRAM-Based Sparse-Multiplication-Engine to Squeeze-Out Bit Sparsity of Neural Network”, Mar. 2, 2021, pp. 417-424, XP055981405, DOI: 10.1109/ICCD53106.2021.00072 ISBN: 978-1-6654-3219-1, p. 1-… [cited by applicant]
International Search Report and Written Opinion—PCT/US2022/074660—ISA/EPO—Nov. 28, 2022. [cited by applicant]
Yang T.H., et al., “Sparse ReRAM Engine Joint Exploration of Activation and Weight Sparsity in Compressed Neural Networks”, Proceedings of the 2020 Chi Conference on Human Factors in Computing Systems, ACMPUB27, New Yor… [cited by applicant]
Wang et al., “SNrram: An Efficient Sparse Neural Network Computation Architecture Based on Resistive Random-Access Memory”, Design Automation Conference (DAC), Jun. 24-29, 2018, San Francisco, CA, USA, 6 Pages, DOI: htt… [cited by applicant]