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

Claim 1:
2. The method for execution of the computational graph in the neural network model according to claim 1, wherein a specific process of step S1 is as follows:
S11: creating a task queue of the operator kernel functions, wherein computational tasks of a current operator kernel function are added into a task queue of the current operator kernel function in sequence, and computational graphs are added into the task queue of the current operator kernel function in sequence through the computational tasks of the current operator kernel function according to a topological order until the entire computational graph is added into the task queue;
S12: creating threads of the task execution bodies, wherein the threads of the task execution bodies acquire current to-be-processed tasks in sequence from the task queue;
S13: creating the task execution bodies of the operator kernel functions, wherein the task execution bodies for calculating operator kernel functions are created according to the current to-be-processed tasks and context information of a current thread, and the computational tasks corresponding to the operator kernel functions in the task queue are performed by the task execution bodies;
S14: creating an event recall queue, wherein the event recall queue is created when all the task execution bodies in the task queue are processed, and the computational tasks that are processed by the task execution bodies are added into the event recall queue in sequence; and
S15: creating a thread of the event recall queue, wherein the thread of the event recall queue is used for taking out and returning the tasks that have been processed in the event recall queue.