Method and apparatus for processing convolution operations of neural networks

By determining shared operands for parallelized operations in neural networks, the method optimizes convolution processing, improving efficiency and reducing hardware complexity in neural network devices.

JP7562265B2Active Publication Date: 2024-10-07SAMSUNG ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2020015497
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-04-02
Filing Date
2020-01-31
Publication Date
2024-10-07
Estimated Expiration
2040-01-31

AI Technical Summary

Technical Problem

Existing neural network technologies face inefficiencies in processing convolution operations, particularly in handling operations with different dimensional sizes and requiring complex hardware structures.

Method used

A neural network device that determines shared operands, such as pixel values or weight values, to be commonly used across parallelized operations, allowing for more effective parallelism and implementing zero skipping to optimize hardware structure and reduce calculation time.

Benefits of technology

This approach enhances the parallelism of convolution operations and reduces the computational load by sharing operands, leading to more efficient processing and simplified hardware design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007562265000001
    Figure 0007562265000001
  • Figure 0007562265000002
    Figure 0007562265000002
  • Figure 0007562265000003
    Figure 0007562265000003
Patent Text Reader

Abstract

To provide a method and an apparatus for processing a convolution operation in a neural network.SOLUTION: There is provided a method for: determining a shared operand to be commonly shared by processing units, as one of a pixel value of an input feature map and a weight value of a kernel; and performing parallelized operations based on the determined shared operand. Also provided is a neural network apparatus therefor.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method and apparatus for processing convolution operations in a neural network. [Background technology]

[0002] Neural network refers to a computational architecture that models the biological brain. Recently, with the development of neural network technology, neural network devices are used in various types of electronic systems to analyze input data and extract useful information.

[0003] A neural network device performs a large number of calculations on input data, and techniques for efficiently processing such neural network calculations are being researched. Summary of the Invention [Problem to be solved by the invention]

[0004] An object of the present invention is to provide a method and apparatus for processing convolution operations of a neural network.

[0005] The technical problems to be solved by the present embodiment are not limited to the above-mentioned technical problems, and further technical problems can be inferred from the following embodiments. [Means for solving the problem]

[0006] According to one aspect, a neural network device includes a memory in which at least one program is stored, and a processor that processes a convolution operation between an input feature map and a kernel by executing the at least one program, and the processor may include a controller that determines a shared operand shared in common to each of the parallelized operations as either a pixel value of the input feature map or a weight value of the kernel based on at least one of a feature of the input feature map and a feature of the kernel, and a processing unit that performs the parallelized operations based on the determined shared operand.

[0007] According to another aspect, a method for processing convolution operations of a neural network may include determining a shared operand shared in common among each of the parallelized operations as one of a pixel value of the input feature map and a weight value of the kernel based on at least one of a feature of an input feature map and a feature of a kernel, and performing the parallelized operations based on the determined shared operand.

[0008] According to yet another aspect, there is provided a computer readable recording medium having a program recorded thereon for implementing a method for processing a convolution operation of a neural network. Effect of the Invention

[0009] According to this embodiment, the shared operand shared in the parallelized operations for the convolution operation can be determined as either one of the pixel value of the input feature map and the weight value of the kernel, so that the parallelism of the convolution operation can be more effectively realized.

[0010] Furthermore, according to this embodiment, when performing a 3D convolution operation between an input feature map having a three-dimensional size and a kernel having a four-dimensional size, even if the dimensions of the input feature map and the kernel are different from each other, it is possible to realize a hardware structure capable of determining one of the pixel values ​​of the input feature map and the weight values ​​of the kernel as a shared operand and executing parallelized operations.

[0011] In addition, according to this embodiment, zero skipping is implemented through zero or no operation on shared operands of a processing unit or zero or no operation on all remaining operands of a processing unit, thereby enabling a simplified hardware structure for zero skipping to be implemented. [Brief description of the drawings]

[0012] [Figure 1] 1 is a diagram for explaining the architecture of a neural network according to an embodiment; [Figure 2A] 1 is a diagram for explaining an example of a convolution operation of a neural network; [Figure 2B] 1 is a diagram for explaining an example of a convolution operation of a neural network; [Diagram 3] FIG. 2 is a block diagram showing the hardware configuration of a neural network device according to an embodiment. [Figure 4] 1 is a diagram showing a specific embodiment of a controller and a processing unit. [Figure 5A] 1 illustrates an embodiment in which processing units perform parallelized operations based on shared operands. [Figure 5B] 1 illustrates an embodiment in which processing units perform parallelized operations based on shared operands. [Figure 6] 11 illustrates an example embodiment in which a controller determines shared operands based on the shape of an input feature map. [Figure 7] 13 illustrates an embodiment in which processing units perform parallelized operations based on pixel values ​​of an input feature map that are shared operands. [Figure 8] 13 illustrates an embodiment in which processing units perform parallelized operations based on pixel values ​​of an input feature map that are shared operands. [Figure 9] 13 is a diagram illustrating an embodiment in which processing units perform parallelized operations based on weight values ​​of kernels that are shared operands. [Figure 10] 13 is a diagram illustrating an embodiment in which processing units perform parallelized operations based on weight values ​​of kernels that are shared operands. [Figure 11] 11 illustrates an embodiment in which a processing unit performs zero skipping based on a shared operand that is zero. [Figure 12] 11 is a diagram illustrating another embodiment in which a processing unit performs zero skipping based on a shared operand that is zero. [Figure 13] 1 is a diagram illustrating an operation method of a neural network device according to an embodiment; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] The terms used in the examples are mainly selected from common terms currently in wide use, but this may vary depending on the intentions of those skilled in the art, precedents, the emergence of new technologies, etc. In addition, in certain cases, the applicant may arbitrarily select terms, and in such cases, the meanings of such terms are described in detail in the relevant description. Therefore, the terms used in the specification must be defined based on the meanings of the terms and the overall content of the specification, not simply the names of the terms.

[0014] When a part in the entire specification "includes" a certain component, this does not mean that other components are excluded, but that other components may be further included, unless otherwise specified to the contrary. Furthermore, the terms "... unit" and "... module" in the specification mean a unit that processes at least one function or operation, which is embodied as hardware or software, or a combination of hardware and software.

[0015] This embodiment relates to a method and apparatus for processing convolution operations of a neural network, and detailed description of matters that are widely known to those having ordinary skill in the art to which the following embodiment pertains will be omitted.

