Hardware Accelerator Optimized Group Convolution-Based Neural Network Models

The hardware integrated circuit architecture optimizes group convolutions by partitioning input feature maps and using a broadcast input bus to enhance computational efficiency and reduce latency, addressing inefficiencies in existing neural network architectures.

JP2024536901AActive Publication Date: 2024-10-08GOOGLE LLC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024520990
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2021-10-08
Publication Date
2024-10-08
Estimated Expiration
2041-10-08

AI Technical Summary

Technical Problem

Existing neural network architectures face inefficiencies in performing group convolutions, leading to suboptimal hardware utilization and computational latency, particularly in mobile and edge computing devices.

Method used

Implementing a hardware integrated circuit architecture that supports group convolutions by partitioning input feature maps along the channel dimension and using a broadcast input bus to maximize parallel computation across multiply-accumulate cells, optimizing computational efficiency and hardware utilization.

Benefits of technology

This approach enhances computational efficiency and reduces latency in performing group convolutions, allowing for improved performance and accuracy in machine learning tasks, especially in resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024536901000001_ABST
    Figure 2024536901000001_ABST
Patent Text Reader

Abstract

A method, system, and apparatus (including computer-readable media) are described for processing an input image using an integrated circuit implementing a convolutional neural network with a group convolutional layer. The processing includes determining a mapping of partitions along a channel dimension of an input feature map to multiplication-accumulation cells (MACs) in a computational device of the circuit, and applying a group convolution to the input feature map. Applying the group convolution includes, for each partition, providing weights of the group convolutional layer to a subset of the MACs based on the mapping, providing an input of the feature map to each MAC in the subset via an input bus of the circuit, and computing a product at each MAC in the subset using the input and the weights of the group convolutional layer. An output feature map of the group convolutional layer is generated based on the accumulation of the products.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] background This specification generally relates to using hardware integrated circuits to perform group convolutions of convolutional neural networks.

[0002] A neural network is a machine learning model that uses one or more layers of nodes to generate an output, such as a classification, for a received input. Some neural networks include one or more hidden layers in addition to an output layer. Some neural networks may be convolutional neural networks configured for image processing, or recurrent neural networks (RNNs) configured for speech and language processing. Different types of neural network architectures can be used to perform a variety of tasks related to classification or pattern recognition, prediction involving data modeling, and clustering of information. Summary of the Invention

[0003] A neural network layer can have a corresponding set of parameters or weights. The weights are used to process an input (e.g., a batch of inputs) through the neural network layer and generate the layer's corresponding output for computing the neural network inference. The batch of inputs and the set of kernels can be represented as tensors, or multidimensional arrays, of inputs and weights. A hardware accelerator is a dedicated integrated circuit for implementing neural networks. The circuit contains a memory with locations corresponding to elements of the tensors that can be traversed or accessed using the circuit's control logic.

[0004] overview This specification describes techniques for efficiently implementing group convolutions on hardware neural network accelerators. Group convolutions convolve input feature maps by grouping them along the channel dimension of the input matrix, and each input group representing a group convolution is associated with a corresponding output group. In particular, based on these techniques, certain hardware and computing efficiencies can be achieved when utilizing group convolutions to process input images using a machine learning model, a convolutional neural network (CNN), implemented on an exemplary computing device, such as a tablet or smartphone.

[0005] An input image is processed using a hardware integrated circuit that implements a convolutional neural network with a group convolution layer. The processing includes determining a mapping of partitions along a channel dimension of an input feature map to multiplication-accumulation cells in a computing device of the integrated circuit, and applying a group convolution to the input feature map. Applying the group convolution includes, for each partition, providing weights of the group convolution layer based on the mapping to a subset of MACs, providing an input of the feature map to each MAC in the subset via an input bus of the circuit, and computing a product at each MAC in the subset using the input and the corresponding weight of the group convolution layer. An output feature map of the group convolution layer is generated based on the accumulation of the products.

[0006] One aspect of the subject matter described herein may be embodied in a method for processing an input image using a hardware integrated circuit configured to implement a convolutional neural network including a plurality of neural network layers, the neural network layers including a group convolution layer. The method includes identifying control parameters defining a plurality of partitions along a channel dimension of an input feature map, determining a mapping of the partitions to multiplication-accumulation cells (MACs) in a computing device of the integrated circuit, and applying a group convolution to the input feature map for the group convolution layer.

[0007] The applying includes providing group convolutional layer weights to a subset of the multiple MACs based on the determined mapping for each of the partitions, providing a respective input of the input feature map to each MAC in the subset via an input bus of the integrated circuit, and computing a product at each MAC in the subset using the respective input and a corresponding weight of the group convolutional layer. The method includes generating an output feature map of the group convolutional layer based on an accumulation of the products.

[0008] These and other implementations may each optionally include one or more of the following features. For example, in some implementations, determining the mapping of the partitions to the multiplication-accumulation cells includes determining the mapping based on a number of channels in each of the partitions. In some implementations, each partition of the multiple partitions includes a respective number of input channels corresponding to a respective size of the partition.

[0009] Generating the output feature map includes generating the output feature map based on a respective size of each partition. In some implementations, generating the output feature map includes computing a plurality of products using a subset of the MACs and generating an accumulation of products from the plurality of products. The method can include accessing information describing a hardware configuration of the computing device and determining a respective size of each partition based on the hardware configuration of the computing device.

[0010] In some implementations, the input bus includes a broadcast function, and the method further includes broadcasting, for each partition, the multiple inputs of the input feature map to the computation device of the integrated circuit via the input bus. The method may also include broadcasting, for a first partition of the input feature map, a first input of the first partition to each MAC in the subset via the input bus, where the broadcasted first input is reused during computation of the group convolutional layer. In some implementations, the first partition of the input feature map corresponds to a first partition of the output feature map, and the first input has reuse for an output of the first partition of the output feature map.

[0011] Other implementations of this and other aspects include corresponding systems, apparatus, and computer programs configured to perform the actions of the method and encoded on a computer storage device. One or more computer systems may be so configured by software, firmware, hardware, or a combination thereof installed on the system, during operation the system performs the actions. One or more computer programs may be so configured by having instructions that, when executed by a data processing device, cause the device to perform the actions.

[0012] The subject matter described herein may be implemented in certain embodiments and may achieve one or more of the following advantages: Leveraging example hardware architectures of dedicated integrated circuits, techniques are described for achieving improved performance of convolutional neural networks that include group convolutional layers, i.e., layers that perform group convolutions rather than depth-wise convolutions or full convolutions.

[0013] The hardware architecture includes a particular type of memory layout, a broadcast input bus, and a configuration of multiply-accumulate cells that can implement group convolutions with improved computational efficiency and hardware utilization compared to conventional architectures. The input bus is coupled to the multiply-accumulate cells and configured to broadcast inputs to some (or all) of the multiply-accumulate cells. The broadcast feature allows parallelization of the computation of inputs that are reused when computing the output channels of the corresponding group convolution.

[0014] This architecture can be used to optimize the execution of various types of group convolution-based neural networks, allowing a broader range of group convolution concepts to be applied to a variety of computer vision tasks. For example, a compiler or associated control logic can be used to determine the optimal mapping of group convolution operations to multiply-accumulate cells in a computational unit of a circuit.

[0015] The mapping may be determined to optimize various aspects of the computational operation, such as maximizing the overall utilization of the computing device, minimizing the overall latency of the operation, or both. An advantage of a particular mapping is that it can minimize the number of off-chip communications required to obtain new or additional parameters for a given computation. An exemplary device (e.g., a host) that determines the mapping may be off-chip relative to the integrated circuit. In some implementations, a compiler and other related control logic may be incorporated into the exemplary device.

[0016] Details of one or more implementations of the subject matter described herein are set forth in the accompanying drawings and the description below. Other potential features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. [Brief description of the drawings]

