US 12,032,931 B2
Compiling method and apparatus for neural networks
Keunmo Park, Seoul (KR)
Assigned to Samsung Electronics Co., Ltd., Suwon-si (KR)
Filed by Samsung Electronics Co., Ltd., Suwon-si (KR)
Filed on Mar. 29, 2021, as Appl. No. 17/215,712.
Claims priority of application No. 10-2020-0115602 (KR), filed on Sep. 9, 2020.
Prior Publication US 2022/0075606 A1, Mar. 10, 2022
Int. Cl. G06F 8/41 (2018.01); G06N 3/04 (2023.01); G06N 3/10 (2006.01)
CPC G06F 8/41 (2013.01) [G06N 3/04 (2013.01); G06N 3/10 (2013.01)] 12 Claims
OG exemplary drawing
 
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.