[0016] FIG. 1 is a diagram for explaining the architecture of a neural network according to an embodiment. Referring to FIG. 1, the neural network 1 may be an architecture of a deep neural network (DNN) or n-layer neural networks. The DNN or n-layer neural network corresponds to a convolutional neural network (CNN), a recurrent neural network (RNN), a deep belief network, a restricted Boltzman machine, or the like. For example, the neural network 1 is embodied as a convolutional neural network (CNN), but is not limited thereto. In FIG. 1, some convolutional layers are shown in the convolutional neural network corresponding to the example of the neural network 1, but the convolutional neural network may further include a pooling layer, a fully connected layer, and the like in addition to the shown convolutional layers.

[0017] The neural network 1 is embodied as an architecture having a plurality of layers including an input image, feature maps, and an output. In the neural network 1, the input image is subjected to a convolution operation with a filter called a kernel, and as a result, a feature map is output. At this time, the generated output feature map is again subjected to a convolution operation with the kernel as the input feature map, and a new feature map is output. As a result of repeating such convolution operations, a recognition result related to the features of the input image is finally output through the neural network 1.

[0018] For example, when an image of 24×24 pixels is input to the neural network 1 of FIG. 1, the input image is output as a 4-channel feature map of 20×20 pixels through a convolution operation with a kernel. The 20×20 feature map is then reduced in size through repeated convolution operations with the kernel, and finally a feature of 1×1 pixel size is output. The neural network 1 repeatedly performs convolution operations and subsampling (or pooling) operations in many layers to filter and output robust features that can represent the entire image from the input image, and can derive a recognition result of the input image through the output final features.

[0019] 2A and 2B are diagrams for explaining an example of a convolution operation of a neural network.

[0020] 2A, it is assumed that the input feature map 210 is 6×6 pixels in size, the kernel 220 is 3×3 pixels in size, and the output feature map 230 is 4×4 pixels in size, but the present invention is not limited to this, and the neural network can be embodied as feature maps and kernels of various sizes. In addition, the values ​​defined for the input feature map 210, the kernel 220, and the output feature map 230 are merely exemplary values, and the present embodiment is not limited thereto.

[0021] The kernel 220 performs a convolution operation while sliding in units of regions (or tiles) of 3×3 pixels in the input feature map 210. The convolution operation means a calculation of multiplying each pixel value in a certain region of the input feature map 210 by the weight of each element at the corresponding position of the kernel 220, and adding up all the obtained values ​​to obtain each pixel value of the output feature map 230. Specifically, the kernel 220 performs a convolution operation with the first region 211 of the input feature map 210. That is, each pixel value 1, 2, 3, 4, 5, 6, 7, 8, and 9 of the first region 211 is multiplied by the weights -1, -3, +4, +7, -2, -1, -5, +3, and +1 of each element of the kernel 220, respectively, and the results are -1, -6, 12, 28, -10, -6, -35, 24, and 9. Next, the obtained values ​​-1, -6, 12, 28, -10, -6, -35, 24, and 9 are all added together to calculate 15, and the pixel value 231 in row 1, column 1 of the output feature map 230 is determined to be 15. Here, the pixel value 231 in row 1, column 1 of the output feature map 230 corresponds to the first region 211. In a similar manner, a convolution operation is performed between the second region 212 of the input feature map 210 and the kernel 220 to determine the pixel value 232 in row 1, column 2 of the output feature map 230, which is 4. Finally, a convolution operation is performed between the 16th region 213, which is the last window of the input feature map 210, and the kernel 220 to determine the pixel value 233 in row 4, column 4 of the output feature map 230, which is 11.

[0022] On the other hand, although the two-dimensional convolution operation is described in Fig. 2A, the convolution operation also corresponds to a three-dimensional convolution operation in which there are input feature maps, kernels, and output feature maps of multiple channels. This will be described with reference to Fig. 2B.

[0023] Referring to FIG. 2B, the input feature map 201 has a three-dimensional size, has X input channels, and the two-dimensional input feature map of each input channel has a size of H rows and W columns (X, W, and H are natural numbers). The kernel 202 has a four-dimensional size, and has a two-dimensional kernel having a size of R rows and S columns, and there are as many as X input channels and Y output channels (R, S, and Y are natural numbers). In other words, the kernel 202 has channels in a number corresponding to the number of input channels X of the input feature map 201 and the number of output channels Y of the output feature map 203, and the two-dimensional kernel of each channel may have a size of R rows and S columns. The output feature map 203 is generated through a three-dimensional convolution operation between the three-dimensional input feature map 201 and the four-dimensional kernel 202, and there are Y channels according to the result of the three-dimensional convolution operation.

[0024] The process of generating an output feature map through a convolution operation between one two-dimensional input feature map and one two-dimensional kernel is the same as that described in FIG. 2A above. The two-dimensional convolution operation described in FIG. 2A is repeatedly performed between an input feature map 201 of X input channels and a kernel 202 of X input channels and Y output channels to generate an output feature map 203 of Y output channels.

[0025] FIG. 3 is a block diagram showing a hardware configuration of a neural network device according to an embodiment.

[0026] The neural network device 100 is embodied as various devices such as a personal computer (PC), a server device, a mobile device, an embedded device, etc., and specific examples include, but are not limited to, smartphones, tablet devices, Augmented Reality (AR) devices, Internet of Things (IoT) devices, autonomous vehicles, robotics, medical devices, etc. that perform voice recognition, image recognition, image classification, etc. using a neural network. Furthermore, the neural network device 100 corresponds to a dedicated hardware accelerator (HW accelerator) mounted on the above devices, and the neural network device 100 is also, but is not limited to, a hardware accelerator such as a neural processing unit (NPU), a tensor processing unit (TPU), or a neural engine, which is a dedicated module for driving a neural network.

[0027] 3, neural network device 100 includes a processor 110 and a memory 120. Only components related to this embodiment are shown in neural network device 100 shown in Fig. 3. Therefore, it will be obvious to those skilled in the art that neural network device 100 further includes other general-purpose components in addition to the components shown in Fig. 3.

[0028] The processor 110 plays a role in controlling the overall functions for operating the neural network in the neural network device 100. For example, the processor 110 controls the overall neural network device 100 by executing a program stored in the memory 120 in the neural network device 100. The processor 110 may be embodied as a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), etc. provided in the neural network device 100, but is not limited thereto.

[0029] The memory 120 is hardware that stores various data processed within the neural network device 100, and can store data that has been processed by the neural network device 100 and data to be processed. The memory 120 can also store applications, drivers, and the like that are run by the neural network device 100. The memory 120 may include dynamic random access memory (DRAM), random access memory (RAM) such as static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD-ROM, Blu-ray, or other optical disk storage, hard disk drive (HDD), solid state drive (SSD), or flash memory.

