Convolutional neural network system
The convolutional neural network system addresses memory and flexibility issues by using external memory and a global buffer with an accelerator for flexible data transmission, enhancing computational speed and adaptability.
Patent Information
- Application Number
- PCT/KR2023/005589
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2023-04-25
- Publication Date
- 2024-09-12
AI Technical Summary
Convolutional neural networks require large amounts of memory for coefficient storage, leading to reduced calculation speed and inflexibility in network modifications due to fixed chip design and memory allocation.
A convolutional neural network system utilizing external memory for image and parameter data, with a global buffer for selective data storage and an accelerator with processing elements and switches for flexible data transmission, minimizing internal memory usage and enabling adaptable operation.
This approach reduces internal memory requirements, enhances computational speed, and allows for flexible network configurations and responsive parameter adjustments, improving the efficiency and adaptability of neural network operations.
Smart Images

Figure KR2023005589_12092024_PF_FP_ABST
Abstract
Description
Convolutional Neural Network System
[0001] The technical idea of the present disclosure relates to a convolutional neural network system.
[0002] Convolutional neural networks (CNNs) are a type of deep learning model primarily used for computer vision tasks such as image classification, object detection, and pattern recognition. Convolutional neural networks consist of convolutional layers, pooling layers, and fully connected layers, each of which processes input data and generates output data.
[0003] Convolutional neural networks generate feature maps by convolutionally convolving input data with filters, and can extract various features using multiple filters. Using these feature maps, convolutional neural networks perform tasks such as image classification and object detection.
[0004] Convolutional neural network operations require numerous coefficients. These coefficients are parameter values of the trained model, representing the weights and biases of the filters used by the convolutional neural network model to process and classify input data. These coefficient values can be optimized and determined during the model's training process.
[0005] However, the number of coefficients required for the operation of the convolutional neural network is very large, and the size of the data stored in the chip's internal memory, such as input data such as images, coefficients, and result values according to the operation, is too large. In particular, when the chip size is limited, if the capacity of the internal memory for data storage increases, the number of calculation units inevitably decreases, which has the problem of reduced calculation speed.
[0006] In addition, convolutional neural networks have various network models depending on the desired purpose, but after the chip design corresponding to the network for the given purpose, modification of the network is impossible, and although there are various computational methods depending on the memory where each data and parameter is stored, once this is determined at the chip design stage, there was a limitation in that flexible modification was not possible thereafter.
[0007] The technical idea of the present disclosure is to solve the above problem, and the purpose is to provide a convolutional neural network system capable of performing neural network operations with a flexible structure while minimizing internal memory usage.
[0008] The technical tasks to be achieved by the convolutional neural network system according to the technical idea of the present disclosure are not limited to the tasks mentioned above, and other tasks not mentioned will be clearly understood by those skilled in the art from the description below.
[0009] According to one aspect of the technical idea of the present disclosure, a convolutional neural network system may include: an external memory that stores image data and parameter data required for calculation; a global buffer that stores some data selectively received from among the image data and parameter data stored in the external memory and a result value of the calculation; an accelerator including a plurality of processing elements that perform a neural network calculation based on the image data and parameter data received from the global buffer; a scatter that transmits image data and parameter data from the global buffer to at least one target processing element among the processing elements; a gather that transmits a result value of at least one of the processing elements to the global buffer; and a global controller that controls data transmission and reception between the scatter and the gather.
[0010] According to an exemplary embodiment, the global controller can control data transmission and reception between the scatter and the gather by transmitting a control signal including information regarding at least one of a processing element ID, a memory ID of the global buffer, and a target address to the scatter and the gather.
[0011] According to an exemplary embodiment, the accelerator controller may further be included to control the operation of the accelerator and data transmission and reception within the accelerator.
[0012] According to an exemplary embodiment, each of the processing elements includes a plurality of MAC operators that perform convolution operations, and each of the MAC operators may be provided with a switch that transmits the operation result of one MAC operator to another MAC operator under the control of the accelerator controller.
[0013] According to an exemplary embodiment, each of the switches is interconnected with switches of a plurality of adjacent MAC operators, so that data can be selectively transmitted in a plurality of directions under the control of the accelerator controller.
[0014] According to an exemplary embodiment, the accelerator may further include a crossbar connected to each of the processing elements to transmit data received through the scatter to the processing element or to transmit data of the processing element to the gather.
[0015] According to an exemplary embodiment, the global buffer, the accelerator, the scatter, the gather, and the accelerator controller may further include a register bank that stores a setting value of at least one of the global buffer, the accelerator, the scatter, the gather, and the accelerator controller and transmits the setting value to the global controller.
[0016] According to embodiments of the technical idea of the present disclosure, the operation speed of a convolutional neural network can be improved by using external memory as the main memory and reducing the internal memory size by using a minimum of common global buffers within the chip, thereby enabling the use of more calculation units.
[0017] According to embodiments of the technical idea of the present disclosure, since selective access to all processing elements in a global buffer is possible through the use of scatter and gather, flexible use is possible depending on the type of network.
[0018] According to embodiments of the technical idea of the present disclosure, flexible data transmission is enabled through a switch provided for each accelerator dedicated controller and MAC operator, thereby providing various operation methods.
[0019] According to embodiments of the technical idea of the present disclosure, by applying an optional restoration module in preparation for cases where data size is reduced using compressed parameters, flexible response to parameters that change according to a learning method is possible.
[0020] The effects that can be obtained by the convolutional neural network system according to the technical idea of the present disclosure are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.
[0021] To more fully understand the drawings cited in this disclosure, a brief description of each drawing is provided.
[0022] FIG. 1 is a block diagram illustrating the configuration of a convolutional neural network system according to an embodiment of the present disclosure.
[0023] FIG. 2 is a block diagram illustrating the configuration of an accelerator according to an embodiment of the present disclosure.
[0024] FIG. 3 is a block diagram illustrating the configuration of a processing element according to an embodiment of the present disclosure.
[0025] FIG. 4 is a drawing for exemplarily explaining the operation of a scatterer according to an embodiment of the present disclosure.
[0026] FIG. 5 is a diagram for exemplarily explaining data transmission and reception operations between MAC operators according to an embodiment of the present disclosure.
[0027] FIG. 6 is a flowchart for explaining the operation of a convolutional neural network system according to an embodiment of the present disclosure.
[0028] The technical concept of this disclosure is susceptible to various modifications and various embodiments. Specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the technical concept of this disclosure to specific embodiments, and it should be understood that all modifications, equivalents, and alternatives fall within the scope of the technical concept of this disclosure.
[0029] When explaining the technical concepts of the present disclosure, detailed descriptions of related known technologies will be omitted if they are deemed to unnecessarily obscure the gist of the present disclosure. Furthermore, numbers (e.g., "first," "second," etc.) used in the description of the present disclosure are merely identifiers used to distinguish one component from another.
[0030] Additionally, in the present disclosure, when a component is referred to as being “connected” or “connected” to another component, it should be understood that the component may be directly connected or connected to the other component, but may also be connected or connected via another component in between, unless there is a specific description to the contrary.
[0031] In addition, terms such as “~part,” “~device,” “~sub-subject,” and “~module” described in the present disclosure mean a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software, such as a processor, a microprocessor, a microcontroller, a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processor unit (APU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), and a field programmable gate array (FPGA).
[0032] And it is to be clarified that the division of components in this disclosure is merely a division based on the main function each component is responsible for. That is, two or more components described below may be combined into a single component, or a single component may be further divided into two or more components with more detailed functions. In addition to its own main function, each component described below may additionally perform some or all of the functions performed by other components, and of course, some of the main functions of each component may be exclusively performed by other components.
[0033]
[0034] Throughout this specification, the term "convolution" refers to an operation for detecting correlations between two functions. Furthermore, a convolutional neural network (CNN) may collectively refer to a process or system that determines patterns in an image or extracts features of an image by repeatedly performing convolution operations between a filter (or kernel) indicating input data or a specific feature and specific parameters (e.g., weights, biases, etc.).
[0035] The values provided to a CNN system for a specific computational operation, or generated or output as a result of a specific computation, may be referred to as data. Data may refer to an image input to a CNN system, a feature map generated from a specific layer within the CNN system, or specific values.
[0036] In the following detailed description, functions, configurations, circuits, systems, or operations well known to those skilled in the art are omitted to clearly describe embodiments of the present disclosure and avoid ambiguity of the embodiments.
[0037] In addition, the functional blocks used in the detailed description or drawings may be implemented in the embodiments of the present invention by software, hardware, or a combination thereof, and the software may be machine code, firmware, embedded code, and application software, and the hardware may be a circuit, a processor, a computer, an integrated circuit, integrated circuit cores, a pressure sensor, an inertial sensor, a MEMS (microelectromechanical system), passive components, or a combination thereof.
[0038]
[0039] FIG. 1 is a block diagram illustrating a configuration of a convolutional neural network system according to an embodiment of the present disclosure, FIG. 2 is a block diagram illustrating a configuration of an accelerator according to an embodiment of the present disclosure, and FIG. 3 is a block diagram illustrating a configuration of a processing element according to an embodiment of the present disclosure.
[0040] Referring to FIGS. 2 and 3, the convolutional neural network system may include an external memory (100), a register bank (200), a global controller (300), an accelerator controller (400), a global buffer (500), a scatter (600), a gather (700), an accelerator (800), and a serial interface (900). In an embodiment, the register bank (200), the global controller (300), the accelerator controller (400), the global buffer (500), the scatter (600), the gather (700), and the accelerator (800) may be implemented in the form of a single system board or chip.
[0041] The external memory (100) can store image data and parameter data required for neural network operations. Here, the parameter data can include data on weights, biases, etc. of filters for the convolutional network model to process and classify input data. The external memory (100) can include, for example, at least one of an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), an SSD (Solid State Drive), an HDD (Hard Disk Drive), and a flash memory device, but is not limited thereto.
[0042] In the present disclosure, an external memory (100) is used as a main memory to store large amounts of data, and by selectively accessing the external memory (100) through a global controller (300), the internal memory size for data storage can be reduced, enabling the use of more computing devices.
[0043] The register bank (200) is composed of multiple registers, stores initial setting values for other components of the system, and can transmit the values to the global controller (300). These setting values may include setting values for operations such as operation scheduling and memory access management. When the network model is changed or the address of an external memory is changed, the setting values can be flexibly set through the register bank (200) to respond thereto. The setting values can be set through an external serial interface (900).
[0044] The global controller (300) can control the operation of the entire system based on the setting values through the register bank (200). In particular, the global controller (300) can control the overall data transmission and reception, such as transmitting necessary data from the global buffer (500) to the accelerator (800) through the scatter (600) and the gather (700) and writing the data (intermediate values or result values) for which calculations have been completed to the global buffer (500).
[0045] In addition, the global controller (300) can perform control over the accelerator controller (400). In the present disclosure, the global controller (300) controls the accelerator controller (400), but is configured so that the global controller (300) performs data transmission and reception separately from the operation process of the accelerator controller (400), thereby reducing the bottleneck between data transmission and reception and operation.
[0046] Specifically, the global controller (300) can issue an operation command to the accelerator controller (400), and then, while the operation is in progress, store data required for the next operation from the external memory (100) to the global buffer (500), and store the results of the previous operation in the global buffer (500) or the external memory (100). Through this structure, it is possible to prevent the operation from stopping due to movement of data in the middle.
[0047] The accelerator controller (400) can control the operations required in each layer of the accelerator (800) and the transmission and reception of data between the operators within the accelerator (800). For example, the accelerator controller (400) can control the operation of the switch (8312) provided in each MAC operator (8311) so as to transmit the operation result of one MAC operator (8311) to another MAC operator (8311).
[0048] The global buffer (500) is an internal memory space implemented to enable reading and writing at high speed, and can store various data such as image data and parameter data stored in the external memory (100), data selectively received from among the image data and parameter data, intermediate values of operations (i.e., output values generated from the intermediate layer), and / or result values, under the control of the global controller (300). The intermediate values of the operations stored in the global buffer (500) can be transmitted as input values of the next layer.
[0049] The scatter (600) and the gather (700) can perform data transmission and reception between the global buffer (500) and the accelerator (800) under the control of the global controller (300). At this time, the global controller (300) can control the data transmission and reception by transmitting a control signal including information about at least one of a processing element ID, a memory ID of the global buffer (500), and a target address to the scatter (600) and the gather (700). In an embodiment, the selection IDs for the memory and the processing element (831) can be implemented to be changeable through external settings.
[0050] The scatter (600) can be responsible for transmitting data from the global buffer (500). Specifically, the scatter (600) can transmit image data and parameter data from the global buffer (500) to at least one target processing element among the processing elements (831) of the accelerator (800). For example, the scatter (600) can receive a control signal including information such as the memory ID (type) of the global buffer (500), the ID of the processing element (831), and a target address from the global controller (300), and transmit data from the global buffer (500) to the target processing element. At this time, the scatter (600) can be implemented to simultaneously transmit the same data to different processing elements (831), or to transmit different data respectively.
[0051] The gather (700) may be responsible for receiving data transmitted from the accelerator (800) to the global buffer (500). Specifically, the gather (700) may transmit an intermediate value and / or a result value of at least one of the processing elements (831) of the accelerator (800) to the global buffer (500) for storage. For example, the gather (700) may receive a control signal including an ID of the processing element (831) to which data is transmitted, a memory ID of the global buffer (500), a target address, etc. from the global controller (300), and transmit (or store) data such as an intermediate value and / or a result value of an operation output from the processing element (831) to an appropriate global buffer (500).
[0052] The accelerator (800) is controlled by the global controller (300) and the accelerator controller (400) and can perform calculations using image data and parameter data received from the scatter (600). In addition, the results of the calculation (intermediate values and / or result values, etc.) can be transferred to the gather (700) so that the corresponding data can be stored in the global buffer (500).
[0053] In an embodiment, the accelerator (800) may include a restorer (810), a crossbar (820), a processing element cluster (830), an FC operator (840), an ACT operator (850), and an address generator (860), as illustrated in FIG. 2.
[0054] The restorer (810) can check whether the received data is compressed. If it is compressed, it can be restored and used. If it is not compressed, the input value can be transmitted as is to the processing element (831) and / or the operator via the crossbar (820).
[0055] The crossbar (820) is configured in a manner in which inputs and outputs are crossed and is connected to all processing elements (831), and data transmission and reception for the processing element cluster (830), FC operator (840), and ACT operator (850) can be performed through the crossbar (820). For example, the crossbar (820) can transmit data received through the scatter (600) to the processing element (831), or transmit data of the processing element (831) to the gather (700). This crossbar (820) enables flexible data transmission for parallel processing as needed.
[0056] A processing element cluster (830) may refer to a cluster formed by grouping multiple processing elements (831). A specific processing element (831) within the processing element cluster (830) may be operated through the control of a global controller (300) and / or an accelerator controller (400). Since a plurality of processing elements (831) constituting the processing element cluster (830) operate in parallel, model calculations can be performed more quickly.
[0057] The processing element (831) is a component that performs operations in the accelerator (800), and in particular, can perform convolution operations of a convolutional neural network.
[0058] The processing element (831) may include a plurality of MAC (multiply accumulate) operators (8311) that perform convolution operations on image pixels, as illustrated in FIG. 3. In this way, since a large number of MAC operators (8311) operate simultaneously, a large amount of operations can be performed at once.
[0059] In an embodiment, each MAC operator (8311) may be provided with a switch (8312) for data transmission between MAC operators (8311). Specifically, the switch (8312) receives data from the processing element cluster (830) and sends it to the MAC operator (8311), and may be configured so that all adjacent switches (8312) are connected to each other. The multiple switches (8312) operate in a manner of opening a path to a desired destination, and, under the control of the accelerator controller (400), the computation result of one MAC operator (8311) may be transmitted to the switch (8312) of an adjacent or desired MAC operator (8311).
[0060] The FC (fully-connected) operator (840) can perform operations on a fully-connected layer of a convolutional neural network in the accelerator (800).
[0061] The ACT (activation) operator (850) can perform an activation operation of a convolutional neural network in the accelerator (800). For this purpose, various activation functions such as the ReLU function can be applied.
[0062] The address generator (860) can transmit the operation result by adding the ID of the processing element (831) to the memory ID of the global buffer (500) received from the global controller (300).
[0063] The serial interface (900) can transmit setting values required for components of a convolutional neural network system via serial communication. These setting values are stored in the register bank (200) and can be transmitted to other configurations via the global controller (300). The setting values can be set externally via a computing device or other device and can be freely changed within the interface serial communication.
[0064] However, the configuration of this system is exemplary, and some configurations may be modified or added depending on the embodiment.
[0065]
[0066] FIG. 4 is a drawing for exemplarily explaining the operation of a scatterer according to an embodiment of the present disclosure.
[0067] Referring to FIG. 4, the scatter (600) can transfer data of a specific internal memory to a desired processing element (831) according to a control signal of the controller. Here, the controller may be the global controller (300) described above with reference to FIGS. 1 to 3, and the internal memory may refer to a memory area of the global buffer (500).
[0068] The controller can transmit at least one control signal to the scatter (600). The control signal can include information regarding read / write distinction, an ID for identifying the internal memory, an ID for identifying the processing element (831), and a target memory address. Based on these control signals, the scatter (600) can selectively transmit data required for the target processing element (831) from the selected internal memory.
[0069] In this manner, the scatter (600) can be implemented to simultaneously transmit the same data to different processing elements (831), or to transmit different data to each.
[0070]
[0071] FIG. 5 is a diagram for exemplarily explaining data transmission and reception operations between MAC operators according to an embodiment of the present disclosure.
[0072] Referring to FIG. 5, the switch (8312) of the MAC operator (8311) is interconnected with the switches (8312) of a plurality of adjacent MAC operators (8311), so that data transmission can be selectively performed in a plurality of directions under the control of the accelerator controller (400).
[0073] For example, a switch (8312) can transmit the operation result of one MAC operator (8311) to the switch (8312) of an adjacent or desired MAC operator (8311) in multiple directions by forming a data movement path in the horizontal, vertical and / or diagonal directions between adjacent switches (8312).
[0074]
[0075] FIG. 6 is a flowchart for explaining the operation of a convolutional neural network system according to an embodiment of the present disclosure.
[0076] At step S610, setting values for each component can be stored in the register bank (200). In an embodiment, the setting values may include setting values for tasks such as operation scheduling and memory access management. The setting values can be set externally using a computing device or other device, and can be freely changed via the serial interface (900) when the network model is changed or the address of the external memory is changed.
[0077] In steps S620 and S630, the global controller (300) and the accelerator controller (400) can transmit the setting values to other components.
[0078] At step S640, under the control of the global controller (300), at least some of the image data and parameter data stored in the external memory (100) may be selectively stored in the global buffer (500).
[0079] At step S650, the image data and parameter data stored in the global buffer (500) can be transmitted to the processing element (831) required by the operation of the scatter (600). At this time, the operation of the scatter (600) can be controlled by a control signal of the global controller (300), as described above with reference to FIG. 4.
[0080] At step S660, the accelerator (800) can perform calculations based on data received through the scatterer (600). Since multiple processing elements (831) operate in parallel within the accelerator (800), calculations can be performed more quickly. At this time, as described above, multiple MAC operators (8311) within the processing element (831) can perform calculations while transmitting and receiving data to and from each other via a switch (8312).
[0081] At step S670, the intermediate and / or result values of the computation of the processing element (831) can be transmitted to the global buffer (500) via the gather (700). In this manner, the data stored in the global buffer (500) can be retransmitted to the accelerator (800) via the scatter (600) as input values for computations of other layers, etc.
[0082] At step S680, the global controller (300) can determine whether the operation has ended. If necessary, the operation of only the convolutional neural network can be repeated until the final result is obtained.
[0083] However, this operation method (500) is exemplary, and some steps may be modified or added depending on the embodiment.
[0084]
[0085] The method according to the embodiment of the present disclosure may be implemented in the form of program commands that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program commands, data files, data structures, etc., alone or in combination. The program commands recorded on the medium may be those specially designed and configured for the present disclosure or may be those known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specially configured to store and execute program commands such as ROMs, RAMs, and flash memories. Examples of program commands include not only machine language codes generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc.
[0086] Additionally, the methods according to the disclosed embodiments may be provided as a computer program product. The computer program product may be traded as a product between a seller and a buyer.
[0087] A computer program product may include a software program and a computer-readable storage medium on which the software program is stored. For example, a computer program product may include a product in the form of a software program (e.g., a downloadable app) distributed electronically by an electronic device manufacturer or through an electronic marketplace (e.g., Google Play Store, App Store). For electronic distribution, at least a portion of the software program may be stored on a storage medium or temporarily created. In this case, the storage medium may be a storage medium of a manufacturer's server, an electronic marketplace server, or a relay server that temporarily stores the software program.
[0088] In a system comprising a server and a client device, the computer program product may include a storage medium of the server or a storage medium of the client device. Alternatively, if a third device (e.g., a smartphone) exists that communicates with the server or the client device, the computer program product may include a storage medium of the third device. Alternatively, the computer program product may include a software program itself that is transmitted from the server to the client device or the third device, or from the third device to the client device.
[0089] In this case, one of the server, the client device, and the third device may execute the computer program product to perform the method according to the disclosed embodiments. Alternatively, two or more of the server, the client device, and the third device may execute the computer program product to perform the method according to the disclosed embodiments in a distributed manner.
[0090] For example, a server (e.g., a cloud server or an artificial intelligence server, etc.) may execute a computer program product stored on the server, thereby controlling a client device in communication with the server to perform a method according to the disclosed embodiments.
[0091]
[0092] Although the embodiments have been described in detail above, the scope of the present disclosure is not limited thereto, and various modifications and improvements made by those skilled in the art using the basic concepts of the present disclosure defined in the following claims also fall within the scope of the present disclosure.
Claims
1. In the convolutional neural network system, External memory that stores image data and parameter data required for operations; A global buffer that stores some data selectively received from among the image data and parameter data stored in the external memory and the result values of the operation; An accelerator including a plurality of processing elements that perform neural network operations based on image data and parameter data received from the global buffer; A scatter that transfers image data and parameter data from the global buffer to at least one target processing element among the processing elements; A gather that transfers the operation result value of at least one of the above processing elements to the global buffer; and A system comprising a global controller that controls data transmission and reception of the scatter and the gather.
2. In paragraph 1, A system in which the global controller controls data transmission and reception between the scatter and the gather by transmitting a control signal including information regarding at least one of a processing element ID, a memory ID of the global buffer, and a target address to the scatter and the gather.
3. In paragraph 1, A system further comprising an accelerator controller that controls the operation of the accelerator and data transmission and reception within the accelerator.
4. In paragraph 3, Each of the above processing elements includes a plurality of MAC operators that perform convolution operations, A system in which each of the above MAC operators is provided with a switch that transmits the operation result of one MAC operator to another MAC operator under the control of the accelerator controller.
5. In paragraph 4, A system in which each of the above switches is interconnected with switches of a plurality of adjacent MAC operators, and data can be selectively transmitted in a plurality of directions under the control of the accelerator controller.
6. In paragraph 3, A system wherein the accelerator further includes a crossbar connected to each of the processing elements to transmit data received through the scatter to the processing element or to transmit data of the processing element to the gather.
7. In paragraph 3, A system further comprising a register bank that stores setting values of at least one of the global buffer, the accelerator, the scatter, the gather, and the accelerator controller and transmits the setting values to the global controller.
Citation Information
Patent Citations
Method and apparatus for instruction execution, electronic device, computer readable storage medium and computer program
KR1020220056838A
Heat transfer fin of fin-tube type heat exchanger
KR1020240061989A
KR20200069353A
KR20220097161A
KR20230000943A