[0017] [Figure 1]FIG. 1 is a block diagram of an example computing system for performing group convolution on an image. [Diagram 2] FIG. 2 is a block diagram illustrating an example grouping used for group convolution. [Diagram 3] FIG. 1 illustrates example attributes of a machine learning model for different convolution operations. [Figure 4] FIG. 2 is a block diagram illustrating operations corresponding to different layer blocks of a convolutional neural network. [Diagram 5] FIG. 2 is a diagram of an example architecture of a convolutional neural network model that can be used in the example computing system of FIG. [Figure 6] FIG. 1 illustrates an exemplary hardware computation tile of a hardware integrated circuit used to perform computations of a convolutional neural network. [Figure 7A] 1 is a block diagram illustrating an exemplary mapping of partitions to subsets of multiply accumulate cells. [Figure 7B] FIG. 2 is a block diagram illustrating an example input bus that provides respective inputs to multiply-accumulate cells of a hardware computation tile. [Figure 8] FIG. 1 is an example block diagram illustrating certain attributes of full convolutions, depth-wise convolutions, and group convolutions. [Figure 9] FIG. 1 is a diagram of an example process for applying group convolution using a hardware integrated circuit. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0018] Like reference numbers and designations in the various drawings indicate like elements. Detailed Description 1 is a block diagram of an exemplary computing system 100 for performing group convolution on an input image. The system 100 generally includes an exemplary convolutional neural network 102 configured to process an image 104, i.e., process intensity values ​​of pixels of the image. The convolutional neural network 102 includes an exemplary neural network architecture based on multiple convolutional neural network layers 108. In the example of FIG. 1, the convolutional neural network 102 includes multiple convolutional neural network layers 108. For example, the convolutional neural network 102 includes N (or N sets) layers, where N is an integer greater than 1.

[0019] Different types of CNN architectures 106 can be used to perform different machine learning tasks. For example, the machine learning task can be a computer vision task (also called an "image processing task"). In other words, the neural network can be configured to receive an input image and process the input image to generate a network output for the input image, i.e., to perform some image processing task. In this specification, processing the input image refers to using the neural network to process the intensity values ​​of the pixels of the image. For example, the task can be image classification, and the output generated by the neural network for a given image can be a score for each of a set of target categories, each score representing an estimate of the likelihood that the image contains an image of a target belonging to that category.

[0020] As another example, the task may be image embedding generation, where the output generated by the neural network may be a numerical embedding of the input image. As yet another example, the task may be object detection, where the output generated by the neural network may identify locations in the input image, e.g., bounding boxes or other geometric regions in the image in which a particular type of object is depicted. As yet another example, the task may be image segmentation, where the output generated by the neural network may define, for each pixel in the input image, which of multiple categories the pixel belongs to. However, more generally, the task may be any of a variety of tasks, including tasks that process inputs other than images.

[0021] Some image processing tasks may involve object detection, data classification, pattern recognition, or image recognition, as well as computational prediction involving data modeling and information clustering. For example, a task may involve object detection, where the CNN processes an image to detect a particular object and, upon detection, generates an output that identifies the object. Another task may involve data / image classification, where the CNN processes an image to determine a classification of the image and generates a particular classification output for the image based on the content of the image. Another task may involve pattern recognition, where the CNN processes an image to identify or recognize a particular pattern in the image and generates an output indicative of the recognized pattern based on the content of the image. Another task may involve general image recognition, where the CNN processes an image to identify or recognize various elements of the image and generates an output indicative of the recognized elements based on the content of the image.

[0022] In some implementations, the convolutional neural network 102 is implemented in or accessible by an exemplary mobile device 110. The mobile device 110 may be a smartphone, tablet, electronic notebook, laptop, game console, or related portable computing device. In some other implementations, the convolutional neural network 102 is integrated into or accessible by an exemplary cloud-based system, such as a server bank, server group, or multiprocessor system.

[0023] The convolutional neural network 102 can be implemented using one or more machine learning hardware accelerators 112. Each hardware accelerator 112 corresponds to one or more dedicated hardware integrated circuits 114. In general, the circuitry 114 is a hardware circuit (e.g., a dedicated hardware circuit) that performs neural network calculations. For example, some (or all) of the circuitry 114 can be a dedicated hardware circuit, such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-core neural network processor, or a multi-core neural network processor. The circuitry 114 may also be a dedicated graphics processing unit (GPU).

[0024] The hardware circuitry 114 is operable to accelerate computation of a neural network workload. In some implementations, the hardware circuitry 114 includes control logic, which may be implemented in hardware, software, or both. The control logic is used to issue instructions for the neural network computation, including obtaining and routing data used in the computation. The circuitry 114 may include memory for storing inputs, input activations, outputs, output activations, and parameters for each layer of the neural network. In some implementations, the circuitry 114 includes dedicated memory, shared memory, or both. For example, the circuitry 114 may include an input / activation memory for storing inputs, input activations, outputs, or output activations, and a parameter memory for storing a respective set of parameters for each neural network layer.

[0025] The circuit 114 may include a computational device, such as a hardware matrix unit, an arrangement of computational tiles, or a combination thereof. The computational device is used to perform neural network computations to process inputs through layers of a neural network. In some implementations, each matrix unit or individual computational tile includes one or more arrays of computational cells, such as multiply-accumulate cells that perform multiplication and accumulation operations. For example, each cell may perform a multiplication of an input and a weight value to generate a product and perform an accumulation of the product (e.g., an addition operation) over multiple clock cycles.

[0026] The circuit 114 implements full convolution, depth-wise convolution, and group convolution to convolve filters with different weights on corresponding portions of the input matrix for a given depth of the channel dimension of the input matrix. For example, the mobile device 110 uses the convolutional neural network 102 and the CNN layer 108 of the model to generate an image processing output 120, such as a recognition output or detection output, for a received input 104. For example, the input 104 may be an image of a laptop 122, and the mobile device 110 uses the convolutional neural network 102 to process the image and detect or recognize that the image includes a depiction of a laptop.

[0027] FIG. 2 is a block diagram including a representation of an input dataset 202 and an example grouping 203 for performing group convolution using inputs from the input dataset. In some implementations, the input dataset 202 is or is derived from a multidimensional matrix structure of inputs. For example, the matrix structure may be an input tensor that includes Zin channels, each with spatial dimensions X×Y. The matrix structure (or tensor) may represent either a set of inputs, a set of activation inputs, or a set of weight inputs. In some cases, the matrix structure of a set of activation inputs is referred to herein as an input feature map, and the matrix structure of a set of weight inputs is referred to as a kernel matrix structure.

[0028] In the example of FIG. 2, the input data set 202 is a matrix structure (or tensor) with three dimensions: two (X, Y) spatial dimensions and one (Z) channel dimension. With respect to spatial dimensions, in some implementations, these dimensions correspond to the space or location of a set of activation inputs. For example, if the convolutional neural network 102 is processing a two-dimensional image 104, the matrix structure may have two spatial dimensions that correspond to the spatial coordinates of the image, i.e., X, Y coordinates. With respect to the channel dimension, this dimension corresponds to features from the input (e.g., activation input). The channel dimension is described with reference to Z, Zin, or channel dimension, where a "channel" may correspond to a color channel of an image.

[0029] The system 100 is configured to determine the group convolution split by, for example, referring to the depth level of the channel dimension of the input data set 202. Each input channel may have a corresponding depth level. For example, the matrix structure of FIG. 2 has a depth level that extends along the Z dimension. As an example, if the exemplary matrix structure 202 represents a 3×3×3 image that is sent as a set of activation inputs to a convolutional neural network layer, the X and Y dimensions of the image (3×3) may be spatial dimensions, and the Z dimension (3) may be a channel dimension corresponding to R, G, and B values.

[0030] As described above, the system 100 can determine a partition of the group convolution along the channel dimension of the exemplary input feature map. For example, the system 100 can determine a first partition of the input group 210-1 along the channel dimension and a second partition of the input group 210-2 along the channel dimension. In some implementations, the system 100 determines n groupings 210-n along the channel dimension, where n is an integer equal to or greater than 1. In an example where the input feature map 202 represents a 3×3×3 image to be sent as a set of activation inputs, the first partition defining the input group 210-1 of the group convolution can correspond to the features of the nine “1” activation inputs (e.g., red values), the second partition defining the input group 210-2 of the group convolution can correspond to the features of the nine “2” activation inputs (e.g., green values), and the third partition defining the input group 210-3 of the group convolution can correspond to the features of the nine “3” activation inputs (e.g., blue values).

[0031] As described above, the group convolution convolves the input feature maps by grouping them along the channel dimension of the input matrix, and each input group 210-n representing the group convolution is associated with a corresponding output group 220-n. The convolutional neural network 102 uses one or more convolutional neural network layers 108 to generate an output 206 (e.g., classification) for the received input 202. For example, each convolutional neural network layer is associated with a set of kernels 204. The kernels 204 may be divided according to the configuration of the group convolution, so that each input group 210-n is convolved with a corresponding kernel / weight matrix to generate a convolution output 220-n. In the example of FIG. 2, the input group 210-1 is convolved with the corresponding kernel matrix 212 to generate the convolution output 220-1, while the input group 210-2 is convolved with the corresponding kernel matrix 214 to generate the convolution output 220-2.