[0030] The processor 110 reads / writes neural network data, such as image data, feature map data, kernel data, etc., from the memory 120, and executes the neural network using the read / written data. When the neural network is executed, the processor 110 drives a processing unit for convolution operation provided therein, and repeatedly performs a convolution operation between an input feature map and a kernel to generate data related to an output feature map. At this time, the amount of calculation of the convolution operation is determined depending on various factors such as the number of channels of the input feature map, the number of channels of the kernel, the size of the input feature map, the size of the kernel, and the precision of the values.

[0031] The processor 110 can obtain an input feature map and a kernel from the memory 120 and process a convolution operation between the input feature map and the kernel. The processor 110 may include processing units 112 for processing the convolution operation. Each of the processing units 112 can process the convolution operation in parallel, and each of the processing units 112 may include a logic circuit for the convolution operation. Specifically, each of the processing units 112 may include an arithmetic unit embodied as a combination of a multiplier, an adder, and an accumulator. Also, the multiplier is embodied as a combination of multiple sub-multipliers, and the adder is embodied as a combination of multiple sub-adders.

[0032] The processor 110 may further include an on-chip memory performing a cache function to process the convolution operation, and a dispatcher for dispatching various operands such as pixel values ​​of an input feature map or weight values ​​of a kernel. Specifically, the dispatcher dispatches operands such as pixel values ​​and weight values ​​required for the operation performed by the processing unit from data such as pixel values ​​of an input feature map and weight values ​​of a kernel stored in the memory 120 to the on-chip memory. Then, the dispatcher dispatches the operands dispatched to the on-chip memory again to the processing unit for the convolution operation.

[0033] The processor 110 may include a controller 114 that determines an operand to be processed by the processing unit 112. The controller 114 determines a shared operand shared in common among the parallelized operations performed by the processing unit 112 during a convolution operation between the input feature map and a kernel as either a pixel value of the input feature map or a weight value of the kernel. In one example, the controller 114 determines the shared operand as a pixel value of the first input feature map during a convolution operation between the first input feature map and the first kernel, and in another example, determines the shared operand as a weight value of the second kernel during a convolution operation between the second input feature map and the second kernel.

[0034] The controller 114 determines the shared operand as one of the pixel value of the input feature map and the weight value of the kernel based on at least one of the features of the input feature map and the features of the kernel. Specifically, the controller 114 determines the shared operand as one of the pixel value of the input feature map and the weight value of the kernel based on at least one of the ratio of pixels having a zero value in the input feature map, the ratio of weights having a zero value in the kernel, and the shape of the input feature map. In one example, the controller 114 determines the shared operand as the pixel value of the input feature map when the ratio of pixels having a zero value in the input feature map is equal to or greater than a preset threshold. The controller 114 determines the ratio of pixels having a zero value in the input feature map of the current layer by considering the ratio of pixels having a zero value in the input feature map of the previous layer. In another example, the controller 114 determines the shared operand as the weight value of the kernel when the ratio of weights having a zero value in the kernel is equal to or greater than a preset threshold. By way of yet another example, the controller 114 may determine the shared operand as a pixel value of the input feature map when the number of input channels of the input feature map is large and the size of the two-dimensional input feature map of each input channel is small.

[0035] The controller 114 determines the shared operand for each layer of the neural network as either the pixel value of the input feature map or the weight value of the kernel. For example, when performing a convolution operation between the input feature map of the first layer and the kernel of the first layer, the controller 114 determines the shared operand of the first layer as the pixel value of the input feature map of the first layer. Also, when performing a convolution operation between the input feature map of the second layer and the kernel of the second layer, the controller 114 determines the shared operand of the second layer as the weight value of the kernel of the second layer. In other words, every time the layer is changed, the controller 114 changes the shared operand from the pixel value of the input feature map to the weight of the kernel or changes the shared operand from the weight of the kernel to the pixel value of the input feature map.

[0036] The processing unit 112 performs a parallelized operation based on the shared operand determined by the controller 114. As an example, when a pixel value of the first input feature map is determined as a shared operand, the processing unit 112 receives the pixel value of the first input feature map as a common operand as one of the operand pairs, and receives the different weight values ​​of the first kernel as the other of the operand pairs. As another example, when a weight value of the first kernel is determined as a shared operand, the processing unit 112 receives the weight value of the first kernel as a common operand as one of the operand pairs, and receives the different pixel values ​​of the first input feature map as the other of the operand pairs. Thus, the processing unit 112 implements a scalar-vector multiplication since it receives the shared operand as a common input and performs a parallelized operation. The processing unit 112 performs the parallelized operation and outputs an output value, and the output value is accumulated in the output feature map.

[0037] Since the neural network device 100 can control the processing units 112 to share the shared operands, the same control can be performed for each of the processing units 112, and therefore the hardware structure can be simplified and the hardware cost can be reduced. In addition, the neural network device 100 can determine the shared operands of the processing units 112 as one of the pixel values ​​of the input feature map and the weight values ​​of the kernel, and selects the shared operands in a manner to more effectively use the parallelism of the convolution operation. In one example, the neural network device 100 determines the shared operands as one of the pixel values ​​of the input feature map and the weight values ​​of the kernel in a manner to more effectively implement zero skipping. A specific example will be described later with reference to FIG. 11 and FIG. 12. In another example, the neural network device 100 selects the shared operands for more effectively implementing the parallelized operation of the processing units 112 according to the shape of the input feature map of one layer. A specific embodiment will be described later with reference to FIG.

[0038] In addition, when performing a 3D convolution operation between an input feature map having a 3D size and a kernel having a 4D size, the neural network device 100 may implement a hardware structure that performs parallelized operations by determining one of the pixel values ​​of the input feature map and the weight values ​​of the kernel as a shared operand even if the dimensions of the input feature map and the kernel are different from each other.

[0039] FIG. 4 shows a specific embodiment of the controller and processing unit.

[0040] The controller 114 obtains the input feature map and the kernel from the memory 120. The controller 114 determines a shared operand shared in common by the processing units 112 as one of the pixel values ​​of the input feature map and the weight values ​​of the kernel based on at least one of the features of the input feature map and the features of the kernel.

