IP Library › Granted Patent US 11,635,904
Granted Patent B2
US 11,635,904 · App. 16/908,707 · Granted Apr 25, 2023

Matrix storage method, matrix access method, apparatus and electronic device

Inventors: Yuan Ruan (Beijing, CN); Haoyang Li (Beijing, CN)
Assignee: KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
G06F3/064G06F3/0622G06F3/0647G06F3/0659G06F3/0683
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 11,635,904
App. No.
16/908,707
Granted
Apr 25, 2023
Kind
B2
Abstract

The present disclosure relates to technical field of data access, and discloses a matrix storage method, a matrix access method, an apparatus and an electronic device in the technical field of data access. The matrix storage method includes: dividing a matrix into a plurality of data blocks with a preset segmentation granularity of N rows×M columns; the plurality of data blocks includes at least one first data block of N rows×M columns; if the column number of the matrix is not an integer multiple of M, the plurality of data blocks further includes at least one second data block of N rows×P columns, the second data block is aligned with an adjacent row of first data block; and storing the data in each of the first data blocks and the second data blocks continuously in an off-chip storage.

Claims (59)

1. A matrix access method, applied to an electronic device comprising at least one processor and an off-chip storage which is connected to and in communication with the at least one processor, wherein the matrix is stored in an off-chip storage using a matrix storage method, comprising:

dividing a matrix into a plurality of data blocks with a preset segmentation granularity of N rows×M columns, at least one of N and M is greater than 1; wherein the plurality of data blocks comprises at least one first data block of N rows×M columns; if the column number of the matrix is not an integer multiple of M, the plurality of data blocks further comprises at least one second data block of N rows×P columns, the second data block is aligned with an adjacent row of first data block, and P is less than M;

storing the data in each of the first data blocks continuously in the off-chip storage, and storing the data in each of the second data blocks continuously in the off-chip storage,

wherein the off-chip storage comprises a plurality of storage channels, and the segmentation granularity is an integral multiple of a storage granularity of each storage channel;

the matrix access method comprising:

receiving an access request for the matrix, wherein the access request comprises access parameters of the matrix;

if the data block corresponding to the access parameter comprises a complete first data block or a complete second data block, reading the data of the data block from the off-chip storage;

if the data block corresponding to the access parameter comprises an incomplete first data block or an incomplete second data block, reading the data of the data block from the off-chip storage is prohibited.

2. The method according to claim 1 , wherein if the row number of the matrix is not an integer multiple of N, the plurality of data blocks further comprises at least one third data block of L rows×S columns, and L is less than N.

3. The method according to claim 2 , wherein the number of the third data block is 1, and S is equal to the column number of the matrix.

4. The method according to claim 2 , wherein the matrix storage method further comprises:

storing the data in each of the third data blocks continuously in the off-chip storage.

5. The method according to claim 3 , wherein the matrix storage method further comprises:

storing the data in each of the third data blocks continuously in the off-chip storage.

6. The method according to claim 2 , wherein the matrix access method comprising:

receiving an access request for the matrix, wherein the access request comprises access parameters of the matrix;

if the data block corresponding to the access parameter comprises a complete first data block or a complete second data block, reading the data of the data block from the off-chip storage;

if the data block corresponding to the access parameter comprises an incomplete first data block or an incomplete second data block, reading the data of the data block from the off-chip storage is prohibited.

7. The method according to claim 3 , wherein the matrix access method comprising:

receiving an access request for the matrix, wherein the access request comprises access parameters of the matrix;

if the data block corresponding to the access parameter comprises a complete first data block or a complete second data block, reading the data of the data block from the off-chip storage;

if the data block corresponding to the access parameter comprises an incomplete first data block or an incomplete second data block, reading the data of the data block from the off-chip storage is prohibited.

8. The method according to claim 4 , wherein the matrix access method comprising:

receiving an access request for the matrix, wherein the access request comprises access parameters of the matrix;

if the data block corresponding to the access parameter comprises a complete first data block or a complete second data block, reading the data of the data block from the off-chip storage;

if the data block corresponding to the access parameter comprises an incomplete first data block or an incomplete second data block, reading the data of the data block from the off-chip storage is prohibited.

9. The method according to claim 5 , wherein the matrix access method comprising:

receiving an access request for the matrix, wherein the access request comprises access parameters of the matrix;

if the data block corresponding to the access parameter comprises a complete first data block or a complete second data block, reading the data of the data block from the off-chip storage;

if the data block corresponding to the access parameter comprises an incomplete first data block or an incomplete second data block, reading the data of the data block from the off-chip storage is prohibited.

10. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 1 .

11. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 2 .

12. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 3 .

13. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 4 .

14. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 5 .

15. An electronic device, comprising:

at least one processor; and

a memory which is connected to and in communication with the at least one processor;

wherein, instructions that can be executed by the at least one processor are stored in the memory, the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to claim 1 .

16. A non-transient computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed to cause the computer to perform the method according to claim 1 .

17. A non-transient computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed to cause the computer to perform the method according to claim 2 .

18. A non-transient computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed to cause the computer to perform the method according to claim 3 .

19. A non-transient computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed to cause the computer to perform the method according to claim 4 .

20. A non-transient computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed to cause the computer to perform the method according to claim 5 .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2021
From: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
To: KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
Reel/Frame 058705/0909 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 22, 2020
From: RUAN, YUAN; LI, HAOYANG
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 053006/0576 →
Priority Claims (1)
CN 201911420575.8 · Dec 31, 2019 · national
Continuity (1)
Related Publication 20210200439A1 · Jul 1, 2021