IP Library Granted Patent US 11,409,575
Granted Patent B2
US 11,409,575 · App. 16/718,742 · Granted Aug 9, 2022

Computation method and product thereof

Inventors: Shaoli Liu (Shanghai, CN); Yuzhe Luo (Shanghai, CN)
Assignee: SHANGHAI CAMBRICON INFORMATION TECHNOLOGY CO., LTD
G06F9/5061G06F9/30109G06F9/30145G06F9/3802G06F9/5011G06F9/546G06N3/063G06N3/08G06N20/10
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,409,575
App. No.
16/718,742
Granted
Aug 9, 2022
Kind
B2
Abstract

The present disclosure provides a computation method and product thereof. The computation method adopts a fusion method to perform machine learning computations. Technical effects of the present disclosure include fewer computations and less power consumption.

Claims (42)

1. A computation method applied in a computing system, wherein the computing system comprises: a control unit, a computation group, and a general storage unit, wherein the control unit comprises: a first memory, a decoding logic, and a controller, wherein the computation group comprises: a group controller and a plurality of computing units; the general storage unit is configured to store data; and the computation method comprises:

receiving, by the controller, a first level instruction sequence, and partitioning, by the decoding logic, the first level instruction sequence into a plurality of second level instruction sequences,

creating, by the controller, M threads for the plurality of second level instruction sequences, and allocating, by the controller, an independent register as well as configuring an independent addressing function for each thread of the M threads, wherein M is an integer greater than or equal to 1; and

obtaining, by the group controller, a plurality of computation types of the plurality of second level instruction sequences, obtaining, by the group controller, a corresponding fusion computation manner of the computation types according to the plurality of computation types, and adopting, by the plurality of computing units, the fusion computation manner to call the M threads for performing computations on the plurality of second level instruction sequences to obtain a final result;

wherein, the obtaining, by the group controller, a plurality of computation types of the plurality of second level instruction sequences, obtaining a corresponding fusion computation manner of the computation types according to the plurality of computation types, and adopting, by the plurality of computing units, the fusion computation manner to call the M threads for performing computations on the plurality of second level instruction sequences to obtain a final result comprises:

if the computation types represent computation operations of the same type, the group controller calls a combined computation manner in which single instruction multiple data of the same type is in combination with single instruction multiple threads, and uses the M threads to perform the combined computation manner to obtain a final result, which includes

partitioning, by the decoding logic, the M threads into N wraps for allocating to the plurality of computing units, converting, by the group controller, the plurality of second level instruction sequences into a plurality of second control signals and sending the second control signals to the plurality of computing units, calling, by the plurality of computing units, wraps that are allocated to the computing units and the second control signals to fetch corresponding data according to the independent addressing function, performing, by the plurality of computing units, computations on the data to obtain a plurality of intermediate results, and splicing the plurality of intermediate results to obtain a final result.

2. The method of claim 1 , wherein, the obtaining, by the group controller, a plurality of computation types of the plurality of second level instruction sequences, obtaining a corresponding fusion computation manner of the computation types according to the plurality of computation types, and adopting, by the plurality of computing units, the fusion computation manner to call the M threads for performing computations on the plurality of second level instruction sequences to obtain a final result comprises:

if the computation types represent computation operations of different types, the group controller calls simultaneous multi-threading and the M threads to perform computations to obtain a final result, which includes:

partitioning, by the decoding logic, the M threads into N wraps, converting the plurality of second level instruction sequences into a plurality of second control signals, obtaining, by the group controller, computation types supported by the plurality of computing units, allocating, by the controller, the N wraps and the plurality of second control signals to corresponding computing units that support computation types of the wraps and the second control signals, calling, by the plurality of computing units, wraps that are allocated to the computing units and the second control signals, fetching, by the plurality of computing units, corresponding data, performing, by the plurality of computing units, computations on the data to obtain a plurality of intermediate results, and splicing all the intermediate results to obtain a final result.

3. The method of claim 1 , further comprising:

if a wrap A in the plurality of wraps is blocked, adding, by the controller, the wrap A to a waiting queue, and if data of the wrap are already fetched, adding, by the controller, the wrap A to a preparation queue, wherein the preparation queue is a queue where a wrap to be scheduled for executing is located when a computing resource is idle.

4. The method of claim 1 , wherein

the first level instruction sequence includes a very long instruction, and the second level instruction sequence includes an instruction sequence.