[0041] The controller 114 may control pixel values ​​of the input feature map and weight values ​​of the kernel to be input to the processing units 112, and in particular, controls a predetermined shared operand to be commonly input to each of the processing units 112. In one example, when pixel values ​​of the input feature map are determined as shared operands, the controller 114 controls pixel values ​​of the input feature map to be input to each of the processing units 112, and controls different weight values ​​of the kernel to be input to different processing units. In other words, the controller 114 controls different weight values ​​of the kernel to be input to different processing units as operand 1 to operand n. In another example, when weight values ​​of the kernel are determined as shared operands, the controller 114 controls weight values ​​of the kernel to be input to each of the processing units 112, and controls different pixel values ​​of the input feature map to be input to different processing units. In other words, the controller 114 controls the input feature map so that different pixel values ​​are input to different processing units as operand 1 through operand n. Under the control of the controller 114, the dispatcher of the processor 110 dispatches operand pairs including a shared operand to each of the processing units 112.

[0042] Each of the processing units 112 is implemented as a combination of a multiplier, an adder, and an accumulator, and outputs an output value (output 1 to output n) through a multiplication and addition operation on an input operand pair, and the output value (output 1 to output n) is accumulated in an output feature map. Also, each of the processing units 112 performs an operation between a shared operand and a different operand, and the processing unit 112 may implement a 1Xn hardware structure that implements a multiplication operation between a scalar (shared operand) and a vector (operand 1, operand 2, ..., operand n).

[0043] 5A and 5B show an embodiment in which processing units perform parallelized operations based on shared operands.

[0044] In Fig. 5A, the controller 114 determines a first weight value w_1 of the kernel as a shared operand of the processing units 112. Then, the controller 114 controls the first weight value w_1 to be input to each of the 16 processing units 112, and controls the 16 pixel values ​​IFM1 to IFM16 of the input feature map to be input to each of the 16 processing units 112. For example, the 16 pixel values ​​IFM1 to IFM16 shown in Fig. 5A may be pixel values ​​corresponding to a first input channel of the input feature map IFM. Each of the 16 processing units 112 performs an operation on the input operand pair, and outputs 16 output values, which are accumulated in the output feature map OFM.

[0045] 5B, the controller 114 determines a first pixel value IFM1 of the input feature map as a shared operand of the processing units 112. Then, the controller 114 controls the first pixel value IFM1 to be input to each of the processing units 112, and controls the 16 weight values ​​w_1 to w_16 of the kernel to be input to each of the 16 processing units 112. For example, the 16 weight values ​​w_1 to w_16 of the kernel may be weight values ​​of each of the 16 output channels of the kernel. Each of the 16 processing units 112 performs an operation on the input operand pair and outputs 16 output values, and the 16 output values ​​are accumulated in the output feature map OFM.

[0046] In Figures 5A and 5B, the number of pixels in one input channel of the input feature map, the number of output channels of the kernel, and the number of processing units 112 are all shown to be the same, 16, but this is merely an example and should not be interpreted as limiting.

[0047] FIG. 6 shows an example where the controller determines the shared operands based on the shape of the input feature map.

[0048] The controller 114 determines the shared operands of the processing units 112 based on the shape of the input feature map. For example, the controller 114 determines the shared operands of the processing units 112 by taking into account the number of input channels of the input feature map or the size of the two-dimensional input feature map of each input channel.

[0049] As an example, the controller 114 may have a tendency to determine the shared operands of the processing unit 112 as the kernel weight values ​​when the number of channels of the input feature map 610 is determined to be small and the one-channel two-dimensional input feature map of the input feature map 610 is determined to be large. In other words, when the width value (W×H) of the input feature map 610 is determined to be large and the depth value (c) is determined to be small, the controller 114 may have a tendency to determine the shared operands of the processing unit 112 as the kernel weight values. The larger the width value (W×H) of the input feature map 610 is and the smaller the depth value (c) is, the more effectively the parallelized operation of the processing unit 112 is realized by reusing the kernel weight values ​​to perform the convolution operation, so the controller 114 determines the kernel weight values ​​as the shared operands. For example, if it is determined that the width value (W×H) of the input feature map 610 is greater than a preset threshold or the depth value (c) is less than a preset threshold, the controller 114 determines the shared operand of the processing unit 112 as the weight value of the kernel.

[0050] The controller 114 may have a tendency to determine the shared operands of the processing unit 112 as pixel values ​​of the input feature map when it is determined that the number of input channels of the input feature map 610 is large and the size of the two-dimensional input feature map of one channel of the input feature map 610 is small. In other words, the controller 114 may have a tendency to determine the shared operands of the processing unit 112 as pixel values ​​of the input feature map when it is determined that the width value (W×H) of the input feature map 620 is small and the depth value (c) is large. The smaller the width value (W×H) of the input feature map 610 is and the larger the depth value (c) is, the more effectively the parallelized operation of the processing unit 112 can be realized by reusing pixel values ​​of the input feature map to perform the convolution operation, so the controller 114 may determine the pixel values ​​of the input feature map as the shared operands. For example, if it is determined that the width value (W×H) of the input feature map 620 is less than a preset threshold or the depth value (c) is greater than a preset threshold, the controller 114 determines the shared operand of the processing unit 112 as the pixel value of the input feature map.

[0051] As the convolution operation for the layers of the neural network proceeds sequentially, the input feature map of the early layer of the neural network may have a shape similar to the input feature map 610 in Figure 6, and the input feature map of the later layer of the neural network may have a shape similar to the input feature map 620 in Figure 6. Thus, the controller 114 determines the shared operands of the processing units 112 in the early layer of the neural network as the weight values ​​of the kernel, and determines the shared operands of the processing units 112 in the later layer of the neural network as the pixel values ​​of the input feature map.

[0052] FIG. 7 illustrates an embodiment in which processing units perform parallelized operations based on pixel values ​​of an input feature map that are shared operands.

[0053] The controller 114 determines the shared operand as a pixel value of the input feature map IFM. Thus, the controller 114 can control the pixel value of the input feature map IFM to be commonly input to each of the processing units 112.

[0054] Specifically, the controller 114 controls so that a first pixel value IFM1 of the input feature map IFM is input to each of the processing units 112 as a shared operand, and controls so that each of the weight values ​​w_1, w_2, ..., w_m of the kernel is input to each of the processing units 112. The first pixel value IFM1 is a pixel value corresponding to the (0,0) position of the 0th input channel of the input feature map IFM, and each of the weight values ​​w_1, w_2, ..., w_m of the kernel may be a weight value corresponding to the (0,0) position of the 0th input channel in each of the m output channels of the kernel.

