The invention discloses an
asynchronous processing method and device based on a neural network accelerator, and the method comprises the steps: generating an asynchronous request through a main thread according to an
algorithm service demand, generating a corresponding
handle number, generating a group of command words according to the generated service request, adding a command word
queue, and querying the command word
queue, and if only one group of command words exist currently, setting the group of command words to be in an execution state, starting a neural network accelerator hardcore, otherwise, setting the group of command words to be in an initial state and returning. And after the execution of the
hard core is finished, generating hardware interruption, starting soft interruption, querying a command word
queue, taking out command words from the queue if the command words exist, judging whether the command words are in an initial state, if so, setting the command words to be in an execution state and starting the
hard core, and otherwise, deleting the group of command words from the queue. And the main thread queries whether the
hard core of the operation is completed or not according to the
handle number. According to the operation, the
asynchronous operation process of a plurality of network algorithms is realized, the
asynchronous operation is processed through hard core interruption, the
network performance is accelerated, and the bandwidth occupied by a processor is reduced.