A non-transitory computer-readable recording medium that stores a computer program which, when executed by one or more processors, performs following operations for performing a neural network optimizing method, the operations including:
- performing, based on a customer-requested instruction for basic resources used for computation execution of a first neural network, a first computation on an input value with the basic resources, wherein the performing of the first computation comprises inputting the customer-requested instruction into a particular resource having a greatest size, among the basic resources;
- identifying a bottleneck portion caused in a process of data exchange between data blocks of the first neural network, at an intermediate branch point between a data line and a buffer;
- checking a first computational performance of the first computation, wherein the first computational performance includes a computational processing speed and a power consumption amount of the bottleneck portion;
- adjusting, based on the checked computational performance and a customer-requested performance according to the customer-requested instruction, at least one resource of the basic resources, adjusting a data path of the bottleneck portion, and configuring a second neural network with the adjusted at least one resource and the adjusted data path;
- performing a second computation on the input value with the adjusted at least one resource and the adjusted data path of the second neural network;
- checking a second computational performance of the second computation;
- and
- when the second computational performance of the second computation minimizes consumption of the adjusted at least one resource and latency of the adjusted data path, outputting the second neural network as a final neural network,
- wherein the customer-requested instruction is an instruction for generating the final neural network that meets a customer's request,
- wherein the adjusting of the at least one resource of the basic resources comprises:
- adjusting a first resource among the basic resources, wherein the first resource is configured to adjust internal memory capacity and a number of channels;
- determining whether the customer-requested performance is satisfied with the adjusted first resource;
- when the customer-requested performance is satisfied with the adjusted first resource, further adjusting a second resource among the basic resources, wherein the second resource is configured to adjust a pipeline and a data bandwidth;
- determining whether the customer-requested performance is satisfied with the adjusted second resource;
- and
- when the customer-requested performance is satisfied with the adjusted second resource, further adjusting a third resource among the basic resources, wherein the third resource is configured to perform an additional function of the customer's request, and
- wherein the method performs all of the performing of the first computation, the identifying of the bottleneck portion, the checking of the first computational performance, the adjusting of the at least one resource, the adjusting of the data path, the configuring of the second neural network, the performing of the second computation, and the outputting of the second neural network, again, for a different customer-requested instruction.