Neural Network Accelerator
By designing accelerator tiles in the neural network hardware accelerator, utilizing weights and activations in sparsity, and using look-ahead and back-up structures to optimize weight scheduling, the problem of low computational efficiency of convolutional neural networks is solved, and efficient utilization of resources and energy are achieved. of reduction.
Patent Information
- Application Number
- CN201980014141.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-04-29
- Filing Date
- 2019-02-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-02-15
AI Technical Summary
Existing neural network hardware accelerators are difficult to effectively utilize sparsity when processing convolutional neural networks, resulting in waste of resources and low computational efficiency.
By designing an accelerator tile, we take advantage of weights and activations in sparsity, use lookahead and fallback structures to optimize weight scheduling, reduce the calculation of invalid weights, and improve computing efficiency through multiplexers and combination units.
It significantly reduces execution time, improves computing efficiency, reduces energy consumption, and achieves efficient utilization of sparse resources.
Smart Images

Figure CN111742331B_ABST
Abstract
Description
Technical Field
[0001] This specification relates generally to hardware architectures for neural networks, and more specifically to neural network hardware accelerators. Background Art
[0002] Deep learning neural networks (DNNs) have found an increasing number of applications executing on a variety of computing platforms, from high-end servers to mobile and embedded systems. Given the growing importance of DNN workloads and their high computational and memory requirements, dedicated hardware accelerators have emerged.
[0003] There are several types of DNNs, such as convolutional neural networks (CNNs), which dominate image-based applications. For example, CNNs can be used to infer images or video frames, and it is often desirable to speed up inference using CNNs, especially convolutional layers that tend to dominate execution time in CNNs.
[0004] Recent developments in the field of neural network acceleration include a push toward hardware implementations. For example, circuits have been developed that are designed to more closely mimic the behavior of neurons, such as having high network connectivity or other characteristics. Summary of the invention
[0005] According to an embodiment of the present invention, a neural network accelerator tile for utilizing input sparsity is provided, the tile defining a weight lane set and an activation lane set, each weight lane corresponding to an activation lane, the tile comprising: a weight memory for supplying weights and weight selection metadata to each weight lane in the weight lane set; an activation selection unit for receiving an input activation value set and rearranging the input activation value set to supply a rearranged activation value set to each activation channel; a multiplexer set comprising at least one multiplexer for each pair of activation channels and weight channels, each multiplexer being configured to select a combined activation value from the activation channel set of rearranged activation values for the activation channel based on the weight channel weight selection metadata; and a combination unit set comprising at least one combination unit per multiplexer, each combination unit being configured to combine the activation channel combination value with the weight channel weight to output a weight channel product.
[0006] According to another embodiment of the present invention, an accelerator tile is provided, which includes: an activation selection unit, the activation selection unit is used to receive an activation value set and re-arrange the activation value set into at least one multiplexer input value set; a weight value receiver set, the weight value receiver set is used to receive at least one weight and at least one weight selection metadata; at least one multiplexer, the at least one multiplexer is used to receive at least one of the at least one multiplexer input value set and at least one weight selection metadata, the at least one multiplexer is configured to apply the at least one weight selection metadata to select at least one combined activation value from the at least one multiplexer input value set; at least one combiner, the at least one combiner is used to apply the at least one combined activation value to the at least one weight to generate at least one product; and at least one product output distributor, the at least one product output distributor is used to output the at least one product.
[0007] Other aspects and features according to the present application will become apparent to those of ordinary skill in the art when reading the following description of embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The principles of the present invention may be better understood with reference to the accompanying drawings, which are provided by illustrating one or more exemplary embodiments in conjunction with the principles and aspects of the present invention, and in which:
[0009] Figure 1 is a schematic diagram of an exemplary convolutional layer;
[0010] Figure 2 is an exemplary pseudocode convolutional layer calculation;
[0011] Figure 3 is a schematic diagram of a dense neural network accelerator tile;
[0012] FIG. 4A to FIG. 4B is an exemplary schematic diagram of CNN functions;
[0013] FIG. 5A to FIG. 5C is a schematic diagram of a lookahead function according to an implementation scheme;
[0014] FIG. 6A to FIG. 6B is a schematic diagram of a lookaside function according to an implementation scheme;
[0015] FIG. 7A to FIG. 7C is a schematic diagram of a weight jump accelerator tile architecture according to an implementation scheme;
[0016] Figure 8is a schematic diagram of an accelerator tile architecture with the ability to skip invalid activation bits added according to an embodiment;
[0017] Fig. 9 is a schematic diagram of a multi-tile accelerator according to an embodiment;
[0018] Fig.10 is a graph showing performance improvements over AlexNet-ES according to three implementations;
[0019] Fig.11 is a graph showing performance improvements over GoogLeNet-Es according to three implementations;
[0020] Fig.12 is a graph showing the performance of using a sparse boosting window according to an implementation with only weight hopping;
[0021] Fig.13A and Fig. 13B is a graph comparing the energy efficiency of the configurations of the two embodiments;
[0022] Fig.14 is a graph showing the performance of five compression scheme implementations; and
[0023] Fig.15 is a schematic diagram of an implementation scheme in which a multiplex select table (MST) is introduced into each filter channel.
[0024] In the drawings, the same reference numerals designate the same or corresponding elements. DETAILED DESCRIPTION
[0025] The following description and the embodiments described therein are provided by illustrating one or more examples of specific embodiments having the principles of the present invention. These examples are provided to explain rather than to limit these principles and the purpose of the present invention. In the following description, the same parts are marked with the same corresponding reference numerals throughout the specification and the drawings. The drawings are not necessarily drawn to scale, and in some cases the scale may be exaggerated to more clearly depict certain features of the present invention.
[0026] The description relates to hardware accelerators for neural networks, and is described with particular reference to configurations for performing inference using convolutional neural networks (CNNs).
[0027] CNNs often consist of a series of layers or directed acyclic graphs, among which convolutional layers (CVLs) dominate the execution time of many image-related applications. Figure 1 In the embodiment shown, the convolutional layer 1000 receives A x ×A y×C activation array 1100, which is convolved with a set 1200 of K weight filter arrays, which are F 0 To F K-1 F x ×F y ×C filter arrays, thus generating O x ×O y ×K output activation array 1300. Each output activation o(x, y, k) of output activation array 1300 is a filter F k With the input activation array 1100 F x ×F y The dot product of the C × C subarray windows is calculated. The windows are evenly spaced using a step size S, resulting in [A x / S]×[A y / S]=O x ×O y . An activation function, such as a rectifier linear unit (ReLU), is applied to each output activation. Typically, a layer, such as Figure 1 The depicted implementation) requires 100s to 1000s of dot product calculations to produce an output activation array, each of which has an input weight and activation pair.
[0028] like Figure 2 As depicted, in an embodiment, CVL can be implemented as 6 nested loops. In some embodiments, the multiplications of the loops are independent, and different permutations of the loops produce the same output activation array, and in some permutations, the calculations can be performed simultaneously.
[0029] Although CVL is often viewed as a specific type of layer in a specific type of neural network, other types of layers can also be implemented as variations of CVL. For example, a fully connected layer can be implemented as a CVL with a single window, where the filter and input have the same dimensions.
[0030] Depend on Figure 2 The 6-nested loop implementation of CVL treats activations and weights like a dense CNN, because it processes all weights and activations. However, in practice, some weights are zero and some activations are zero or close enough to zero to be considered zero and therefore invalid. Many neural networks are sparse for various reasons, for example, weight pruning, which often requires retraining CNNs, can also cause weight sparsity.
[0031] Embodiments of hardware accelerators exploit sparsity, such as sparsity of one or both of weights and activations. In embodiments of the present invention, weight sparsity is exploited directly, and activation sparsity is exploited indirectly. Embodiments can yield benefits even for efficient activations.
[0032] exist Figure 3 The method for processing dense CNNs (such as Figure 1 1 and 2. An example of a data-parallel hardware accelerator 3000 for a CVL (depicted). The data-parallel hardware accelerator 3000 processes weights and activations in cycles and produces k partial output activations per cycle. The data-parallel hardware accelerator 3000 includes k inner product units (IPUs) 3100 that operate in parallel on the same set of N activations. Each input activation is multiplied by k weights, one for each filter in the filter set 1200, as follows: each IPU 3100 accepts a vector of N weights per cycle, one for each input activation, computes N products, reduces the N products through an adder tree, and accumulates the results into an output register. Once the entire window has been processed (typically over multiple cycles), the output register contains the corresponding output activations.
[0033] The data parallel hardware accelerator 3000 includes a weight memory 3200 and an activation memory 3300, which provide weights and activations to the accelerator 3000, respectively. In the depicted embodiment, similar to the embodiment disclosed in Y. Chen, T. Luo, S. Liu, S. Zhang, L. He, J. Wang, L. Li, T. Chen, Z. Xu, N. Sun, and O. Temam, “Dadiannao: A machine-learning supercomputer,” in Microarchitecture (MICRO), 2014 47th Annual IEEE / ACM International Symposium on, pp. 609-622, December 2014, weight memory 3200 and activation memory 3300 are large enough to hold an entire layer at a time, weight memory 3200 can supply N×k weights per cycle through a single wide read port, activation memory 3300 can supply N activations per cycle through a wide read port, weight and activation buffers hide the latency of weight memory 3200 and activation memory 3300, and an output activation buffer collects the results and then writes the results back to activation memory 3300 for use in the next layer in the neural network. As depicted, like many embodiments of the inference accelerator, the accelerator 3000 uses a 16-bit fixed-point format to represent activations and weights. Figure 3 The embodiment depicted in assumes that if there are multiple tiles, they are all connected to the same activation memory 3300, which broadcasts a block with N activations to all tiles every cycle.
[0034] Figure 4A and Figure 4B Depicted Figure 3An example of how the IPU 3100 of the accelerator 3000 will process activations and steps, where N is set to 4 and k is set to 1. The activation is represented as And the weight is expressed as Where channels represent the activation columns and weight rows in which they appear, and steps specify the temporal order in which activations and weights are multiplied. Assuming each step requires a single cycle, the Accelerator 3000 will process 16 products in 4 cycles, regardless of the set of weights. Figure 4A as dense as Figure 4B Despite the fact that if the product is freely sparse, then Figure 4B The 6 products required in the example of can be completed in 2 cycles, but this happens. Embodiments of the present invention eliminate products with invalid weights while avoiding the complexity of unrestricted scheduling of weights and activations.
[0035] Embodiments of the present invention eliminate invalid weights by statically promoting valid weights in time, by processing valid weights when invalid weights would otherwise be processed. The software scheduling process reorders the weights before processing so that they appear at the correct channel and step when they are extracted at runtime. Therefore, a tile of such an embodiment can access all the k×N weights it needs at each step using a single wide access to the associated weight memory. Each valid weight comes with a small piece of metadata to identify its position in the original dense weight schedule so that each valid weight can be matched with the appropriate activation at runtime.
[0036] In an embodiment, weight scheduling flexibility can be balanced with energy and area efficiency, such as by allowing a schedule in which only two intra-filter weight moves are allowed: lookahead moves and backup moves. Lookahead moves allow valid weights to be advanced in steps to replace invalid weights, such as bringing forward a valid weight w[channel, step] to replace an invalid weight w[channel, step-h], where h is the lookahead depth, which is related to the number of activation values that must become available in the accelerator architecture. Backup moves allow valid weights to replace invalid weights in different channels, for example, a valid weight w[channel, step] can be brought forward by one time step and shifted d channels to replace an invalid weight w[(channel+d)MOD(N-1), step-1].
[0037] FIG. 5A to FIG. 5C Shows the application Figure 4B Schematic diagram of an example of look-ahead weight scheduling of the sparse filter accelerator 5000. FIG. 5A to FIG. 5C As shown in Figure 2, setting h = 1 reduces the execution time from 4 cycles to 3 cycles. FIG. 4A to FIG. 4B The same accelerator implementation scheme as FIG. 5A to FIG. 5CThe accelerator 5000 can process 4 products per cycle. The use of lookahead allows the accelerator 5000 to establish a sliding window of h+1 within which valid weights can be promoted over invalid weights occurring in the same channel.
[0038] exist Figure 5A At period 0 depicted, the look-ahead window 5100 fails to utilize weight channel 2, the single weight w[2,2] is the look-ahead distance 2 and h is set to 1. Figure 5B At cycle 1, valid weight w[1,1] is being processed, so lookahead window 5100 extends the accelerator 5000's arrival to step 1=h or 2. This causes accelerator 5000 to promote valid weight w[2,2] to replace invalid weight w[2,1], but weight w[3,3] remains outside lookahead window 5100. However, since no weight is being processed at step 3, accelerator 5000 then advances two steps to step=3, such that Figure 5C As shown, at cycle 2, weight w[3,3] is processed.
[0039] like FIG. 5A to FIG. 5C As depicted, static promotion of weights within a channel requires that the accelerator 5000 has access to the corresponding activations at run time. As depicted, to allow this pairing, the accelerator 5000 must have access to all activations for the entire lookahead window 5100. When h is set to 1, there are 2 activation channels available to the accelerator 5000 in each cycle. The accelerator 5000 selects the appropriate activations through a 2-to-1 multiplexer per weight channel, and when the weight schedule is modified for the lookahead function, the control signal for the multiplexer is statically determined and stored with the corresponding weight.
[0040] The accelerator 5000 uses h additional activation channels (h+1) to 1 multiplexer to select the appropriate activation for the lookahead window h, where h is set to 1 as depicted. In various embodiments, support for a wider range of activation groups results in changes in the cost and practicality of the accelerator construction. Since the activation channels are shared between the k filters of each tile in other embodiments of the accelerator, the cost of including the activation channels can generally be amortized over multiple weight channels. In many cases, when h is less than or equal to 2, the benefits of applying the lookahead structure to the accelerator are available.
[0041] FIG. 6A to FIG. 6Bis a schematic diagram of accelerator 6000 using a lookahead structure. The loop reduction allowed by the lookahead structure of accelerator 5000 is limited to the number of valid weights in the channel with the most valid weights. The lookahead structure of accelerator 6000 allows accelerator 6000 to process the weights of one channel in another channel, thereby allowing accelerator 6000 to process the weights of a more densely distributed channel of the original weight structure in the time and channel steps of an adjacent less densely distributed channel.
[0042] The accelerator 6000 uses a fallback structure in which d has been set to 1. Fig. 6A , at cycle 0, channel 2 processes weights w[1,1] from channel 1, thereby allowing channel 2 of accelerator 6000 to process weights instead of remaining idle at step 0. This also allows accelerator 6000 to process the set of weights in two steps, since it can proceed to step 2 and process both weights w[2,2] and weights w[3,3] at cycle 1 while also employing a lookahead of h=1. Thus, accelerator 6000 is able to process the set of weights in a minimum number of cycles by employing a lookahead and lookbehind structure and setting h=d=1. Figure 4B The weight set of .
[0043] Since the accelerator 6000 adopts a look-ahead structure of h=1, the accelerator has two activation channels available for each weight channel at each time step. Therefore, adopting a backup structure of d=1 does not require providing any additional activation channels to the accelerator 6000, and the accelerator 6000 only needs an activation multiplexer with more inputs. For the backup setting of h and the look-ahead setting of d, the accelerator 6000 adopts a (h+d+1) to 1 multiplexer. The data input connections of these multiplexers are statically determined and regular. As with the accelerator 5000, the control signals of the multiplexers of the accelerator 6000 are statically determined and stored with the weights, and they require lg(h+d+1) bits. In accelerator variations, an increased d value can allow greater scheduling flexibility, but can increase interconnection costs.
[0044] FIG. 7A to FIG. 7C The structure of a weight jump accelerator tile 7000 is depicted. The accelerator tile 7000 processes N productions in parallel for each of the k filters. The tile 7000 includes an activation selection unit (ASU) 7100 that buffers activations as they are provided by an activation memory 7200. The ASU 7100 reorders the activations so that the weight jump unit (WSU) 7300 can straightforwardly select the appropriate activations.
[0045] WSU 7300 WSU slice 7310 in Figure 7B7300 includes one slice for each filter for a total of k slices per tile. The WSU slice 7310 of the accelerator 7000 reads a list of pre-scheduled weights and their multiplexer selection metadata via a single weight memory 7400 port. The WSU 7300 reads N×k weight and metadata pairs plus the activation channel control (ALC) field per access. As depicted, the accelerator tile 7000 processes N weights per WSU slice 7310, and all weights are processed in one step.
[0046] WSU slice 7310 takes N weights w 1 tow N , the weights are each mapped to a separate weight channel where they are fed into one of the inputs of the multiplier 7311. The (h+d+1)-to-1 multiplexer selects the second input of the multiplier 7311. The multiplexer control signal comes from the weight selection (ws) metadata 7312 read by the WSU 7300 from the weight memory 7400. The (h+d+1)-to-1 multiplexer 7313 allows enough activation values to be input to allow the multiplier 7311 to access possible activations.
[0047] For each weight w processed by tile 7000 i , there are h+1 activations A i,0 To A i,h , the h+1 activations correspond to the look-ahead window of h activations. 1 , A 1,2 is the activation of the first 2 places, and for w N , A N,h is the activation at predecessor h. ASU 7200 orders the activations to match their logical predecessor order, thereby i,j The signals are statically assigned to the multiplexer inputs to allow the WSU 7300 to implement look-ahead and fall-back. 2 The backup 1 connection is to A 3,1 , and its first 2 connections are to A 2,2 . All WSU slices 7310 share the same (h+1)×N activations.
[0048] like Figure 7B As depicted, the WSU slice 7310 of the accelerator tile 7000 generates N 16b×16b products per cycle, with the output being t 1 to N These products are fed into an adder tree whose outputs are accumulated as output activations over multiple cycles. In some embodiments, variations of the present accelerator tile 7000 may replace multipliers 7311 with AND gates or shifters to exploit the activation property.
[0049] like Figure 7C As depicted, the ASU 7200 generates the A used by the WSU 7300 通道先行 Signal. An ASU 7200 is provided to supply the input activations and stride lengths required for the corresponding weight channels to the multipliers 7311 in advance. The ASU 7200 includes h+1 activation block registers (ABRs) 7210, each of which holds N input activations. Each ABR 7210 holds the N activations required for all weight channels at a particular lookahead distance l=0 to h. The ABR 7210 logically operates as a circular queue, with the head register pointing to the ABR, thereby holding the activations at lookahead=l=0. An array 7220 of h+1 multiplexers, each of which is a (h+1)-to-1 multiplexer, shuffles the ABR outputs in the proper order to generate A 通道先行 signals, which are distributed along the weight columns, such as Figure 7C As shown near the bottom, the ALC metadata read by the WSU 7300 from the WM 7400 is used with each N×k weight column to advance the head register and implement a sliding look-ahead window.
[0050] The activation buffer (AB) 7230 buffers activations as they are read from the activation memory (AM) 7100. The AB 7230 has h+1 banks, each connected to one ABR 7210 via a dedicated single read port. In this way, any number of ABRs 7210 can be updated simultaneously per cycle, effectively advancing the lookahead window as indicated by the ALC metadata. This arrangement allows the accelerator tile 7000 to also skip columns that include only invalid weights.
[0051] Although weight jumping exploits weight sparsity, it does not exploit any potentially valuable properties of input activations. In some embodiments of the present invention, an accelerator or accelerator tile may be constructed to exploit properties of input activations, or to exploit properties of both input activations and weights. Embodiments of the present invention provide different tradeoffs of area, performance, and energy efficiency. Some embodiments exploit the effective bit content of activations and prioritize performance. Some embodiments exploit fine-grained dynamic activation precision variability and prioritize energy efficiency. Some embodiments provide benefits for all activations, whether valid or not. The embodiments discussed in detail below do not attempt to eliminate invalid activations, but rather make both embodiments utilize invalid activations.
[0052] Many of the activation bits in the average set of input activations input to a layer of a neural network are zero (even if a portion of the activations are non-zero) and are therefore invalid during multiplication operations. Embodiments of the present invention exploit invalid activation bits alone or in combination with exploiting weight sparsity.
[0053] like Figure 8 As depicted, the accelerator 8000 is constructed to process only the valid bits of activations bit-serially over time. For example, the accelerator 8000 processes the activation value {0000 0000 1000 1111b} in 3 cycles, thereby multiplying the corresponding weights by the following signed powers of 2: {+2 7 ,-2 4 ,+2 0}. These powers are Booth-encoded representations of the activation values. This structure allows the accelerator 8000 to process input activations in an execution time proportional to the number of valid activation bits. However, since the activations are now processed bit-serially, the overall throughput would be lower if the accelerator 8000 only processed N×N weight and activation pairs per cycle. The accelerator 8000 compensates for this throughput loss by processing 16 activation windows in parallel, thereby improving overall throughput. Therefore, the same weights can be reused across 16 windows and the WM interface is maintained as in the previous implementation. However, the accelerator 8000 maintains all channels feeding a common adder tree that is synchronized across activation groups, that is, all channels wait for the processing of an activation with the most valid bits to complete before proceeding to the next set of activation values. Designers can choose different numbers of activation windows to process in parallel to achieve the desired performance, area, and energy efficiency goals.
[0054] In design, Figure 8The accelerator 8000 reflects many elements of the Practical Accelerator (PRA) design for processing activations (for a discussion of the PRA design, see: J. Albericio, A. Delmás, P. Judd, S. Sharify, G. O'Leary, R. Genov, and A. Moshovos, "Bit-pragmatic deep neural network computing," in Proceedings of the 50th Annual IEEE / ACM International Symposium on Microarchitecture, MICRO-50'17, pp. 382-394, 2017, which is hereby incorporated by reference). The PRA design targets dense CNNs and exploits invalid activation bits to deliver execution time proportional to the content of the valid activation bits. The PRA design processes activations bit-serially, one valid bit at a time. After applying a modified Booth encoding, each tile unit converts the activations into a stream of valid powers of 2, or oneffsets. Since the PRA design multiplies the weights by a power of 2 at each cycle, a shifter is sufficient instead. The oneffset symbol is used to add or subtract the shifted weights through the adder tree. To maintain the throughput of an equivalent bit-parallel design, the PRA design processes multiple activation windows in parallel, allowing the design to reuse the same weights during window processing.
[0055] In some accelerator implementations, the back end of the practical accelerator (PRA) design can be modified. In some implementations, similar to the PRA, the accelerator implementation processes activations bit-serially, one effective power at a time. After applying the modified Booth encoding, each ABR unit converts the activations into a stream of effective powers of 2 or oneffset. In some implementations, the accelerator of the present invention uses a shifter to multiply the weights with the oneffset, and adds or subtracts the results via an adder tree based on the oneffset sign. In order to ensure that the accelerators of the present invention always match or exceed the throughput of an equivalent bit-parallel design, these accelerators can process 16 activation windows simultaneously. This enables these accelerators to reuse the same weights on 16 IP units.
[0056] Figure 8 Tiles of an accelerator 8000 are shown. Figure 3 The k inner product (IP) cells of have been expanded to a grid of 16×k simpler IP cells 8100. The main modifications to the practical design are the inclusion of WSU and ASU slicing and the ability to shift partial sums by one column using each row of loops. FIG. 7A to FIG. 7CThe original WSU discussed is cut into 16 columns 8200, namely WSU / 0 to WSU / 15, each column has k IPs 8100. Each of these 16 columns corresponds to a different window. Each IP 8100 has a 16-input adder tree and has N shifters instead of N multipliers. Each of these shifts the 16b weight input as indicated by the activation oneffset input. All IPs 8100 along the same row share the same w (weight) and ws (weight select) signals, and they all perform exactly the same lookahead and backup activation selections. Unlike Figure 6, the multiplexer here selects 4b activation oneffsets, thereby greatly reducing the area. These oneffsets encode shifts of up to 3 positions plus signs and enables. For each column, the corresponding ASU slice, i.e., ASU / 0 to ASU / 15 of ASU 8300, provides data for N activation groups as described above, one activation group per weight channel, each containing data for h activations to support lookahead. Unlike FIG6, the ASU provides 4b oneffsets. Since all WSU columns 8200 perform the same weight scheduling, all 16 ASU slices access the activation buffers in tandem and share the same activation selection logic and signals.
[0057] In a practical accelerator design, since each column computes a different window and in case of window overlap, each input activation must ultimately appear at a different column. As a result, naively scaling a practical accelerator design would require a crossbar switch between the AM and the activation buffers for each tile. TCL statically interleaves the input activation space across the 16 IP columns, so no crossbar switch is required. Specifically, all activations a(c,x,y) are mapped to columns (x×S) MOD 16. With this modification, it is no longer possible to fully compute each output activation at the IP. The accelerator implementation uses Figure 8 The loop 8400 shown slides the partial sums horizontally by one column. Practical accelerator designs already include connections between adjacent column IPs to read out the results once completed and improve utilization of layers with fewer channels. The partial sums are left at a column as long as necessary to accumulate all the sums of the activations mapped to that column. All partial sums are then advanced to the next column in tandem. Table 1 shows an example of how this is handled in JaZe.
[0058]
[0059] Table 1: Processing: 16 windows with a 3×3 filter are processed over an input activation array with 16 channels in 9 steps. In step 0, the output o(0,0,0) starts at column 0 and moves to column 1 and 2 in steps 3 and 6 respectively. The activation a(c,x,y) only appears at column x MOD 16. In this example, the coordinates are a(channel,x,y).
[0060] In some embodiments, invalid activations or activation bits may be utilized differently. For example, in some embodiments, the valid bit content of activations is utilized by utilizing precision requirements. The precision activation requirements vary across the network and across layers, and may be determined, such as by profiling. In an embodiment, the execution time may be reduced by 16 / p, where p is the precision used for activation, compared to a baseline precision of 16b. For example, a striped (STR) accelerator tile design may be employed. The STR accelerator tile design is disclosed in P. Judd, J. Albericio, T. Hetherington, T. Aamodt, and A. Moshovos, “Stripes: Bit-serial Deep Neural Network Computing,” in Proceedings of the 49th Annual IEEE / ACM International Symposium on Microarchitecture, MICRO-49, 2016, and in U.S. Patent Application Publication No. US2017 / 0357891A1, “Accelerator for Deep Neural Networks,” to The Governing Council of the University of Toronto (inventors: Patrick Judd, Jorge Albericio, Alberto Delmas Lascorz, Andreas Moshovos, and Sayeh Sharify), both of which are hereby incorporated by reference.
[0061] The STR design processes activations bit-serially and therefore requires p cycles to process activations represented by p bits. As with the PRA design, to compensate for the computational bandwidth loss compared to the bit-parallel design, implementations of the STR design process multiple windows in parallel, such as 16 windows in parallel. The STR design uses AND gates instead of multipliers. The block-level description of the STR design is similar to Figure 8The block-level description of the depicted PRA design is similar. However, the STR design employs an ASU that sends activations a single bit at a time, rather than a single oneffset at a time, and does not require encoding activations as oneffsets. In a typical STR design, each activation requires fewer wires than a PRA design, there are no shifters, and the input width of the adder tree is 16b.
[0062] In all cases where weight sparsity is used to utilize the structure, it is not necessary to use the input activation to utilize the accelerator structure. For example, although STR uses the precision requirements derived from the profile, it has been observed that the precision derived from the profile is pessimistic for a certain layer, because the precision must adapt to any possible input, and the precision must adapt to all activations of the layer. However, in practice, in some embodiments, only a limited set of activations for a specific input will be processed at the same time during runtime. In addition, since most activations are close to zero in some embodiments, this approach significantly reduces the precision required for each group of activations processed simultaneously. When the precision is read from the activation memory and the precision is transmitted together with the activation value, the precision required for each activation group is detected. Alternatively, the precision of each activation group can be detected at the output before being stored in the memory. The precision requirements of unsigned and unsigned numbers can be detected to adapt to weights and activation functions other than ReLU. For the above-mentioned embodiments using the STR structure, dynamic precision reduction reduces the execution time, and for both the above-mentioned embodiments using the STR structure and the embodiments using the PRA structure, it reduces the number of bits that need to be sent after reading the activation from the activation memory. Recall that the above-mentioned embodiments using the PRA structure generate oneffset locally at each tile.
[0063] It has been found that the numerical precision neural networks require for correct operation varies widely between networks and between layers of the same network. For example, a method for using profiling to determine the numerical precision of each layer is proposed in P. Judd, J. Albericio, TH Hetherington, TM Aamodt, ND Enright Jerger, R. Urtasun, and A. Moshovos, "Reduced-Precision Strategies for Bounded Memory in Deep Neural Nets," CoRR abs / 1511.05236 (2015) ('Judd et al.'), which is hereby incorporated by reference. However, it was observed in A. Delmas, P. Judd, S. Sharify, and A. Moshovos, “Dynamic Stripes: Exploiting the Dynamic Precision Requirements of Activation Values in Neural Networks,” CoRR abs / 1706.00504 (2017) (‘Delmas et al.’), which is hereby incorporated by reference, that at granularities even smaller than the layer granularity, this variability in precision becomes more pronounced. Numerical precision refers to the number of bits required to safely represent a number. In the case of a fixed-point representation, this will be exactly the number of bits in an integer. For other representations, different components of the representation may require separate bit counts, such as the exponent or mantissa of a floating-point number.
[0064] The described accelerator implementation utilizes precision requirements to reduce the number of cycles required to process multiplication operations. However, in addition to computation, communication and storage are also major challenges for deep learning computations. Therefore, a method is proposed to exploit the variability of precision requirements of activations and weights to reduce storage and communication requirements. A specific implementation is described below. First, it should be noted that the dynamic precision detection method of Delmas et al. also applies to negative values, where leading 0s must be looked for and 1 is added to the final precision length instead of looking for leading 1s. Alternatively, negative numbers can be transformed into a signed numerical representation, and the sign bit can be placed in the least significant position. This second approach accommodates activation functions and weights that do not convert all negative values to zero.
[0065] The following description assumes that all numbers are represented in 16-bit fixed-point, however, the described mechanism is directly applicable to other representation lengths and types. The compression scheme considers input values, weights, or activations as groups of elements with a fixed number, such as, for example, 16 or 256. Then, within each group, the maximum precision required is determined by scanning the position of the most significant 1 bit in all values. Negative values are converted to sign-value representations. The processing of weights can be done offline, while activations are processed at the output of each layer. The values are then packed by using 4 bits to store the required precision and then using a number of bits equal to the precision of the group to store each value. For the accelerator described here, the weight channels and activation channels are grouped and the data is stored in memory using the virtual column approach of Judd et al. For example, the method of Judd et al. can be used and unpacked into the data path using a 16b to 16b crossbar for weights. Activations can be stored in memory along the bit plane, thereby avoiding the need for a crossbar. Table 2 below shows the group storage format for each virtual column. Precision can be best stored separately in memory. In some embodiments, the precision of multiple consecutive groups are stored together in a single memory block, thereby amortizing the cost of this additional memory access over multiple groups.
[0066]
[0067] Table 2
[0068] An alternative includes a bitmap in which each bit represents whether the value within the group is equal to or different from zero, as shown in Table 3. If the value is equal to zero, it is not encoded at all. Therefore, the number of encoded elements varies for each group. This allows for higher compression rates for data with a large number of zeros. Unpacking is done by reading the packed groups and then continuously extending the groups as needed using a bit vector to insert zeros where necessary. By extracting and unpacking a sufficient number of groups simultaneously, the bandwidth requirements of the accelerator can be maintained.
[0069]
[0070] Table 3
[0071] Fig.14 The effectiveness of two compression schemes for both weights and activation data in AlexNet-ES and GoogLeNet-ES is indicated with and without the above zero-augmentation approach, together showing the ratios achievable using a fixed number of bits per layer. A value of 2 indicates a reduction to half the original size. Both per-group schemes outperform the per-layer compression scheme on weights and activations. The zero-augmentation compression scheme further improves the compression ratio, especially for weights. This may be particularly desirable when the network is sparse.
[0072] When combining a weight property utilization structure with an activation property utilization structure, the acceleration tile may experience a reduction in the effectiveness of activation optimization due to the increased lookahead structure. Specifically, in both the STR structure and the PRA structure, a group of activations processed in parallel must wait for the slowest activation to be processed before advancing to the next group. For example, in the PRA structure, the activation with the highest number of oneffsets determines how many cycles the entire group will require. As the degree of lookahead increases, embodiments of the present invention that employ STR or PRA activation property utilization structures must consider all activations within the lookahead window. In many embodiments, the wider the lookahead window, the greater the impact of this "bottleneck" activation. Typically, the fallback has no further effect because, as described above, it uses the activations contained in the synchronization group with a lookahead distance of 1 when the lookahead is at least 1.
[0073] In other embodiments, the activation property utilization structure may not adopt the STR or PRA structure. For example, neither the STR or PRA structure will directly attack invalid activations, which may seem counterintuitive because it has been shown that nearly half of the activations in CNNs often tend to be invalid. However, both the STR structure and the PRA structure bring benefits to invalid activations and valid activations, and such structures can generally provide improved functions that are superior to structures that only directly attack invalid activations. Specifically, an accelerator structure that adopts the STR structure or the PRA structure will be advantageous for any valid activation, and a structure that can skip invalid activations will be advantageous for invalid activations, however, the opportunity loss of an accelerator that adopts the STR structure or the PRA structure will generally be far less than 1 for each invalid activation.
[0074] For example, in the case where all activations processed as a group by an accelerator using a PRA structure happen to be zero, the accelerator will process the activation in a single cycle, which represents an opportunity loss of only 1 / 16 compared to an accelerator that can skip invalid activations, because the accelerator using a PRA structure processes each activation bit-serially rather than bit-parallel. Typically, when an accelerator using a PRA structure processes invalid activations in p cycles, the opportunity loss is p / 16, and considering that on average less than 10% of the bits are valid, the opportunity loss of not completely skipping invalid activations is expected to be low. Similar reasoning applies to accelerators using a STR structure.
[0075] In general, invalid activations, dynamic precision variability, and invalid activation bits are a result of the distribution of activation values in networks such as CNNs: typically, most activations are clustered around zero, and a few activations peak at values far from zero. For image classification CNNs, even as each layer reduces the precision of the activations, about 45% of the activations are typically still zero, while more than 90% of the activation bits are often found to be zero, indicating that the potential for performance improvement is much higher if invalid bit content is targeted. As such, many embodiments of the present invention may employ techniques that directly or indirectly exploit invalid bit content.
[0076] like Fig. 9 As depicted, the accelerator 9000 includes a plurality of tiles 9100. Each tile 9100 has its own AM local slice 9110, a local WM (not shown), an input activation buffer (not shown), and an output activation buffer (not shown). The dispatcher 9120 of each AM slice 9110 reads the appropriate activations as in the STR and PRA structures, while also adapting to the prior requirements of the structure of the prior implementation scheme of the present invention. In some embodiments, in order to reduce energy and bandwidth requirements, the dispatcher 9120 uses the per-layer precision derived from the configuration file to read only the required number of activation bits from the AM 9110. Before each activation group is broadcast to all tiles, the dispatcher 9110 further prunes the activations by dynamically detecting the precision required for the given values. Locally, each tile 9100 consumes its activations at its own pace. The buffer determines how far the tiles can be spaced apart in the activation space. Locally, each tile 9100 can perform further processing, such as for the structure using the PRA architecture, the tile can encode the power of 2.
[0077] In some embodiments, each tile has its own AM local slice, local WM, input activation buffer and output activation buffer. AM and WM are stored to maintain the bandwidth required by the computing core. Data is loaded and copied from off-chip memory to a separate AM or WM tile, or multicast to multiple AM or WM tiles. The implementation scheme uses compression to reduce off-chip and on-chip traffic. For both on-chip and off-chip data transmission, the accelerator implementation scheme uses each group of precision to encode activations and weights, and each group of precision is dynamically detected (activation) or statically detected (weight) at the output of the previous layer. Weights are packaged in virtual columns that match weight channels in memory and WM. In addition, zero values are not stored, but the position of the bit vector of each group identifies the non-zero value. In some embodiments, a group of 16 activations or weights can be used to provide a good balance between compression rate and metadata overhead. For each group, precision is stored in bits and zero value bit vectors, and for 256-bit uncompressed activations or weights, the overhead is 4 bits and 16 bits respectively. Before copying activation, the activation buffer decompresses the value.
[0078] The configurations studied here are reported in Table 4. Table 4 gives an example of a configuration for an example accelerator implementation:
[0079]
[0080] Table 4: Configuration of accelerator implementation
[0081] In practice, accelerator implementations employing various aspects and features of the above-described architecture have been shown to provide performance benefits.
[0082] The relative performance of some embodiments is evaluated by modeling the execution time of convolutional and fully connected layers using a cycle-level simulator. Table 5 reports the CNN used, which is sparse (for further discussion, see: Yang, Tien-Ju and Chen, Yu-Hsin and Sze, Vivienne, "Designing Energy-Efficient Convolutional Neural Networks using Energy-Aware Pruning," IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017, which is hereby incorporated by reference). All area and energy measurements are done on the layout using circuit activity with representative data inputs. The layout was generated using Cadence Innovus for TMSC 65mm technology, and then they were synthesized using Synopsys Design Compiler. A typical case design library was used because it produced more pessimistic results for the designs tested. All test designs operate at 1GHz. SRAM is modeled by CACTI (for further discussion, see: J. Park, S. Li, W. Wen, PTP Tang, H. Li, Y. Chen, and P. Dubey, “Faster CNNs with Direct Sparse Convolutions and Guided Pruning,” in 5th International Conference on Learning Representations (ICLR), 2017, which is hereby incorporated by reference), and eDRAM is modeled by Destiny (for further discussion, see: N. Muralimanohar and R. Balasubramonian, “Cacti6.0: A tool to understand large caches,” HP Technical Report HPL-2009-85, http: / / www.hpl.hp.com / techreports / 2009 / HPL-2009-85.html, which is hereby incorporated by reference).
[0083] network abbreviation <![CDATA[ AlexNet-Eyeriss ]]> <![CDATA[ AlexNet-ES ]]> <![CDATA[ GoogLeNet-Eyeriss ]]> <![CDATA[ GoogLeNet-ES ]]>
[0084] Table 5: Studied networks
[0085] Included below is a discussion of weight hopping versus weight and activation utilization. Included below is an evaluation of the performance, energy efficiency, and area of various implementations.
[0086] In the embodiments tested, various lookahead and fallback values have been tested and the performance compared to the reference configuration. The results indicate that using a larger multiplexer results in better performance regardless of the mix of lookahead and fallback. In the embodiments discussed below, the combination of lookahead h and fallback d is considered such that h+d+1=2 n And n={8}. Fig.10 and Fig.11 Indicates the speedup relative to an accelerator structure that does not use weight jumping and is not constructed to exploit the properties of activation values. Fig.10 and Fig.11 Indicates the speedup for setting lookahead and lookaside to (lookahead, lookaside) or (h,d), as indicated at the base of each graphical result set. Fig.10 indicates the speedup when processing ES-AlexNet, while Fig.11 Indicates the speedup when processing ES-GoogLeNet. As indicated, three accelerator structure implementations were tested, one implementation using only the weight hopping structure, one implementation using the weight hopping and STR structure, and one implementation using the weight hopping and PRA structure.
[0087] like Fig.10 and Fig.11 As indicated, adding a small amount of backup input by sacrificing the lookahead input provides a significant marginal gain in performance when testing implementations that only employ weight hopping structures, as can be seen in the transition from (7,0) to (4,3). Fig.10 As indicated, for AlexNet-ES, the speedup with (7,0) or no fallback is 2.3x, and the speedup with (4,3) is 2.7x.
[0088] Fig.10 and Fig.11Indicates that some of the trends of changes in backup or lookahead values have been observed compared to setting the value to zero. Conceptually, the backup allows the weight channels with densely distributed effective weights to distribute their load to adjacent weight channels, thereby alleviating the imbalance of the weight channels. However, some weight channels are generally unlikely to have multiple adjacent densely distributed channels. Therefore, it can be expected that any expansion of the backup window will result in a decreasing return, which matches the results described for a given implementation. Similarly, it is understandable that adding a large lookahead will affect the effectiveness of the activation processing backend as described above. The results indicate that for the same total number of multiplexed inputs (h+d+1), and as long as there are some backup options, the more looksaheads, the better the performance.
[0089] Overall, the difference seems relatively weak, however, as indicated in the figure, when combined with a structure that exploits activation properties (such as using an STR structure or a PRA structure), the benefits are multiplied. Therefore, in an embodiment, a relatively small performance difference compared to just weight jumping brings a much larger benefit to the final design.
[0090] Different configurations also lead to different benefits. Although the difference between configurations is small in terms of area, generally the smaller the lookahead, the lower the wire count used to implement the weight hopping structure. Therefore, for many implementations and situations, setting the lookahead and lookaside pairs to (2,5) or (4,3) may be a reasonable compromise configuration.
[0091] like Fig.10 and Fig.11 As indicated, adding activation property utilization structures increases the benefits of weight skipping structures. Various configurations can be designed to balance cost and desired performance, such as in the design of activation memories and interconnects.
[0092] like Fig.10 and Fig.11As indicated, adding the ability to utilize precision variability is mainly to supplement invalid weight jumps. For AlexNet-ES and GoogLeNet-ES, even the most incompetent configuration (1,6) shown also improves performance by 7.2 times and 4.3 times respectively. The Alexnet-ES set has only a few layers, which are larger than the GoogLeNet-ES set. As indicated, using activation properties utilizing invalid activation bit content such as PRA structure produces better performance than using activation properties utilizing structures utilizing precision such as STR structure. In the case where the overall performance benefit is lower than the overall performance benefit suggested by the invalid bit content, the culprit may be cross-activation channel synchronization, because all activation channels in the lead window must wait for the activation channel with the most oneffset to complete before advancing to the next lead window. As indicated, the best configuration tested is to set the lead and backup to (4,3), which improves performance by 15.8 times and 8.4 times for AlexNet-ES and GoogLeNet-ES respectively.
[0093] Although the above description focuses on the assumption that the lookahead and fallback patterns must constitute weight boosts of continuous windows in both the time and channel directions, the concept of weight boosts within a filter is not limited to continuous windows in the lookahead and fallback directions, but may come from arbitrary coordinates that are a combination of both the lookahead and fallback. That is, given a lookahead distance of h, it is possible to implement a fallback pattern that allows boosts from any subset of 16×h positions in this window, where 16 is the filter channel width.
[0094] In a variation of this configuration, a sparse boosting mode can be employed that allows weights to be boosted from arbitrary positions in the weight stream. The term 'sparse' here refers to the fact that, for example, a weight w[channel,step] that can be stolen from position [channel+d,step+h] may not necessarily be associated with a weight stolen from position [channel+d-1,step+h] or [channel+d,step+h-1].
[0095] exist Fig.12 In the set of three configurations compared in , the base configuration is presented on the left, where a (2,5) weight hop configuration is employed as described above. The other two configurations are sparse configurations created from the original configuration, where the lookahead is set to 2 and the fallback is set to 5, where the fallback is limited to a distance of 7 channels, for a total of 2+2*7=16 possible boost sites. For power and area considerations, the entire connectivity is reduced to h+d=7 boost sites, resulting in an 8-input multiplexer of the same size as the base design on the left. For the network optimized design on the right, connection sites are iteratively removed to minimize performance degradation for a given network; resulting in a connection pattern customized for each of the two test networks. For the Fig.12 The Checkers configuration presented in the center of FIG. 5 directly adopts a fixed checkerboard connection pattern without having to repeatedly select connections to remove. As indicated, the Checkers configuration provides many of the acceleration benefits of the network optimization mode. As expected from the description below, it can be expected that adding activation property utilization structure doubles the acceleration benefits.
[0096] Various factors can drive the determination of the overall preferred structure. For example, while using a PRA structure appears to outperform using an STR structure in many embodiments, using a PRA structure can be more expensive due to the need for more wires per activation. For example, relative area and energy efficiency considerations can be considered when determining whether the performance gain is worthwhile.
[0097] Fig.13A and Fig. 13B Indicates the energy efficiency of the weight hopping with STR architecture and the weight hopping with PRA architecture compared to accelerators that do not employ weight hopping or activation property exploitation architectures. Fig.13A Plotting the energy efficiency when running on AlexNet-ES, Fig. 13B Energy efficiency when running on GoogLeNet-ES is described. As indicated, in each case the design is more energy efficient than the baseline because the performance benefit outweighs the additional hardware power cost. Using the STR structure is more energy efficient than using the PRA structure, except for adopting the (1,6) configuration, which is contextually incompatible with low-cost designs. The most energy-efficient design tested is an implementation that includes the STR structure and adopts the (4,3) configuration, which results in 5.6x and 2.9x relative energy efficiency for AlexNet-ES and GoogLeNet-ES, respectively.
[0098] Table 6 indicates the area of various accelerator implementations and details the (1,6) configuration. The tradeoff between area and performance is sublinear, indicating that even if the performance of the baseline structure that does not employ weight jumping or activation property utilization structures can be linearly scaled, its performance per unit area will still lag behind. Test results indicate that the performance of the baseline structure scales sublinearly with area because typical filter counts, typical filter dimensions, and inputs and outputs result in higher underutilization of wider configurations of the baseline structure. Since the sum of the lookahead and fallback is the same for each of the following three configurations (1,6), (2,5), and (4,3), the area difference between the configurations is negligible. Overall, most of the area of these implementations is in memory.
[0099]
[0100] Table 6: Area decomposition for structures using PRA and STR
[0101] Table 7 below compares the weight jump and activation property utilization accelerator disclosed herein with other available accelerators. Table 7 highlights several relevant characteristics of these designs: 1) for which input data the multiplication-accumulation calculation is skipped, 2) for which input data the memory reference is avoided, 3) for which input data the multiplication-accumulation with reduced cost is performed; 4) for which input data the memory access with reduced cost is performed; 5) how the input data is routed to the appropriate computation unit or storage unit; and 6) the ordering used to calculate the inner product.
[0102] Cnvlutin (see: J. Albericio, P. Judd, T. Hetherington, T. Aamodt, N. Enright Jerger, and A. Moshovos, "Cnvlutin: Ineffectual-neuron-free deep neural network computing," 2016 IEEE / ACM International Conference on Computer Architecture (ISCA), 2016 and PCT Patent Application Publication No. WO 2017 / 214728A1, entitled "Accelerator for Deep Neural Networks" owned by the University of Toronto Management Committee (inventors: Patrick Judd, Jorge Albercio, Andreas Moshovos, Sayeh Sharify, and Alberto Delmas Lascorz), both of which are hereby incorporated by reference) skips both computation and memory access for invalid activations (IA). It does not require special input or output routing mechanisms except that each set of weights paired with each activation must have independent weight ports.
[0103] Cambricon-X (see S. Zhang, Z. Du, L. Zhang, H. Lan, S. Liu, L. Li, Q. Guo, T. Chen, and Y. Chen, “Cambricon-x: An accelerator for sparse neural networks,” 49th Annual IEEE / ACM International Symposium on Microarchitecture, MICRO 2016, Taipei, Taiwan, October 15-19, 2016, pp. 1-12, 2016, which is hereby incorporated by reference) utilizes invalid weights (IW) in an inner-product based accelerator. Non-zero weights are compressed into memory and marked with deltas (distances between weights). Each cycle, a PE (equivalent to our inner-product unit) extracts 16 weights and selects the corresponding 16 activations from a vector with 256. The deltas are decoded into absolute offsets using a chained adder. It uses a 256-wide input activation crossbar to pair activations with corresponding weights. This approach is similar to the weight-hopping accelerator of the present invention with a very large 16×16 look-ahead window and coded multiplexing selection. This requires a memory interface for 256 activations. The authors discuss that this activation bandwidth makes their approach impractical for a scalable accelerator.
[0104] SCNN (see: A. Parashar, M. Rhu, A. Mukkara, A. Puglielli, R. Venkatesan, B. Khailany, J. Emer, SW Keckler, and WJ Dally, "Scnn: An accelerator for compressed-sparse convolutional neural networks", Proceedings of the 44th Annual International Symposium on Computer Architecture, ISCA'17, (New York, NY, USA), pp. 27-40, ACM, 2017, which is hereby incorporated by reference) skips the computation and memory access of both invalid weights and invalid activations. It compresses weights and activations in memory where only valid elements are stored, each followed by the number of invalid elements that have been ignored. A 16×32 output crossbar routes the multiplication results to 32 accumulator banks. SCNN is designed to minimize input read bandwidth. Since SCNN uses 4×4 Cartesian products, only 4 of the 16 multipliers can be used for the FCL, which has no weight reuse.
[0105] The weight-jumping accelerator of the present invention skips computation and memory access for invalid weights, although to a different degree than SCNN or Cambricon-X. It reduces the bandwidth and energy cost of memory access for both invalid activations and valid activations (EAs). It uses a hybrid input weight-static / activation-dynamic approach to match activations and weights, as it utilizes a sparse scrambled network for input activations and a constrained static schedule for weights.
[0106] To capture sparsity, SCNN and Cambricon-X use dense hardware interconnects. SCNN uses output crossbars, while Cambricon-X uses input crossbars. The weight-jumping accelerator of the present invention uses sparse input interconnects to capture a sufficient number of invalid weights and compensate for the opportunity loss by targeting all activations instead.
[0107]
[0108]
[0109] Table 7: Comparison of CNN accelerators
[0110] like Figure 7B In the implementation scheme presented, the front end uses a per-weight multiplexer signal ( Figure 7Bws in), which allows each weight channel to perform weight promotion independently of other weight channels. However, these signals represent memory overhead. Reducing this overhead is preferred, and the more so, the narrower the weight data width. To this end, we make the following observations: 1) Use per-weight ws signals to over-provisioning, because not all combinations are valid when all ws signals for each PE are considered; and 2) Even eliminating some of the valid combinations (e.g., combinations that never occur or are infrequent) may not adversely affect TCL's ability to fully exploit sparsity. Therefore, we can limit the combinations of weight moves supported by the TCL front end, thereby reducing the number of bits required to specify which schedule table to use in each step. For example, we can store a scheduling selection field (SS) for each group of weights. TCL can expand SS to per-weight ws signals in tiles, which is a surgical modification to the design. For example, a 4-bit SS field for each group with 16 weights can support 2S S=16 different scheduling modes, each of which is mapped to 3b 16=48b vectors including 16 ws signals. The mapping of SS signals to ws can be static or programmable. In the latter case, it can be provided at an appropriate granularity (such as per filter or per layer). For our example, a 16×48b table can map these SS signals to a set of 16 scheduling steps per filter. Profiling shows that such an arrangement does not significantly affect the performance of the studied network (e.g., it covers 96% of all scheduling steps in GoogleNet-ES).
[0111] Fig.15 An implementation of the aforementioned approach is shown. In this implementation 1500, a multiplexing selection table (MST) 1520 is introduced into each filter channel 1540. Alternatively, the MST can be shared between multiple channels. The MST can only be used to load some of the most frequently used combinations of multiplexing selection signals. Loading can be performed at convenient time intervals, such as once per layer per filter, once per several layers, or even at a sub-filter granularity. In this implementation, a small ws field for each row weight can be used to specify the schedule to be used in each step. Therefore, the overhead of the selection signal can be greatly reduced.
[0112] As long as there is sparsity, the front-end implementation can also be used to speed up training. For example, this is the case in a selective back-propagation method that only performs some of the updates. This method effectively converts some of the weight update values to zero, thereby introducing sparsity during the back-propagation phase. At the output of each layer during back-propagation, a lightweight implementation of a scheduler (most preferably a greedy scheduler and in hardware) can rearrange the updates before sending them to the processing element. The front end is data type agnostic and can therefore be used with floating point, fixed point, or mixed representations in the forward and back-propagation phases alike.
[0113] As will be appreciated by those skilled in the art, in operation, the above components may be controlled by a controller, which may be, for example, a programmable finite state machine or a programmable processor that may control an accelerator as a functional unit. Depending on the embodiment, the programmable finite state machine may have several control and data registers and possibly program and data memory, and output various control signals to other components described herein in the neural network system.
[0114] The present invention can be embodied in other specific forms without departing from its spirit or essential characteristics. For those skilled in the art, some adaptations and modifications of the present invention will be apparent. Therefore, the embodiments discussed herein are considered to be illustrative rather than restrictive, and the scope of the present invention is indicated by the appended claims rather than the foregoing description, and therefore all changes falling within the equivalent meanings and scope of the claims are intended to be included in the claims.
Claims
1. A neural network accelerator tile for exploiting input sparsity, the neural network accelerator tile defining a set of weight channels and a set of activation channels, each weight channel corresponding to an activation channel, the neural network accelerator tile include: a weight memory for supplying weights and weight selection metadata for each weight channel in the set of weight channels; an activation selection unit for receiving an input activation value set and rearranging the input activation value set to supply the rearranged activation value set to each activation channel; a set of multiplexers, the set of multiplexers comprising at least one multiplexer per pair of an activation channel and a weight channel, each multiplexer configured to select a combined activation value from the activation channel set of reordered activation values for the activation channel based on weight selection metadata for the weight channel; as well as A combination unit set, the combination unit set comprising at least one combination unit per multiplexer, each combination unit being configured to combine the combined activation value of the activation channel with the weight of the weight channel to output a weight channel product.
2. The neural network accelerator tile of claim 1 , further comprising an activation memory for supplying the input activation value set to the activation selection unit.
3. The neural network accelerator tile of claim 1 , wherein each multiplexer in the set of multiplexers is configured to select the combined activation value from the corresponding set of reordered activation values and from an additional set of channel activation values, the additional set of channel activation values being formed by at least one reordered activation value of at least one additional activation channel.
4. The neural network accelerator tile of claim 1 , further comprising an adder tree for receiving at least two eight-channel products.
5. The neural network accelerator tile of claim 1, wherein weights of the set of weight channels define at least one neural network filter.
6. The neural network accelerator tile of claim 1, wherein the combinational unit comprises a multiplier.
7. A neural network accelerator, comprising the neural network accelerator tile according to claim 1.
8. The neural network accelerator tile of claim 1 , wherein each rearranged set of activation values comprises a standard weight activation value and at least one preceding activation value.
9. The neural network accelerator tile of claim 1, wherein the tile is implemented on an activation efficiency utilization accelerator structure.
10. The neural network accelerator tile of claim 1, wherein the set of input activation values are bits of activation values.
11. The neural network accelerator tile of claim 1 , wherein the set of input activation values is a signed power of 2 as a Booth encoded representation of the activation values.
12. The neural network accelerator tile of claim 3, wherein the set of multiplexers is a set of multiplexers of a uniform size indicating a number of inputs.
13. The neural network accelerator tile of claim 12, wherein the uniform size is a power of 2.
14. The neural network accelerator tile of claim 13, wherein a size of the rearranged set of activation values is greater than a size of the additional set of channel activation values.
15. The neural network accelerator tile of claim 12, wherein the rearranged set of activation values and the additional set of channel activation values are used for a combined set of activation values, and the combined set of activation values contains 8 activation values.
16. The neural network accelerator tile of claim 3, wherein the additional set of channel activation values is formed by at least one rearranged activation value from each of at least two additional activation channels.
17. The neural network accelerator tile of claim 16, wherein the at least two additional activation channels are non-contiguous activation channels.
18. The neural network accelerator tile of claim 1 , wherein the tile is configured to receive the input activation value set as at least one packed activation value set stored bit by bit to a desired precision defined by a precision value, the tile being configured to unpack the at least one packed activation value set.
19. The neural network accelerator tile of claim 18, wherein the at least one packed set of activation values comprises a first packed set of activation values and a second packed set of activation values, the first packed set of activation values being stored bit by bit to a first desired precision defined by a first precision value, and the second packed set of activation values being stored bit by bit to a second desired precision defined by a second precision value, the first precision value being independent of the second precision value.
20. The neural network accelerator tile of claim 18, wherein the tile is configured to receive a set of bit vectors, the set of bit vectors comprising a bit vector corresponding to each packed activation value set of the input activation value set, the tile being configured to unpack each packed activation value set to insert zero values as indicated by the corresponding bit vector.
21. The neural network accelerator tile of claim 1 , wherein the tile is configured to receive the weights of the weight channel set as at least one packed weight channel weight set stored bit by bit to a desired precision defined by a precision value, and the tile is configured to unpack the at least one packed weight channel weight set.
22. The neural network accelerator tile of claim 1 , wherein the activation channel sets are at least two column activation channel sets, each column activation channel set forming a column in which each activation channel corresponds to a weight channel, the tile further comprising at least one connection between at least two columns to transfer at least one weight channel product between the columns.
23. A system for bit-serial computation in a neural network, the system include: one or more bit-serial tiles, the one or more bit-serial tiles configured according to claim 1 to perform bit-serial computations in a neural network, each bit-serial tile receiving an input neuron and a synapse, the input neuron comprising at least one set of input activation values, and the synapse comprising at least one set of weights and at least one set of weight selection metadata, the one or more bit-serial tiles generating output neurons, each output neuron being formed using at least one weight channel product; an activation memory for storing neurons and communicating with the one or more bit-serial tiles via a dispatcher and an output activation buffer, wherein the dispatcher reads neurons from the activation memory and transmits the neurons to the one or more bit-serial tiles via a first interface, and wherein the dispatcher reads synapses from a memory and transmits the synapses to the one or more bit-serial tiles via a second interface; and wherein the output activation buffer receives the output neurons from the one or more bit-serial tiles and transmits the output neurons to the activation memory via a third interface; And wherein one of the first interface and the second interface transmits the neuron or the synapse bits serially to the one or more bit-serial tiles, and the other of the first interface and the second interface transmits the neuron or the synapse bits in parallel to the one or more bit-serial tiles.
24. A system for computing at each layer in a neural network, the system include: One or more tiles, the one or more tiles configured according to claim 1 to perform computations in a neural network, each tile receiving input neurons and synapses, the input neurons each comprising at least one bias, each bias comprising at least one activation value, and the synapses comprising at least one set of weights and at least one set of weight selection metadata, the one or more tiles generating output neurons, each output neuron formed using at least one weight channel product; an activation memory for storing neurons and communicating with the one or more tiles via a dispatcher and an encoder, wherein the dispatcher reads neurons from the activation memory and transmits the neurons to the one or more tiles, and wherein the dispatcher reads synapses from the memory and transmits the synapses to the one or more tiles, and wherein the encoder receives the output neuron from the one or more tiles, encodes the output neuron, and transmits the output neuron to the activation memory; And wherein the offset is processed by the tile so as to perform calculations only on non-zero neurons.
25. An accelerator tile, the accelerator tile include: an activation selection unit for receiving a set of activation values and reordering the set of activation values into at least one set of multiplexer input values; a set of weight value receivers for receiving at least one weight and at least one weight selection metadata; at least one multiplexer for receiving at least one of the at least one set of multiplexer input values and at least one weight selection metadata, the at least one multiplexer configured to apply the at least one weight selection metadata to select at least one combined activation value from the at least one set of multiplexer input values; at least one combiner for applying the at least one combined activation value to the at least one weight to produce at least one product; as well as At least one product output distributor, the at least one product output distributor is used to output the at least one product.
26. A neural network accelerator, comprising the accelerator tile according to claim 25.
27. The accelerator tile of claim 25, further comprising an activation memory for supplying the set of activation values to the activation selection unit.
28. The accelerator tile of claim 25, wherein the at least one multiplexer input value set comprises at least two multiplexer input value sets, and the at least one multiplexer is configured to receive at least one of the at least two multiplexer input value sets and at least one activation value from at least another multiplexer input value set.
29. The accelerator tile of claim 25, wherein the combiner comprises a multiplier.
30. The accelerator tile of claim 25, wherein each set of multiplexer input values includes a standard activation value and at least one look-ahead activation value.
31. The accelerator tile of claim 25, implemented on an activation efficiency utilization accelerator structure.
32. The accelerator tile of claim 25, wherein the set of activation values are bits of activation values.
33. The accelerator tile of claim 25, wherein the set of activation values are signed powers of 2 as Booth encoded representations of activation values.
34. The accelerator tile of claim 25, wherein a size of a number of indicative inputs of each of the at least one multiplexer is a power of two.
35. The accelerator tile of claim 34, wherein the size of each multiplexer of the at least one multiplexer is 8.
36. The neural network accelerator tile of claim 1, wherein the neural network accelerator tile is used to train a neural network.
37. The accelerator tile of claim 25, wherein the accelerator tile is used to train a neural network.
38. The neural network accelerator tile of claim 1, wherein the weight selection metadata for the weight channel indexes a table specifying a multiplexer selection signal.
39. The accelerator tile of claim 25, wherein the weight selection metadata indexes a table specifying multiplexer selection signals.
Citation Information
Patent Citations
Apparatus and process for electrolysis using a cation-permselective membrane and turbulence inducing means
EP0002009A1
Accelerator for deep neural networks
US20170357891A1
Accelerator for deep neural networks
WO2017214728A1
Vector computation unit in a neural network processor
CN107533667A
Dynamically reconstructable multistage parallel single instruction multiple data array processing system
US20150310311A1
