Data processing method, device, processor chip, electronic device and medium

By introducing relational instructions and confirmation information mechanisms into heterogeneous processors, the independent coordinated running time between coprocessors is achieved, which solves the problem of low collaboration efficiency between coprocessors and improves the overall operating efficiency.

CN113641621BActive Publication Date: 2025-02-18KUNLUNXIN TECHNOLOGY (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110819670.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-20
Publication Date
2025-02-18
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

In heterogeneous processors, the collaboration between coprocessors is low, resulting in low overall operational efficiency.

Method used

By introducing relationship instructions and confirmation information mechanisms, the coprocessors realize autonomous coordinated running time. The specific steps include: the first coprocessor executes the calculation instructions and sends the confirmation information, and the second coprocessor restores the state of the acquisition calculation instructions based on the confirmation information.

Benefits of technology

It improves the overall operating efficiency of heterogeneous processors, and reduces the blocking overhead of the control unit and the time overhead of instruction delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641621B_ABST
    Figure CN113641621B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method, device, processor chip, electronic device and medium, which relate to the field of artificial intelligence chip technology. The specific implementation scheme is: obtain a first relationship instruction, execute at least one first calculation instruction obtained before the first relationship instruction according to the first relationship instruction, and send a confirmation message according to the first relationship instruction when at least one first calculation instruction is executed, so that the second coprocessor that receives the confirmation message, according to the confirmation message, restores the state of the second calculation instruction after obtaining the second relationship instruction obtained by the second coprocessor. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relationship instruction, and realize self-coordination of the running time between the coprocessors according to the confirmation information, thereby improving the overall running efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence chip technology, and specifically to data processing methods, devices, processor chips, electronic devices and media. Background Art

[0002] In a system-on-chip processor, different processor cores collaborate to complete a computing task. For example, in an accelerator or processor for deep learning, or an accelerator or processor for big data processing, it is usually necessary to build heterogeneous processors to jointly implement a computing task, that is, in the computing process, the output data of the previous coprocessor in the heterogeneous processor needs to be used by the next processor.

[0003] How to control the collaboration between coprocessors to improve the overall operating efficiency of heterogeneous processors is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present disclosure provides a data processing method, a processor chip, a device, an electronic device and a medium for improving operating efficiency.

[0005] According to one aspect of the present disclosure, there is provided a data processing method for a first coprocessor, the method comprising:

[0006] Get the first relation instruction;

[0007] According to the first relation instruction, executing at least one calculation instruction acquired before the first relation instruction;

[0008] When the at least one computing instruction is executed, confirmation information is sent according to the first relational instruction, so that the second coprocessor that receives the confirmation information resumes the state of acquiring the computing instruction according to the confirmation information.

[0009] According to another aspect of the present disclosure, a data processing method is provided for a second coprocessor, the method comprising:

[0010] Acquire a first relationship instruction sent by the control unit;

[0011] In the case of acquiring the first relation instruction, stopping acquiring computing instructions from the command queue corresponding to the second coprocessor;

[0012] monitoring confirmation information sent by the first coprocessor;

[0013] According to the confirmation information, the acquisition of computing instructions from the command queue is resumed to perform data processing according to the acquired computing instructions.

[0014] According to another aspect of the present disclosure, there is provided a processor chip, comprising a control unit, a first coprocessor and a second coprocessor;

[0015] The control unit is used for sending a first calculation instruction and a first relationship instruction to the first coprocessor, and sending a second calculation instruction and a second relationship instruction to the second coprocessor;

[0016] The first coprocessor is used to execute the data processing method described in the above aspect;

[0017] The second coprocessor is used to execute the data processing method described in the other aspect above.

[0018] According to another aspect of the present disclosure, there is provided a data processing device, which is arranged in a first coprocessor, and the device comprises:

[0019] An acquisition module, used for acquiring a first relationship instruction;

[0020] an execution module, configured to execute, according to the first relationship instruction, at least one calculation instruction acquired before the first relationship instruction;

[0021] The sending module is used to send confirmation information according to the first relationship instruction when the execution of the at least one computing instruction is completed, so that the second coprocessor that receives the confirmation information can resume the state of obtaining the computing instruction according to the confirmation information.

[0022] According to another aspect of the present disclosure, there is provided a data processing device, which is arranged in a second coprocessor, and the device comprises:

[0023] An acquisition module, used for acquiring a first relationship instruction sent by a control unit;

[0024] a processing module, configured to stop acquiring computing instructions from a command queue corresponding to the second coprocessor when acquiring the first relation instruction;

[0025] A monitoring module, used for monitoring the confirmation information sent by the first coprocessor;

[0026] The processing module is further used to resume acquiring computing instructions from the command queue according to the confirmation information, so as to perform data processing according to the acquired computing instructions.

[0027] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0028] at least one processor; and

[0029] a memory communicatively connected to the at least one processor; wherein,

[0030] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the first aspect, or execute the method described in the second aspect.

[0031] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect, or execute the method described in the second aspect.

[0032] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the method described in the first aspect, or executes the method described in the second aspect.

[0033] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0035] Figure 1 A schematic diagram of coordination between coprocessors in the prior art;

[0036] Figure 2 A flowchart of a data processing method provided in an embodiment of the present disclosure

[0037] Figure 3 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0038] Figure 4 One of the schematic diagrams of sending confirmation information provided in the embodiment of the present disclosure;

[0039] Figure 5 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0040] Figure 6 The second schematic diagram of sending confirmation information provided by the embodiment of the present disclosure;

[0041] Figure 7 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0042] Figure 8 A flowchart of a data processing method provided by an embodiment of the present disclosure;

[0043] Fig. 9 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0044] Fig.10 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0045] Fig.11 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0046] Fig.12 A schematic diagram of the structure of a processor chip provided in an embodiment of the present disclosure;

[0047] Fig.13 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;

[0048] Fig.14 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;