[0032] The system 100 is configured to dynamically determine a value for a control parameter g, where g is an integer greater than 1. The system 100 is also configured to determine a group size by calculating Zin / g, where Zin is the number of input channels along the channel dimension of the input tensor and g is the number of groups defined by the control parameter. The control parameter g is used to define the number of group convolutions (e.g., splits). In some cases, the value of g may be dynamically determined by the system 100 or predefined by the system 100 for a given operation. For example, the control parameter g that defines the number of group convolutions may be predefined (and / or embedded) by a compiler of the system 100 or may be dynamically determined at run time.

[0033] In some implementations, the system 100 defines the number of group convolutions (e.g., splits) based on the particular type of machine learning task required and sets the value of the control parameter g accordingly. In some other implementations, the system 100 defines the number of group convolutions (e.g., splits) based on i) the type of machine learning task being processed, ii) the neural architecture of the convolutional neural network, iii) the computing environment, iv) performance goals, or v) a combination thereof. Exemplary computing environments may include cloud-based computing environments and mobile device computing environments. The performance goals may include speed, latency, hardware utilization, model accuracy, parameter size, or a combination thereof.

[0034] Group convolution can be described as a generalized form of convolution. In some implementations, the system 100 initializes a control parameter g by assigning a particular value to the control parameter. The initialized or assigned value of the control parameter g can be used to control the division of the group convolution. For example, if the system 100 determines that a convolution operation using data across the channel dimensions (e.g., a full convolution) is required, the system 100 sets the value of the control parameter g=1 and triggers and / or performs a full convolution using the associated data in the matrix structure 202.

[0035] Relatedly, the system 100 can determine groupings of depth-separable convolutions required for a given step in a larger neural network computation. For example, if the system 100 determines that two or more depth-separable convolutions using data from a portion of the channel dimension are required, the system 100 sets a control parameter to a desired value (e.g., g=4) and triggers and / or executes two or more (e.g., four) depth-separable convolutions using the associated data portions in the matrix structure 202. In some implementations, the computations of two or more group convolutions are performed sequentially, simultaneously, or a combination thereof. For example, some (or all) of the respective sets of computations for each of the two or more depth-separable convolutions can be performed sequentially or in parallel.

[0036] As mentioned above, the group / grouped convolution techniques described herein provide at least finer control over the utilization metrics and computational efficiency of the hardware resources of the exemplary ML accelerator. In some implementations, these group convolution techniques provide a multi-purpose block or control knob that is used to influence and control certain attributes or performance metrics of the exemplary machine learning model. For example, selecting a value for the control parameter g between 1 and the number of channels (z) provides a continuum between two exemplary constraints: full convolution and depth-wise separable convolution, as described in more detail below.

[0037] 3 illustrates exemplary attributes of a machine learning model. In general, the attributes correspond to various convolution operations performed using the convolutional neural network 102 described above. For example, attribute 302 indicates the number of parameters and multiplication-accumulation cells (MACs) used to perform a full convolution operation, attribute 304 indicates the number of parameters and multiplication-accumulation cells used to perform a depth-wise convolution operation, and attribute 306 indicates the number of parameters and multiplication-accumulation cells used to perform a group convolution operation.

[0038] The control parameter g and the configuration of group convolutions can be determined and / or adjusted to control the number of parameters (e.g., trainable parameters) used for a given task, as well as the number of multiplication-accumulation cells used to perform the operations of the task. Each of these example attributes 302, 304, 306 of the machine learning model has or can have a corresponding impact on various performance metrics of the model. For example, increasing or decreasing the number of trainable parameters and / or the number of multiplication-accumulation cells (or operations) has a corresponding impact on the accuracy, speed, and / or latency of the machine learning model. In another example, while the use of depth-wise convolutions can be a lightweight, low-cost (i.e., less resource-intensive) option compared to full convolutions, performing depth-wise convolutions in an integrated circuit of an ML accelerator often results in a lower utilization of the circuit's hardware resources.

[0039] For example, when performing a depth-wise (or depth-separable) convolution, a standard hardware array of circuit 114 that includes tens or hundreds of hardware multiply-accumulate cells may have a 3% utilization of those hardware cells in a given computation cycle, while incurring minimal or low latency. Thus, using a depth-wise convolution may be fast, but also inefficient due to low hardware utilization. Conversely, when performing a full convolution, the hardware array of circuit 114 may have a significantly higher utilization (e.g., 73%), resulting in a majority of the array's multiply-accumulate cells being used in a given computation cycle. Compared to a depth-wise convolution, this higher utilization when performing a full convolution often comes at the cost of significantly higher computation latency.

[0040] As mentioned above, the group convolution technique described herein provides finer control over the utilization metrics and computational efficiency of the hardware resources of an exemplary ML hardware accelerator. Selecting a value for the control parameter g between 1 and the number of channels (z) provides a continuum between two exemplary constraints: full convolution (308) and depthwise separable convolution (310). The system 100 can determine the partitioning of the group convolutions with reference to the depth level of the channel dimension, as shown in the example of FIG. 2. The control parameter g is used to define the number of group convolutions (e.g., partitions).

[0041] 3 illustrates an example number of parameters 320 and number of MACs 322 for a selection of different values ​​of g (324) between 2 and the number of channels (z) along a continuum between full convolution (308) and depth-wise convolution (310). In this example, the zin dimension is 256. Graph 312 illustrates an example of a reduction in the number of trainable parameters and the number of multiplication-accumulation cells (or operations) for a corresponding increase in the value of group convolution (g).

[0042] As described above, the circuit 114 may include a memory with locations corresponding to elements of a tensor that can be traversed or accessed using the control logic of the circuit to compute the output of a layer, such as a group convolutional layer. The elements (e.g., inputs or activations) retrieved from the memory must serve to compute multiple outputs of the layer. The number of weights (i.e., parameters) also varies with the size of the grouping. In some implementations, the transfer of parameters from the memory may be a bottleneck, increasing the latency of the computation. In determining a preferred neural network architecture, an exemplary set of search data or simulations may indicate a bottleneck with respect to parameter transfer time. The disclosed group convolutional concepts and group convolutional based neural blocks may then be used to define architectures that reduce the number of parameters and improve or accelerate the computation time of machine learning tasks.

[0043] FIG. 4 is a block diagram illustrating an example of process blocks 410, 420, and 430. Each process block 410, 420, 430 includes one or more layer blocks. In general, each process block 410, 420, 430 can be represented by a different layer block of a convolutional neural network. In the example of FIG. 4, each of the process blocks 410, 420, and 430 can be a subset of operations performed for a given convolution operation. The convolution operation is performed using a convolutional neural network 102, which can be implemented on the example hardware integrated circuit 114 described above.

[0044] A neural network block can describe a single layer, or a component of a neural network that includes multiple layers. A common block that is widely used in exemplary computer vision models, such as the mobile vision model, is the inverse bottleneck (IBN) layer block 402 ("IBN layer 402"). In general, an IBN block may be a macroblock of a larger neural architecture that combines multiple convolutional layers in some way. Multiple types of layers (or blocks), including an IBN layer, are used as building blocks to form an exemplary classification or object detection network.

[0045] The IBN layer 402 may include a point-wise convolution (404), a K×K depth-wise convolution (405), and a final point-wise convolution (406). The point-wise convolution expands the channel dimension, and an example of this point-wise convolution is shown in FIG. 4 as “1×1 Convolution (Expanded)”. A K×K depth-wise convolution kernel is applied to the expanded depth of the channel dimension following the point-wise convolution. The final point-wise convolution (406) projects the expanded channel dimension to smaller values. An example of this final point-wise convolution is shown in FIG. 4 as “1×1 Convolution (Projected)”.

[0046] The use of K×K depth-wise convolutions such as the IBN layer block 402 is very common because computing full convolutions over large or extended channel dimensions after dilation is very costly in terms of processing and computational resources. In some implementations, the point-wise convolutions (404) and the K×K depth-wise convolutions (405) are replaced by a K×K full convolution (fused dilation) process block, which represents the fused IBN layer 407. In general, the fused IBN layer 407 combines the dilation and depth-wise convolution operations into a single full convolution neural block.

[0047] Full convolution may involve a large number of parameters / weights and may require a significant proportion of the hardware computational resources of the integrated circuit. As previously mentioned, examples of such resources may include multiply-accumulate cells of a hardware computational array (e.g., a systolic array) of the circuit 114, a vector unit of the integrated circuit 114, or both. In contrast, the disclosed group convolution techniques implemented using the disclosed neural block alternatives such as blocks 414, 416, 422, 432 described below provide an improved approach to increasing the number of trainable parameters for a set of input channels (e.g., large input channels), thereby improving model accuracy, but at a lower computational cost compared to non-group convolution alternatives.

