IP Library Granted Patent US 12,499,174
Granted Patent B2
US 12,499,174 · App. 17/367,517 · Granted Dec 16, 2025

Methods and apparatus for matrix and vector storage and operations

Inventors: Sam Brian Fok (San Leandro, CA); Alexander Smith Neckar (Redwood City, CA); Manish Shrivastava (Pleasanton, CA)
Assignee: Femtosense, Inc.
G06F17/16G06F9/30036G06F9/3802G06F9/3818G06F9/3836G06F9/3838G06F9/3851G06F9/3885G06F9/48G06F11/3024G06F11/3433G06F15/16G06F15/7807G06F16/901G06N3/045G06N3/048G06N3/063G06N3/10G06N3/098
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,499,174
App. No.
17/367,517
Granted
Dec 16, 2025
Kind
B2
Abstract

Methods and apparatus for matrix and vector storage and operations are disclosed. Exemplary embodiments include a multicore processor, where each core includes processing hardware, local weights, global weights, working memory, and accumulator. Exemplary embodiments compress sparse neural network data structures based on actual, non-null, connectivity (rather than all possible connections). In some variants, the compression and reduction in complexity is sized to fit within the memory footprint and processing capabilities of a core. The exemplary compression schemes represent sparse matrices with links to compressed column data structures, where each compressed column data structure only stores non-null entries to optimize column-based lookups of non-null entries. Similarly, sparse vector addressing skips nulled entries when performing vector-specific non-null multiply-accumulate operations.

Claims (51)

1 . A neural network processing apparatus, comprising:

processing hardware and a memory; and

a non-transitory computer-readable medium comprising one or more instructions which when executed by the processing hardware, causes the processing hardware to:

generate a first compressed representation of a sparse vector the first compressed representation comprising a plurality of non-null values and at least one address offset to a next non-null value of the plurality of non-null values;

obtain a second compressed representation of a second sparse data structure, the second compressed representation comprises a plurality of non-null data structures, each of the plurality of non-null data structures comprising a same number of values, the same number is greater than one;

determine the plurality of non-null values and a plurality of addresses associated with the plurality of non-null values from the first compressed representation;

for each non-null address of the plurality of addresses of the first compressed representation:

read a parameter column address table for a corresponding parameter column address;

read a parameter column from a parameter memory of the second sparse data structure at the corresponding parameter column address;

decode non-null data and addresses from the parameter column; and

for each of the non-null data and the addresses compute a product of the non-null data and a corresponding non-null value of the plurality of non-null values to calculate a plurality of intermediate element-wise products of the sparse vector and the second sparse data structure; and

calculate a result of the sparse vector and the second sparse data structure based on the plurality of intermediate element-wise products.

2 . The neural network processing apparatus of claim 1 , where:

the first compressed representation comprises a plurality of words of data, and

each word of the plurality of words of data comprises a control bit and a plurality of value bits, the control bit indicating that the plurality of value bits comprise a non-null value or the at least one address offset.

3 . The neural network processing apparatus of claim 1 , where the second sparse data structure exceeds a parameter memory dimension associated with the memory of the neural network processing apparatus; and

where the second compressed representation fits within the parameter memory dimension.

4 . The neural network processing apparatus of claim 1 , where the second sparse data structure comprises a sparse matrix.

5 . The neural network processing apparatus of claim 4 , where the second compressed representation comprises a pointer to a compressed column of the sparse matrix, where the compressed column comprises one or more non-null data structures of the plurality of non-null data structures.

6 . The neural network processing apparatus of claim 5 , where the compressed column of the sparse matrix does not include null values.

7 . The neural network processing apparatus of claim 6 , where a memory address of the compressed column comprises a base address and an offset.

8 . The neural network processing apparatus of claim 1 , where the second sparse data structure comprises a plurality of columns characterized by a fixed size and where each column of the plurality of columns is identified by a column offset.

9 . The neural network processing apparatus of claim 1 , where at least one dimension of the first compressed representation of the sparse vector is selected based on access efficiency.

10 . The neural network processing apparatus of claim 1 , where at least one dimension of the first compressed representation of the sparse vector is selected based on neural network training.

11 . The neural network processing apparatus of claim 1 , where at least one non-null data structure of the plurality of non-null data structures comprises a zero value.

12 . A neural network processing apparatus, comprising:

processing hardware;

a working memory;

a parameter memory; and

a non-transitory computer-readable medium comprising one or more instructions which when executed by the processing hardware, causes the processing hardware to:

generate a first compressed representation of a sparse vector the first compressed representation comprising a plurality of words of data, each word of the plurality of words of data comprises a control bit and a plurality of value bits, the control bit indicating that the plurality of value bits comprise a non-null value or at least one address offset to a next non-null value;