[0049] Fig.15 A schematic block diagram of an electronic device 800 provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0050] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0051] The data processing method, device, processor chip, electronic device and medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0052] Heterogeneous processors contain multiple coprocessors and control units. Each coprocessor often needs to collaborate to complete a computing task, for example, in the deep learning scenario of artificial intelligence, or in the big data processing scenario, that is, the output data of the previous coprocessor needs to be used by the next processor in the computing process. In the scenario where there is data dependency between coprocessors, a synchronization mechanism needs to be implemented so that each processor runs at the correct time point, and the next coprocessor cannot be started before the previous coprocessor has completed the processing.

[0053] In the related art, heterogeneous processors synchronize various coprocessors through a control unit so that each coprocessor runs at the correct time. Figure 1As shown in the figure, if there is a data dependency between two instructions sent to different coprocessors, synchronization is required. After the control unit generates the first instruction, it first sends the instruction to the corresponding coprocessor 1, and then blocks and waits for the coprocessor 1 to return a completion signal. After the control unit receives the completion signal from the previous coprocessor 1, it will continue to generate the second instruction and send the instruction to the next coprocessor 2. In this way, it can ensure that each coprocessor is executed in the correct order.

[0054] However, in this processing mode, the control unit needs to block and wait during the operation of coprocessor 1, and the execution overhead of the control unit itself cannot be covered, affecting the overall efficiency. At the same time, the time-sharing transmission of instructions and completion signals between the control unit and the coprocessor has time overhead, affecting the overall efficiency.

[0055] To this end, the present disclosure provides a data processing method, which is applied to a first coprocessor of artificial intelligence, wherein the first coprocessor obtains a first relational instruction, executes at least one computing instruction obtained before the first relational instruction according to the first relational instruction, and sends a confirmation message according to the first relational instruction when at least one computing instruction is executed, so that the second coprocessor that receives the confirmation message restores the state of obtaining the computing instruction according to the confirmation message. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relational instruction, and the coprocessors coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0056] Figure 2 A flowchart of a data processing method provided in an embodiment of the present disclosure.

[0057] like Figure 2 As shown, the method comprises the following steps:

[0058] Step 201, obtaining a first relationship instruction.

[0059] In the disclosed embodiment, a relationship instruction is set to describe the dependency relationship between various coprocessors. The dependency relationship indicates the dependency order of the coprocessor execution in the calculation process, that is, the startup of a coprocessor needs to rely on the confirmation of another coprocessor with a dependency relationship before it can start execution. In this embodiment, confirmation information is sent to coordinate the startup time. Therefore, in this embodiment, for the convenience of explanation, among the coprocessors with a dependency relationship, the coprocessor that sends confirmation information is called the first coprocessor, and the coprocessor that executes after receiving the confirmation information is called the second processor. Therefore, the relationship instruction received by the first coprocessor is called the first relationship instruction, and the relationship instruction received by the second coprocessor is called the second relationship instruction. Among them, the second coprocessor will be explained in the subsequent embodiments.

[0060] The execution subject of the embodiment of the present disclosure is the first coprocessor.

[0061] The first relationship instruction may be implemented by a compiler, so that those skilled in the art may freely and flexibly design various dependencies between coprocessors through programming control to meet the needs of different computing tasks.

[0062] In the embodiment of the present disclosure, the first relationship instruction is generated by the control unit, and the first coprocessor obtains the first relationship instruction from the control unit.

[0063] Step 202: Execute at least one first calculation instruction obtained before the first relationship instruction according to the first relationship instruction.

[0064] In this embodiment, the control unit parses the program to be run to obtain corresponding instructions, wherein the instructions obtained by parsing include a first calculation instruction and a first relationship instruction. The control unit sends the parsed first calculation instruction and the first relationship instruction to the first coprocessor in sequence according to the sequence of the instructions set in the program. After receiving the first calculation instruction, the first coprocessor will execute the corresponding first calculation instruction. After receiving the first relationship instruction, the first coprocessor will count at least one first calculation instruction received before the first relationship instruction based on the first relationship instruction, and execute at least one first calculation instruction.

[0065] Step 203, when at least one computing instruction is executed, send confirmation information according to the first relationship instruction, so that the second coprocessor that receives the confirmation information resumes the state of acquiring the second computing instruction according to the confirmation information.

[0066] In this embodiment, the first relationship instruction indicates the dependency relationship between the first coprocessor and the second coprocessor, and at least one first computing instruction received before the first instruction can also be determined. When the at least one first computing instruction obtained before the first instruction is executed, confirmation information is generated according to the dependency relationship between the first coprocessor and the second coprocessor indicated by the first relationship instruction, and the confirmation information is sent to the second coprocessor, so that the second coprocessor that receives the confirmation information can resume the state of obtaining the second computing instruction according to the confirmation information. That is to say, before the second coprocessor receives the confirmation information, the second coprocessor is in a blocked state of stopping obtaining and executing the second computing instruction after the second relationship instruction, so that the second coprocessor waits for the confirmation signal sent by the first coprocessor before starting a specific computing task, so that the first coprocessor and the second coprocessor can coordinate the running time by themselves, which greatly improves the overall running efficiency of the processor.

[0067] It should be noted that in the embodiment of the present disclosure, the first coprocessor sends confirmation information to the second coprocessor, which can be sent in a point-to-point manner or in a broadcast manner. In subsequent embodiments, different embodiments will be used to illustrate the sending methods of the confirmation information.

[0068] In the data processing method of the embodiment of the present disclosure, a first relation instruction is obtained, and at least one first computing instruction obtained before the first relation instruction is executed according to the first relation instruction. When at least one first computing instruction is executed, confirmation information is sent according to the first relation instruction, so that the second coprocessor that receives the confirmation information can resume the state of obtaining the second computing instruction of the second coprocessor after the second relation instruction according to the confirmation information. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relation instruction, and the coprocessors can coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0069] Based on the above embodiment, this embodiment provides another data processing method, which illustrates that the first relationship instruction received by the first coprocessor includes the identifier of the second coprocessor that has a dependency relationship with the first coprocessor, so that confirmation information can be sent point-to-point to the second coprocessor. Figure 3 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the method comprises the following steps:

[0070] Step 301, obtaining a first relationship instruction.

[0071] The first relationship instruction includes a keyword and an identifier of a second coprocessor that has a dependency relationship with the first coprocessor. The identifier of the second coprocessor can be used to uniquely identify the second coprocessor, and the specific identification method is not limited in this embodiment. The keyword indicates that the first coprocessor is the sender, that is, the first relationship instruction indicates that the first coprocessor needs to send confirmation information to the second coprocessor indicated by the identifier.

[0072] Among them, the explanation in step 201 is also applicable to the embodiment of the present disclosure, the principle is the same, and it will not be repeated in this embodiment.

[0073] In one implementation of the embodiment of the present disclosure, the first relationship instruction may be expressed as:

[0074] Keywords: Send signal Received second coprocessor identifier

[0075] For example, SEND to P2 is a first relational instruction, wherein SEND to is a keyword, and P2 is a received second coprocessor identifier.

[0076] In the embodiment of the present disclosure, the first coprocessor means that in a dependency relationship, the second coprocessor needs to rely on the execution result of the first coprocessor, so that the first coprocessor needs to send confirmation information to the second coprocessor after executing the corresponding result. Therefore, the first relationship instruction indicates that the first coprocessor needs to send confirmation information to the second coprocessor after completing the computing task before the first relationship instruction.

[0077] Step 302: Execute at least one first calculation instruction obtained before the first relationship instruction according to the first relationship instruction.

[0078] In the disclosed embodiment, after receiving the first relation instruction, the first coprocessor needs to confirm how many first computing instructions are received before the first relation instruction, that is, it needs to record how many computing tasks are currently being executed but not completed.

[0079] Among them, the explanation in step 202 is also applicable to the embodiment of the present disclosure, the principle is the same, and it will not be repeated in this embodiment.

[0080] Step 303, when at least one first computing instruction is executed, send confirmation information to the second coprocessor according to the identifier of the second coprocessor indicated by the first relationship instruction, so that the second coprocessor that receives the confirmation information resumes the state of obtaining the second computing instruction according to the confirmation information.

[0081] In the embodiment of the present disclosure, based on the content contained in the first relationship instruction, when at least one first computing instruction is executed, that is, when the corresponding computing tasks are all executed, it is necessary to send a confirmation signal to the designated second coprocessor in accordance with the content indicated by the first relationship instruction, so that the second coprocessor that receives the confirmation information can resume the state of executing the second computing instruction received after receiving the second relationship instruction based on the confirmation information.

[0082] It should be understood that the first coprocessor only needs to record the first calculation instructions that have not been completed when the first relationship instruction is received, and the first calculation instructions received after the first relationship instruction have nothing to do with the confirmation signal that needs to be sent by the first relationship instruction; the first coprocessor is used to send a confirmation signal, and the first coprocessor does not need to be blocked, and can continue to execute the first calculation instructions received after the first relationship instruction. It only needs to send confirmation information to the second coprocessor after all at least one first calculation instruction received before the first relationship instruction is executed.

[0083] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides an example. Figure 4 This is one of the schematic diagrams of sending confirmation information provided by the embodiment of the present disclosure. Figure 4As shown, the instructions successively received by the first coprocessor P1 are CMD1, CMD2, SEND to P2 and CMD3, among which CMD1, CMD2 and CMD3 are first calculation instructions, SEND to P2 is a first relational instruction, wherein SEND to is a keyword and P2 is the received second coprocessor identifier. Usually, the coprocessor has a long pipeline, and each instruction is executed in a pipeline manner, so when the subsequent instruction starts to execute, the previous instruction may still be executed. Before receiving the first relational instruction SEND to P2, the first coprocessor P1 has received the first calculation instructions CMD1 and CMD2, so the condition for the first coprocessor P1 to send a confirmation signal to the second coprocessor P2 is that the first calculation instructions CMD1 and CMD2 are executed. However, the first relational instruction SEND to P2 will not block the execution of the subsequent first calculation instruction CMD3. In the disclosed embodiment, through the keywords contained in the first relational instruction and the identifier of the second coprocessor, after the first coprocessor completes the corresponding computing task, the first coprocessor sends a confirmation message to the corresponding second coprocessor according to the indicated identifier, so that the second coprocessor can resume executing the second computing instruction received after the second relational instruction to execute the corresponding processor task, thereby realizing the synchronization process between coprocessors based on the relational instruction and the confirmation information, and improving the overall operating efficiency of the heterogeneous processors.

[0084] It should be noted that if there are multiple second coprocessors that have a dependency relationship with the first coprocessor, for example, two second coprocessors, the identification portion of the second coprocessor for receiving indicated in the first relationship instruction may include the identifications of the two second coprocessors. For example, the first coprocessor P1 sends confirmation information to the second coprocessor P2 and the second coprocessor P3 according to the identification indicated in the first relationship instruction.

[0085] In the data processing method of the embodiment of the present disclosure, a first relational instruction is obtained, and at least one first computing instruction obtained before the first relational instruction is executed according to the first relational instruction. When at least one first computing instruction is executed, a confirmation message carrying identification information is sent according to the first relational instruction, so that the second coprocessor that receives the confirmation message resumes the state of obtaining the second computing instruction according to the confirmation message. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relational instruction, and the coprocessors coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0086] Based on the above embodiment, this embodiment provides another data processing method, in which the first coprocessor sends confirmation information by broadcasting. Figure 5 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 5As shown, the method comprises the following steps:

[0087] Step 501, obtaining a first relationship instruction.