[0055] The first processing unit of the processing units 112 performs a multiplication and addition operation between the first pixel value IFM1 and the weight value w_1 to generate an output value O 0 The m-th processing unit of the processing unit 112 performs a multiplication and addition operation between the first pixel value IFM1 and the weight value w_m to output an output value O m-1 In other words, the processing unit 112 performs a scalar-vector multiplication operation between the first pixel value IFM1 and the weight values ​​w_1, w_2, ..., w_m to output an output value O 0 (0,0), O 1 (0,0),...,O m-1 Output (0,0). Also, the output value O 0 (0,0), O 1 (0,0),...,Om-1 Each (0,0) is accumulated in the 0th through m-1th output channels of the output feature map OFM, respectively.

[0056] Similarly, the controller 114 controls other pixel values ​​of the input feature map IFM to be input as shared operands to each of the processing units 112, and controls other weight values ​​of the kernel to be input to each of the processing units 112. Then, the processing units 112 perform multiplication operations of other pixel values ​​of the input feature map IFM and other weight values ​​of the kernel, and output output values, which are accumulated in the output feature map OFM.

[0057] FIG. 8 shows an example where processing units perform parallelized operations based on pixel values ​​of an input feature map that are shared operands.

[0058] The controller 114 determines the shared operands to be the first pixel value IFM1, the second pixel value IFM2, the third pixel value IFM3, and the fourth pixel value IFM4 of the input feature map IFM. The first pixel value IFM1, the second pixel value IFM2, the third pixel value IFM3, and the fourth pixel value IFM4 may be pixel values ​​corresponding to positions (0,0), (0,1), (1,0), and (1,1) of the 0th input channel of the input feature map IFM. The controller 114 controls the first pixel value IFM1 to be input as a shared operand to each of the first processing units 171 of the processing units 112, and controls the weight values ​​w_1, w_2, ..., w_m of the kernel to be input to each of the first processing units 171. Similarly, the controller 114 controls so that the second pixel value IFM2 is input as a shared operand to each of the second processing units 172 of the processing units 112, and controls so that each of the kernel weight values ​​w_1, w_2, ..., w_m is input to each of the second processing units 172. Similarly, the controller 114 controls so that the third pixel value IFM3 is input as a shared operand to each of the third processing units 173 of the processing units 112, and controls so that each of the kernel weight values ​​w_1, w_2, ..., w_m is input to each of the third processing units 173. Similarly, the controller 114 controls so that the fourth pixel value IFM4 is input as a shared operand to each of the fourth processing units 174 of the processing units 112, and controls so that each of the kernel weight values ​​w_1, w_2, ..., w_m is input to each of the fourth processing units 174.For example, the controller 114 can control the first pixel value IFM1 to the fourth pixel value IFM1 from the buffer (IFM Buffer(0,0) to IFM Buffer(1,1)) to be input to the first processing unit 171 to the fourth processing unit 174, respectively, and can control the weight values ​​w_1, w_2, ..., w_m from the buffer (Weight Buffer) to be input to the first processing unit 171 to the fourth processing unit 174, respectively.

[0059] The first processing unit 171 multiplies the first pixel value IFM1 by the weight values ​​w_1, w_2, . . . , w_m to produce an output value O 0 (0,0), O 1 (0,0),...,O m-1 The second processing unit 172 multiplies the second pixel value IFM2 by the weight values ​​w_1, w_2, ..., w_m to output an output value O 0 (0,1), O 1 (0,1),...,O m-1 The third processing unit 173 multiplies the third pixel value IFM3 by the weight values ​​w_1, w_2, ..., w_m to output an output value O 0 (1,0), O 1 (1,0),...,O m-1 The fourth processing unit 174 multiplies the fourth pixel value IFM4 by the weight values ​​w_1, w_2, ..., w_m to output an output value O 0 (1,1), O 1 (1,1),...,O m-1 Therefore, the output value O output by the first processing unit 171 to the fourth processing unit 174 is 0~m-1 (0,0), O 0~m-1 (0,1), O 0~m-1 (1,0), O 0~m-1 (1,1) is accumulated in the output feature map OFM.

[0060] The input feature map IFM, Ti×T, has a size of H×W and is composed of n input channels, as shown in Fig. 7 and Fig. 8. r A kernel of size T r ×T c The numerical values ​​of the output feature map OFM having a size of m and composed of m output channels are merely examples and should not be construed as being limited thereto. In addition, the positions of the first pixel value to the fourth pixel value of the input feature map IFM and the positions of the kernel weight values ​​w_1, w_2, ..., w_m shown in Figures 7 and 8 are merely examples and should not be construed as being limited thereto.

[0061] FIG. 9 illustrates an embodiment in which processing units perform parallelized operations based on weight values ​​of kernels that are shared operands.

[0062] The controller 114 determines the shared operand as the weight value of the kernel. Therefore, the controller 114 can perform control so that the weight value of the kernel is commonly input to each of the processing units 112. Specifically, the controller 114 controls so that a first weight value w_1 of the kernel is input to each of the processing units 112 as a shared operand, and controls so that each of the pixel values ​​IFM1, IFM2, IFM3, and IFM4 of the input feature map IFM is input to each of the processing units 112. The first weight value w_1 of the kernel may be a weight value corresponding to the (0,0) position of the 0th output channel and the 0th input channel of the kernel. The first pixel value IFM1, the second pixel value IFM2, the third pixel value IFM3, and the fourth pixel value IFM4 may be pixel values ​​corresponding to the (0,0), (0,1), (1,0), and (1,1) positions of the 0th input channel of the input feature map IFM.

[0063] The first processing unit of the processing units 112 performs a multiplication and addition operation between a first weight value w_1 and a first pixel value IFM1 to obtain an output value O 0 Similarly, the second processing unit to the fourth processing unit among the processing units 112 perform a multiplication and addition operation between the first weight value w_1 and the second pixel value IFM2, a multiplication and addition operation between the first weight value w_1 and the third pixel value IFM3, and a multiplication and addition operation between the first weight value w_1 and the fourth pixel value IFM4, and output a value O 0 (0,1), output value O 0 (1,0), and the output value O 0 In other words, the processing unit 112 performs a scalar-vector multiplication operation between the first weight value w_1 and the pixel values ​​IFM1, IFM2, IFM3, and IFM4 to output an output value O 0 (0,0), O 0 (0,1), O 0 (1,0), O 0 Output (1,1). Also, the output value O 0 (0,0), O 0 (0,1), O 0 (1,0), O 0 Each (1,1) is accumulated in the output feature map OFM.

