CPC G06F 8/41 (2013.01) [G06N 3/04 (2013.01); G06N 3/10 (2013.01)] | 12 Claims |
1. A compiling method, comprising:
receiving, a single-core neural network based code of an operation and a plurality of input data, each respective input data comprises an operand for the operation included in a neural network and a parameter of the neural network;
generating a graph of the single-core neural network based code, wherein the generating of the graph comprises:
generating a plurality of nodes, wherein each respective node corresponds to a respective operation kernel of a plurality of operation kernels of the single-core neural network based code; and
generating a plurality of edges connecting the nodes based on a similarity between respective input data received by operation kernels, wherein the similarity is based on an amount of similar input data shared between respective operation kernels and a distance between storage locations at which the respective input data used by the operation kernels are stored:
generating kernel clusters, based on the generated graph, wherein the kernel clusters comprise operation kernels using similar input data;
generating, based on the kernel clusters, multi-core neural network based code for the operation;
distributing, based on the multi-core neural network based code, the operation kernels and the plurality of input data to respective cores for execution; and
executing the operation through the cores.
|