[0088] In the embodiment of the present disclosure, the first relationship instruction includes setting keywords and event identifiers. Among them, each event number of the event identifier can correspond to an event with a specific meaning, which can be planned by the software programmer. For example, the event is: the number of user clicks within a set time. The keyword indicates that the first coprocessor is the sender, that is, the first relationship instruction indicates that the first coprocessor needs to send the event identifier. In the embodiment of the present disclosure, the event identifier is sent by broadcasting.

[0089] In one implementation of the embodiment of the present disclosure, the first relationship instruction may be expressed as:

[0090] Keywords: Send signal Event ID

[0091] For example, SEND 1 is a first relation instruction, where SEND is a keyword and 1 is an event identifier. For example, 1 indicates the number of user clicks within a set time obtained by statistics.

[0092] In the embodiment of the present disclosure, the first coprocessor refers to a dependency relationship in which the second coprocessor needs to rely on the execution result of the first coprocessor. The first relationship instruction indicates that the first coprocessor needs to send confirmation information after completing the computing task before the first relationship instruction, so that the second coprocessor that needs to rely on the execution result of the first coprocessor can execute the corresponding computing instruction according to the confirmation information.

[0093] Step 502: Execute at least one first calculation instruction obtained before the first relationship instruction according to the first relationship instruction.

[0094] In the disclosed embodiment, after receiving the first relation instruction, the first coprocessor needs to confirm how many first computing instructions are received before the first relation instruction, that is, it needs to record how many computing tasks are currently being executed but not completed.

[0095] Step 503: When at least one first computing instruction is executed, broadcast confirmation information including an event identifier, so that the second coprocessor that receives the confirmation information resumes the state of acquiring the second computing instruction according to the confirmation information.

[0096] In the embodiment of the present disclosure, based on the content contained in the first relationship instruction, when at least one first computing instruction is executed, that is, when the corresponding computing tasks are all executed, it is necessary to broadcast confirmation information containing an event identifier in accordance with the content indicated by the first relationship instruction, so that the second coprocessor that receives the confirmation information can restore the state of the second computing instruction after receiving the second relationship instruction based on the confirmation information.

[0097] It should be understood that the first coprocessor only needs to record the first calculation instructions that have not been completed when the first relationship instruction is received, and the first calculation instructions received after the first relationship instruction have nothing to do with the confirmation signal that needs to be sent by the first relationship instruction; the first coprocessor is used to send a confirmation signal, and the first coprocessor does not need to be blocked, and can continue to execute the first calculation instructions received after the first relationship instruction. It only needs to send confirmation information to the second coprocessor after all at least one first calculation instruction received before the first relationship instruction is executed.

[0098] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides an example. Figure 6 The second schematic diagram of sending confirmation information provided by the embodiment of the present disclosure. Figure 4 As shown, the instructions successively received by the first coprocessor P1 are CMD1, CMD2, SEND1 and CMD3, among which CMD1, CMD2 and CMD3 are the first calculation instructions, SEND1 is the first relational instruction, SEND is the keyword "send", and 1 is the event identifier. Usually, the coprocessor has a long pipeline, and each instruction is executed in a pipeline manner, so when the subsequent instruction starts to execute, the previous instruction may still be executed. Before receiving the first relational instruction SEND 1, the first coprocessor P1 has received the first calculation instructions CMD1 and CMD2, so the condition for the first coprocessor P1 to broadcast the confirmation signal is that the first calculation instructions CMD1 and CMD2 are executed. However, the first relational instruction SEND 1 will not block the execution of the subsequent first calculation instruction CMD3. In an embodiment of the present disclosure, through the keywords and event identifiers contained in the first relationship instruction, the first coprocessor sends the event identifier by broadcasting after completing the corresponding computing task, so that each second coprocessor that receives the event identifier can confirm the resumption of execution of the second computing instruction received after the second relationship instruction according to the received second relationship instruction to execute the corresponding processor task. In the present disclosure, when there are multiple second coprocessors that have a dependent relationship with the first coprocessor, confirmation information is sent by broadcasting, which improves the sending efficiency of the first coprocessor. Based on the relationship instruction and the confirmation information, the synchronization process between the control coprocessors is realized, and the overall operating efficiency of the heterogeneous processors is improved.

[0099] It should be noted that after receiving the second relationship instruction, the second coprocessor can continue to receive the second calculation instruction adjacent to the second relationship instruction from the control unit to the second coprocessor after receiving the second relationship instruction; or it can block obtaining the second calculation instruction from the control unit after receiving the second relationship instruction, and then obtain the second calculation instruction from the control unit and execute the second calculation instruction after receiving the confirmation message.

[0100] It should be understood that the explanations in steps 201-203 are also applicable to the embodiments of the present disclosure, and the principles are the same, so they will not be repeated in the embodiments of the present disclosure.

[0101] In the data processing method of the embodiment of the present disclosure, a first relation instruction is obtained, and at least one first computing instruction obtained before the first relation instruction is executed according to the first relation instruction. When at least one first computing instruction is executed, a confirmation message is broadcasted according to the first relation instruction, so that the second coprocessor that receives the confirmation message can restore the state of obtaining the computing instruction according to the confirmation message. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relation instruction, and the coprocessors can coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0102] Based on the above embodiments, the disclosed embodiments provide an implementation method. Figure 7 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the following steps are included before steps 201, 301 and 501:

[0103] Step 701: Obtain a command queue query request sent by a control unit.

[0104] Step 702: query the remaining storage space contained in the command queue according to the query request.

[0105] Step 703: Send the queried indication information of the remaining storage space to the control unit, so that the control unit stores the first relationship instruction or the first calculation instruction in the remaining storage space.

[0106] A corresponding command queue is provided in the first coprocessor, and the command queue is used to store instructions sent by the control unit to the first coprocessor, such as a first calculation instruction or a first relation instruction.

