IP Library Granted Patent US 11,669,443
Granted Patent B2
US 11,669,443 · App. 16/746,419 · Granted Jun 6, 2023

Data layout optimization on processing in memory architecture for executing neural network model

Inventors: Minxuan Zhou (San Mateo, CA); Guoyang Chen (San Mateo, CA); Weifeng Zhang (San Mateo, CA)
Assignee: Alibaba Group Holding Limited
G06F12/0246G06F9/30036G06F9/5016G06F12/0207G06F17/16G06N3/06G06F2212/7202
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,669,443
App. No.
16/746,419
Granted
Jun 6, 2023
Kind
B2
Abstract

The present disclosure relates to a method for scheduling a computation graph on a processing in memory (PIM) enabled device comprising a memory block assembly. The method comprises allocating a first node of the computation graph on a first memory block of a first array of memory blocks in the memory block assembly and allocating a second node of the computation graph on a second memory block of a second array of memory blocks in the memory block assembly, wherein output data of the first node is used for executing the second node. The memory block assembly can be configured to support data transfer from the first memory block to the second memory block via an internal data coupling in the memory block assembly.

Claims (65)

1. A method for scheduling a computation graph on a processing in memory (PIM) enabled device comprising a memory block assembly, comprising:

allocating a first node of the computation graph on a first memory block of a first array of memory blocks in the memory block assembly;

allocating a second node of the computation graph on a second memory block of a second array of memory blocks in the memory block assembly, wherein output data of the first node is used for executing the second node; and

assigning a first layer number to the first node and a second layer number to the second node based on dependency between the first node and the second node, wherein the second layer number is bigger than the first layer number,

wherein the memory block assembly is configured to support data transfer from the first memory block to the second memory block via an internal data coupling in the memory block assembly,

wherein the computation graph further includes a third node of which output data is used for executing the second node and to which a third layer number is assigned, and

wherein the second layer number is obtained by increasing the first layer number by 1 when the first layer number is bigger than the third layer number or by increasing the third layer number by 1 when the third layer number is bigger than the first layer number.

2. The method of claim 1 , further comprising:

reallocating the second node on a third memory block of a third array of memory blocks in the memory block assembly,

wherein the memory block assembly is configured to support data transfer from the first memory block to the third memory block via a global buffer shared by all memory blocks of the memory block assembly, and

wherein a number of outgoing edges from one or more nodes that includes the second node and that are allocated to the second array of memory blocks is bigger than a number of outgoing edges from one or more nodes that includes the first node and that are allocated to the first array of memory blocks.

3. The method of claim 1 , further comprising:

determining data layout for executing the first node on the first memory block based on vector folding,

wherein the first memory block includes a memory cell array arranged in a plurality of rows and in a plurality of columns.

4. The method of claim 3 , wherein the first node includes a vector-matrix multiplication operation between a vector and a matrix, and

wherein a first element of the vector is arranged in a same column among the plurality of columns with a second element of the vector.

5. The method of claim 4 , wherein the first element of the vector is copied multiple times in the same column among the plurality of columns.

6. The method of claim 1 , wherein the second array of memory blocks is adjacent to the first array of memory blocks in the memory block assembly.

7. An apparatus for scheduling a computation graph on a processing in memory (PIM) enabled device comprising a memory block assembly, comprising:

a memory storing a set of instructions; and

one or more processors configured to execute the set of instructions to cause the apparatus to perform:

allocating a first node of the computation graph on a first memory block of a first array of memory blocks in the memory block assembly;

allocating a second node of the computation graph on a second memory block of a second array of memory blocks in the memory block assembly, wherein output data of the first node is used for executing the second node; and

assigning a first layer number to the first node and a second layer number to the second node based on dependency between the first node and the second node, wherein the second layer number is bigger than the first layer number,

wherein the memory block assembly is configured to support data transfer from the first memory block to the second memory block via an internal data coupling in the memory block assembly,

wherein the computation graph further includes a third node of which output data is used for executing the second node and to which a third layer number is assigned, and

wherein the second layer number is obtained by increasing the first layer number by 1 when the first layer number is bigger than the third layer number or by increasing the third layer number by 1 when the third layer number is bigger than the first layer number.

8. The apparatus of claim 7 , wherein the one or more processors are configured to execute the set of instructions to cause the apparatus to further perform:

reallocating the second node on a third memory block of a third array of memory blocks in the memory block assembly,