[0064] Similarly, the controller 114 can control other weight values ​​of the kernel to be input as shared operands to each of the processing units 112, and control other pixel values ​​of the input feature map IFM to be input to each of the processing units 112. The processing units 112 then perform multiplication operations between the other weight values ​​of the kernel and the other pixel values ​​of the input feature map, and output output values, which are accumulated in the output feature map OFM.

[0065] FIG. 10 illustrates an embodiment in which processing units perform parallelized operations based on weight values ​​of kernels that are shared operands.

[0066] The controller 114 determines the shared operands to be the first weight value w_1, the second weight value w_2, the third weight value w_3, and the fourth weight value w_4 of the kernel. The first weight value w_1, the second weight value w_2, the third weight value w_3, and the fourth weight value w_4 may be weight values ​​corresponding to the (0,0) position of the 0th input channel corresponding to the 0th output channel to the 3rd output channel, respectively. The controller 114 can control the first weight value w_1 to be input as a shared operand to each of the first processing units 191 of the processing units 112, and control the pixel values ​​IFM1, IFM2, IFM3, and IFM4 of the input feature map IFM to be input to each of the first processing units 191. Similarly, the controller 114 can control the second weight value w_2 to be input as a shared operand to each of the second processing units 192 among the processing units 112, and control the pixel values ​​IFM1, IFM2, IFM3, and IFM4 of the input feature map IFM to be input to each of the second processing units 192. Similarly, the controller 114 can control the third weight value w_3 to be input as a shared operand to each of the third processing units 193 among the processing units 112, and control the pixel values ​​IFM1, IFM2, IFM3, and IFM4 of the input feature map IFM to be input to each of the third processing units 193. Similarly, the controller 114 can control the fourth weight value w_4 to be input as a shared operand to each of the fourth processing units 194 among the processing units 112, and control the pixel values ​​IFM1, IFM2, IFM3, and IFM4 of the input feature map IFM to be input to each of the fourth processing units 194.

[0067] The first processing unit 191 multiplies the first weight value w_1 by the pixel values ​​IFM1, IFM2, IFM3, and IFM4 to obtain an output value O0 (0,0), O 0 (0,1), O 0 (1,0), O 0 The second processing unit 192 multiplies the second weight value w_2 by the pixel values ​​IFM1, IFM2, IFM3, and IFM4, and outputs output values ​​O1(0,0), O1(0,1), O1(1,0), and O1(1,1). The third processing unit 193 multiplies the third weight value w_3 by the pixel values ​​IFM1, IFM2, IFM3, and IFM4, and outputs output values ​​O1(0,0), O1(0,1), O1(1,0), and O1(1,1). 2 (0,0), O 2 (0,1), O 2 (1,0), O 2 The fourth processing unit 194 multiplies the fourth weight value w_4 by the pixel values ​​IFM1, IFM2, IFM3, and IFM4 to output an output value O 3 (0,0), O 3 (0,1), O 3 (1,0), O 3 Therefore, the output value O output by the first processing unit 191 to the fourth processing unit 194 is 0 (0~1, 0~1), O 1 (0~1, 0~1), O 2 (0~1, 0~1), O 3 (0~1, 0~1) is accumulated in the output feature map OFM.

[0068] The input feature map IFM, Ti×T, has a size of H×W and is composed of n input channels, as shown in Fig. 8 and Fig. 9. r Kernel, which has a size of T and consists of n input channels and m output channels, r ×T cThe values ​​of the output feature map OFM having a size of m and configured with m output channels are merely examples and should not be construed as being limited thereto. In addition, the positions of the first weight value w_1 to the fourth weight value w_4 and the positions of the pixel values ​​IFM1, IFM2, IFM3, or IFM4 shown in Figs. 8 and 9 are merely examples and should not be construed as being limited thereto.

[0069] 3, the processing unit 112 performs parallelized operations based on the shared operands determined by the controller 114. In this case, if the shared operands are zero, the processing unit 112 may skip the parallelized operations. In other words, the processing unit 112 may implement zero skipping based on the shared operands.

[0070] The controller 114 determines the pixel value of the input feature map as the shared operand. According to one example, when the first pixel value is zero, the processing unit 112 omits the parallelized calculation of the first pixel value and the first weight value of the kernel. Thus, the processing unit 112 performs the parallelized calculation of the second pixel value, which is non-zero, and the second weight value of the kernel, instead of the first pixel value, which is zero. According to another example, when the first weight values ​​of the kernel are both zero, the processing unit 112 can omit the parallelized calculation of the first pixel value and the first weight value of the kernel, and perform the parallelized calculation of the second pixel value and the second weight value of the kernel. The controller 114 determines the weight value of the kernel as a shared operand. According to one example, when the first weight value is zero, the processing unit 112 omits the parallelized calculation of the first weight value and the first pixel value of the input feature map. Thus, the processing unit 112 performs the parallelized calculation of the second weight value, which is non-zero, and the second pixel value, instead of the first weight value, which is zero. According to another example, when the first pixel values ​​of the input feature map are both zero, the processing unit 112 can omit the parallelized calculation of the first weight value and the first pixel value, and perform the parallelized calculation of the second weight value and the second pixel value.

[0071] The neural network device 100 implements zero skipping through zero or no for shared operands of the processing unit 112 or zero or no for all remaining operands of the processing unit 112, thereby enabling a simplified hardware structure for zero skipping to be implemented.

[0072] FIG. 11 illustrates one embodiment in which a processing unit performs zero skipping based on shared operands that are zero.

[0073] In the (N-1)th cycle, the processing unit 112 performs parallel calculations based on the first pixel value IFM1 of the input feature map IFM, which is a shared operand, and outputs an output value. Specifically, the processing unit 112 performs parallel calculations between the first pixel value IFM1 located at (0,0) of the 0th input channel of the input feature map IFM and weight values ​​located at (0,0) of the 0th input channel corresponding to each of the 0th output channel to the m-1th output channel of the kernel, and outputs an output value. Each of these output values ​​is accumulated in O0 to m-1 (0,0), which is the (0,0) position of each of the 0th output channel to the m-1th output channel of the output feature map OFM.

[0074] Then, in the Nth cycle, the processing unit 112 performs a parallelized calculation based on the second pixel value IFM2 of the input feature map IFM. However, if the second pixel value IFM2 is zero, the processing unit 112 may omit the parallelized calculation of the second pixel value IFM2 and the weight value. Specifically, the processing unit 112 may omit the parallelized calculation of the second pixel value IFM2 located at (0,0) of the first input channel of the input feature map IFM and the weight value located at (0,0) of the first input channel corresponding to each of the 0th output channel to the (m-1)th output channel of the kernel.