[0107] In the disclosed embodiment, the first coprocessor queries the remaining storage space in the command queue corresponding to the first coprocessor according to the acquired command queue query request sent by the control unit, and sends indication information of the queried remaining storage space to the control unit, wherein the indication information may be address information of the storage space, so that the control unit stores the first relationship instruction or the first calculation instruction in the remaining storage space according to the indication information, thereby realizing that in the process of coordinating the running time between the first coprocessor and the second coprocessor, the control unit can first store the parsed instructions in the command queue corresponding to the first coprocessor, thereby realizing that the control unit sends instructions to the first coprocessor without blocking, so that the control unit and each coprocessor can run in parallel, thereby improving the running efficiency of heterogeneous processors.

[0108] Based on the above embodiments, this embodiment provides a data processing method, which is applied to a second coprocessor in a chip. Figure 8 A flowchart of a data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the method comprises the following steps:

[0109] Step 801: Acquire a second relationship instruction sent by a control unit.

[0110] For the description of the second relationship instruction, please refer to the explanation in step 201. The principle is the same and will not be repeated in this embodiment.

[0111] Step 802: When obtaining the second relation instruction, stop obtaining the second computing instruction from the command queue corresponding to the second coprocessor.

[0112] The command queue is used to store various instructions obtained from the control unit, including the second relationship instruction and the second calculation instruction.

[0113] In the disclosed embodiment, after obtaining the second relational instruction, the second coprocessor needs to stop obtaining the second computing instruction from the corresponding command queue, that is, after obtaining the second relational instruction, it needs to block the continued acquisition of instructions to wait for confirmation information.

[0114] It should be noted that the second coprocessor will stop acquiring instructions from the command queue, but the control unit can continue to send instructions to the command queue until there is no storage space in the command queue.

[0115] Step 803: monitor confirmation information sent by the first coprocessor.

[0116] In an implementation manner of the embodiment of the present disclosure, the second coprocessor obtains confirmation information sent by the first coprocessor.

[0117] In an implementation manner of the embodiment of the present disclosure, the second coprocessor obtains confirmation information sent by the first coprocessor in a broadcasting manner.

[0118] Among them, the relevant explanations of the first coprocessor sending the confirmation information can be referred to the aforementioned embodiment, and will not be repeated in this embodiment.

[0119] Step 804: according to the confirmation information and the second relationship instruction, restore the state of obtaining the second computing instruction from the command queue.

[0120] In the disclosed embodiment, the second coprocessor uses the information carried in the received confirmation information for confirming whether the identification information contained in the received second relationship instruction matches, so that after receiving the confirmation information, the second coprocessor matches the second relationship instruction to confirm whether the state of obtaining the second computing instruction from the command queue can be restored, and after confirming that the state of obtaining the second computing instruction from the command queue can be restored, after the second computing instruction obtained before the second relationship instruction is executed, the computing instruction obtained after the second relationship instruction is executed, thereby achieving self-coordination of the running time between the first coprocessor and the second coprocessor, greatly improving the overall running efficiency of the processor.

[0121] In the data processing method of the disclosed embodiment, the second coprocessor obtains the second relationship instruction sent by the control unit. When obtaining the second relationship instruction, the second coprocessor stops obtaining the second calculation instruction from the command queue corresponding to the second coprocessor, monitors the confirmation information sent by the first coprocessor, and restores the state of obtaining the second calculation instruction from the command queue according to the confirmation information and the second relationship instruction, thereby realizing the self-coordination of the running time between the coprocessors based on the confirmation information and the second relationship instruction, thereby improving the overall running efficiency.

[0122] Based on the above embodiment, this embodiment provides another data processing method, which illustrates how to coordinate the running time between different coprocessors according to the relationship information when the second relationship instruction includes the identifier of the first coprocessor. Fig. 9 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the method comprises the following steps:

[0123] Step 901: Obtain a second relationship instruction sent by a control unit.

[0124] The second relationship instruction includes a keyword and an identifier of a first coprocessor that has a dependency relationship with the second coprocessor. The identifier of the first coprocessor can be used to uniquely identify the first coprocessor, and the specific identification method is not limited in this embodiment. The keyword indicates that the second coprocessor is the recipient, that is, the second relationship instruction indicates that the second coprocessor needs to obtain the confirmation information sent by the first coprocessor indicated by the identifier.

[0125] Among them, the explanation in step 201 is also applicable to the embodiment of the present disclosure, the principle is the same, and it will not be repeated in this embodiment.

[0126] In one implementation of the embodiment of the present disclosure, the second relationship instruction may be expressed as:

[0127] Keywords: receiving signal First coprocessor identifier sent

[0128] For example, RECV from P1 is a second relational instruction, wherein RECV from is a keyword, and P1 is an identifier of a first coprocessor that sends confirmation information.

[0129] Step 902: When obtaining the second relation instruction, stop obtaining the second computing instruction from the command queue corresponding to the second coprocessor.

[0130] like Figure 4 As shown, the instructions that the second coprocessor P2 can receive are CMD4, CMD5, RECV from P1 and CMD6, among which CMD4, CMD5 and CMD6 are second calculation instructions, and RECV to P1 is a second relational instruction. Before the second relational instruction RECV from P1, the second coprocessor P2 has received the second calculation instructions CMD4 and CMD5, among which CMD4 and CMD5 will continue to execute. However, before the second coprocessor P2 receives the confirmation information from the first coprocessor P1, the second calculation instruction CMD6 will be blocked, that is, the second coprocessor P2 will stop obtaining CMD6 from the command queue.

[0131] Step 903: monitor confirmation information sent by the first coprocessor.

[0132] Steps 901 to 903 can refer to the explanations in the aforementioned embodiment, and the principles are the same, so they will not be repeated in this embodiment.

[0133] Step 904: when the identifier of the first coprocessor included in the confirmation information matches the identifier of the first coprocessor included in the second relational instruction, resuming to obtain the second computing instruction from the command queue.

[0134] The second relation instruction includes an identifier of a coprocessor with a dependency relationship.

[0135] The confirmation information includes the identifier of the first coprocessor. After receiving the confirmation information, the second coprocessor matches the identifier of the coprocessor included in the confirmation information with the identifier of the coprocessor included in the second relationship instruction. When the identifiers match, the second coprocessor resumes obtaining the second computing instruction from the command queue.

