A highly energy-efficient neural network computing system with adjustable precision and throughput
By introducing multiple parallel pipelines and side-feed connection interfaces into the binary neural network computing system, and using side-feed connections to reconstruct the routing module to adjust the degree of parallelism, the problem of changes in accuracy and throughput of binary neural networks in different application scenarios is solved. , achieving high accuracy and flexibility.
Patent Information
- Application Number
- CN202310311747.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-03-28
AI Technical Summary
The existing binary neural network accelerated computing architecture cannot meet the changing requirements of computing accuracy and throughput in different application scenarios, and the model performance is low, which is especially unacceptable in application scenarios that require high accuracy.
By introducing multiple parallel binary neural network computing pipelines, and introducing side feed connection interfaces in the computing pipeline, the side feed connection is used to reconstruct the routing module and the reconstruction controller to adjust the parallelism of the computing system to achieve an improvement in accuracy and throughput. Adjustable.
The accuracy of the binary neural network is significantly improved, approaching or even exceeding the floating point level, and the flexibility and performance of the computing system are improved by flexibly adjusting the degree of parallelism.
Smart Images

Figure CN116306853B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the computer field, relates to the field of neural network computing architecture, and specifically relates to a high-energy-efficiency neural network computing system with adjustable precision and throughput. Background Art
[0002] As an important branch of machine learning, deep learning technology has become an important research direction in this round of artificial intelligence research boom, thanks to the background of the big data era and the breakthrough progress of computer computing power in recent years. Different from the feature engineering method of traditional machine learning, which is manually designed by human experts for pattern recognition systems, deep learning is based on feature learning. It learns features through a model composed of multiple neurons and multi-layer computing structures to complete complex learning tasks such as pattern recognition. Deep learning technology has made substantial progress in image classification, speech recognition, target detection and other fields. In order to pursue more advanced model performance, deep learning models have developed in the direction of more layers and higher complexity in recent years. The storage complexity and computational complexity of the model are also increasing, which brings challenges to the deployment of deep learning at the edge where storage resources and computing resources are limited.
[0003] In order to deploy deep learning technology on embedded devices with limited computing and storage resources such as sensors and wearable devices, researchers have proposed binary neural networks. As an extreme example of deep learning model compression, binary neural networks use 1-bit binary pulses to represent the weights and activation values in the network, and use bit-level operations to replace complex multiplication and accumulation (MAC) operations in deep learning models, which greatly reduces the requirements for storage and computing resources for model deployment. With the development of binary neural network technology, designing binary neural network acceleration computing architecture for specific application scenarios has become one of the best solutions for deploying deep learning at the edge. Binary neural networks have also gradually been widely used in multiple intelligent computing application scenarios such as smart logistics, smart wearables, and low-power machine vision. However, the deployment solution of designing binary neural network acceleration computing architecture for specific application scenarios still has shortcomings.
[0004] On the one hand, since the binary neural network uses 1-bit binary pulses to represent feature values and weight values, and uses XNOP+Popcount bit-level operations to replace the original multiplication and accumulation operations in floating-point convolution, the binary neural network computing architecture has lower power consumption and higher computing energy efficiency than traditional general-purpose computing architectures such as CPU and GPU, as shown in Table 1.
[0005] Table 1 Comparison of power consumption and energy efficiency of existing binary neural network computing architectures
[0006]
[0007] However, these characteristics of binary neural networks also lead to a significant decline in model performance. As can be seen from Table 2, the accuracy of existing binary neural networks is low, with a decrease of about 10% to 30% compared with floating-point models, which is unacceptable in application scenarios with high requirements for model performance.
[0008] Table 2 Classification accuracy of existing binary neural networks on the ImageNet dataset
[0009]
[0010] On the other hand, most of the existing binary neural network acceleration computing architectures are designed for specific application scenarios. They are limited by the fixed network connections and representation accuracy (1-bit) in the computing architecture. Once the computing architecture is comprehensively deployed, the computing accuracy and throughput of the accelerator are fixed, which cannot meet the changing requirements of binary neural networks for the computing accuracy and throughput of the accelerator in different application scenarios.
[0011] Therefore, a high-performance and flexible deployment solution is required for the deployment of binary neural networks on embedded devices. Summary of the invention
[0012] In view of this, the purpose of the present invention is to provide a high-energy-efficiency neural network computing system with adjustable precision and throughput, by introducing multiple parallel binary neural network computing pipelines and introducing side feed connection interfaces in the binary neural network computing pipelines. Each computing pipeline is interconnected with a side feed connection reconstruction routing module, and the reconstruction of the side feed connection reconstruction routing module, the side feed connection interface, and the output reorganization module is completed through a reconstruction controller, so that the parallelism of the reconstructed computing system reaches the goal of adjustable precision and throughput and high flexibility.
[0013] In order to achieve the above object, the present invention provides the following technical solutions:
[0014] Scenario 1:
[0015] A high-energy-efficiency neural network computing system with adjustable precision and throughput includes: multiple parallel binary neural network computing pipelines, a side-feedback connection reconstruction routing module, a reconstruction controller and an output reorganization module; each binary neural network computing pipeline includes multiple computing arrays, and a side-feedback connection interface is reserved for each computing array.
[0016] Each binary neural network computing pipeline is interconnected with the side feed connection reconstruction routing module to form a binary neural network with higher parallelism, thereby improving the accuracy of the computing system; the system receives a reconstruction signal and completes the reconstruction of the side feed connection reconstruction routing module, the side feed connection interface and the output reorganization module through a reconstruction controller, thereby changing the parallelism of the computing system to achieve the purpose of balancing and adjusting the accuracy and throughput of the computing system.
[0017] Furthermore, the side feed connection interface is located behind the computing unit of each computing array, and under the control of the reconstruction controller, completes the calculation of the side feed connection under different parallelism states, and interacts with the side feed connection reconstruction routing module.
[0018] Further, the side feed connection interface includes a controller, an input pulse signal buffer, a side feed connection calculation unit, a side feed connection pulse signal buffer and an accumulation calculation unit;
[0019] The input pulse signal buffer is used to buffer the binary convolution feature map output by the computing unit in the computing array as the input pulse signal, so as to facilitate the side feed connection computing unit and the accumulation computing unit to read and perform calculation;
[0020] The side feed connection calculation unit is used to pre-store side feed connection parameters pointing to other computing pipelines; under the control of the controller, the side feed connection calculation unit multiplies the corresponding side feed connection parameters with the cached input pulse signal to obtain the side feed connection transmitted from the computing pipeline to other computing pipelines, and transmits it to the side feed connection reconstruction routing module for further routing reconstruction between different pipelines;
[0021] The side feed connection parameters output by other calculation pipelines are transmitted to the target pipeline after being reconstructed by the side feed connection reconstruction routing module and cached in the side feed connection pulse signal cache for further accumulation calculation;
[0022] The accumulation calculation unit is used to read the side feed connection from other calculation pipelines in the side feed connection pulse signal cache and the input pulse of the current calculation pipeline in the input pulse signal cache, add them together to obtain an output pulse array, and transmit them to the next calculation array in the pipeline.
[0023] Furthermore, under the control of the reconstruction controller, the side feed connection reconstruction routing module uniformly manages the routing states between the computing pipelines according to the reconstruction signal, completes the routing reconstruction between the pipelines, and thus adjusts the parallelism of the computing system.
[0024] Furthermore, under the control of the reconstruction controller, the output reorganization module reorganizes and outputs the output pulse sequences from each binary neural network computing pipeline; the output reorganization module includes a register array whose size is the sum of the output pulse sequences of N computing pipelines, and the register array is used for caching. The cached output pulse sequences are readjusted in output order according to the parallelism of the computing system and then output under the control of the reconstruction controller.
[0025] Furthermore, the calculation steps of the algorithm model of the binary neural network calculation pipeline are:
[0026] S1: The input signal is input into the binary calculation unit, and an efficient binary convolution calculation is completed through the bit-level operation of XNOR+Popcount; the binary calculation unit is a calculation unit of the calculation array in the binary neural network calculation pipeline;
[0027] S2: The sparsely grouped side feed connection completes the calculation of the side feed connection through the channel-level multiplication shown in formula (1);
[0028]
[0029] Among them, A i,k Represents the output feature map of the kth binary computing unit in the i-th binary subnetwork; represents the side feed connection parameter from the k-th binary computing unit in the i-th binary sub-network to the k-th binary computing unit in the j-th binary sub-network;
[0030] S3: The side feed connection calculated according to formula (2) is added to the output of the corresponding computing unit of the target binary sub-network to obtain the input feature of the next computing unit;
[0031]
[0032] S4: Repeat the above steps S1 to S3 until the last binary calculation unit;
[0033] S5: The output feature maps of each binary sub-network are concatenated and integrated by channel to obtain the output signal of the algorithm model.
[0034] Scenario 2:
[0035] A multi-chip reconfigurable high-energy-efficiency neural network computing system, which completes the deployment of the control end based on a single control chip and completes the deployment of the computing end based on multiple FPGA chips;
[0036] The control chip is integrated with the side feed connection reconstruction routing module and the reconstruction controller of Scheme 1; and each FPGA chip is integrated with the binary neural network calculation pipeline of Scheme 1.
[0037] Scenario 3:
[0038] A reconfigurable high-energy-efficiency neural network computing system deployed on a single SoC, wherein the computing system of scheme 1 is deployed in the logic segment of the SoC chip, and the control of the computing device is completed through the system end of the SoC.
[0039] The beneficial effects of the present invention are as follows: the present invention significantly improves the accuracy of the binary neural network, approaching or even exceeding the floating point level; the computing system can reconstruct the parallelism of the computing system through control signals, balance and adjust the accuracy and throughput, and improve the flexibility of the computing system.
[0040] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0042] Figure 1 The overall structure diagram of the computing system of the present invention is shown;
[0043] Figure 2 This is the structural diagram of the side feed connection interface;
[0044] Figure 3 Reconstruct the interconnect structure between the routing module and the computational pipeline for the side feed connection;
[0045] Figure 4 Schematic diagram of the working state of the side feed connection reconstruction routing module (the computing system includes 4 binary neural network computing pipelines);
[0046] Figure 5 This is the structural diagram of the output reorganization module;
[0047] Figure 6 It is a diagram of the structure of a binary parallel neural network with side feed connections;
[0048] Figure 7 Calculate system performance bubble charts for each binary neural network;
[0049] Figure 8 This is a structural diagram of a multi-chip reconfigurable binary neural network computing system of Example 1;
[0050] Fig. 9 This is a structural diagram of a reconfigurable binary neural network computing system deployed on a single SoC according to Example 2. DETAILED DESCRIPTION
[0051] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0052] See also Figures 1 to 9 The present invention provides a high-efficiency neural network computing system with adjustable accuracy and throughput, such as Figure 1 As shown. Different from the traditional binary neural network computing system which only includes a single binary neural network computing pipeline, the computing system proposed by the present invention introduces multiple parallel binary neural network computing pipelines, and reserves a side feed connection interface in the computing array of each computing pipeline. Each computing pipeline is interconnected with the side feed connection reconstruction routing module to form a binary neural network with higher parallelism, thereby improving the accuracy of the computing system. On the other hand, the computing system proposed by the present invention receives a reconstruction signal, and completes the reconstruction of the side feed connection reconstruction routing module, the side feed connection interface, and the output reorganization module through a reconstruction controller, thereby changing the parallelism of the computing system to achieve the purpose of balancing and adjusting the accuracy and throughput of the computing system. The specific working principles of each module are shown below.
[0053] 1) Side feed connection interface
[0054] The computing system proposed in the present invention introduces a side feed connection interface in each binary neural network computing pipeline. It is located behind the computing unit of each computing array and, under the control of the reconstruction controller, completes the calculation of the side feed connection under different parallelism states and interacts with the side feed connection reconstruction routing module. Figure 2 As shown, the side feed connection interface is composed of a controller, an input pulse signal buffer, a side feed connection calculation unit, a side feed connection pulse signal buffer, and an accumulation calculation unit.
[0055] The input pulse signal buffer is used to buffer the binary convolution feature map output by the computing unit as an input pulse signal, so as to facilitate the side feed connection computing unit and the accumulation computing unit to read and perform calculations.
[0056] The side feed connection calculation unit pre-stores side feed connection parameters pointing to other computing pipelines. Under the control of the controller, the side feed connection calculation unit multiplies the corresponding side feed connection parameters with the cached input pulse signal to obtain the side feed connection transmitted from the computing pipeline to other computing pipelines, and transmits it to the side feed connection reconstruction routing module for further routing reconstruction between different pipelines.
[0057] The side feed connection parameters output by other calculation pipelines are transmitted to the target pipeline after the reconstructed routing of the side feed connection reconstructed routing module and cached in the side feed connection pulse signal cache for further accumulation calculation.
[0058] The accumulation calculation unit reads the side feed connection from other calculation pipelines in the side feed connection pulse signal cache and the input pulse of the current calculation pipeline in the input pulse signal cache, accumulates them to obtain an output pulse array, and transmits them to the next calculation array in the pipeline.
[0059] 2) Side feed connection reconstruction routing module
[0060] The side feed connection reconstruction routing module is interconnected with each parallel binary neural network computing pipeline, such as Figure 3 As shown, under the control of the reconstruction controller, the routing states between the computing pipelines are uniformly managed according to the reconstruction signal, and the routing reconstruction between the pipelines is completed, thereby adjusting the parallelism of the computing system.
[0061] In order to explain in detail the working principle of the side-feed connection reconstruction routing module, here we take 4 parallel binary neural network computing pipelines as an example to illustrate the control principle of the side-feed connection reconstruction routing module. Table 3 shows the state table of the computing system of the present invention when it contains 4 parallel binary neural network computing pipelines, where #1, #2, #3, #4 respectively represent binary neural network computing pipelines #1, #2, #3, #4; N represents the parallelism of the pipeline, and #1+#2 represents that the binary neural network computing pipelines #1 and #2 form a binary parallel network structure with a parallelism of 2 through the side-feed connection.
[0062] Table 3 Computation system status table (including 4 binary neural network calculation pipelines)
[0063]
[0064] As shown in Table 3, under the control of the 4-bit reconstruction signal, the computing system has a total of 9 states of 4 different categories, completing the routing reconstruction of the side feed connections between different binary neural network computing pipelines, thereby adjusting the parallelism of the entire computing system.
[0065] Figure 4 Take the reconstructed signals as 0000, 0001, 0100, 1000 as an example (corresponding to Figure 4 (a)~ Figure 4 (d)) intuitively shows the routing connection status of the side feed connection reconstruction routing module under the computing system parallelism N = 1*4, N = 2*2, N = 1+N = 3, N = 4, where LC i,j Represents a side feed connection from pipeline #i to pipeline #j.
[0066] 3) Output reforming module
[0067] Under the control of the reconstruction controller, the output reorganization module reorganizes and outputs the output pulse sequences from each binary neural network calculation pipeline. The structure of the output reorganization module is as follows: Figure 5 As shown, the module contains a register array of size equal to the sum of N output pulse sequences of the computing pipeline for caching. The cached output pulse sequence is readjusted in output order according to the parallelism of the computing system under the control of the reconstruction controller and then output.
[0068] Figure 6 The algorithm structure diagram of the high-efficiency neural network computing system with adjustable accuracy and throughput proposed by the present invention. Where #k represents the kth binary computing unit; A i,k Represents the output feature map of the kth binary computing unit in the i-th binary subnetwork; It represents the side feed connection parameter from the kth binary computing unit in the i-th binary sub-network to the kth binary computing unit in the j-th binary sub-network. The calculation steps of the algorithm model are as follows:
[0069] Step 1: The input signal is input into the binary calculation unit of the algorithm model, and efficient binary convolution calculation is completed through the bit-level operation of XNOR+Popcount.
[0070] Step 2: Group sparse side feed connections The calculation of the side feed connections is completed by channel-level multiplication as shown in formula (1).
[0071]
[0072] Step 3: As shown in formula (2), the calculated side feed connection is added to the output of the corresponding binary calculation unit of the target binary sub-network to obtain the input feature of the next calculation unit.
[0073]
[0074] Step 4: Repeat the above steps 1, 2, and 3 until the last binary calculation unit.
[0075] Step 5: Concatenate and integrate the output feature maps of each binary sub-network by channel to obtain the output signal of the algorithm model.
[0076] Performance comparison experiment:
[0077] We completed the coding of the computing module and control module in the computing system of the present invention through the Vivado HLS tool, and after completing the hardware and software collaborative verification, we generated the hardware IP cores of each module, and further completed the construction of the system based on the hardware IP cores of each module and the top-level structure of the present invention in the Vivado development kit and burned it into the Xilinx Zynq XC7Z100 development board. Finally, by outputting the test set of the CIFAR-10 data set to the system, the accuracy and flexibility of the computing system of the present invention under three different parallel configurations were analyzed. Table 4 shows the results of the accuracy comparison and flexibility analysis of each computing system, among which the accuracy of the floating-point model on the CIFAR-10 data set is 88.57%. It can be seen from Table 4 that the high-efficiency neural network computing system proposed in the present invention not only has the highest throughput (35627fps) compared with other traditional binary neural network computing systems when the parallelism N=1*4, but also has the highest accuracy (90.08%) when the parallelism N=4, and exceeds the accuracy of the floating-point model. Figure 7 The hardware performance of the high-efficiency neural network computing system with adjustable accuracy and throughput proposed by the present invention is compared with that of the traditional binary neural network computing system in the form of a bubble chart, intuitively demonstrating the flexibility of the computing system proposed by the present invention.
[0078] Table 4 Accuracy comparison and flexibility analysis of various binary neural network computing systems
[0079]
[0080] Example 1: Multi-chip reconfigurable energy-efficient neural network computing system
[0081] Figure 8 The figure shows the structure of a high-efficiency neural network acceleration computing system based on multiple chips with adjustable accuracy and throughput. The system is based on a separate control chip to complete the deployment of the control end, and based on four FPGA chips to complete the deployment of the computing end. Compared with the traditional binary neural network computing system, this computing system not only has the advantages of high computing energy efficiency and low power consumption, but also has the advantage of flexibility.
[0082] Example 2: Reconfigurable Energy-Efficient Neural Network Computing System Deployed on a Single SoC
[0083] Fig. 9 The figure shows the structure of a high-efficiency neural network acceleration computing system with adjustable precision and throughput based on a single SoC chip. The system is implemented through an Xlinx Zynq series fully programmable SoC, deploys the computing system proposed in this patent at the logic end of the chip, and completes the control of the computing device through the system end of the SoC.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A high-efficiency neural network computing system with adjustable accuracy and throughput, characterized in that: The system includes: multiple parallel binary neural network computing pipelines, side feed connection reconstruction routing modules, reconstruction controllers and output reorganization modules; each binary neural network computing pipeline includes multiple computing arrays, and a side feed connection interface is reserved for each computing array; each binary neural network computing pipeline is interconnected with the side feed connection reconstruction routing module to form a binary neural network with higher parallelism, thereby improving the accuracy of the computing system; the system receives a reconstruction signal, and completes the reconstruction of the side feed connection reconstruction routing module, the side feed connection interface and the output reorganization module through the reconstruction controller, and the specific reconstruction method is: the side feed connection interface is located in the computing unit of each computing array Afterwards, under the control of the reconstruction controller, the calculation of the side feed connection under different parallelism states and the interaction with the side feed connection reconstruction routing module are completed; under the control of the reconstruction controller, the side feed connection reconstruction routing module uniformly manages the routing states between the various computing pipelines according to the reconstruction signal, completes the routing reconstruction between the pipelines, and thus adjusts the parallelism of the computing system; the output reorganization module contains a register array of the size of the sum of the output pulse sequences of the N binary neural network computing pipelines, the register array is used for caching, and the cached output pulse sequence is readjusted in output order according to the parallelism of the computing system under the control of the reconstruction controller and then output; The side feed connection interface includes a controller, an input pulse signal buffer, a side feed connection calculation unit, a side feed connection pulse signal buffer and an accumulation calculation unit; The input pulse signal buffer is used to buffer the binary convolution feature map output by the computing unit in the computing array as the input pulse signal, so as to facilitate the side feed connection computing unit and the accumulation computing unit to read and perform calculation; The side feed connection calculation unit is used to pre-store side feed connection parameters pointing to other computing pipelines; under the control of the controller, the side feed connection calculation unit multiplies the corresponding side feed connection parameters with the cached input pulse signal to obtain the side feed connection transmitted from the computing pipeline to other computing pipelines, and transmits it to the side feed connection reconstruction routing module for further routing reconstruction between different pipelines; The side feed connection parameters output by other calculation pipelines are transmitted to the target pipeline after being reconstructed by the side feed connection reconstruction routing module and cached in the side feed connection pulse signal cache for further accumulation calculation; The accumulation calculation unit is used to read the side feed connection from other calculation pipelines in the side feed connection pulse signal cache and the input pulse of the current calculation pipeline in the input pulse signal cache, add them together to obtain an output pulse array, and transmit them to the next calculation array in the pipeline.
2. The neural network computing system according to claim 1, characterized in that: The calculation steps of the algorithm model of the binary neural network calculation pipeline are: S1: The input signal is input into the binary calculation unit, and an efficient binary convolution calculation is completed through the bit-level operation of XNOR+Popcount; the binary calculation unit is a calculation unit of the calculation array in the binary neural network calculation pipeline; S2: The sparsely grouped side feed connection completes the calculation of the side feed connection through the channel-level multiplication shown in formula (1); Among them, A i,k Represents the output feature map of the kth binary computing unit in the i-th binary subnetwork; represents the side feed connection parameter from the k-th binary computing unit in the i-th binary sub-network to the k-th binary computing unit in the j-th binary sub-network; S3: The side feed connection calculated according to formula (2) is added to the output of the corresponding binary computing unit of the target binary sub-network to obtain the input feature of the next computing unit; S4: Repeat the above steps S1 to S3 until the last binary calculation unit; S5: The output feature maps of each binary sub-network are concatenated and integrated by channel to obtain the output signal of the algorithm model.
3. A multi-chip reconfigurable energy-efficient neural network computing system, characterized in that: The system is based on a single control chip to complete the deployment of the control end, and multiple FPGA chips to complete the deployment of the computing end; The control chip is integrated with the side feed connection reconstruction routing module and reconstruction controller described in claim 1; each FPGA chip is integrated with a binary neural network calculation pipeline described in claim 1.
4. A reconfigurable energy-efficient neural network computing system deployed on a single SoC, characterized in that: The system deploys the computing system of claim 1 in the logic segment of the SoC chip, and completes the control of the computing device through the system end of the SoC.
Citation Information
Patent Citations
Adaptive and reconfigurable deep convolutional neural network computing method and device
CN107169560A
Binary neural network acceleration method and system based on FPGA
CN110458279A
