IP Library Granted Patent US 11,163,686
Granted Patent B2
US 11,163,686 · App. 16/715,127 · Granted Nov 2, 2021

Method and apparatus for accessing tensor data

Inventors: Chen Sun (Beijing, CN); Zhenjiang Wang (Beijing, CN); Liang Chen (Beijing, CN); Kun Ling (Beijing, CN)
Assignee: Beijing Horizon Robotics Technology Research and Development Co., Ltd.
G06F12/0868G06F12/10G06F2212/1024G06F2212/608G06N3/063
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,163,686
App. No.
16/715,127
Granted
Nov 2, 2021
Kind
B2
Abstract

Disclosed are a method and an apparatus for accessing tensor data. The method may include determining a first row address in a first memory where one or more first data items to be accessed in a logical structure of the tensor data are stored at the first row address, copying data items at the first row address in the first memory to a first buffer row of a first buffer, moving each first data item in the first buffer row of the first buffer to a corresponding location at least in a first buffer row of a second buffer, and storing data items in the first buffer row of the second buffer into corresponding target locations in the second memory.

Claims (65)

1. A method for accessing tensor data, comprising:

determining a first row address in a first memory, one or more first data items to be accessed in a logical structure of the tensor data being stored at the first row address in the first memory;

copying data items at the first row address in the first memory to a first buffer row of a first buffer;

moving each first data item in the first buffer row of the first buffer to a corresponding location at least in a first buffer row of a second buffer, the corresponding location at least in the first buffer row of the second buffer for each first data item depending on a target location in a second memory allocated to the first data item; and

storing data items in the first buffer row of the second buffer into corresponding target locations in the second memory.

2. The method of claim 1 , further comprising:

in a case of a second buffer row of the second buffer including at least one first data item, storing each first data item in the second buffer row of the second buffer into the corresponding target location in the second memory,

in the first memory, each first data item in the second buffer row of the second buffer being located after each first data item in the first buffer row of the second buffer.

3. The method of claim 1 , further comprising:

determining a second row address of the first memory, one or more second data items to be accessed in the logical structure of the tensor data being stored at the second row address in the first memory;

copying data items at the second row address in the first memory to a second buffer row of the first buffer;

moving each second data item in the second buffer row of the first buffer to a corresponding location at least in a second buffer row of the second buffer, the corresponding location at least in the second buffer row of the second buffer for each second data item depending on a target location in the second memory allocated to the second data item; and

storing data items in the second buffer row of the second buffer into corresponding target locations in the second memory.

4. The method of claim 3 , further comprising:

in a case of the first buffer row of the second buffer including at least one second data item, storing each second data item in the first buffer row of the second buffer into the corresponding target location in the second memory,

in the first memory, each second data item in the first buffer row of the second buffer being located after each second data item in the second buffer row of the second buffer.

5. The method of claim 3 , wherein the moving each second data item in the second buffer row of the first buffer to the corresponding location at least in the second buffer row of the second buffer comprises:

in parallel with or after storing data items in the first buffer row of the second buffer into corresponding target locations in the second memory, moving each second data item in the second buffer row of the first buffer to the corresponding location at least in the second buffer row of the second buffer.

6. The method of claim 1 , further comprising:

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

7. The method of claim 2 , further comprising:

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

8. The method of claim 3 , further comprising:

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

9. The method of claim 4 , further comprising:

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

10. The method of claim 5 , further comprising:

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

11. An apparatus for accessing tensor data, comprising:

a first buffer;

a second buffer; and

a controller, the controller being coupled to a first memory, a second memory, the first buffer, and the second buffer, the controller being configured to perform

determining a first row address in a first memory, one or more first data items to be accessed in a logical structure of the tensor data being stored at the first row address in the first memory,

copying data items at the first row address in the first memory to a first buffer row of a first buffer,

moving each first data item in the first buffer row of the first buffer to a corresponding location at least in a first buffer row of a second buffer, the corresponding location at least in the first buffer row of the second buffer for each first data item depending on a target location in a second memory allocated to the first data item, and

storing data items in the first buffer row of the second buffer into corresponding target locations in the second memory.

12. The apparatus of claim 11 , wherein a capacity of each buffer row of the first buffer is same with a total capacity of a plurality of storage units with same row address in the first memory, and wherein a capacity of each buffer row of the second buffer is same with a total capacity of a plurality of storage units with same row address in the second memory.

13. The apparatus of claim 11 , wherein both the first buffer and the second buffer are circularly addressed by buffer rows.

14. The apparatus of claim 11 , wherein the controller is further configured to perform

in a case of a second buffer row of the second buffer including at least one first data item, storing each first data item in the second buffer row of the second buffer into the corresponding target location in the second memory,

in the first memory, each first data item in the second buffer row of the second buffer being located after each first data item in the first buffer row of the second buffer.

15. The apparatus of claim 11 , wherein the controller is further configured to perform

determining a second row address of the first memory, one or more second data items to be accessed in the logical structure of the tensor data being stored at the second row address in the first memory;

copying data items at the second row address in the first memory to a second buffer row of the first buffer;

moving each second data item in the second buffer row of the first buffer to a corresponding location at least in a second buffer row of the second buffer, the corresponding location at least in the second buffer row of the second buffer for each second data item depending on a target location in the second memory allocated to the second data item; and

storing data items in the second buffer row of the second buffer into corresponding target locations in the second memory.

16. The apparatus of claim 15 , wherein the controller is further configured to perform

in a case of the first buffer row of the second buffer including at least one second data item, storing each second data item in the first buffer row of the second buffer into the corresponding target location in the second memory,

in the first memory, each second data item in the first buffer row of the second buffer being located after each second data item in the second buffer row of the second buffer.

17. The apparatus of claim 15 , wherein the controller is further configured to perform

in parallel with or after storing data items in the first buffer row of the second buffer into corresponding target locations in the second memory, moving each second data item in the second buffer row of the first buffer to the corresponding location at least in the second buffer row of the second buffer.

18. The apparatus of claim 11 , wherein the controller is further configured to perform

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

19. The apparatus of claim 12 , wherein the controller is further configured to perform

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

20. The apparatus of claim 13 , wherein the controller is further configured to perform

receiving an instruction to access the tensor data; and

determining one or more of data items to be accessed in the logical structure, the first row address, and target locations in the second memory of the data items to be accessed in the logical structure, by parsing the instruction.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2019
From: SUN, CHEN; WANG, ZHENJIANG; CHEN, LIANG; LING, KUN
To: BEIJING HORIZON ROBOTICS TECHNOLOGY RESEARCH AND DEVELOPMENT CO., LTD.
Reel/Frame 051292/0169 →
Priority Claims (1)
CN 201811541065.1 · Dec 17, 2018 · national
Continuity (1)
Related Publication 20200192803A1 · Jun 18, 2020