wherein the memory block assembly is configured to support data transfer from the first memory block to the third memory block via a global buffer shared by all memory blocks of the memory block assembly, and

wherein a number of outgoing edges from one or more nodes that includes the second node and that are allocated to the second array of memory blocks is bigger than a number of outgoing edges from one or more nodes that includes the first node and that are allocated to the first array of memory blocks.

9. The apparatus of claim 7 , wherein the one or more processors are configured to execute the set of instructions to cause the apparatus to further perform:

determining data layout for executing the first node on the first memory block based on vector folding,

wherein the first memory block includes a memory cell array arranged in a plurality of rows and in a plurality of columns.

10. The apparatus of claim 9 , wherein the first node includes a vector-matrix multiplication operation between a vector and a matrix, and

wherein a first element of the vector is arranged in a same column among the plurality of columns with a second element of the vector.

11. The apparatus of claim 10 , wherein the first element of the vector is copied multiple times in the same column among the plurality of columns.

12. A non-transitory computer readable medium that stores a set of instructions that is executable by at least one processor of a computing device to cause the computing device to perform a method for scheduling a computation graph on a processing in memory (PIM) enabled device comprising a memory block assembly, the method comprising:

allocating a first node of the computation graph on a first memory block of a first array of memory blocks in the memory block assembly;

allocating a second node of the computation graph on a second memory block of a second array of memory blocks in the memory block assembly, wherein output data of the first node is used for executing the second node; and

assigning a first layer number to the first node and a second layer number to the second node based on dependency between the first node and the second node, wherein the second layer number is bigger than the first layer number,

wherein the memory block assembly is configured to support data transfer from the first memory block to the second memory block via an internal data coupling in the memory block assembly,

wherein the computation graph further includes a third node of which output data is used for executing the second node and to which a third layer number is assigned, and

wherein the second layer number is obtained by increasing the first layer number by 1 when the first layer number is bigger than the third layer number or by increasing the third layer number by 1 when the third layer number is bigger than the first layer number.

13. The computer readable medium of claim 12 , wherein the set of instructions that is executable by at least one processor of the computing device to cause the computing device to further perform:

reallocating the second node on a third memory block of a third array of memory blocks in the memory block assembly,

wherein the memory block assembly is configured to support data transfer from the first memory block to the third memory block via a global buffer shared by all memory blocks of the memory block assembly, and

wherein a number of outgoing edges from one or more nodes that includes the second node and that are allocated to the second array of memory blocks is bigger than a number of outgoing edges from one or more nodes that includes the first node and that are allocated to the first array of memory blocks.

14. The computer readable medium of claim 12 , wherein the set of instructions that is executable by at least one processor of the computing device to cause the computing device to further perform:

determining data layout for executing the first node on the first memory block based on vector folding,

wherein the first memory block includes a memory cell array arranged in a plurality of rows and in a plurality of columns.

15. The computer readable medium of claim 14 , wherein the first node includes a vector-matrix multiplication operation between a vector and a matrix, and

wherein a first element of the vector is arranged in a same column among the plurality of columns with a second element of the vector.

16. The computer readable medium of claim 15 , wherein the first element of the vector is copied multiple times in the same column among the plurality of columns.

17. A terminal, comprising:

a processing in memory (PIM) enabled device comprising a memory block assembly; and

a host unit, which is communicatively coupled to the PIM enabled device, for scheduling a computation graph on the PIM enabled device, the host unit comprising:

a memory storing a set of instructions; and

one or more processors configured to execute the set of instructions to cause the host unit to perform:

allocating a first node of the computation graph on a first memory block of a first array of memory blocks in the memory block assembly;

allocating a second node of the computation graph on a second memory block of a second array of memory blocks in the memory block assembly, wherein output data of the first node is used for executing the second node; and

assigning a first layer number to the first node and a second layer number to the second node based on dependency between the first node and the second node, wherein the second layer number is bigger than the first layer number,

wherein the memory block assembly is configured to support data transfer from the first memory block to the second memory block via an internal data coupling in the memory block assembly,

wherein the computation graph further includes a third node of which output data is used for executing the second node and to which a third layer number is assigned, and

wherein the second layer number is obtained by increasing the first layer number by 1 when the first layer number is bigger than the third layer number or by increasing the third layer number by 1 when the third layer number is bigger than the first layer number.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2020
From: ZHOU, MINXUAN; CHEN, GUOYANG; ZHANG, WEIFENG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052506/0603 →
Continuity (1)
Related Publication 20210224185A1 · Jul 22, 2021