obtain a second compressed representation of a second sparse data structure; and

for each non-null address of the first compressed representation:

read a parameter column address table for a corresponding parameter column address;

read a parameter column from the parameter memory of the second sparse data structure at the corresponding parameter column address;

decode non-null data and addresses from the parameter column; and

for each of the non-null data and the addresses compute a product of the non-null data and a corresponding non-null value of the plurality of words of data.

13 . The neural network processing apparatus of claim 12 , where the one or more instructions further cause the processing hardware to accumulate non-null results in the working memory.

14 . The neural network processing apparatus of claim 13 , where the working memory stores a last known state of a plurality of intermediate results and where unrelated operations can access the working memory concurrently.

15 . The neural network processing apparatus of claim 13 , where the second sparse data structure comprises a sparse matrix and the non-null results are a plurality of intermediate results of element-wise multiplications between non-null elements of the sparse vector and the sparse matrix.

16 . A method of performing a matrix operation, comprising:

generating a first representation of a vector, the first representation comprising a plurality of words of data, each word of the plurality of words of data comprises a control bit and a plurality of value bits, the control bit indicating that the plurality of value bits comprise a non-null value or at least one address offset to a next non-null value;

obtaining a second representation of a matrix; and

for each non-null address of the first representation:

reading a parameter column address table for a corresponding parameter column address;

reading a parameter column from a parameter memory of the second representation of the matrix at the corresponding parameter column address;

decoding non-null data and addresses from the parameter column; and

for each of the non-null data and the addresses computing a product of the non-null data and a corresponding non-null value of the plurality of words of data.

17 . The method of claim 16 , where the second representation comprises a plurality of consecutive non-null elements of the matrix.

18 . The method of claim 16 , further comprising calculating a result of the vector and the matrix based on the product for each of the non-null data and the addresses, where the result comprises a sparse global vector for a global neural network state of a multicore neural network.

19 . The method of claim 16 , further comprising calculating a result of the vector and the matrix based on the product for each of the non-null data and the addresses, where the result comprises a dense local vector for a local neural network state of a core of a multicore neural network.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 8, 2021
From: FOK, SAM BRIAN; NECKAR, ALEXANDER SMITH; SHRIVASTAVA, MANISH
To: FEMTOSENSE, INC.
Reel/Frame 057411/0050 →
Continuity (2)
Provisional Application 63050090 · Jul 9, 2020
Related Publication 20220012598A1 · Jan 13, 2022
References Cited (27)
US 10452744B2 · Agrawal · 2019 [cited by examiner]
US 10965315B2 · Kamal · 2021 [cited by applicant]
US 11599181B1 · Nair et al. · 2023 [cited by applicant]
US 11625592B2 · Fok et al. · 2023 [cited by applicant]
US 11748666B2 · Feng et al. · 2023 [cited by applicant]
US 12136039B1 · Sather et al. · 2024 [cited by applicant]
US 20070220517A1 · Lippett · 2007 [cited by applicant]
US 20070283357A1 · Jeter et al. · 2007 [cited by applicant]
US 20140306970A1 · Surti et al. · 2014 [cited by applicant]
US 20140331029A1 · Foo · 2014 [cited by applicant]
US 20150379668A1 · Weissmann et al. · 2015 [cited by applicant]
US 20170024645A1 · Socher et al. · 2017 [cited by applicant]
US 20180113713A1 · Cheng et al. · 2018 [cited by applicant]
US 20180189234A1 · Nurvitadhi · 2018 [cited by examiner]
US 20190349318A1 · Fok et al. · 2019 [cited by applicant]
US 20190379396A1 · Bajic · 2019 [cited by examiner]
US 20200019837A1 · Boahen et al. · 2020 [cited by applicant]
US 20200135095A1 · Mobasher · 2020 [cited by examiner]
US 20200293367A1 · Andrei et al. · 2020 [cited by applicant]
US 20210200610A1 · Chu · 2021 [cited by examiner]
US 20210209450A1 · Cassidy et al. · 2021 [cited by applicant]
US 20210397943A1 · Ribalta · 2021 [cited by examiner]
US 20220012060A1 · Fok et al. · 2022 [cited by applicant]
US 20220012575A1 · Fok et al. · 2022 [cited by applicant]
US 20220012598A1 · Fok et al. · 2022 [cited by applicant]
US 20230133088A1 · Fok et al. · 2023 [cited by applicant]
Definition of “decompress” in Cambridge Dictionary, Jun. 24, 2016, https://web.archive.org/web/20160624170745/https://dictionary.cambridge.org/us/dictionary/english/decompress (Year: 2016). [cited by examiner]