[0048] Referring now to process block 410, a grouped IBN progressive projection (or progressive expansion) block is shown, where the K×K depth-wise convolution (405) described above is replaced with a K×K group convolution (414) or (416). Process block 410 can have a first instance that implements a K×K group convolution (414) to perform a progressive projection of the channel dimension, or a second instance that implements a K×K group convolution (416) to perform a progressive expansion of the channel dimension.

[0049] In a first example of process block 410, the system 100 can generate an augmented feature map from an input feature map (e.g., input 438) by applying a 1×1 convolution (dilation) (404) to the input feature map. The input feature map can be an h×w feature map with c1 channel. The augmented feature map can be an h×w feature map with c2 channels, where c2 is greater than c1. In some implementations, the 1×1 convolution has more output filters than input filters. A K×K group convolution (414) is applied to the augmented feature map to perform a progressive projection of the channel dimension. For example, the convolutional neural network 102 can perform a progressive projection on the augmented feature map using a group convolution implemented in a group convolution layer of the convolutional neural network 102. The grouped IBN progressive projection can provide flexibility to trade off parameters dedicated to the projection with the main K×K convolution operator.

[0050] In this first example of a process block 410, the final point-wise convolution (406) projects the expanded channel dimension to a smaller value. Thus, the K×K kernel associated with the group convolution can perform an initial reduction in channel size before the 1×1 projection (406) reduces the channel size to its final value. Each summation block 418 is an optional residual (or skip) connection that can be used to sum the example convolution output 436 with the input 438 provided to a given process block (e.g., 410). The example sum 440 is passed as the output of the operation performed in the corresponding process block.

[0051] In a second example of process block 410, the system 100 may generate an initial dilated feature map from an input feature map (e.g., input 438) by applying a 1×1 convolution (dilation) (404) to the input feature map. This initial dilated feature map may be an h×w feature map with c2 channels, where c2 is greater than c1. The system 100 generates an augmented feature map from the initial dilated feature map by applying a K×K group convolution (416) to the initial dilated feature map. For example, the convolutional neural network 102 may generate the augmented feature map from the initial dilated feature map using a group convolution implemented in a group convolution layer of the convolutional neural network 102. The augmented feature map may be an h×w feature map with c3 channels, where c3 is greater than c2. This grouped IBN progressive dilation operation may provide flexibility to trade off parameters dedicated to the dilation with the main K×K convolution operator. In grouped IBN progressive extension, some of the extension layers may be kept unfused and allow channel-wise convolution between groups before the main K×K convolution. The final point-wise convolution (406) in process block 410 projects the extended channel dimensions to smaller values.

[0052] Now referring to process block 420, this process block is a fused grouping IBN block in which the 1×1 convolution (dilation) (404) and K×K depth-wise convolution (405) described above are replaced with a K×K group convolution (422). This K×K group convolution (422) includes the designation "fused dilation" because it can at least replace point-wise (404)+depth-wise (405) pairs and dilate channel dimensions by fusing aspects of their operations via the K×K group convolution (422). Thus, in process block 420, the system 100 can generate an augmented feature map from an exemplary input feature map (e.g., input 438) by applying the K×K group convolution (422) to the input feature map. The exemplary input feature map can be an h×w feature map with a c1 channel. The augmented feature map can be an h×w feature map with a c2 channel, where c2 is greater than c1. The final point-wise convolution (406) of process block 420 projects the expanded channel dimension to smaller values. As mentioned above, the corresponding sum 440 is passed as an output of the particular operation performed in process block 420.

[0053] In some implementations, the fused group convolution block 422 provides an alternative to the fused IBN layer 407, allowing for more efficient processing along the channel dimension. For example, these efficiencies may be realized in later stages of the computer vision model. In some cases, these later stages correspond to cases where the data resolution associated with the convolution along the channel dimension is very large. The processing speed improvement obtained by the fused group convolution may be particularly optimized when the process block 420 including the group convolution operation is performed using a particular type of dedicated integrated circuit. For example, the dedicated integrated circuit may be a neural network processor that includes a broadcast input bus that broadcasts layer inputs from a memory to one or more computational cells of the circuit, as described below with reference to FIG. 6.

[0054] The fused group convolution block 422 may require a slightly higher number of parameters compared to the grouped IBN layer 414. On the continuum between the two constraints of full convolution and depthwise separable convolution, the fused group IBN 422 is higher on the continuum. For example, the fused grouped IBN layer 422 may be closer to full convolution along the continuum from depthwise convolution to full continuum.

[0055] Now referring to process block 430, this process block is a grouped IBN block in which the K×K depth-wise convolution (405) described above is replaced with a K×K group convolution (432). As described above, the system 100 applies a 1×1 convolution (404) to the input 438 to generate an extended feature map. The K×K group convolution (432) is applied at a group convolution layer of the convolutional neural network 102. The K×K group convolution (432) allows the total number of input and output filters to be the same. As with the other process blocks, the final point-wise convolution (406) of process block 430 projects the extended channel dimension to smaller values, and the corresponding sum 440 is passed as the output of the particular operation performed in process block 430.

[0056] The convolution operations performed in process block 430 may involve smaller expansion ratios compared to the baseline IBN layer. These smaller expansion ratios may reduce the number of parameters. To recover the number of parameters, the convolution operations in process block 430 (and other process blocks) may use group convolutions of K×K kernels that exploit inter-channel information. The K×K group convolutions (432) may be interleaved with other block types that include convolutions along the input channel dimension. This interleaving pattern may mitigate the lack of input channel convolutions between groups.

[0057] In general, each of the architectures of process blocks 410, 430 replaces K×K depth-wise convolutions with K×K group convolutions. At least one advantage of replacing K×K depth-wise convolutions with K×K group convolutions is that the K×K group convolutions reduce latency and generate more trainable parameters compared to full convolutions. The additional trainable parameters from the use of the K×K group convolutions contribute to improved model accuracy. This improved accuracy can be achieved with only a small or minimal increase in latency compared to depth-wise convolutions.

[0058] Replacing depth-wise convolutions with group convolutions may be specific to the convolution operations of a particular type of hardware accelerator, such as a tensor processing unit (TPU) configured for mobile devices or edge computing applications. In some implementations, for K×K depth-wise convolutions, K×K group convolutions may be configured to achieve a more efficient hardware mapping in terms of the hardware layout of the integrated circuit 114. For example, instead of a one-to-one relationship between input and output channels, group convolutions can leverage the concept of blocks to perform convolutions along input channels in groups. This provides the benefit of algorithms that can use more information along the input channels, improving the representational capabilities at one or more layers of the computer vision network.

[0059] As the computation of a certain machine learning task progresses to deeper layers of a CNN, the channel dimension may become large. To achieve certain performance improvements such as output accuracy and computation / processing speed, conventional approaches have considered the use of fused IBN layer blocks such as the fused IBN layer 407 described above. However, the large dimensions of each of the input channels (zin) make the use of fused IBN layers impractical due to the cost of performing full convolutions and the slow computation speed.

[0060] Compared to traditional approaches, the group convolutions of each of the process blocks 410, 420, and 430 provide an alternative to neural blocks that can each improve model performance while minimizing certain processing penalties. For example, the fused grouped IBN block 422 can be used to achieve improved performance without the latency and augmented / large dataset processing penalties associated with traditional or fused IBN layers. In general, each of the group convolution blocks 414, 416, 422, 432 is a neural network block that can include one or more group convolution layers. Additionally, each group convolution block 414, 416, 422, 432 can be interleaved with other layers or block types that implement convolutions along the input channel dimension. An example of an interleaved neural block is shown in FIG. 5.

[0061] The interleaving pattern can mitigate the lack of input channel convolutions between groups. For example, group convolutions use inter-channel information, but such information is limited to groups only, and when using groups, a shuffle operation is typically required to mix the information along the channel dimension. The interleaving pattern also avoids the use of these additional shuffle operators (e.g., ShuffleNet). Similar to blocks 410 and 430, the fused group convolution operations, e.g., via block 422, can generate more trainable parameters compared to baseline IBN, and can enable processing speedups (e.g., run faster) compared to baseline IBN and fused IBN layers for certain types of tensor shapes.

[0062] In some implementations, depth-wise convolution limits input and output channels to the same size, while group convolution can enable different sizes. For example, a K×K group convolution (414) kernel can perform an initial reduction in channel size before 1×1 projections reduce the channel size to its final value. One assumption here is that once the group convolution reduces the channels to their final channel dimensions, thereby eliminating the 1×1 projections, performance may be less than optimal (e.g., degraded) due to the small channel depth per group (zo). However, this can be mitigated if group convolution is natively supported by an integrated circuit configuration that allows for the implementation of incremental expansion. For example, the circuit configuration can include an input bus that can pass inputs to separate MACs on the integrated circuit. This is described in more detail below with reference to Figures 6-9.

