Patent ID: 11893414
Assignee: CAMBRICON TECHNOLOGIES CORPORATION LIMITED
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 3:
4. A parallel execution device for a neural network, comprising:
a first processor that includes:
an obtaining circuit configured to receive, a first command and obtain a parallel degree parameter in the first command, wherein the parallel degree parameter comprises both a model parallel parameter and a data parallel parameter, and
a setting circuit configured to set a degree of parallelism of a second processor according to the parallel degree parameter according to the first command, wherein the degree of parallelism includes a degree of model parallelism and a degree of data parallelism, so that multiple cores in the second processor perform a task to be processed by using the degree of parallelism,
wherein the degree of model parallelism indicates how many cores of the second processor are configured to parallelly perform operations corresponding to respective layers of the neural network,
wherein the degree of data parallelism indicates how many cores of the second processor are configured to parallelly process different portions of input data of the neural network,
wherein the task to be processed includes an online task, and the setting circuit includes:
a first setting circuit configured to set the degree of model parallelism in a first configuration file of the task to be processed according to the model parallel parameter, and
a second setting circuit configured to set the degree of data parallelism in a second configuration file of the task to be processed according to the data parallel parameter,
wherein the first configuration file and the second configuration file are stored in the first processor,
a first compiling circuit configured to compile the online task according to the degree of model parallelism in the first configuration file, and generating a program to be executed on the second processor, and
a first sending circuit configured to send, by using a second command, the degree of data parallelism in the second configuration file to the second processor, so that the second processor obtains data according to the degree of data parallelism and executes the program to be executed to process the data.