[0075] Then, in the Nth cycle, the processing unit 112 performs a parallelized calculation based on the third pixel value IFM3 of the input feature map IFM, and outputs an output value. Specifically, the processing unit 112 performs a parallelized calculation between the third pixel value IFM3 located at (0,0) of the second input channel of the input feature map IFM and weight values ​​located at (0,0) of the second input channels corresponding to each of the 0th output channel to the m-1th output channel of the kernel, and outputs an output value. Each of these output values ​​is O, which is the (0,0) position of each of the 0th output channel to the m-1th output channel of the output feature map OFM. 0~m-1 Accumulates to (0,0).

[0076] As a result, when the second pixel value IFM2 is zero, the processing unit 112 performs parallelized calculations based on the third pixel value IFM3 after the first pixel value IFM1, and the position for accumulating the output value based on the first pixel value IFM1 and the position for accumulating the output value based on the third pixel value IFM3 are both the same position in the output feature map OFM. Therefore, the neural network device 100 can efficiently process the convolution calculation of the neural network, since the position for accumulating the output value is kept the same while reducing the amount of calculation and calculation time of the convolution calculation through zero skipping.

[0077] FIG. 12 illustrates another embodiment in which a processing unit performs zero skipping based on shared operands that are zero.

[0078] In the (N-1)th cycle, the processing unit 112 performs a parallelized operation based on the first weight value w_1 of the kernel, which is a shared operand, and outputs an output value. Specifically, the processing unit 112 performs a parallelized operation between the first weight value w_1 located at (0,0) of the 0th output channel and 0th input channel of the kernel and a pixel value located at (0 to 1, 0 to 1) of the 0th input channel of the input feature map IFM, and outputs an output value. Each of these output values ​​is calculated based on the pixel value (0 to 1, 0 to 1) of the 0th output channel of the output feature map OFM. 0 Accumulates to (0~1, 0~1).

[0079] Then, in the Nth cycle, the processing unit 112 performs a parallelized calculation based on the second weight value w_2 of the kernel. However, if the second weight value w_2 is zero, the processing unit 112 omits the parallelized calculation of the second weight value w_2 and the pixel value. Specifically, the processing unit 112 omits the parallelized calculation of the second weight value w_2 located at (0,0) of the 0th output channel and the first input channel of the kernel and the pixel value located at (0 to 1, 0 to 1) of the first input channel of the input feature map IFM.

[0080] Then, in the Nth cycle, the processing unit 112 performs a parallelized calculation based on the third weight value w_3 of the kernel, and outputs an output value. Specifically, the processing unit 112 performs a parallelized calculation between the third weight value w_3 located at (0,0) of the 0th output channel and the second input channel of the kernel, and a pixel value located at (0 to 1, 0 to 1) of the second input channel of the input feature map IFM, and outputs an output value. Each of these output values ​​is O, which is (0 to 1, 0 to 1) of the 0th output channel of the output feature map OFM. 0 Accumulates to (0~1, 0~1).

[0081] As a result, when the second weight value w_2 is zero, the processing unit 112 performs parallelized calculations based on the third weight value w_3 after the first weight value w_1, and the position for accumulating the output value based on the first weight value w_1 and the position for accumulating the output value based on the third weight value w_3 are both the same position in the output feature map OFM. Therefore, the neural network device 100 can efficiently process the convolution calculation of the neural network, while reducing the amount of calculation and calculation time of the convolution calculation through zero skipping, and keeping the position for accumulating the output value the same.

[0082] 13 is a diagram for explaining an operation method of a neural network device according to an embodiment. The method shown in FIG. 13 is performed by each component of the neural network device 100 of FIG. 3 to FIG. 12, and a duplicated description will be omitted.

[0083] In step 1310, the neural network device 100 determines a shared operand shared in common among the parallelized operations as one of a pixel value of the input feature map and a weight value of the kernel based on at least one of the features of the input feature map and the features of the kernel. In one example, the neural network device 100 determines the shared operand as a pixel value of the first input feature map when performing a convolution operation between the first input feature map and the first kernel, and in another example, determines the shared operand as a weight value of the second kernel when performing a convolution operation between the second input feature map and the second kernel.

[0084] The neural network device 100 determines the shared operand as one of the pixel values ​​of the input feature map and the weight values ​​of the kernel based on at least one of the features of the input feature map and the features of the kernel. Specifically, the neural network device 100 determines the shared operand as one of the pixel values ​​of the input feature map and the weight values ​​of the kernel based on at least one of the ratio of pixels having a zero value in the input feature map, the ratio of weights having a zero value in the kernel, and the shape of the input feature map.

[0085] The neural network device 100 determines the shared operand for each layer of the neural network as either one of the pixel value of the input feature map and the weight value of the kernel. For example, when performing a convolution operation between the input feature map of the first layer and the kernel of the first layer, the neural network device 100 determines the shared operand of the first layer as the pixel value of the input feature map of the first layer. Also, when performing a convolution operation between the input feature map of the second layer and the kernel of the second layer, the neural network device 100 determines the shared operand of the second layer as the weight value of the kernel of the second layer.

[0086] In step 1320, the neural network device 100 performs parallelized operations based on the shared operands. As an example, when the pixel values ​​of the first input feature map are determined as the shared operands, the neural network device 100 performs parallelized operations between the pixel values ​​of the first input feature map and the weight values ​​of the first kernel. As another example, when the weight values ​​of the first kernel are determined as the shared operands, the neural network device 100 performs parallelized operations between the weight values ​​of the first kernel and the pixel values ​​of the first input feature map. The neural network device 100 accumulates the output values ​​output through the parallelized operations in an output feature map.

[0087] The neural network device 100 can skip parallelized operations when a default shared operand is zero. In one example, when the first pixel value is zero, the neural network device 100 skips parallelized operations between the first pixel value and the first weight value of the kernel. Thus, the neural network device 100 performs parallelized operations between the second pixel value, which is non-zero, and the second weight value of the kernel, instead of the first pixel value, which is zero. In another example, when the first weight value is zero, the neural network device 100 skips parallelized operations between the first weight value and the first pixel value of the input feature map. Thus, the neural network device 100 performs parallelized operations between the second weight value, which is non-zero, and the second pixel value, instead of the first weight value, which is zero.