[0063] The system 100 is operable to select from a number of different types of group convolution blocks. For example, in addition to the group convolution blocks 414, 416, 422, 432 described above, the system 100 can also select a fused projection grouped convolution block that implements a K×K group convolution. The fused projection grouped convolution fuses point-wise projections into a K×K main convolution (instead of fusing point-wise extensions). Depending on the shape of the tensor, the fused projection grouped IBN can provide more trainable parameters while achieving similar processing efficiency compared to the fused IBN. The fused projection grouped IBN keeps some of the projection layers unfused and allows channel-wise convolution between groups after the main K×K convolution.

[0064] 5 is an example architecture 500 of a convolutional neural network of the machine learning model 102 that can be used in the example computing system of FIG. 1. The neural architecture 500 can implement multiple respective sets of convolution operations to obtain various characteristics of an example input image. In some implementations, the system 100 is operable to strategically select and arrange various IBN layer / block options from the grouped IBN options and ungrouped IBN options described above with reference to the example of FIG. 4. In some implementations, the system 100 is operable to select and arrange the operations in a stacked, connected, or combined configuration (i.e., place and combine them together) to form an example architecture 500 that can be used to implement a large computer vision network / model.

[0065] In the example of FIG. 5, the architecture 500 includes a sequence of layer blocks, where each of a first subset of layer blocks in the sequence is configured to perform an operation to process an input image. More specifically, the architecture 500 includes a first subset of layer blocks 502, a second subset of layer blocks 504, and a third subset of layer blocks 506. In some implementations, at least one subset of layer blocks 502, 504, 506 may include an alternating sequence of two or more different types of neural blocks. For example, the subset of layer blocks 502 may have an alternating sequence including fused IBN layers and fused group IBN layers.

[0066] A fused IBN layer may represent a first separate neural block 512, such as fused IBN layer 407 (above), that combines the dilation and depth-wise convolution operations into a single fully convolutional neural block, while a fused group IBN layer may represent a second separate neural block 514, such as fused group IBN 422, that replaces point-wise (404)+depth-wise (405) pairs and allows aspects of their operations to be fused via K×K group convolutions (422) to extend the channel dimension. As explained above, this block may provide an alternative to the fused IBN layer 407 that allows for more efficient processing along the channel dimension.

[0067] More specifically, the first neural block 512 may be an ungrouped IBN block and the second neural block 514 may be a grouped IBN block. Each of the first neural block 512 and the second neural block 514 includes one or more convolutional neural network layers. Thus, the layer block 502 may include an alternating sequence of grouped IBN layers and ungrouped IBN layers. For example, the alternating sequence of layer blocks may include grouped convolutional layer blocks interleaved with non-grouped convolutional layer blocks.

[0068] 6 illustrates an exemplary hardware computational tile 600 ("computational tile 600") used to perform computations of a convolutional neural network. Multiple computational tiles 600 can be arranged or configured to form a special-purpose processor, such as a neural network processor, an application specific integrated circuit, or a hardware accelerator. In some implementations, computational tile 600 is one of multiple computational tiles included in hardware integrated circuit 114 described above.

[0069] Each computational tile 600 is configured to independently perform the computations (e.g., neural network computations) required for one or more layers of the multi-layer neural network. For example, the computational tile 600 is configured to execute multiple computational threads based on data and instructions retrieved locally from the memory (described below) of the computational tile 600. In some cases, data and instructions are received at the computational tile 600 via a communication / data bus 602 of the hardware integrated circuit 114. For example, the data bus 602 can be coupled to each computational tile 600 to route data and compute instructions between the different computational tiles 600. Thus, for a given computational tile 600, data and instructions can be received at the computational tile 600 from a source external to the tile. The source can be another computational tile 600, a controller above the hardware circuit 114, a host device external to the hardware circuit 114, or a combination of these.

[0070] The computational tile 600 receives a set of data 604, which may include instructions and operands for performing a neural network computation. As described below, the data 604 may be instructions and operands for performing a group convolution operation. The computational tile 600 uses local control logic (e.g., a controller) to identify the instructions and operands in response to an analysis of the data 604. The control logic generates control signals for processing the operands based on the one or more instructions. For example, the control logic uses one or more opcodes of the instructions to generate control signals for each of the corresponding components of the computational tile 600. The components cooperate based on the control signals to perform the group convolution operation.

[0071] In the example of FIG. 6, the local control logic is represented by at least a tensor controller 606 ("tensor control 606") and a memory access controller 608 ("DMA control 608"). The tensor control 606 includes a tensor traversal unit (TTU) 626. In general, the tensor control 606 manages tensor traversal operations for neural network computations using the TTU 626, as described in more detail below. The DMA control 608 manages the writing / storing of operands of a given computation to memory locations in a local memory included in the computation tile 600. The DMA control 608 also manages the reading / retrieval of operands of a given computation from memory locations in the local memory. In some implementations, the DMA control 608 cooperates with the TTU 626 to perform memory access operations. In some other implementations, the DMA control 608 includes a dedicated TTU for performing memory access operations independent of cooperation with the TTU 626.

[0072] Each computational tile 600 includes a memory for storing inputs to a neural network layer and for storing weights of the layer. The inputs and weights correspond to operands (or data) arriving at the computational tile 600 via a communication bus 602. In the example of FIG. 6, the memory includes a first memory 610 for storing inputs to the neural network layer and a second memory 612 for storing weights of the neural network layer. The first memory may be a narrow memory that stores, reads, or otherwise manages data in, for example, 8-bit chunks, while the second memory may be a wide memory that stores, reads, or otherwise manages data in, for example, 32-bit chunks. The first memory and the second memory can each store, read, and manage data with more or fewer bits. In some implementations, each of the first memory 610 and the second memory 612 is a sub-portion of a larger local memory of the computational tile 600. In some other implementations, each of the first memory 610 and the second memory 612 is a separate local memory device of the computational tile 600 .

[0073] Each computational tile 600 includes a respective computational unit 614 configured to perform an arithmetic operation, such as addition or multiplication, using operands corresponding to inputs and weight values ​​passed to the computational tile 160. Each computational unit 614 may include multiple computation blocks. In the example of FIG. 6, the computation blocks are each identified as "Cell #_". Each computational block (or cell) includes a multiplication-accumulation cell 616 and a summation register 618. The multiplication-accumulation cell 616 is configured to perform an arithmetic operation (e.g., multiplication) using the inputs and weights.

[0074] For example, the arithmetic operations include multiplying inputs or activations obtained from the narrow memory 610 with weights obtained from the wide memory 612 to generate one or more sets of accumulated values. Each computational tile 600 includes a respective input bus 617 that allows inputs to be broadcast, passed, or otherwise provided to individual blocks or multiplication-accumulation cells 616 of the computational device 614. In some implementations, the input bus 617 is a broadcast input bus that broadcasts inputs of a group convolutional layer from the narrow memory to one or more multiplication-accumulation cells. The sum registers 618 are used to store partial sums that can be grouped to form a set of accumulated output values ​​620.

[0075] Each computational tile 600 includes an output bus 622 and an activation unit 626 coupled to the output bus 622. The computational tile 600 may optionally include one or more registers 624 coupled to the output bus 622. In some implementations, each of the one or more registers 624 is an individual shift register used to shift output values ​​620 (e.g., accumulated values ​​or partial sums) of the neural network layer to the activation unit 626. The activation unit 626 is operable to apply a non-linear activation function to the output values ​​620. The activation unit 626 is operable to generate a set of output activations for the layer based on the activation function applied to the outputs 620.

[0076] The activation unit 626 is coupled to the first memory 610 and configured to pass output activations to the narrow memory 610 for storage in the memory. The output activations correspond to layer outputs of a neural network layer. For example, the set of output activations may be the output (or a portion of the output) of a group convolutional layer that applies group convolutions to input feature maps to generate an output feature map. Thus, the output activations may correspond to the output feature map. In some implementations, the activation unit 626 is operable to aggregate multiple partial sums or accumulated values ​​into a vector of values.

[0077] Each computational tile 600 may include an optional group convolution control 635 operable to manage and implement the operation of a group convolution layer in the computational tile. For example, the computational tile 600 may receive instructions to process a set of inputs through a group convolution layer by applying a group convolution to one or more input groupings along the channel dimension of the input feature map. Individual inputs of one or more input groupings may be stored across different computational tiles 600 as well as in various locations of the memory 610. Each memory location is identified by a respective address. The individual memory locations (or their respective addresses) that store the respective group convolution inputs may correspond to elements of an input tensor, such as a multidimensional input tensor or input feature map, stored in the first memory 610.

