CPC G06F 8/4441 (2013.01) [G06N 3/04 (2013.01); G06N 3/10 (2013.01)] | 13 Claims |
1. A method comprising:
generating, by a compiler for a neural network, N blocks of instructions from source code, wherein each block of the N blocks of instructions includes a set of common instructions that are common to each block, and wherein, during execution of the N blocks of instructions, the set of common instructions are performed up to a number of iterations based on a condition;
generating an overwrite instruction for each of the first N-1 blocks of instructions of the N blocks of instructions, wherein execution of the overwrite instruction triggers an overwrite action that causes the instructions of each subsequent block of instructions of the N blocks of instructions to be overwritten with no operation (NOP) instructions that are to be executed during execution of each subsequent block of instructions, such that the instructions of each subsequent block of instructions are modified at a memory in response to triggering the overwrite action, wherein N is greater than or equal to 3; and
adding the overwrite instruction within and at an end of each of the first N-1 blocks of instructions after the set of common instructions.
|