[0136] Further, as an implementation method, Figure 4 As shown, after receiving the confirmation information, if the identification information matches, the second coprocessor executes the second calculation instruction CMD6 received after the second relationship instruction RECV from P1 after completing the execution of the second calculation instructions CMD4 and CMD5 received before the second relationship instruction RECV from P1.

[0137] In the data processing method of the disclosed embodiment, the second coprocessor obtains the second relationship instruction sent by the control unit. When obtaining the second relationship instruction, the second coprocessor stops obtaining the second calculation instruction from the command queue corresponding to the second coprocessor, monitors the confirmation information sent by the first coprocessor, and restores the state of obtaining the second calculation instruction from the command queue according to the confirmation information and the second relationship instruction, thereby realizing the self-coordination of the running time between the coprocessors based on the confirmation information and the second relationship instruction, thereby improving the overall running efficiency.

[0138] Based on the above embodiment, this embodiment provides another data processing method, which illustrates how to coordinate the running time between different coprocessors according to the relationship information when the relationship instruction contains the identification information of the event. Fig.10 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Fig.10 As shown, the method comprises the following steps:

[0139] Step 1001: Obtain a second relationship instruction sent by a control unit.

[0140] In the embodiment of the present disclosure, the second relationship instruction includes setting keywords and event identifiers. Among them, each event number of the event identifier can correspond to an event with a specific meaning, which can be planned by the software programmer. For example, the event is: the number of user clicks within a set time. The keyword indicates that the second coprocessor is the receiver, that is, the second relationship instruction indicates that the second coprocessor needs to obtain the event identifier. In the embodiment of the present disclosure, the event identifier is sent by broadcasting.

[0141] In one implementation of the embodiment of the present disclosure, the second relationship instruction may be expressed as:

[0142] Keywords: receiving signal Event ID

[0143] For example, RECV 1 is a second relational instruction, wherein RECV is a keyword and 1 is an event identifier. For example, 1 indicates the number of user clicks within a set time obtained by statistics.

[0144] Step 1002: When obtaining the second relation instruction, stop obtaining the second computing instruction from the command queue corresponding to the second coprocessor.

[0145] Step 1003: monitor confirmation information sent by the first coprocessor.

[0146] Steps 1001 to 1003 can refer to the explanations in the aforementioned embodiment, and the principles are the same, so they will not be repeated in this embodiment.

[0147] Step 1004: When the event identifier included in the confirmation information matches the event identifier included in the first relationship instruction, resuming obtaining the second computing instruction from the command queue.

[0148] The second relationship instruction includes an event identifier with a dependency relationship, for example, the event is: the number of user clicks within a set time, which is identified by the number "1".

[0149] The confirmation information includes the identifier of the first coprocessor. After receiving the confirmation information, the second coprocessor matches the identifier of the coprocessor included in the confirmation information with the identifier of the coprocessor included in the second relationship instruction. When the identifiers match, the second coprocessor resumes obtaining the second computing instruction from the command queue.

[0150] Further, as an implementation method, Figure 4 As shown, after receiving the confirmation information, if the event identifier matches, the second coprocessor executes the second calculation instruction CMD6 received after the second relational instruction RECV from P1 after completing the execution of the second calculation instructions CMD4 and CMD5 received before the second relational instruction RECV from P1.

[0151] In the data processing method of the disclosed embodiment, the second coprocessor obtains the second relationship instruction sent by the control unit. When obtaining the second relationship instruction, the second coprocessor stops obtaining the second calculation instruction from the command queue corresponding to the second coprocessor, monitors the confirmation information sent by the first coprocessor, and restores the state of obtaining the second calculation instruction from the command queue according to the confirmation information and the second relationship instruction, thereby realizing the self-coordination of the running time between the coprocessors based on the confirmation information and the second relationship instruction, thereby improving the overall running efficiency.

[0152] Based on the above embodiments, this embodiment provides an implementation method: Fig.11 A flowchart of another data processing method provided by an embodiment of the present disclosure is shown in FIG. Fig.11As shown, the following steps are included before steps 801, 901 and 1001:

[0153] Step 1101: Obtain a command queue query request sent by a control unit.

[0154] Step 1102: query the remaining storage space contained in the command queue according to the query request.

[0155] Step 1103: Send the queried indication information of the remaining storage space to the control unit, so that the control unit stores the second relationship instruction or the second calculation instruction in the remaining storage space.

[0156] A corresponding command queue is provided in the second coprocessor, and the command queue is used to store instructions sent by the control unit to the second coprocessor, such as a second calculation instruction or a second relation instruction.

[0157] In the disclosed embodiment, the second coprocessor queries the remaining storage space in the command queue corresponding to the second coprocessor based on the acquired command queue query request sent by the control unit, and sends indication information of the queried remaining storage space to the control unit, wherein the indication information may be address information of the storage space, so that the control unit stores the second relationship instruction or the second calculation instruction in the remaining storage space according to the indication information, thereby realizing that in the process of coordinating the running time between the first coprocessor and the second coprocessor, the control unit can first store the parsed instructions in the command queue corresponding to the second coprocessor, thereby realizing that the control unit sends instructions to the second coprocessor without blocking, so that the control unit and each coprocessor can run in parallel, thereby improving the running efficiency of heterogeneous processors.

[0158] In order to implement the above embodiments, the embodiments of the present disclosure provide a processor chip.

[0159] Fig.12 A schematic diagram of the structure of a processor chip provided for an embodiment of the present disclosure, wherein the processor chip is, for example, a heterogeneous processor, which can be applied to a processor or accelerator for deep learning, or a processor or accelerator for big data processing, to achieve computing tasks.

[0160] In one scenario, an accelerator or processor for deep learning will abstract each layer of the neural network into an operator, such as convolution, full connection, pooling, activation, etc. The hardware will be implemented in multiple modules, such as convolution module, full connection module, pooling module, activation module, etc., and a computing task will be jointly implemented by calling these modules.