5. The method of claim 1 , wherein the computing system further includes: a tree module, wherein the tree module includes: a root port and a plurality of branch ports, wherein the root port of the tree module is connected to the group controller, and the plurality of branch ports of the tree module are connected to a computing unit of the plurality of computing units respectively; and

the tree module is configured to forward data blocks, wraps, or instruction sequences between the group controller and the plurality of computing units.

6. The method of claim 5 , wherein the tree module is an n-ary tree, wherein n is an integer greater than or equal to 2.

7. The method of claim 1 , wherein the computing system further includes a branch processing circuit,

wherein the branch processing circuit is connected between the group controller and the plurality of computing units; and

the branch processing circuit is configured to forward data, wraps, or instruction sequences between the group controller and the plurality of computing units.

8. A computing system, comprising: a control unit, a computation group, and a general storage unit, wherein the control unit includes: a first memory, a decoding logic, and a controller, the computation group includes: a group controller and a plurality of computing units; the general storage unit is configured to store data;

the controller is configured to receive a first level instruction sequence and control the first memory and the decoding logic;

the decoding logic is configured to partition the first level instruction sequence into a plurality of second level instruction sequences;

the controller is further configured to create M threads for the plurality of second level instruction sequences, and allocate an independent register and configure an independent addressing function for each thread of the M threads; M is an integer greater than or equal to 1; and the controller is further configured to convert the plurality of second level instruction sequences into a plurality of control signals for sending to the group controller;

the group controller is configured to receive the plurality of control signals, obtain a plurality of computational types if the plurality of control signals, divide the M threads into N wraps, and allocate the N wraps and the plurality of control signals to the plurality of computing units according to the plurality of computational types;

the plurality of computing units are configured to fetch data from the general storage unit through allocated wraps and control signals, and perform computations to obtain an intermediate result; and

the group controller is configured to splice all intermediate results to obtain a final computation result;

wherein the computing system further comprises a tree module, wherein the tree module includes: a root port and a plurality of branch ports, wherein the root port of the tree module is connected to the group controller, and the plurality of branch ports of the tree module are connected to a computing unit of the plurality of computing units respectively; and

the tree module is configured to forward data blocks, wraps, or instruction sequences between the group controller and the plurality of computing units.

9. The computing system of claim 8 , wherein

the plurality of computing units includes: an addition computing unit, a multiplication computing unit, an activation computing unit, or a dedicated computing unit.

10. The computing system of claim 8 , wherein

the dedicated computing unit includes: a face recognition computing unit, a graphics computing unit, a fingerprint computing unit, or a neural network computing unit.

11. The computing system of claim 10 , wherein

the group controller is configured to, if computation types of a plurality of control signals are graphics computations, fingerprint identification, face recognition, or neural network operations, allocate the plurality of control signals to the face recognition computing unit, the graphics computing unit, the fingerprint computing unit, or the neural network computing unit respectively.

12. The computing system of claim 8 , wherein

the first level instruction sequence includes a very long instruction, and the second level instruction sequence includes an instruction sequence.

13. The computing system of claim 8 , wherein the tree module is an n-ary tree, wherein n is an integer greater than or equal to 2.

14. The computing system of claim 8 , wherein the computing system includes a branch processing circuit,

the branch processing circuit is connected between the group controller and the plurality of computing units; and

the branch processing circuit is configured to forward data, wraps, or instruction sequences between the group controller and the plurality of computing units.

15. A computer program product, comprising a non-transitory computer readable storage medium, wherein a computer program is stored in the non-transitory computer readable storage medium, and the computer program is capable of causing a computer to perform the method of claim 1 through operations.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 18, 2019
From: LIU, SHAOLI; LUO, YUZHE; MENG, XIAOFU; ZHANG, XISHAN; SONG, XINKAI
To: SHANGHAI CAMBRICON INFORMATION TECHNOLOGY CO., LTD
Reel/Frame 051319/0248 →
Priority Claims (4)
CN 201810479540.0 · May 18, 2018 · national
CN 201811040961.X · Sep 6, 2018 · national
CN 201811041573.3 · Sep 6, 2018 · national
CN 201811592249.0 · Dec 25, 2018 · national
Continuity (2)
Continuation In Part PCTCN2019085844 · May 7, 2019
Related Publication 20200142748A1 · May 7, 2020