Processor, electronic device and control method thereof
By designing the memory, convolution calculation unit and controller in the processor and optimizing the storage and retrieval of data in the internal memory, the problem of the DNN processor's dependence on external memory is solved and the processing efficiency is improved.
Patent Information
- Application Number
- CN201980035810.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-10-19
- Filing Date
- 2019-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-05-30
AI Technical Summary
Due to the limited internal memory capacity of the deep neural network (DNN) processor for input data, it needs to frequently communicate with external memory, resulting in increased processing time and difficulty in efficiently processing convolution calculations.
A processor configuration is designed, including a memory, a convolution calculation unit and a controller. The data input through the buffer are grouped in row units and assigned logical addresses, optimizing the storage and retrieval of data in the memory to ensure that the convolution calculation data is Performed in internal memory to reduce interaction with external memory.
By performing convolution calculations in internal memory, bandwidth limitations with external memory are avoided, improving the efficiency of the processor's DNN processing of input data, independent of the bandwidth of external memory.
Smart Images

Figure CN112204585B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a processor, an electronic device and a control method thereof, and more particularly, to a processor for performing convolution calculation on input data, an electronic device and a control method thereof. Background Art
[0002] In recent years, artificial intelligence (AI) systems that achieve human-level intelligence have been applied to various fields. Unlike traditional rule-based intelligent systems, AI systems refer to systems that learn, determine, and become more intelligent. As execution iterations are performed, AI systems show higher recognition rates and become more accurate in understanding user preferences. Therefore, traditional rule-based intelligent systems are gradually being replaced by deep learning-based AI systems.
[0003] Artificial intelligence technology consists of machine learning (such as deep learning) and basic techniques that use machine learning.
[0004] Machine learning refers to the technology of classifying / learning the characteristics of input data, and the basic technology is the technology of simulating human brain functions (such as recognition or determination) using machine learning algorithms (such as deep learning), and includes technical fields such as language understanding, visual understanding, reasoning / prediction, knowledge representation, and operation control.
[0005] Examples of various fields where AI technology is applied are as follows. Language understanding refers to the technology of recognizing human language / characters and applying / processing them, including natural speech processing, machine translation, communication systems, question and answer, speech recognition / synthesis, etc. Visual understanding refers to the technology of recognizing objects and processing them in a way similar to human vision, including object recognition, object tracking, image search, human recognition, scene understanding, spatial understanding, image improvement, etc. Reasoning / prediction refers to the technology of determining information and performing logical reasoning and prediction on it, including knowledge / possibility-based reasoning, optimization prediction, preference-based planning, recommendation, etc. Knowledge representation refers to the technology of automatically processing human experimental information into knowledge data, including knowledge construction (data generation / classification), knowledge management (data application), etc. Operation control refers to the technology of controlling vehicle autonomous driving and robot movement, including motion control (navigation, collision or driving), operation control (behavior control), etc.
[0006] The above-mentioned AI application can be executed in a processor capable of processing a deep neural network (DNN). However, since the capacity of the internal memory required to process the DNN for the input memory is limited, there is a problem that the processor must communicate with the external memory to input and output data. In particular, since it takes time to read data from and write data to the external memory, there is a problem that the time required to process the DNN for the input data increases proportionally.
[0007] Therefore, there is a need for a method of processing a DNN with respect to input data by efficiently using an internal memory having a limited capacity. Summary of the invention
[0008] Technical issues
[0009] The present disclosure is directed to providing a processor, an electronic device, and a control method thereof that performs convolution calculation on input data and stores the obtained data in an internal memory.
[0010] Technical Solution
[0011] Multiple embodiments can overcome the above disadvantages and other disadvantages not described above. In addition, the embodiments do not necessarily need to overcome the above disadvantages, and the embodiments do not necessarily need to solve any of the above problems.
[0012] A processor, comprising: a memory; a convolution calculation unit; and a controller, configured to: based on data input from a buffer, as many as the number of rows corresponding to the first kernel data, being stored in the memory, provide the stored input data to the convolution calculation unit; based on the first calculation data output by the convolution calculation unit, store the received first calculation data in the memory; and based on the first calculation data as many as the number of rows corresponding to the second kernel data, being stored in the memory, provide the stored first calculation data to the convolution calculation unit; the convolution calculation unit is configured to: obtain the first calculation data by performing convolution calculation based on the input data and the first kernel data, and obtain the second calculation data by performing convolution calculation based on the first calculation data and the second kernel data; after providing the first calculation data to the convolution calculation unit, the controller stores the data input from the buffer at the position of the first stored data in the first calculation data stored in the memory.
[0013] The controller may provide the first calculation data to the convolution calculation unit, store the received second calculation data in the memory based on receiving the second calculation data from the convolution calculation unit, and provide the stored second calculation data to the convolution calculation unit based on the second calculation data as many as the number of rows corresponding to the third kernel data being stored; after providing the first calculation data to the convolution calculation unit, based on a row of data input from the buffer being stored in the memory, provide the convolution calculation unit with data including the corresponding rows as many as the number of rows corresponding to the first kernel data; and based on the first calculation data being received, store the received first calculation data at the position where the first stored data is stored in the second calculation data.
[0014] The memory can store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
[0015] The controller may provide the M-1th calculation data to the convolution calculation unit; after providing the M-1th calculation data to the convolution calculation unit, on the basis that the M-2th calculation data based on the data input from the buffer is received, the received M-2th calculation data is stored at the position where the first stored data is stored in the M-1th calculation data; and after providing the M-2th calculation data including the M-2th calculation data and as many rows as the number of rows corresponding to the M-1th kernel data to the convolution calculation unit, based on the M-1th calculation data being received, the received M-1th calculation data is stored at the position where the first stored data is stored in the input data.
[0016] The controller may provide the M-1th calculation data to the convolution calculation unit based on the M-1th calculation data being stored as many rows as the number of rows corresponding to the Mth kernel data, and output the Mth calculation data received from the convolution calculation unit.
[0017] The controller may: when the same number of M-3 calculation data as the number of rows corresponding to the M-2 kernel data rows are stored, store the M-2 calculation data received from the convolution calculation unit at the position where the first stored data is stored in the M-1 calculation data stored in the memory; and when the same number of M-2 calculation data as the number of rows corresponding to the M-1 kernel data rows are stored, store the M-1 calculation data received from the convolution calculation unit at the position where the first stored data is stored in the input data stored in the memory.
[0018] The memory is a cyclic memory.
[0019] The data input from the buffer includes a logical address, and the controller stores the input data in the memory based on the logical address.
[0020] According to an embodiment, an electronic device includes: a buffer configured to group input data in units of rows and assign logical addresses; and a processor including a memory and a convolution calculation unit, the processor storing data input from the buffer based on the logical address; based on the data being stored in the memory as many rows as the number of rows corresponding to the first kernel data, providing the stored input data to the convolution calculation unit; based on the first calculation data being output by the convolution calculation unit, storing the received first calculation data in the memory; based on the first calculation data being stored as many rows as the number of rows corresponding to the second kernel data, providing the stored first calculation data to the convolution calculation unit; and after providing the first calculation data to the convolution calculation unit, storing the data input from the buffer at the position where the first stored data is stored in the first calculation data stored in the memory.
[0021] The convolution calculation unit may obtain the first calculation data by performing convolution calculation based on the input data and the first kernel data; and obtain the second calculation data by performing convolution calculation based on the first calculation data and the second kernel data.
[0022] According to an embodiment, a control method for a processor including a memory and a convolution calculation unit includes: based on data input from a buffer and as many rows as the number of rows corresponding to first kernel data being stored in the memory, the stored input data is provided to the convolution calculation unit; first calculation data is obtained by performing convolution calculation based on the input data and the first kernel data; based on the first calculation data being output by the convolution calculation unit, the received first calculation data is stored in the memory; based on first calculation data as many rows as the number of rows corresponding to second kernel data being stored in the memory, the stored first calculation data is provided to the convolution calculation unit; second calculation data is obtained by performing convolution calculation based on the first calculation data and the second kernel data; and after providing the first calculation data to the convolution calculation unit, the data input from the buffer is stored at the position of the first stored data in the first calculation data stored in the memory.
[0023] The method may include: providing the first calculation data to the convolution calculation unit, and storing the received second calculation data in the memory based on the second calculation data received from the convolution calculation unit; based on the second calculation data being stored as many as the number of rows corresponding to the third kernel data, providing the stored second calculation data to the convolution calculation unit; after providing the first calculation data to the convolution calculation unit, based on a row of data input from the buffer being stored in the memory, providing the convolution calculation unit with data including the corresponding rows as many as the number of rows corresponding to the first kernel data; and based on the first calculation data being received, storing the received first calculation data at the position where the first stored data is stored in the second calculation data.
[0024] The memory can store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
[0025] The method may include: providing the M-1th calculation data to the convolution calculation unit; after providing the M-1th calculation data to the convolution calculation unit, based on the M-2th calculation data based on the data input from the buffer being received, storing the received M-2th calculation data at the position where the first stored data is stored in the M-1th calculation data; and after providing the M-2th calculation data including as many rows as the number of rows corresponding to the M-1th kernel data including the M-2th calculation data to the convolution calculation unit, based on the M-1th calculation data being received, storing the received M-1th calculation data at the position where the first stored data is stored in the input data.
[0026] The method may include: based on M-1th calculation data being stored as many as the number of rows corresponding to the Mth kernel data rows, providing the M-1th calculation data to the convolution calculation unit, and outputting the Mth calculation data received from the convolution calculation unit.
[0027] The method may include: when the same number of M-3 calculation data as the number of rows corresponding to the M-2 kernel data rows are stored, the M-2 calculation data received from the convolution calculation unit is stored at the position where the first stored data is stored in the M-1 calculation data stored in the memory; and when the same number of M-2 calculation data as the number of rows corresponding to the M-1 kernel data rows are stored, the M-1 calculation data received from the convolution calculation unit is stored at the position where the first stored data is stored in the input data stored in the memory.
[0028] The memory may be a circular memory.
[0029] The data input from the buffer includes a logical address, and providing the input data to the convolution calculation unit may include: storing the input data in the memory based on the logical address.
[0030] Beneficial Effects
[0031] According to various embodiments, since data obtained by performing convolution calculations is stored in the internal memory and data required to perform convolution calculations is retrieved from the internal memory, the processor can perform DNN on input data regardless of the bandwidth between the processor and the external memory.
[0032] Additional aspects and advantages of the embodiments are set forth in the detailed description, will be obvious from the detailed description, or may be learned by practicing the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and / or other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings, in which:
[0034] Figure 1 is a block diagram showing a configuration of a processor according to an embodiment of the present disclosure;
[0035] Figure 2 is a block diagram showing a configuration of an electronic device according to an embodiment;
[0036] Figure 3 is a diagram provided for describing convolution according to an embodiment;
[0037] Figure 4 It is a view that is provided to describe the problems of traditional technology;
[0038] Figure 5 is a diagram provided for describing a deep neural network according to an embodiment;
[0039] Figure 6 is a view provided for describing a memory according to an embodiment;
[0040] Figure 7 is a view provided for describing a memory according to an embodiment;
[0041] Figure 8 is a view provided for describing a memory according to another embodiment; and
[0042] Fig. 9 is a flowchart describing a control method according to an embodiment.
[0043] Best Mode for Carrying Out the Invention DETAILED DESCRIPTION
[0044] After briefly describing the terms used in the specification, the present disclosure will be described in detail.
[0045] Considering the functions of the present disclosure, currently widely used general terms are selected as the terms used in the embodiments of the present disclosure, but they may be changed according to the intention of those skilled in the art or judicial precedents, new technologies, etc. In addition, in specific cases, there may be terms arbitrarily selected by the applicant. In this case, the meanings of these terms will be mentioned in detail in the corresponding description section of the present disclosure. Therefore, the terms used in the embodiments of the present disclosure should be defined based on the meaning of the terms in the entire disclosure and the meaning of the content rather than the simple name of the terms.
[0046] Since the present disclosure may be variously modified and has multiple embodiments, specific embodiments of the present disclosure will be shown in the drawings and described in detail in the detailed description. However, it should be understood that the present disclosure is not limited to specific embodiments, but includes all modifications, equivalents and alternatives without departing from the scope and spirit of the present disclosure. When it is determined that the detailed description of known technologies related to the present disclosure may obscure the main points of the present disclosure, the detailed description will be omitted.
[0047] The terms "first", "second", etc. may be used to describe various components, but these components should not be construed as being limited by these terms. These terms are only used to distinguish one component from another.
[0048] Singular forms are intended to include plural forms unless the context clearly indicates otherwise. It will be further understood that the terms "comprising" or "formed by" used in this specification specifically refer to the presence of the features, numbers, steps, operations, components, parts or combinations thereof mentioned in this specification, but do not exclude the presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof.
[0049] In the embodiments of the present disclosure, a "module" or "device / component" may perform at least one function or operation and may be implemented by hardware or software, or by a combination of hardware and software. In addition, multiple "modules" or multiple "devices / components" may be integrated into at least one module and implemented by at least one processor other than the "module" or "device / component" (implemented by specific hardware).
[0050] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art related to the present disclosure can easily implement the present disclosure. However, the present disclosure can be implemented in various different forms and is not limited to the embodiments described herein. In addition, in the accompanying drawings, parts irrelevant to the description will be omitted to clearly describe the present disclosure, and similar parts are represented by similar reference numerals throughout the specification.
[0051] Figure 1 is a block diagram showing a configuration of a processor according to an embodiment of the present disclosure.
[0052] like Figure 1 As shown, the processor 100 includes a memory 110 , a convolution calculation unit 120 , and a controller 130 .
[0053] The memory 110 may store data input from a source such as a buffer. Here, the input data may be at least a portion of an image. The buffer may be a stream input buffer, and may assign logical addresses to data input from a previous stage of the stream environment. For example, the buffer may assign addresses to pixel data in an image input from a previous stage in units of rows.
[0054] The memory 110 according to an embodiment may store data input from an external buffer. Here, the memory 110 may store the input data in the memory based on a logical address.
[0055] According to an embodiment, the memory 110 may be implemented as a memory capable of storing data corresponding to a predetermined number of rows. For example, the memory 110 may store data corresponding to a capacity of 20 rows in the vertical direction. However, the embodiment is not limited thereto, and the storage capacity of the memory may be implemented in various ways. For example, if a 1080p full HD image (resolution of 1920×1080) is input, pixel data corresponding to a 20-row image area in the full HD image may be stored in the memory 110. Due to hardware limitations, the storage capacity of the memory in the processor 100 is limited, so a portion of the input image frame may be stored in the memory 110.
[0056] For example, assume a case where a conventional processor performs image processing on a 720p (resolution of 1280×720) HD image with a tile size of 32×32 (1 pixel size is 2 bytes). In order for the conventional processor to perform image processing using an internal memory, there is a problem of providing a relatively large internal memory of a size of 1280×10×32×2 bytes (800KB).
[0057] In addition, since memory bandwidth is limited, the method of storing data in an external memory that is large relative to the size of the internal memory is difficult to perform image processing on ultra-high definition (UHD) and high-performance (60 frames per second (FPS)) images. Here, data may refer to a plurality of layers generated or obtained during the image processing process.
[0058] The processor 100 according to an embodiment may efficiently store stream data input from a previous stage in the internal memory 110 and perform image processing regardless of (independent of) the limited memory bandwidth of the external memory.
[0059] The convolution calculation unit 120 may perform convolution calculation based on the received data and the kernel data. Here, among the data stored in the memory 110, the received data may be data provided to the convolution calculation unit 120 under the control of the controller 130.
[0060] The kernel data may be weight data trained using a deep neural network (DNN). Here, DNN is a multi-layer neural network with a special connection structure designed for speech processing, image processing, etc. For example, a convolutional neural network (CNN) can filter an image by preprocessing pixels and identify the features of the image. For example, the kernel data may be Nx*Ny*Cin*Cout data. Here, Cin is the input channel of a specific layer of the network, and Cout may refer to the output channel of a specific layer of the network. The convolution calculation unit 120 may perform convolution calculations based on the data and kernel data provided by the memory 110, and obtain calculation data. The kernel data may be variously referred to as filters, weight matrices, or learning matrices, etc., but for ease of description, it will be referred to as kernel data hereinafter. The convolution calculation unit 120 may be a processing element provided in a processor for performing convolution calculations.
[0061] According to an embodiment, the convolution calculation unit may obtain first to Mth calculation data based on the first to Mth kernel data. For example, a convolution calculation may be performed based on the input data and the first kernel data, and the first calculation data may be obtained. In addition, a convolution calculation may be performed based on the first calculation data and the second kernel data, and the second calculation data may be obtained. Here, each of the first to Mth kernel data may be referred to as a first filter to an Mth filter.
[0062] The convolution calculation unit 120 may perform convolution calculations when input data or calculation data is looped. According to an embodiment, each of the first to M-th kernel data may be a matrix format of a different size. In addition, each of the first to M-th kernel data may be composed of different values. According to an embodiment, the processor 100 may use different filters when performing convolution calculations to obtain the first to M-th calculation data. For example, when performing convolution calculations to obtain the first calculation data, the first kernel data may be used; and when performing convolution calculations to obtain the M-th calculation data, the M-th kernel data may be used. Here, each of the first to M-th kernel data may be a different set of filters.
[0063] According to an embodiment, the convolution calculation unit 120 may send the obtained calculation data to the controller 130. Here, the calculation data may be data on which the convolution calculation unit 120 performs convolution calculations. The calculation data may mean a plurality of hidden layers according to a DNN. Hereinafter, for ease of description, the first hidden layer to the M-1 hidden layer are collectively referred to as the first calculation data to the M-1 calculation data, and the output layer is referred to as the M-th calculation data.
[0064] The controller 130 controls the overall operation of the processor 100 .
[0065] The controller 130 may store the data input from the buffer in the memory 110. According to an embodiment, when as many rows of input data as the number of rows of the first kernel data are stored in the memory 110, the controller 130 may provide the stored input data to the convolution calculation unit 120. For example, when the first kernel data is Nx*Ny*Cin*Cout data and Ny input data are stored in the memory 110, the controller 130 may provide Ny input data to the convolution calculation unit 120.
[0066] According to one embodiment, the convolution calculation unit 120 may perform convolution calculation based on the Ny input data and the first kernel data and obtain the first calculation data. The controller 130 may store the first calculation data received from the convolution calculation unit 120 in the memory 110.
[0067] When the first calculation data as many as the number of rows corresponding to the second kernel data is stored, the controller 130 may provide the stored first calculation data to the convolution calculation unit 120. For example, the first kernel data may be in the format of a 3×3 matrix, and the second kernel data may be in the form of a 5×5 matrix. That is, the sizes of the first kernel data and the second kernel data may be different. When the first calculation data as many as the number of rows corresponding to the second kernel data (for example, 5) is stored, the convolution calculation unit 120 may use the stored first calculation data and the second kernel data to perform convolution calculation and obtain the second calculation data.
[0068] Meanwhile, after providing the first calculation data to the convolution calculation unit 120 , the controller 130 may store the data input from the external buffer at a location where the first stored data is stored among the first calculation data stored in the memory 110 .
[0069] The controller 130 according to the embodiment may provide the first calculation data to the convolution calculation unit 120; when receiving the second calculation data from the convolution calculation unit 120, the received second calculation data may be stored in the memory 110. Then, when the second calculation data as many as the number of rows corresponding to the stored third kernel data is stored in the memory 110, the controller 130 may provide the stored second calculation data to the convolution calculation unit 120.
[0070] Meanwhile, after providing the first calculation data to the convolution calculation unit 120, when the data input from the external buffer is stored in the memory 110 for one row, the controller 130 may provide the data including the corresponding row as many as the number of rows corresponding to the first kernel data to the convolution calculation unit 120. For example, the controller 130 may store the data newly input from the external buffer in the memory 110 based on the logical address. When the newly stored data is stored for one row, the controller 130 may provide the data including the corresponding row as many as the number of rows corresponding to the first kernel data to the convolution calculation unit 120. For example, if the first kernel data is in the format of a 5×5 matrix, the controller 130 may provide five rows of data including the newly stored data to the convolution calculation unit 120. Then, when the first calculation data is received from the convolution calculation unit 120, the controller 130 may store the newly received first calculation data at the position where the first stored data is stored in the second calculation data.
[0071] The controller 130 according to the embodiment may control the number of convolution calculations of the convolution calculation unit 120. For example, the controller 130 may sequentially provide input data, first calculation data, ..., M-1th calculation data, etc. to the convolution calculation unit 120. According to one embodiment, the convolution calculation unit 120 may perform convolution calculations on the M-1th calculation data provided from the controller 130, and obtain the Mth calculation data. Here, the Mth calculation data may be an output layer obtained by performing a DNN on the input data (or input layer). Specifically, the convolution calculation unit 120 may perform convolution calculations on the input data to obtain the first calculation data, and perform convolution on the first calculation data to obtain the second calculation data. The convolution calculation unit 120 may perform convolution calculations and sequentially obtain the first calculation data, ..., M-2th calculation data, and M-1th calculation data, and perform convolution based on the M-1th calculation data and the Mth kernel data and obtain the Mth calculation data.
[0072] According to an embodiment, the convolution calculation unit 120 may obtain the first to Mth calculation data based on each of the first to Mth kernel data. Here, the first to Mth kernel data may have different sizes or shapes. However, the embodiment is not limited thereto, and the convolution calculation unit 120 may obtain operation data (or hidden layers) by using various types of kernel data depending on the purpose of image processing, etc.
[0073] When the M-1th calculation data as many as the number of rows corresponding to the M-th kernel data are stored, the controller 130 according to an embodiment may provide the M-1th calculation data to the convolution calculation unit 120. When the M-th calculation data is received from the convolution calculation unit 120, the controller 130 may output the M-th calculation data to the output buffer. Here, the M-th calculation data is an output layer obtained by continuously processing the M-1th calculation data with DNN processing. According to an embodiment, if the input data is an image, the processor 100 may continuously process the image in a stream environment and output the image frame. Here, the image processing may refer to noise reduction (NR), interlaced to progressive conversion (IPC), detail enhancement (DE), contrast enhancement (CE), etc. The output buffer according to one embodiment may be referred to as a stream output buffer, but for ease of description, it will be referred to as an output buffer hereinafter. The output buffer may receive an input of feature map output data in the form of rows. Here, the feature map output data may refer to the M-th calculation data. Then, the output buffer may output data in pixels based on the required frames per second (FPS).
[0074] At the same time, according to an embodiment, the controller 130 may provide the M-1th calculation data to the convolution calculation unit 120, and after providing the M-1th calculation data to the convolution calculation unit 120 and then receiving the M-2th calculation data based on the data input from the buffer, the controller 130 may store the received M-2th calculation data at the location where the first stored data is stored in the M-1th calculation data stored in the memory 110.
[0075] According to an embodiment, the controller 130 may, after providing the M-2th calculation data including the M-2th calculation data and as many rows corresponding to the number of rows of the M-1th kernel data to the convolution calculation unit 120, store the received M-1th calculation data at a location where the first stored data is stored in the input data stored in the memory 110 when receiving the M-1th calculation data. Here, the M-1th calculation data may refer to data including the M-1th calculation data based on the newly input data.
[0076] When the M-3th calculation data having the same number of rows corresponding to the number of rows of the M-2th kernel data is stored, the controller 130 may store the M-2th calculation data received from the convolution calculation unit 120 at the location where the first stored data is stored in the M-1th calculation data stored in the memory 110.
[0077] In addition, when the M-2th calculation data as many rows as the number of rows of the M-1th kernel data are stored, the controller 130 can store the M-1th calculation data received from the convolution calculation unit 120 at the location where the first stored data is stored in the input data stored in the memory 110.
[0078] Here, the memory 110 may be a cyclic memory. The memory 110 may store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
[0079] The controller 130 may control the memory 110 to store new data at a location where the first stored data is stored. In the memory 110 having a limited size, data may be stored in a circular structure. At the same time, Figure 1 The memory 110 shown in FIG. 1 may refer to a storage space provided in the processor 100 , such as a static random access memory (SRAM).
[0080] Figure 2 is a block diagram showing a configuration of an electronic device according to an embodiment.
[0081] like Figure 2 As shown, the electronic device 1000 includes a processor 100 and a buffer 200. The configuration of the processor 100 is similar to Figure 1 The same as described in will not be described again.
[0082] The electronic device 1000 may be a device capable of performing DNN processing on input data. For example, a user terminal device, a display device, a set-top box, a tablet personal computer, a smart phone, an e-book reader, a desktop PC, a laptop PC, a workstation, a server, a personal digital assistant (PDA), a portable multimedia player (PMP), an MP3 player, etc. Alternatively, the electronic device 1000 may refer to the system itself in which a cloud computing environment is established. However, the embodiment is not limited thereto, and the electronic device 1000 may be any device capable of performing artificial intelligence (AI) learning.
[0083] The buffer 200 connected to the input / output of the processor 100 may buffer and provide input data to the processor 100. According to another embodiment, the buffer 200 is connected to another input / output of the processor 100, and may buffer calculation data (or output layer) output by the processor 100, and provide the calculation data to another element in the electronic device 1000.
[0084] In particular, the buffer 200 may receive input of feature map data that does not include memory address information in units of pixels. The buffer 200 may group input pixels in units of rows to perform convolution calculations. Then, the buffer 200 may assign logical addresses to data in units of rows. The processor 100 may store the data input from the buffer 200 in the memory 110 based on the logical addresses.
[0085] For example, the buffer 200 may buffer data input in units of pixels in units of rows (units of convolution calculation processing). Subsequently, when a row is formed with pixel data, the buffer 200 may allocate a logical address and provide the logical address to the processor 100. The processor 100 may store the input data based on the logical address. According to an embodiment, the buffer 200 may be referred to as a stream input buffer, but for ease of description, it will be referred to as the buffer 200 hereinafter. Figure 4 A specific embodiment in which the buffer 200 provides the calculated data to another element in the electronic device 1000 will be described.
[0086] The processor 100 controls the overall operation of the electronic device 1000 .
[0087] According to an embodiment, the processor 100 may be implemented as a digital signal processor (DSP), a microprocessor, and a time controller (TCON), but is not limited thereto. The processor 100 may include one or more of a central processing unit (CPU), a microcontroller unit (MCU), a microprocessing unit (MPU), a controller, an application processor (AP), a communication processor (CP), and an advanced reduced instruction set computing (RISC) machine (ARM) processor, or may be defined as a corresponding term. The processor 100 may be implemented as a system on chip (SoC) type or a large scale integration (LSI) type with a built-in processing algorithm or may be implemented as a field programmable gate array (FPGA).
[0088] According to an embodiment, the electronic device 1000 may include a memory external to the processor 100. The external memory is connected to the processor 100, and may receive data input from the processor 100 or output data to the processor 100.
[0089] According to an embodiment, the external memory may store input data and convolution calculation information. Here, the input data may be image data. Image frames constituting image data received from the memory may be buffered by the buffer 200 as described below and provided to the processor 100.
[0090] According to an embodiment, the processor 100 may store kernel data of DNN training. For example, the electronic device 1000 may perform convolution using the first kernel data to the Mth kernel data, and obtain a final output layer through multiple hidden layers of input data. Here, the output layer may refer to image processing data, and the output layer may be provided to the next level.
[0091] In addition, the processor 100 may store convolution calculation information. Here, the convolution calculation information may include information related to the number of convolution calculations performed, etc. The processor 100 may perform convolution calculations on the input data based on the convolution calculation information.
[0092] Figure 3 is a view provided for describing convolution according to an embodiment.
[0093] The processor 100 according to the embodiment may obtain calculation data by performing convolution on input data input in units of lines and output the calculation data.
[0094] like Figure 3 As shown, the controller 130 may store the data 10 input from the buffer 200 in the memory 110. When as many rows of input data 10 as the number of rows of the first kernel data 11 are stored, the controller 130 may provide the input data 10 to the convolution calculation unit 120 and obtain the first calculation data 20.
[0095] For example, when the first kernel data 11 is 3×3 and the input data 10 stored in the memory 110 reaches three rows, the processor 100 can obtain one first calculation data 20 based on the input data 10 and the first kernel data 11. Figure 3 , when the input data 10 is stored in the memory 110 to form rows I2, I3, and I4, the processor 100 may perform convolution using the first kernel data and obtain the first calculation data 20 (O3). Meanwhile, the first kernel data 11 is only exemplary, and the processor 100 may perform convolution using various types of kernel data.
[0096] Figure 4 It is a view provided to describe the problems of the conventional technology.
[0097] like Figure 4 As shown, the input data can be image processed by each of the multiple stages. In particular, each stage can perform image processing corresponding to at least one of noise reduction (NR), interlaced to progressive conversion (IPC), detail enhancement (DE), contrast enhancement (CE), etc. on the input data.
[0098] According to an embodiment, the DNN is used to perform image processing on input data in a specific stage.
[0099] In the case of a conventional processor, the data output in stage 2 is provided to the next stage (stage 3). Then, when image processing is performed in stage 3, since the capacity of the memory provided inside the processor 100 is limited, the processor 100 stores multiple layers generated by performing convolution on the input data in an external memory (external DRAM). Since the bandwidth for transmitting and receiving data with the external memory is limited, there is a problem that the time required for the processor 100 to perform the convolution calculation increases or multiple layers cannot be generated. In addition, the capacity of the conventional memory is not suitable for image processing of high-definition images.
[0100] The processor 100 according to an embodiment may efficiently store multiple layers generated according to convolution calculations in the memory 110 .
[0101] Hereinafter, an embodiment in which multiple layers are generated when the processor 100 performs convolution calculation will be described.
[0102] Figure 5 A view provided for describing a deep neural network (DNN) according to an embodiment.
[0103] Reference Figure 5 When the input data 10 is stored in the memory 110, and the number of rows of the input data 10 corresponding to the number of rows of the first kernel data 11 is stored, the processor 100 may perform convolution calculation on the input data 10. Figure 5 As shown, the first calculation data 20 (a4) can be obtained by performing convolution on the input data 10 (I4, I5 and I6). For ease of description, it is assumed that the first kernel data to the Mth kernel data are in a 3×3 format, but the embodiment is not limited thereto, and the processor 100 can perform convolution based on kernel data of various sizes. For example, if the first kernel data is a matrix in a 3×3 format and the input data 10 stored in the memory 110 reaches three rows, the processor 100 can perform convolution based on the input data 10 and the first kernel data and obtain the first calculation data 20.
[0104] When the first calculation data 20 having the same number of rows as the second kernel data is obtained, the processor 100 may perform convolution calculation on the first calculation data 20 and obtain the second calculation data 30. Figure 5 As shown, the second calculation data 30b4 can be obtained by performing convolution on the first calculation data 20 (a3, a4 and a5). Here, the size of the second kernel data can be different from the size of the first kernel data. For example, if the second kernel data is a matrix in a 5×5 format, the second calculation data 30 can be obtained by performing convolution on the first calculation data 20 (a3 to a7).
[0105] According to an embodiment, the processor 100 may perform convolution calculation based on the second calculation data 30 (b2, b3, and b4) and the third kernel data, and obtain third calculation data (or output data) O3. The processor 100 may obtain and output the third calculation data O1 to O9.
[0106] Here, the memory 110 provided in the processor 100 for the processor 100 to obtain the third calculation data may store each of the input data 10, the first calculation data 20, and the second calculation data 30. In the case of a conventional processor, since the capacity (or size) of the internal memory provided in the processor is limited for storing all the input data 10, the first calculation data 20, and the second calculation data 30, data or hidden layers, etc. need to be stored in an external memory, and it is difficult to obtain multiple layers.
[0107] Figure 6 and Figure 7 is a view provided for describing a memory according to an embodiment.
[0108] The processor 100 may store the data 10 input from the buffer in the memory 110 , and when as many rows of input data 10 as the number of rows corresponding to the first kernel data are stored, the processor 100 may perform a convolution calculation on the stored input data 10 to obtain and store the first calculation data 20 .
[0109] When the processor 100 stores the same number of first calculation data 20 as the number of rows corresponding to the second kernel data, it can perform convolution calculation on the first calculation data 20 to obtain and store the second calculation data 30.
[0110] For example, the processor 100 may perform convolution calculation based on the input data 10 (I1, I2, and I3) and the first kernel data, and obtain the first calculation data 20 (a1); and perform convolution based on the first calculation data 20 (a1, a2, and a3) and the second kernel data, and obtain the second calculation data 30 (b1). Here, the memory 110 may store I1, I2, I3, a1, a2, a3, and b1.
[0111] The input data 10, the first calculation data 20, and the second calculation data 30 may be stored in the memory 110. For example, if the storage space of the memory 110 is represented as rows, the first calculation data 20 (a5) may be obtained and stored by performing convolution calculation on the input data 10 (I4, I5, and I6) stored in the first to third rows; and the second calculation data 30 (b4) may be obtained and stored by performing convolution calculation on the first calculation data 20 (a3, a4, and a5) stored in the fourth to sixth rows. Figure 6As shown, the memory 110 can store input data 10 (I4, I5 and I6), first calculation data 20 (a3, a4 and a5), and second calculation data 30 (b2, b3 and b4). Here, a row may refer to a data processing unit formed when the processor 100 stores the first storage data on the memory 110 based on the logical address.
[0112] Meanwhile, assume a case where the processor 100 performs convolution calculation on first calculation data and obtains second calculation data, and then stores new data input from the buffer in the memory 110 .
[0113] Reference Figure 6 , when input data or calculation data is stored in each of the first to ninth rows of the memory 110 , data newly input from the buffer may be stored in one of the first to ninth rows.
[0114] like Figure 6 and Figure 7 As shown, when the next line of input data 10I7 is received, after the processor 100 performs convolution calculation on the first calculation data 20 (a3, a4 and a5), the processor 100 can store the newly input data 10 (I7) from the buffer at the position where the first stored data a3 is stored in the first calculation data 20 stored in the memory 110.
[0115] According to an embodiment, when the first calculation data 20 is obtained by performing convolution calculation on three rows of input data 10 (I5, I6 and I7) including new input data 10 (I7) after convolution is performed on the second calculation data 30 (b2, b3 and b4), the processor 100 may store the first calculation data 20a6 at the position where the first stored data b2 is stored in the second calculation data 30 (b2, b3 and b4).
[0116] Reference Figure 7, although the number of second calculation data 30 stored is N-1, i.e., two rows, when the processor 100 according to the embodiment performs convolution calculation on the first calculation data 20 (a3, a4, and a5) and obtains the second calculation data 30 (b5) 30-1, the processor 100 may store the second calculation data 30 (b5) 30-1 in the first row. The input data 10 (I4) stored in the first row may be replaced by the second calculation data 30 (b5) 30-1. Specifically, the processor 100 may perform convolution calculation on rows I5, I6, and I7 formed by the input data 10, and obtain the first calculation data 20 (a6). Then, the processor 100 may perform convolution calculation on the first calculation data 20 (a4, a5, and a6), and obtain the second calculation data 30 (b5) 30-1. Here, when the memory 110 is divided in units of rows, the second calculation data 30 (b5) 30-1 may not be stored in the next row of the second calculation data 30b4. Therefore, when the memory 100 is divided in row units, the processor 100 may store the second calculation data 30(b5)30-1 in the first row. For example, the row I4 formed by the input data stored in the first row may be replaced with the second calculation data 30(b5)30-1. Then, the new data input from the buffer is stored at the position (a4) of the first calculation data 20, and a row I8 may be formed.
[0117] According to an embodiment, when row I8 is formed as data newly input from the buffer is stored in the memory 110, the processor 100 may store the input data 10I8 at the location where the first stored data a4 is stored in the first calculation data 20 (a4, a5, and a6) stored in the memory 110.
[0118] The processor 100 can obtain the first calculation data 20 (a7) by performing convolution calculation on the input data 10 (I6, I7, and I8), and store the first calculation data 10 (a7) at the position where the first stored data b3 is stored in the second calculation data 20 (b3, b4, and b5). When the data newly input from the buffer forms a row, the processor 100 can obtain the first calculation data 20 based on the input data including the row and the first kernel data, and sequentially obtain the second calculation data 30 from the first calculation data 20.
[0119] According to an embodiment, the input data 10, the first calculation data 20, ..., the M-1th calculation data may be stored in the memory 110 having a cyclic structure. For example, the memory 110 may be implemented as a cyclic memory.
[0120] According to an embodiment, when the M-3th calculation data is stored as many rows as the number of rows corresponding to the M-2th kernel data, the controller 130 may store the M-2th calculation data received from the convolution calculation unit 120 at the location where the first stored data is stored in the M-1th calculation data stored in the memory 110; when the M-2th calculation data is stored as many rows as the number of rows corresponding to the M-1th kernel data, the controller 130 may store the M-1th calculation data received from the convolution calculation unit 120 at the location where the first stored data is stored in the input data stored in the memory 110.
[0121] Figure 8 is a view provided for describing a memory according to another embodiment.
[0122] Reference Figure 8 , when the second kernel data is a matrix in a 3×3 format, the processor 100 may perform convolution calculation based on the first calculation data 20 (a3, a4, a5) and the second kernel data when the stored first calculation data 20 reaches three rows, and obtain the second calculation data 30 (b4). Then, when the third kernel data is a matrix in a 3×3 format, the processor 100 may perform convolution calculation based on the second calculation data 30 (b2, b3, and b4) and the third kernel data, and obtain the third calculation data 40 (c3).
[0123] According to an embodiment, the controller 130 may perform convolution calculation on the input data to obtain the first calculation data to the third calculation data, and finally obtain the fourth calculation data. Here, the fourth calculation data is output data (or output layer) and can be output to the buffer. For example, the processor 100 may obtain the fourth calculation data based on the third calculation data 40 (c1, c2 and c3) and the fourth kernel data, and output the fourth calculation data O1 to the buffer.
[0124] Reference Figure 8 In (b), when the data newly input from the buffer is stored in the memory 110 to form a row I7, the processor 100 can obtain the first calculation data 20 (a6) based on the input data 10 (I5, I6 and I7) and the first kernel data. According to one embodiment, the processor 100 can overwrite the data b2 in the second calculation data 20 (b2, b3 and b4) stored in the memory 110 with the first calculation data 20a6. Moreover, the newly obtained M-1th calculation data according to the embodiment can be stored in the first stored data in the input data stored in the memory 110. Figure 8 As shown in (b) in FIG. 1 , the newly obtained third calculation data 40 - 1 ( c4 ) may be stored at the location where the input data 10 ( I4 ) is stored.
[0125] The memory 110 according to the embodiment may store as many rows of data as the number of rows of the first kernel data to the M-th kernel data. According to one embodiment, the newly input data from the buffer may be stored in the first stored data among the first calculation data stored in the memory 110, and the newly obtained M-2-th calculation data may be stored in the first stored data among the M-1-th calculation data. That is, the memory 110 as a cyclic memory may have the input data and the first calculation data to the M-1-th calculation data stored cyclically, such as Figure 8 shown.
[0126] According to one embodiment, although the size of the memory 110 provided in the processor 100 is limited, multiple hidden layers and calculation data obtained when performing image processing through DNN can be stored in the internal memory 110 instead of the external memory. The processor 100 can perform image processing with the external memory without limiting the bandwidth, etc. For high-definition images (such as 4K) and high-performance images (60FPS), the processor 100 according to the embodiment can execute the DNN using only the internal memory 110.
[0127] Fig. 9 is a flowchart describing a control method according to an embodiment.
[0128] According to an embodiment, a control method of a processor including a memory and a convolution calculation unit: in step S910, when data input from a buffer as many rows as the number of rows corresponding to the first kernel data is stored, the stored input data can be provided to the convolution calculation unit. Then, in step S920, when first calculation data is received from the convolution calculation unit, the received first calculation data can be stored in the memory. In step S930, when the first calculation data as many rows as the number of rows corresponding to the second kernel data is stored, the stored first calculation data can be provided to the convolution calculation unit.
[0129] After the first calculation data is provided to the convolution calculation unit, in step S940, the data input from the buffer may be stored at a location where the first stored data is stored in the first calculation data stored in the memory.
[0130] According to the control method of the embodiment, the steps include: providing first calculation data to a convolution calculation unit, storing the received second calculation data in a memory based on receiving second calculation data from the convolution calculation unit; providing the stored second calculation data to the convolution calculation unit based on the same number of rows corresponding to the third kernel data being stored; after providing the first calculation data to the convolution calculation unit, based on the input data input from the buffer and stored in the memory reaching a row, providing data including the row and the same number of rows corresponding to the first kernel data to the convolution calculation unit; and storing the received first calculation data at the position where the first stored data is stored in the second calculation data based on receiving the first calculation data.
[0131] Here, the memory can store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
[0132] Here, the control method according to the embodiment may include the following steps: providing the M-1th calculation data to the convolution calculation unit; after providing the M-1th calculation data to the convolution calculation unit, receiving the M-2th calculation data based on the data input from the buffer, and storing the received M-2th calculation data at the position where the first stored data is stored in the M-1th calculation data; and after providing the M-2th calculation data including the M-2th calculation data and as many rows as the number of rows of the M-1th kernel data, when the M-1th calculation data is received, storing the received M-1th calculation data at the position where the first stored data is stored in the input data.
[0133] In addition, the control method according to the embodiment may include: storing the M-1th calculation data based on as many rows corresponding to the number of rows of the Mth kernel data, providing the M-1th calculation data to the convolution calculation unit, and outputting the Mth calculation data received from the convolution calculation unit to the output buffer.
[0134] In addition, when the same number of rows as the M-3 calculation data corresponding to the number of rows of the M-2 kernel data are stored, the M-2 calculation data received from the convolution calculation unit is stored at the position of the data first stored in the M-1 calculation data stored in the memory; when the same number of rows as the M-2 calculation data corresponding to the number of rows of the M-1 kernel data are stored, the M-1 calculation data received from the convolution calculation unit is stored at the position of the data first stored in the input data stored in the memory.
[0135] According to an embodiment, the memory may be a circular memory.
[0136] In addition, in the control method according to the embodiment, the data input from the buffer may include a logical address, and the step S910 of providing the input data to the convolution calculation unit may include storing the input data in the memory based on the logical address.
[0137] At the same time, the various embodiments described above can be implemented in a recording medium readable by a computer or a similar device using software, hardware or a combination thereof. In some cases, the embodiments described herein can be implemented by the processor itself. Regarding the implementation of software, embodiments such as the processes and functions described herein can be implemented with separate software modules. Each of the software modules can perform one or more of the functions and operations described herein.
[0138] Meanwhile, the computer instructions for executing the processing operations according to the above-mentioned various embodiments may be stored in a non-transitory computer-readable medium. When the computer instructions stored in such a non-transitory computer-readable medium are executed by a processor, the computer instructions may cause a specific machine to execute the processing operations according to the above-mentioned embodiments.
[0139] A non-transitory computer-readable medium refers to a medium that stores data semi-permanently rather than for a short period of time, such as a register, a cache, a memory, etc., and can be read by a device. Specifically, specific examples of non-transitory computer-readable media include a compact disc (CD), a digital versatile disc (DVD), a hard disk, a Blu-ray disc, a universal serial bus (USB), a memory card, a read-only memory (ROM), etc.
[0140] While the present disclosure has been particularly shown and described with reference to embodiments thereof, it will be understood that the present disclosure is not limited to the disclosed embodiments, but rather it will be understood that various modifications may be made by those skilled in the art without departing from the spirit and scope of the present disclosure.
Claims
1. Processor, include: Memory; Convolution computing unit; as well as Controller, configured as: Based on data input from the buffer, as many rows as the number of rows corresponding to the first kernel data are stored in the memory, the stored input data is provided to the convolution calculation unit, storing the received first calculation data in the memory based on the first calculation data being output by the convolution calculation unit, and Based on the first calculation data as many as the number of rows corresponding to the second kernel data being stored in the memory, providing the stored first calculation data to the convolution calculation unit, Wherein, the convolution calculation unit is configured as: The first calculation data is obtained by performing a convolution calculation based on the input data and the first kernel data, and obtaining second calculation data by performing convolution calculation based on the first calculation data and the second kernel data, and Wherein, the controller is further configured as: After the first calculation data is provided to the convolution calculation unit, the data input from the buffer is stored at a position where the first stored data is stored among the first calculation data stored in the memory.
2. The processor according to claim 1, in, The controller is also configured to: providing the first calculation data to the convolution calculation unit, based on receiving the second calculation data from the convolution calculation unit, storing the received second calculation data in the memory, and based on as many second calculation data as the number of rows corresponding to the third kernel data being stored, providing the stored second calculation data to the convolution calculation unit; After providing the first calculation data to the convolution calculation unit, based on one row of data input from the buffer being stored in the memory, providing as many data including corresponding rows as the number of rows corresponding to the first kernel data to the convolution calculation unit; as well as Based on the first calculation data being received, the received first calculation data is stored at a location in the second calculation data where the first stored data is stored.
3. The processor according to claim 2, in, The memory can store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
4. The processor according to claim 3, in, The controller is also configured to: Providing the M-1th calculation data to the convolution calculation unit; After providing the M-1th calculation data to the convolution calculation unit, upon receiving the M-2th calculation data based on the data input from the buffer, storing the received M-2th calculation data at a position where the first stored data is stored in the M-1th calculation data; and After providing the M-2th calculation data including the M-2th calculation data and as many rows as the number of rows corresponding to the M-1th kernel data to the convolution calculation unit, based on the M-1th calculation data being received, the received M-1th calculation data is stored at the position where the data first stored is stored in the input data.
5. The processor according to claim 4, in, The controller is also configured to: Based on M-1th calculation data as many as the number of rows corresponding to the Mth kernel data rows being stored, the M-1th calculation data is provided to the convolution calculation unit, and the Mth calculation data received from the convolution calculation unit is output.
6. The processor according to claim 3, in, The controller is also configured to: When the M-3th calculation data as many as the number of rows corresponding to the M-2th kernel data rows are stored, storing the M-2th calculation data received from the convolution calculation unit at the position where the first stored data is stored in the M-1th calculation data stored in the memory; as well as When M-2th calculation data as many as the number of rows corresponding to the M-1th kernel data row number are stored, the M-1th calculation data received from the convolution calculation unit is stored at a position where the first stored data is stored in the input data stored in the memory.
7. The processor according to claim 6, in, The memory is a cyclic memory.
8. The processor according to claim 1, in, The data input from the buffer includes a logical address, and The controller stores the input data in the memory based on the logical address.
9. Electronic devices, include: a buffer configured to group input data in units of lines and assign logical addresses; as well as A processor, comprising a memory and a convolution calculation unit, wherein the processor is configured as follows: storing data input from the buffer based on the logical address; providing the stored input data to the convolution calculation unit based on the data being stored as many rows as the number of rows corresponding to the first kernel data; storing the received first calculation data in the memory based on the first calculation data being output by the convolution calculation unit; Based on as many first calculation data as rows corresponding to the second kernel data being stored in the memory, providing the stored first calculation data to the convolution calculation unit; and After the first calculation data is provided to the convolution calculation unit, the data input from the buffer is stored at a position where the first stored data is stored among the first calculation data stored in the memory.
10. The electronic device according to claim 9, in, The convolution calculation unit is configured as follows: Obtaining the first calculation data by performing a convolution calculation based on the input data and the first kernel data; and By performing convolution calculation based on the first calculation data and the second kernel data, second calculation data is obtained.
11. A control method for a processor including a memory and a convolution calculation unit, the method include: Based on data input from a buffer as many as the number of rows corresponding to the first kernel data rows being stored in the memory, the stored input data is provided to the convolution calculation unit; Obtaining first calculation data by performing a convolution calculation based on the input data and the first kernel data; storing the received first calculation data in the memory based on the first calculation data being output by the convolution calculation unit; Based on the first calculation data as many as the number of rows corresponding to the second kernel data being stored in the memory, providing the stored first calculation data to the convolution calculation unit; Obtaining second calculation data by performing convolution calculation based on the first calculation data and the second kernel data; as well as After the first calculation data is provided to the convolution calculation unit, the data input from the buffer is stored at a position where the first stored data is stored among the first calculation data stored in the memory.
12. The method according to claim 11, further comprising: include: providing the first calculation data to the convolution calculation unit, and storing the received second calculation data in the memory based on the second calculation data received from the convolution calculation unit; Based on the second calculation data being stored as many as the number of rows corresponding to the third kernel data, providing the stored second calculation data to the convolution calculation unit; After providing the first calculation data to the convolution calculation unit, based on one row of data input from the buffer being stored in the memory, providing as many rows of data including corresponding rows as the number of rows corresponding to the first kernel data to the convolution calculation unit; as well as Based on the first calculation data being received, the received first calculation data is stored at a location in the second calculation data where the first stored data is stored.
13. The method according to claim 12, in, The memory can store at least as many rows of data as the number of rows corresponding to the first kernel data to the Mth kernel data.
14. The method of claim 13, further comprising: include: Providing the M-1th calculation data to the convolution calculation unit; After providing the M-1th calculation data to the convolution calculation unit, upon receiving the M-2th calculation data based on the data input from the buffer, storing the received M-2th calculation data at a position where the first stored data is stored in the M-1th calculation data; and After providing the M-2th calculation data, which is as many as the number of rows corresponding to the M-1th kernel data and includes the M-2th calculation data, to the convolution calculation unit, based on the M-1th calculation data being received, the received M-1th calculation data is stored at the position where the data was first stored in the input data.
15. The method according to claim 14, further comprising: include: Based on M-1th calculation data as many as the number of rows corresponding to the Mth kernel data rows being stored, the M-1th calculation data is provided to the convolution calculation unit, and the Mth calculation data received from the convolution calculation unit is output.