[0088] Meanwhile, the above-mentioned method can be created by a program executed by a computer, and can be realized by a general-purpose digital computer that operates the program using a computer-readable recording medium. Also, the data structure used in the above-mentioned method can be recorded in a computer-readable recording medium by various means. The computer-readable recording medium includes recording media such as magnetic recording media (e.g., ROM (Read Only Memory), RAM, USB, floppy disk, hard disk, etc.) and optical recording media (e.g., CD-ROM, DVD, etc.).

[0089] It will be understood by those skilled in the art that the present invention may be embodied in modified forms without departing from the essential characteristics of the above description. Therefore, the disclosed method should be considered in an illustrative rather than restrictive manner, and the scope of the claims should be interpreted as including all differences within the scope of the claims, not the above description, and equivalents thereto. [Explanation of symbols]

[0090] 100 Neural network device 110 Processor 114 Controller 112 Processing Unit 120 Memory 171 First Processing Unit 172 Second Processing Unit 173 3rd Processing Unit 174 4th Processing Unit 191 First Processing Unit 192 Second Processing Unit 193 3rd Processing Unit 194 4th Processing Unit 201 Input feature maps 202 Kernel 203, 230 Output feature map 210 Input feature maps 220 Kernel 211 First area 212 Second area 213 Area 16 230 Output feature maps 231 pixel value 232 pixel value

Claims

1. In the neural network device, a memory having at least one program stored therein; A processor that processes a convolution operation between an input feature map and a kernel by executing the at least one program; Including, The processor, a controller that determines a shared operand shared in common among the parallelized operations as one of a pixel value among a plurality of pixel values ​​constituting the input feature map and one weight value among the weight values ​​constituting the kernel, based on one of (i) a shape of the input feature map and (ii) a ratio of pixels having a zero value in the input feature map or a ratio of weights having a zero value in the kernel being equal to or greater than a preset value; a processing unit for performing the parallelized operations based on the determined shared operands and respective operands from the input feature map or the kernel; The parallel processing units include: performing, in parallel, respective operations on the one pixel value of the input feature map and each weight value of the kernel in response to the controller determining the shared operand as the one pixel value of the input feature map; or The plurality of processing units include In response to the controller determining the shared operand as the one weight value of the kernel, the neural network device performs respective operations in parallel between the one weight value of the kernel and each pixel value of the input feature map.

2. (1) the controller, determining the shared operand as a first pixel value and a second pixel value of a plurality of pixel values ​​constituting the input feature map; and The processing unit includes: a first processing unit that performs a calculation in parallel between a first pixel value of the input feature map and a weight value of the kernel; a second processing unit configured to perform parallel operations on second pixel values ​​of the input feature map and weight values ​​of the kernel, respectively; or (2) the controller determining the shared operands as a first weight value and a second weight value among a plurality of weight values ​​constituting the kernel; and The processing unit includes: a first processing unit that performs a calculation in parallel between a first weight value of the kernel and a pixel value of the input feature map; The neural network device according to claim 1 , further comprising a second processing unit that performs parallel operations on the second weight values ​​of the kernel and the pixel values ​​of the input feature map.

3. The controller: determining a shared operand of the first layer as one of a pixel value of the input feature map of the first layer and a weight value of the kernel of the first layer based on at least one of features of the input feature map of the first layer and features of the kernel of the first layer; 2. The neural network device of claim 1, wherein the shared operand of the second layer is determined as one of a pixel value of the input feature map of the second layer and a weight value of a kernel of the second layer based on at least one of a feature of an input feature map of the second layer and a feature of a kernel of the second layer.

4. The number of processing units that commonly share the shared operand is 2. The neural network device according to claim 1, wherein the number of pixels is equal to the number of pixels of the input channel of the input feature map or the number of pixels is equal to the number of output channels of the kernel.

5. The processor, 2. The neural network device according to claim 1, which performs a three-dimensional convolution operation between an input feature map having a three-dimensional size and a kernel having a four-dimensional size.

6. The processing unit includes:

2. The neural network device of claim 1, wherein the parallelized operation is skipped if the shared operand is zero.

7. (1) The processing unit comprises: skipping the parallelized computation of the first pixel value of the input feature map and the first weight value of the kernel if the first pixel value of the input feature map is zero; and computing a second pixel value of the input feature map and a second weight value of the kernel; or (2) the processing unit skipping the parallelized computation of the first weight value of the kernel and the first pixel value of the input feature map if the first weight value of the kernel is zero; and The neural network device according to claim 1 , further comprising a parallel computation of the second weight value of the kernel and the second pixel value of the input feature map.

8. 1. A method for processing a convolution operation of a neural network, comprising: a controller determining a shared operand shared in common among each of the parallelized operations as one of a pixel value among a plurality of pixel values ​​constituting the input feature map and one weight value among the weight values ​​constituting the kernel, based on one of (i) a shape of an input feature map and (ii) a ratio of pixels having a zero value in the input feature map or a ratio of weights having a zero value in a kernel being equal to or greater than a preset value; a processing unit performing the parallelized operations based on the determined shared operands and respective operands from the input feature map or the kernel; The step of performing the calculation includes: in response to the controller determining the shared operand as the one pixel value of the input feature map in the determining step, the parallel processing units perform respective operations on the one pixel value of the input feature map and respective weight values ​​of the kernels in parallel; or The step of performing the calculation includes: wherein in the determining step, in response to the controller determining the shared operand as the one weight value of the kernel, a plurality of the processing units perform respective operations on the one weight value of the kernel and respective pixel values ​​of the input feature map in parallel.

9. The step of performing the calculation includes:

9. The method of claim 8, further comprising skipping the parallelized operation if the shared operand is zero.

10. (1) the step of performing the calculation skipping the parallelized computation of the first pixel value of the input feature map and the first weight value of the kernel if the first pixel value of the input feature map is zero; and computing a second pixel value of the input feature map and a second weight value of the kernel; or (2) the step of performing the calculation skipping the parallelized computation of the first weight value of the kernel and the first pixel value of the input feature map if the first weight value of the kernel is zero; and The method of claim 8 , further comprising performing a parallelized operation of the second weight value of the kernel and the second pixel value of the input feature map.

11. A computer-readable recording medium having recorded thereon a program for causing a computer to execute the method according to any one of claims 8 to 10.

Citation Information

Patent Citations

  • Neural network apparatus, neural network processor, and method of operating neural network processor

    US20180253636A1

  • System and method for an optimized winograd convolution accelerator

    US20190042923A1

  • Inference device, convolution computation method and program

    US20210004701A1