[0161] In another scenario, the accelerator or processor for big data processing will abstract each operation in the database query into an operator, such as filtering, joining, sorting, aggregation, etc. The hardware will be implemented in multiple modules accordingly, such as filtering module, joining module, sorting module, aggregation module, etc., and a computing task will be jointly implemented by calling these modules.

[0162] like Fig.12 As shown, the processor chip includes a control unit 1201 , a first coprocessor 1202 and a second coprocessor 1203 .

[0163] The control unit 1201 is configured to send a first calculation instruction and a first relationship instruction to the first coprocessor 1202 , and send a second calculation instruction and a second relationship instruction to the second coprocessor 1203 .

[0164] The first coprocessor 1202 is used to execute Figure 1-Figure 7 The data processing method described in the corresponding embodiment.

[0165] The second coprocessor 1203 is used to execute Figure 8-Figure 11 The data processing method described in the corresponding embodiment.

[0166] For details, please refer to the above Figure 2-Figure 11 The explanations in the corresponding embodiments are the same in principle and will not be repeated in this embodiment.

[0167] In the processor chip in this embodiment, the first coprocessor generates confirmation information according to the first relationship instruction obtained from the control unit, and the second coprocessor coordinates the running time between the first coprocessor and the second coprocessor according to the second relationship instruction obtained from the control unit and the confirmation message obtained from the first coprocessor. There is no need for a processor to control the running time between the first coprocessor and the second coprocessor, thus avoiding the overhead of a separate control unit and improving the overall operating efficiency.

[0168] In order to implement the above embodiments, the present disclosure provides a data processing device.

[0169] Fig.13 A structural diagram of a data processing device provided in an embodiment of the present disclosure is shown in FIG. Fig.13 As shown, the device comprises:

[0170] The acquisition module 131 is used to acquire a first relationship instruction.

[0171] An execution module 132 is used to execute at least one first calculation instruction obtained before the first relationship instruction according to the first relationship instruction.

[0172] The sending module 133 is used to send a confirmation message according to the first relationship instruction when the execution of at least one first computing instruction is completed, so that the second coprocessor that receives the confirmation message can resume the state of obtaining the second computing instruction according to the confirmation message; wherein the second computing instruction is obtained by the second coprocessor after receiving the second relationship instruction.

[0173] Further, as an implementation method of the present disclosure,

[0174] The first relationship instruction includes an identifier of a second coprocessor that has a dependency relationship with the first coprocessor; the sending module 133 is used to:

[0175] When the at least one computing instruction is executed, the confirmation information is sent to the second coprocessor according to the identifier of the second coprocessor indicated by the first relational instruction.

[0176] As an implementation of the embodiment of the present disclosure, the first relationship instruction includes an event identifier; the sending module 133 is used to:

[0177] When the execution of the at least one computing instruction is completed, a confirmation message including the event identifier is broadcast.

[0178] As an implementation of the embodiment of the present disclosure, the device further includes:

[0179] The acquisition module 131 is also used to acquire the command queue query request sent by the control unit;

[0180] A query module, configured to query the remaining storage space contained in the command queue according to the query request;

[0181] The sending module 133 is further used to send the queried indication information of the remaining storage space to the control unit, so that the control unit stores the first relationship instruction or the first calculation instruction in the remaining storage space.

[0182] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principles are the same, so they will not be repeated in this embodiment.

[0183] In the data processing device of the embodiment of the present disclosure, a first relation instruction is obtained, and at least one first computing instruction obtained before the first relation instruction is executed according to the first relation instruction. When the at least one first computing instruction is executed, a confirmation message is sent according to the first relation instruction, so that the second coprocessor that receives the confirmation message can restore the state of obtaining the second computing instruction of the second coprocessor after the second relation instruction according to the confirmation message. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relation instruction, and the coprocessors can coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0184] In order to implement the above embodiments, the present disclosure provides a data processing device.

[0185] Fig.14 A structural diagram of a data processing device provided in an embodiment of the present disclosure is shown in FIG. Fig.14 As shown, the device comprises:

[0186] The acquisition module 141 is used to acquire a first relationship instruction sent by the control unit.

[0187] The processing module 142 is configured to stop acquiring the second computing instruction from the command queue corresponding to the second coprocessor when acquiring the first relation instruction.

[0188] Monitoring module 143, for monitoring the confirmation information sent by the first coprocessor.

[0189] The processing module 142 is further configured to restore the state of obtaining the second computing instruction from the command queue according to the confirmation information and the second relationship instruction.

[0190] Further, in an implementation of the embodiment of the present disclosure, the first relation instruction includes an identifier of the first coprocessor; the processing module 142 is configured to:

[0191] When the identifier of the first coprocessor included in the confirmation information matches the identifier of the first coprocessor included in the second relational instruction, resuming obtaining the second computing instruction from the command queue.

[0192] In an implementation of the embodiment of the present disclosure, the first relationship instruction includes an event identifier; the processing module 142 is used to:

[0193] When the event identifier included in the confirmation information matches the event identifier included in the first relationship instruction, resuming obtaining the second computing instruction from the command queue.

[0194] In one implementation of the embodiment of the present disclosure, the device further includes:

[0195] The acquisition module 141 is further used to acquire the command queue query request sent by the control unit.

[0196] The query module is used to query the remaining storage space contained in the command queue according to the query request.

[0197] A sending module is used to send the indication information of the queried remaining storage space to the control unit, so that the control unit stores the second relationship instruction or the second calculation instruction in the remaining storage space.

[0198] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principles are the same, so they will not be repeated in this embodiment.