[0078] The group convolution control 635 can obtain or determine the memory address of the corresponding group convolution input to be broadcast to one or more multiplication-accumulation cells 616. In some implementations, the group convolution control 635 is in data communication with the DMA control 608 and interacts with the DMA control 608 to issue addresses for accessing the memory locations of the corresponding group convolution inputs. In some other implementations, the group convolution control 635 communicates directly with the first memory 610 to access the memory addresses of the corresponding group convolution inputs. The group convolution control 635 can perform similar operations to access the weights of the parameter tensors stored in the second memory 612 and pass or load the weights to the corresponding multiplication-accumulation cells. The group convolution control 635 is further described below with reference to FIG. 8.

[0079] Each computational tile 600 is configured to execute one or more computational threads. In some implementations, the hardware circuitry 114 uses some (or all) of the computational tiles 600 to execute multiple computational threads in parallel. The computational threads may execute over multiple clock cycles and are used to process inputs to a neural network layer to generate outputs of the neural network layer. For example, a loop nest of group convolutional layers that apply group convolutions to an example input feature map can be executed by assigning respective subsets of computational threads to one or more computational tiles 600, as described in more detail below. FIG. 6 includes a reference map 630 that shows the respective attributes of various components in the computational tile 600. The reference map 630 is shown for clarity but is not included in the computational tile 600. The attributes include whether a particular component is an apparatus, a storage device, an operator, a control device, or a data path.

[0080] 7A is a block diagram illustrating an example mapping of partitions to subsets of multiply-accumulate cells 616. FIG. 7B is a block diagram illustrating an example input bus 617 that provides respective inputs to the multiply-accumulate cells 616 of the hardware computation tile 600.

[0081] Referring first to FIG. 7A, as described above, data and instructions can be received at the computational tile 600 from a source external to the tile. The source can be another computational tile 600, a controller above the hardware circuit 114, a host device external to the hardware circuit 114, or a combination of these. Based on the type of group convolution operation being performed, the system 100 can select from various predefined values ​​of a control parameter g, which represents the number of group convolutions (e.g., splits). For example, the system 100 can select specific values ​​of g for different group convolution neural blocks of a given neural network architecture. In some implementations, the value of g is predefined at the external host for a given operation and passed to the controller of the hardware circuit 114.

[0082] In some implementations, the upper controller identifies one or more partitions along the channel dimension (e.g., Zin) of the input feature map based on the control parameter g. The system 100 can form one or more groupings along the channel dimension based on the one or more partitions. In the example of FIG. 7, a respective grouping of input channels is formed along Zin of the exemplary input tensor or input feature map. Each respective grouping can be mapped to a corresponding multiplication-accumulation cell 616-1, 616-2, 616-3, 616-4, as described below. Furthermore, each grouping of input channels includes a respective size. More specifically, each grouping includes a respective number of input channels corresponding to the respective size of the grouping. For example, as shown in the diagram of FIG. 7A, the size parameter S of the grouping or partition can be defined by Zin / g, where Zin is the number of input channels along the channel dimension of the input tensor, and g is the number of groups defined by the control parameters above.

[0083] The system 100 is operable to determine a mapping 700 of groupings to multiply-accumulate cells 616 in the computational device 614. For example, the mapping can be determined locally in the computational tile 600 or using a higher level controller of the integrated circuit 114. In some implementations, a host device determines the mapping, generates mapping instructions, and passes the mapping instructions to a higher level controller, which then passes the instructions to the computational tile 600. For example, the integrated circuit 114 can include a host interface block for receiving data or instructions passed to the higher level controller from an external host device.

[0084] In some implementations, the system 100 (e.g., a host or integrated circuit controller) determines the mapping based on the number of channels in each partition. For example, either the host device or a higher-level controller can access information describing the hardware configuration of the integrated circuit 114, including the configuration of the computational units 614 in each computational tile 600. Based on these hardware configurations, the system 100 can determine the respective size of each grouping with reference to the number or layout of multiply-accumulate cells of the computational units 614. For example, the system 100 can determine an optimal mapping of groupings and respective inputs to multiply-accumulate cells 616 to maximize the overall utilization of the computational units 614, as described in more detail below.

[0085] 7B, an exemplary architecture is shown in which an input bus 617 coupled to narrow memory 610 broadcasts inputs / activations to one or more multiply accumulate cells 616. Inputs can be shifted or sent one at a time onto the input bus 617 for reception by a corresponding multiply accumulate cell 616.

[0086] In some implementations, the input bus 617 is a broadcast input bus that broadcasts group convolutional layer inputs obtained from the narrow memory 610 to one or more multiplication-accumulation cells 616. For example, the input bus 617 can pass (or broadcast) respective inputs to individual multiplication-accumulation cells 616-1, 616-2, 616-3, 616-n of the integrated circuit 114. Thus, the input bus 617 includes a broadcast function that enables the integrated circuit 114 to broadcast multiple inputs of each grouping along the Zin dimension of the input feature map to corresponding multiplication-accumulation cells 616 based on the determined mapping described above.

[0087] In some implementations, the same inputs are shared between some (or all) multiply accumulate cells 616 in a subset of cells 616. The width of the input bus 617 must be wide enough to provide inputs that are broadcast to a number of multiply accumulate cells 616 corresponding to a given subset of computational devices 614. For example, with respect to the structure of the input bus 617, if the number of multiply accumulate cells 616 in the computational device 614 is four and the data resolution / width of the inputs (or activations) is eight bits, then the input bus 617 can be configured to provide up to four input activations per cycle. In this example, each multiply accumulate cell 616 can receive one activation out of the four broadcast activations.

[0088] The system 100 can broadcast the first input ("0") of each of the first groupings (along Zin) of the input feature maps to each multiply-accumulate cell 616-1, 616-2, 616-3, 616-n in the subset of multiply-accumulate cells 616 via the input bus 617. Similarly, the system 100 can broadcast the second input ("1") of each of the second groupings (along Zin) of the input feature maps to each multiply-accumulate cell 616-1, 616-2, 616-3, 616-n in the subset of multiply-accumulate cells 616 via the input bus 617. The broadcasted first and second inputs are reused during the computation of the group convolution layer. For example, each input 702 ("0"), 704 ("1"), 706 ("2"), 708 ("3") can correspond to a different grouping along the channel dimension of the activation tensor.

[0089] In some implementations, each input 702, 704, 706, 708 can be broadcast and reused across each multiply-accumulate cell to parallelize the computation of the group convolution layer. For example, to perform a portion of the group convolution, the reused input is multiplied by a different individual weight value that is retrieved from a memory location in the wide memory 612 and routed to a respective weight register of the multiply-accumulate cell 616. This reuse attribute is described in more detail below with reference to FIG. 8. By parallelizing the computation of each Zin grouping in this manner, the circuit 114 can maximize the utilization of the computation unit 614 and the corresponding multiply-accumulate cell 616 therein. More specifically, a circuit architecture for performing group convolution that allows input broadcasting across at least the multiply-accumulate cells 616 of the circuit 114 can achieve utilization and efficiency levels that exceed conventional circuit architectures used to perform group convolution.

[0090] Moreover, at least one advantage of the group convolution-based neural block is that the computation intensity can be varied. For example, the computation intensity can be adjusted to control the number of operations performed in the multiplication-accumulation cell 616 and the overall cell utilization per weight obtained. This allows the system 100 to optimize the parameter bandwidth. In some cases, applications for inference computation at the edge may be memory bandwidth limited. Group convolutions can be used to maximize the overall computation time and minimize (or avoid) the need for extra memory operations to obtain new weights from memory.

[0091] FIG. 8 is an example block diagram 800 illustrating certain attributes of full convolution, depth-wise convolution, and group convolution. More specifically, block diagram 800 illustrates respective reuse attributes of inputs processed during a full convolution operation (802), a depth-wise convolution operation (804), and a group convolution operation (806). In the example of FIG. 8, reuse is illustrated with reference to block 802 (full convolution) and block 806 (group convolution). For example, the first block 802 illustrates that each input 812 is reused to compute each output channel 813 of the full convolution, while the second block 804 illustrates that each input 814 is used only once to compute a corresponding output channel 815 of the depth-wise convolution.

[0092] The third block 806 indicates that inputs can have a measure of reuse when computing the output channels 817, 818 corresponding to a given group convolution. For example, in block 806, each input 816 has a certain reuse factor (e.g., 2) when computing the corresponding output channels 817, 818. The reuse factor of an input to a group convolution layer corresponds to the size of the grouping processed by that layer. In some cases, each element from an input channel is reused to compute the output channel that belongs to that group. With this in mind, the reuse factor is determined based on the size of the group.

