Patent ID: 11861505
Assignee: ZHEJIANG LAB
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 6:
7. The method of executing dynamic graph for neural network computation according to claim 1, wherein the step S53 includes the following specific steps:
S531: adding the each instruction in the temporary list to a corresponding device stream, fetching a device stream of the current instruction according to metainformation of the each instruction in the temporary list, adding the current instruction into a runtime instruction list of a current device stream, and then adding the current device stream into an active device stream list;
S532: preparing the each instruction in the temporary list by the device stream, fetching a type of the current device stream according to metainformation of the device stream, judging whether the type of the current device stream is located on a current scheduler thread, in response to that the type of the current device is located on the current scheduler thread, running the current instruction according to the type of the current device stream, or adding the current instruction into a preparation instruction list corresponding to the current device stream, and then running an instruction in the preparation instruction list on a separate thread;
S533: running the each instruction in the temporary list by the device stream, receiving the current instruction by a computing function of the type of the device stream, setting a device ID according to a device ID of the device stream of the current instruction, calling a computing function of the each instruction in the temporary list according to the metainformation of the each instruction in the temporary list, and after the current instruction is executed, setting a state of the current instruction to be a “completed state”; and
S534: pre-scheduling the each instruction in the temporary list: firstly, placing the preparation instruction list into the temporary list, continuously carrying out scheduling on the temporary list, after the temporary list receives the each instruction in the preparation list, directly executing the each instruction in the temporary list by the virtual machine, and at the same time, in a working process, once an instruction capable of being pre-scheduled is found, adding the instruction capable of being pre-scheduled into the preparation list.