[0199] In the data processing device of the embodiment of the present disclosure, a first relation instruction is obtained, and at least one first computing instruction obtained before the first relation instruction is executed according to the first relation instruction. When the at least one first computing instruction is executed, a confirmation message is sent according to the first relation instruction, so that the second coprocessor that receives the confirmation message can restore the state of obtaining the second computing instruction of the second coprocessor after the second relation instruction according to the confirmation message. In the present disclosure, the first coprocessor and the second coprocessor generate confirmation information according to the first relation instruction, and the coprocessors can coordinate the running time according to the confirmation information, thereby improving the overall running efficiency.

[0200] In order to implement the above embodiment, this embodiment provides an electronic device, including:

[0201] at least one processor; and

[0202] a memory communicatively connected to the at least one processor; wherein,

[0203] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the foregoing method embodiment.

[0204] In order to implement the above embodiment, this embodiment provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method described in the above method embodiment.

[0205] In order to implement the above embodiment, this embodiment provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in the above method embodiment is implemented.

[0206] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0207] Fig.15 A schematic block diagram of an electronic device 800 provided for an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0208] like Fig.15 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 802 or a computer program loaded from a storage unit 808 to a RAM (Random Access Memory) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An I / O (Input / Output) interface 805 is also connected to the bus 804.

[0209] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0210] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the data processing method in any other appropriate manner (eg, by means of firmware).

[0211] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0212] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0213] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0214] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0215] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0216] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0217] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0218] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0219] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data processing method, used for a first coprocessor in a chip, the method comprising: Get the first relation instruction; executing, according to the first relation instruction, at least one first calculation instruction acquired before the first relation instruction; When the at least one first computing instruction is executed, sending confirmation information according to the first relationship instruction, so that the second coprocessor that receives the confirmation information resumes the state of acquiring the second computing instruction according to the confirmation information; wherein the second computing instruction is acquired by the second coprocessor after receiving the second relationship instruction; The method further comprises: Get the command queue query request sent by the control unit; According to the query request, query the remaining storage space contained in the command queue; The queried indication information of the remaining storage space is sent to the control unit, so that the control unit stores the first relationship instruction or the first calculation instruction in the remaining storage space.

2. The method according to claim 1, wherein the first relationship instruction comprises an identifier of a second coprocessor having a dependency relationship with the first coprocessor; When the at least one first computing instruction is executed, sending confirmation information according to the first relationship instruction includes: When the at least one first computing instruction is executed, the confirmation information is sent to the second coprocessor according to the identifier of the second coprocessor indicated by the first relational instruction.

3. The method according to claim 2, wherein the first relationship instruction comprises an event identifier; When the at least one first computing instruction is executed, sending confirmation information according to the first relationship instruction includes: When the at least one first computing instruction is executed completely, a confirmation message including the event identifier is broadcast.

4. A data processing method for a second coprocessor in a chip, the method comprising: Acquire a second relationship instruction sent by the control unit; In the case of acquiring the second relation instruction, stop acquiring the computing instruction from the command queue corresponding to the second coprocessor; monitoring confirmation information sent by the first coprocessor; According to the confirmation information and the second relationship instruction, resuming the state of obtaining the second computing instruction from the command queue; The method further comprises: Get the command queue query request sent by the control unit; According to the query request, query the remaining storage space contained in the command queue; The queried indication information of the remaining storage space is sent to the control unit, so that the control unit stores the second relationship instruction or the second calculation instruction in the remaining storage space.

5. The method according to claim 4, wherein the second relational instruction includes an identifier of the first coprocessor; and the step of restoring the state of obtaining the second computing instruction from the command queue according to the confirmation information and the second relational instruction comprises: When the identifier of the first coprocessor included in the confirmation information matches the identifier of the first coprocessor included in the second relational instruction, resuming obtaining the second computing instruction from the command queue.

6. The method according to claim 4, wherein the second relation instruction includes an event identifier; and the step of restoring the state of obtaining the second computing instruction from the command queue according to the confirmation information and the second relation instruction comprises: When the event identifier included in the confirmation information matches the event identifier included in the second relationship instruction, resuming obtaining the second computing instruction from the command queue.

7. A processor chip, comprising a control unit, a first coprocessor and a second coprocessor; The control unit is configured to send a first calculation instruction and a first relationship instruction to the first coprocessor, and send a second calculation instruction and a second relationship instruction to the second coprocessor; The first coprocessor is used to execute the data processing method according to any one of claims 1 to 3; The second coprocessor is used to execute the data processing method described in any one of claims 4 to 6.

8. A data processing device, comprising: An acquisition module, used for acquiring a first relationship instruction; an execution module, configured to execute, according to the first relationship instruction, at least one first calculation instruction acquired before the first relationship instruction; a sending module, configured to send confirmation information according to the first relationship instruction when the at least one first computing instruction is executed, so that the second coprocessor that receives the confirmation information resumes the state of acquiring the second computing instruction according to the confirmation information; wherein the second computing instruction is acquired by the second coprocessor after receiving the second relationship instruction; The device also includes: Get the command queue query request sent by the control unit; According to the query request, query the remaining storage space contained in the command queue; The queried indication information of the remaining storage space is sent to the control unit, so that the control unit stores the first relationship instruction or the first calculation instruction in the remaining storage space.

9. A data processing device, comprising: An acquisition module, used for acquiring a second relationship instruction sent by the control unit; a processing module, configured to stop acquiring the second computing instruction from the command queue corresponding to the second coprocessor when acquiring the second relation instruction; A monitoring module, used for monitoring the confirmation information sent by the first coprocessor; The processing module is further used to restore the state of obtaining the second computing instruction from the command queue according to the confirmation information and the second relationship instruction; The device also includes: Get the command queue query request sent by the control unit; According to the query request, query the remaining storage space contained in the command queue; The queried indication information of the remaining storage space is sent to the control unit, so that the control unit stores the second relationship instruction or the second calculation instruction in the remaining storage space.

10. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-3, or execute the method of any one of claims 4-6.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 3, or to execute the method according to any one of claims 4 to 6.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 3, or performs the method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Parallel processor, parallel processing method, and storing medium

    US7032099B1