[0093] In some implementations, a first opcode in an instruction received at a computational tile 600 specifies a value of a control parameter g indicating the splitting and subsequent grouping of group convolution inputs of an input tensor, and a second opcode in the instruction specifies a value of a size parameter indicating the reuse factor of the inputs in the grouping. Each computational tile 600 can also use local group convolution control 635 to determine the size parameter based on the hardware configuration of the computational tile 600, the group convolutions being performed in the computational tile 600, or both.

[0094] The circuit 114 may include 32 or 64 multiplication-accumulation cells in the computation unit 614. The group convolution control 635 may identify one or more opcodes in the instruction that specify a group convolution operation in the computation tile 600. For example, the group convolution control 635 may determine that the group convolution is a K×K group convolution (416) and perform a progressive expansion of the channel dimension. The group convolution control 635 may determine that this particular type of convolution operation is applied in one or more group convolution layers of the grouped IBN progressive expansion neural block 416.

[0095] In some implementations, the system 100 can select a predefined value of the control parameter g specific to a particular type of convolution operation. For example, for a given group convolution neural block 412, 416, 422, or 432, the system 100 can select from predefined control values ​​g for different group convolution operations associated with each neural block. The groupings of the group convolution operations are defined from the control values. In some implementations, the group convolution control 635 of a given computational tile 600 determines the local mapping 700 of the groupings to the multiplication-accumulation cells 616 of the tile. For each grouping, the group convolution control 635 can identify a group convolution layer of the neural block 416 to process the group convolution input 816 of the operation and set the size parameter S depending on the grouping and the operation.

[0096] As mentioned above, each grouping includes a respective number of input channels corresponding to the respective size of the grouping, so that the size parameter S of the grouping can be defined by Zin / g. Each grouping represents a group convolution and is associated with a corresponding channel of the output group 220-n. Each grouping can include a respective input derived from the input feature map. In the example of FIG. 8, each input 816 can be from a different grouping along the channel dimension of the input tensor. In some implementations, the group convolution control 635 analyzes one or more opcodes of the instruction and determines based on the opcode that the computational tile 600 applies K×K group convolutions (416) to perform a progressive expansion of the channel dimension that involves increasing the number of channel dimensions.

[0097] The group convolution control 635 can determine a size parameter S for various aspects of the group convolution and adjust the local mapping of the grouping as the K×K group convolution (416) progresses. In some implementations, this progressive dilation operation is represented statically as part of the neural network. For example, to have an overall dilation of the output channel of e, the K×K group convolution (416) can dilate the output channel by a factor g_e. As explained above, this dilation can be followed by a 1×1 point-wise convolution, which has an dilation of e / g_e, so that the overall dilation is g_e*e / g_e=e.

[0098] Next, an exemplary operation involving the computation of a group convolution is described. Referring back to the example of 64 multiply accumulate cells, the group convolution control 635 can obtain 64 different weight values ​​for the group convolution layer from the wide memory 612. For example, the group convolution control 635 can obtain 64 different weight values ​​based on the hardware configuration (e.g., number of cells), the type of group convolution layer, or both. The group convolution control 635 can also obtain the corresponding input 816 from the memory 610. The obtained input should have reuse across the multiply accumulate cells 616. In some implementations, the obtained input has reuse across the 64 multiply accumulate cells. In some other implementations, the obtained input has reuse across a subset of the 64 multiply accumulate cells. In general, all inputs within a group have some reuse for outputs within the same group.

[0099] In this example, the inputs 816 can be selected from an input feature map with an input depth of 64, such that the input depth corresponds to the number of multiply-accumulate cells. The computational tile 600 can compute 1000 outputs using 64 cells. The group convolution control 635 can set the group size to 64, so that for each cycle that it takes and broadcasts one input value 816, the computational tile 600 can compute 64 of the 1000 outputs using that input 816. Thus, if the group size is large enough, a given computational tile 600 can achieve 100% utilization of the input bus because all 64 cells are used for each cycle that it takes one input value.

[0100] Thus, the computational tile 600 defines a group size based on the number of multiplication-accumulation cells, and depending on certain characteristics of the group convolution, can achieve full utilization of the multiplication-accumulation cells without incurring the processing penalty of a full convolution. In an example with a single input channel, if the group size=2, this means that the computational tile 600 convolves two channel elements (e.g., two inputs 816). Thus, the computational tile 600 convolves that number of channel elements based on the group size. For a full convolution, the group size is equal to the size of the entire input channel.

[0101] If there are 1000 input channels, in a full convolution, the system 100 convolves across the 1000 input channels to compute one output channel, where the output is a channel of values ​​or activations. In a depth-wise convolution, the system 100 only computes one input channel to compute one output channel. In this example, if the group size is 1, this is a depth-wise convolution. If the group size is 2, two input channels need to be convolved to compute one output channel. If the group size is 4, four input channels need to be convolved to compute one output channel.

[0102] 9 is a flow diagram of an example process 900 used to process an example image by applying group convolution using a hardware integrated circuit. The hardware integrated circuit is configured to implement a CNN that includes multiple neural network layers, including a group convolution layer. The example image may be the image 102 described above, or may be various other types of digital images and related graphic data. In some implementations, the process 900 is part of a technique used to speed up neural network calculations, which may also improve the accuracy of the image processing output compared to other data processing techniques.

[0103] The process 900 can be implemented or performed using the system 100 described above. Thus, the description of the process 900 may refer to the computing resources of the system 100 described above. The steps or actions of the process 900 can be enabled by firmware or software instructions programmed and executable by one or more processors of the devices and resources described in this document. In some implementations, the steps of the process 900 correspond to a method for using a hardware integrated circuit to perform calculations for generating an output of a convolutional neural network layer, e.g., a group convolutional layer. The integrated circuit can be a dedicated neural network processor or a hardware machine learning accelerator configured to implement a CNN.

[0104] Referring again to process 900, system 100 identifies control parameters associated with an input feature map (902). For example, control parameters are identified that define two or more partitions along a channel dimension of the input feature map. System 100 determines a mapping of the two or more partitions (904). More specifically, system 100 determines a mapping of the partitions to multiply-accumulate cells within a computing device of a hardware integrated circuit.

[0105] For a group convolutional layer, the system 100 applies a group convolution to the input feature map using a hardware integrated circuit (906). For each of the two or more partitions, applying the group convolution to the group convolutional layer includes providing weights of the group convolutional layer to a subset of the multiplication-accumulation cells (908). For example, the system 100 provides weights to the subset of the multiplication-accumulation cells based on the determined mapping. The weights are provided from an exemplary wide memory of the computational tile 600.

[0106] The system 100 provides inputs of the input feature map to the subset of multiply accumulate cells (910). For example, each input of the input feature map is provided to each multiply accumulate cell in the subset via an input bus of the integrated circuit. More specifically, each hardware computational tile 600 includes a respective input bus that is used to broadcast one or more inputs to a given multiply accumulate cell.

[0107] The system 100 computes a product using each input and the corresponding weight of the group convolutional layer (912). For example, the product is computed by multiplying each input and the corresponding weight at each multiply-accumulate cell in the subset using a multiplier circuit of the multiply-accumulate cell.

[0108] The system 100 generates an output feature map of the group convolutional layer (914). For example, the output feature map of the group convolutional layer is generated based on an accumulation of multiple respective products calculated in each multiplication-accumulation cell 616 in the subset of multiplication-accumulation cells. The computation process performed in the computational tile 600 of the group convolutional layer includes multiplication of data values ​​(e.g., inputs or activations) stored in respective elements of an input tensor by data values ​​(e.g., weights) stored in respective elements of a parameter tensor. For example, the computation includes multiplying the input or activation values ​​and weight values ​​in one or more cycles to generate multiple products (e.g., partial sums), and then performing an accumulation of those products over multiple cycles. In some implementations, generating the output feature map includes generating the output feature map based on the respective sizes of each grouping (or partition) of the input channels.

[0109] Embodiments of the subject matter and functional operations described herein may be implemented in digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware, or one or more combinations thereof, including the structures disclosed herein and structural equivalents thereof.Embodiments of the subject matter described herein may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by or control the operation of a data processing apparatus.

[0110] Alternatively or additionally, the program instructions may be encoded onto an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to an appropriate receiver device for execution by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more thereof.

[0111] The term "computing system" encompasses any kind of apparatus, device, and machine for processing data, such as, for example, a programmable processor, a computer, or multiple processors or computers. An apparatus can include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). In addition to hardware, an apparatus can also include code that creates an execution environment for the computer program in question, such as code that constitutes a processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof.

[0112] Computer programs (which may also be called or described as programs, software, software applications, modules, software modules, scripts, or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and may be deployed in any form, either as stand-alone programs or as modules, components, subroutines, or other devices suitable for use in a computing environment.

[0113] A computer program may, but need not, correspond to a file in a file system. A program can be stored as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in several coordinated files (e.g., a file storing one or more modules, subprograms, or portions of code). A computer program can be deployed to be executed on one computer, or on several computers at one site or distributed across several sites and interconnected by a communications network.

[0114] The processes and logic flows described herein may be performed by one or more programmable computers executing one or more computer programs that perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, or an apparatus may be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array), an ASIC (application specific integrated circuit), or a GPGPU (general purpose graphics processing unit).

[0115] A computer suitable for executing a computer program may be based, for example, on a general purpose or special purpose microprocessor or both, or on any other type of central processing unit. Typically, the central processing unit receives instructions and data from a read-only memory or a random access memory or both. Some computer elements include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer also includes one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or is operatively coupled to receive data from and / or transfer data to those storage devices. However, a computer need not have such devices. Additionally, a computer may be incorporated into another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device, such as a universal serial bus (USB) flash drive, to name just a few.

[0116] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, by way of example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, CD-ROM and DVD-ROM disks, etc. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.

[0117] To enable interaction with a user, embodiments of the subject matter described herein can be implemented on a computer with a display device (e.g., an LCD (liquid crystal display) monitor) for displaying information to the user, and a keyboard and pointing device (e.g., a mouse or trackball) by which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user. For example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, such as acoustic, speech, or tactile input. Additionally, the computer can interact with the user by sending and receiving documents to devices used by the user. For example, sending a web page to a web browser on the user's client device in response to a request received from the web browser.

[0118] An embodiment of the subject matter described herein may be implemented in a computing system including a back-end component, such as, for example, a data server, or a middleware component, such as, for example, an application server, or a front-end component, such as, for example, a client computer with a graphical user interface or web browser through which a user may interact with an implementation of the subject matter described herein, or may be implemented in any combination of one or more of such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication, such as a communications network. Examples of communications networks include a local area network ("LAN") or a wide area network ("WAN") such as the Internet.

[0119] A computing system may include clients and servers. Generally, clients and servers are remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

[0120] Although the present specification contains many specific implementation details, these should not be construed as limiting the scope of the invention or what may be claimed, but rather as descriptions of features that may be specific to certain embodiments of a particular invention. Certain features described in the context of separate embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable subcombination. Furthermore, even if features may be described above as functioning in a combination and originally claimed as such, one or more features from a claimed combination may in some cases be deleted from the combination, and the claimed combination may be directed to a subcombination or a variation of the subcombination.

[0121] Similarly, although the figures depict operations in a particular order, this should not be understood as requiring that such operations be performed in the particular or sequential order shown, or that all of the operations shown be performed, to achieve desirable results. In some situations, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the program components and systems described may generally be integrated into a single software product or packaged into multiple software products.

[0122] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. By way of example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.

Claims

1. 1. A method for processing an input image using a hardware integrated circuit configured to implement a convolutional neural network including a plurality of neural network layers, the plurality of neural network layers including a group convolutional layer, the method comprising: identifying control parameters that define a plurality of partitions along a channel dimension of the input feature map; determining a mapping of the partitions to multiply-accumulate cells (MACs) within a computing device of the integrated circuit; For the group convolutional layer, applying a group convolution to the input feature map, and for each of the plurality of partitions, providing group convolutional layer weights for a subset of the plurality of MACs based on the determined mapping; and providing an input of each of the input feature maps to each MAC in the subset via an input bus of the integrated circuit; and at each MAC in the subset, computing a product using the respective input and a corresponding weight of the group convolutional layer; The method comprises: generating an output feature map of the group convolutional layer based on an accumulation of products.

2. Determining a mapping of the plurality of partitions to the plurality of multiplication accumulate cells comprises: The method of claim 1 , comprising determining the mapping based on a number of channels in each of the plurality of partitions.

3. The method of claim 2 , wherein each partition of the plurality of partitions includes a respective number of input channels corresponding to a respective size of the partition.

4. Generating the output feature map includes: The method of claim 3 , comprising generating the output feature map based on the respective size of each partition.

5. accessing information describing a hardware configuration of the computing device; The method of claim 3 , further comprising: determining the respective size of each partition based on the hardware configuration of the computing device.

6. the input bus includes a broadcast function, the method comprising:

2. The method of claim 1, further comprising broadcasting a plurality of inputs of the input feature map for each partition via the input bus to the computing device of the integrated circuit.

7. broadcasting, for a first partition of the input feature map, a first input of the first partition to each MAC in the subset via the input bus; The method of claim 6 , wherein the first input that is broadcast is reused during computation of the group convolutional layer.

8. the first partition of the input feature map corresponds to a first partition of the output feature map; The method of claim 6 , wherein the first input has a reuse for an output of the first partition of the output feature map.

9. Generating the output feature map includes: computing a plurality of products using the subset of the plurality of MACs; generating said accumulation of products from said plurality of products.

10. 1. A system for processing an input image, the system comprising: A processor; a hardware integrated circuit configured to implement a convolutional neural network including a plurality of neural network layers including a group convolutional layer; Executable by the processor, identifying control parameters that define a plurality of partitions along a channel dimension of the input feature map; determining a mapping of the partitions to multiply-accumulate cells (MACs) within a computing device of the integrated circuit; For the group convolutional layer, applying a group convolution to the input feature map, and for each of the plurality of partitions, providing group convolutional layer weights for a subset of the plurality of MACs based on the determined mapping; and providing an input of each of the input feature maps to each MAC in the subset via an input bus of the integrated circuit; and at each MAC in the subset, computing a product using the respective input and a corresponding weight of the group convolutional layer; and a non-transitory machine-readable storage device that stores instructions for performing operations, including generating an output feature map of the group convolutional layer based on an accumulation of products.

11. Determining a mapping of the plurality of partitions to the plurality of multiplication accumulate cells comprises: The system of claim 10 , further comprising determining the mapping based on a number of channels in each of the plurality of partitions.

12. The system of claim 11 , wherein each partition of the plurality of partitions includes a respective number of input channels corresponding to a respective size of the partition.

13. Generating the output feature map includes: The system of claim 12 , further comprising generating the output feature map based on the respective size of each partition.

14. The calculation is accessing information describing a hardware configuration of the computing device; 13. The system of claim 12, further comprising: determining the respective size of each partition based on the hardware configuration of the computing device.

15. The input bus includes a broadcast function, and the operation is The system of claim 10 , further comprising broadcasting a plurality of inputs of the input feature map for each partition via the input bus to the computing device of the integrated circuit.

16. The calculation is broadcasting, for a first partition of the input feature map, a first input of the first partition to each MAC in the subset via the input bus; The system of claim 15 , wherein the first input that is broadcast is reused during computation of the group convolutional layer.

17. the first partition of the input feature map corresponds to a first partition of the output feature map; The system of claim 15 , wherein the first input has a reuse for an output of the first partition of the output feature map.

18. Generating the output feature map includes: computing a plurality of products using the subset of the plurality of MACs; generating said accumulation of products from said plurality of products.

19. 1. A non-transitory machine-readable storage device that stores instructions for processing an input image using a hardware integrated circuit configured to implement a convolutional neural network including a plurality of neural network layers including a group convolutional layer, the instructions being executable by a processor; identifying control parameters that define a plurality of partitions along a channel dimension of the input feature map; determining a mapping of the partitions to multiply-accumulate cells (MACs) within a computing device of the integrated circuit; For the group convolutional layer, applying a group convolution to the input feature map, and for each of the plurality of partitions, providing group convolutional layer weights for a subset of the plurality of MACs based on the determined mapping; providing an input of each of the input feature maps to each MAC in the subset via an input bus of the integrated circuit; and at each MAC in the subset, computing a product using the respective input and a corresponding weight of the group convolutional layer; generating an output feature map of the group convolutional layer based on an accumulation of products.

20. 20. The non-transitory machine-readable storage device of claim 19, wherein each partition of the plurality of partitions includes a respective number of input channels corresponding to a respective size of the partition.

Citation Information

Patent Citations

  • Chip device and related products

    JP2020177641A

  • System and method for shift-based information mixing across channels for shufflenet-like neural networks

    US20210019633A1

  • Computation processing device, computation processing method, and configuration program

    WO2020158384A1

  • Grouping convolution processing definition changing device, grouping convolution processing definition changing method, and grouping convolution processing definition changing program

    WO2021220422A1