CN109146059A - A kind of convolved data processing circuit and data processing method - Google Patents

A kind of convolved data processing circuit and data processing method Download PDF

Info

Publication number
CN109146059A
CN109146059A CN201810876462.8A CN201810876462A CN109146059A CN 109146059 A CN109146059 A CN 109146059A CN 201810876462 A CN201810876462 A CN 201810876462A CN 109146059 A CN109146059 A CN 109146059A
Authority
CN
China
Prior art keywords
module
input
basic
control information
addition unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810876462.8A
Other languages
Chinese (zh)
Inventor
王子彤
姜凯
聂林川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Hi Tech Investment and Development Co Ltd
Original Assignee
Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Hi Tech Investment and Development Co Ltd filed Critical Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority to CN201810876462.8A priority Critical patent/CN109146059A/en
Publication of CN109146059A publication Critical patent/CN109146059A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means

Abstract

The present invention provides a kind of convolved data processing circuit and data processing method, which includes control module, reconfigurable interconnection module, adder array basic module, cumulative temporary storage module, data activation module, quantization modules.Control module controls information according to outside instruction to determine;The input and output connection between configuration module parameter and deployment module according to the control information of reconfigurable interconnection module;The result that adder array basic module, cumulative temporary storage module, data activation module, quantization modules respectively according to the control information send outside exports after handling.As it can be seen that based on external instruction, module is retained, the connection of module parameter, intermodule is configurable, so that circuit can configure on demand.Therefore, the convolutional neural networks model that this programme can be suitable for continuing to optimize.

Description

A kind of convolved data processing circuit and data processing method
Technical field
The present invention relates to field of computer technology, in particular to a kind of convolved data processing circuit and data processing method.
Background technique
As artificial intelligence study gos deep into, convolutional neural networks are widely used in pattern-recognition, object classification etc..In convolution In neural network hardware realization, the operation such as process of convolution, multichannel summation, data nonlinear activation, intermediate result quantification treatment It has higher requirements to hardware circuit.
Currently, fixed convolutional neural networks model can be directed to, convolved data processing electricity corresponding thereto is configured Road.
But convolutional neural networks model can have the case where continuing to optimize, hardware circuit is difficult to complete determination.Therefore it is existing Implementation is not suitable for the convolutional neural networks model continued to optimize.
Summary of the invention
The present invention provides a kind of convolved data processing circuit and data processing method, the volume that can be suitable for continuing to optimize Product neural network model.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
On the one hand, the present invention provides a kind of convolved data processing circuits, comprising:
Control module, reconfigurable interconnection module, adder array basic module, cumulative temporary storage module, data activation module, amount Change module;
The control module is determined for being indicated according to externally input instruction for the reconfigurable interconnection module First control information, for the second control information of the adder array basic module, for the of the cumulative temporary storage module Three control information control information for the 4th control information of the data activation module, for the 5th of the quantization modules;
The reconfigurable interconnection module, the first control information for being sent according to the control module, matches respectively Set the adder array basic module, the cumulative temporary storage module, the data activation module, the module of quantization modules ginseng Number, and the deployment adder array basic module, the cumulative temporary storage module, the data activation module, the quantization mould Input and output connection between block;
The adder array basic module, the second control information for being sent according to the control module, externally The result that portion is sent exports after carrying out read group total;
The cumulative temporary storage module, the third for being sent according to the control module control information, send out outside The result come exports after carrying out accumulation process;
The data activation module, the 4th control information for being sent according to the control module, sends out outside The result come exports after carrying out activation processing;
The quantization modules, the 5th control information for being sent according to the control module, send outside As a result it is exported after carrying out quantification treatment.
Further, the reconfigurable interconnection module is specifically used for disposing each connecting line according to connection request;
The connection request includes: that the connecting line includes an input terminal and an output end;
When the input terminal is connected with the output interface of external prime module, the output end can be with the adder array base This module, the cumulative temporary storage module, the data activation module, the input interface phase of any one in the quantization modules Even;
When the input terminal is connected with an output interface of the adder array basic module, the output end can with it is described Cumulative temporary storage module, the data activation module, the input interface of any one in the quantization modules are connected;
When the input terminal is connected with an output interface of the cumulative temporary storage module, the output end can be with the data Active module or an input interface of the quantization modules are connected;
When the input terminal is connected with an output interface of the data activation module, the output end can be with the quantization One input interface of module is connected;
When the output end is connected with an input interface of external post-module, the input terminal can be with the adder array Basic module, the cumulative temporary storage module, the data activation module, the output of any one in the quantization modules connect Mouth is connected.
Further, the second control information, third control information, the 4th the control information, the described 5th The information type for controlling information is flow chart of data processing control information;
The first control information includes: intermodule connection type deployment information, and, it is directed to the adder array base respectively This module, the cumulative temporary storage module, the data activation module, the inside modules parameter information of the quantization modules and wait match Set module number.
Further, the inside modules parameter information for the adder array basic module includes: adder cascade number Amount, adder cascade system;
The reconfigurable interconnection module is specifically used for cascading quantity and the adder cascade side according to the adder Formula configures the module parameter of the adder array basic module, so that the adder array basic module includes circuits cascading At least two basic addition units;
The adder cascade system include: parallel cumulative formula, step by step progressively increase type, the formula cumulative parallel and it is described step by step Any one in the combination of progressively increase type.
Further, each described basic addition unit all have bypass instruction input, first input and second input, Bypass instruction output, the first output, bypass instruction output;
The adder cascade system is when adding up formula parallel, for basic addition unit described in each: current basic When addition unit is connected with next stage basic addition unit, there is that current basic addition unit is associated is located at same level-one with this The basic addition unit of target, wherein basic addition unit associated by different basic addition units is different;This currently adds substantially Method unit first output and the basic addition unit of the target first export respectively with the basic addition unit of the next stage First input is connected with the second input;The bypass instruction output of the current basic addition unit and the basic addition unit of the target Bypass instruction output collect after, be connected with the bypass of the basic addition unit of next stage instruction input.
Further, each described basic addition unit all have bypass instruction input, first input and second input, Bypass instruction output, the first output;
The adder cascade system be step by step progressively increase type when, for basic addition unit described in each: current basic When addition unit is connected with next stage basic addition unit, the first output of the current basic addition unit is basic with the next stage First input of addition unit is connected;Second input of the current basic addition unit is communicated with the outside;The current basic addition The bypass instruction output of unit is connected with the bypass of the basic addition unit of next stage instruction input.
Further, the inside modules parameter information for the cumulative temporary storage module includes: accumulative frequency, and/or, it is It is no to be fed back to itself.
Further, the inside modules parameter information for the data activation module includes: active mode, and/or, it is It is no to be fed back to itself;
The active mode includes: by any one function in function algorithm one, function algorithm two, function algorithm three Algorithm realizes activation, and any function algorithm passes through any one hardware electricity in register circuit, comparison circuit, lookup table circuit It realizes on road;
The function algorithm one includes: f (a)=a;
The function algorithm two includes:
The function algorithm three includes:
Wherein, f (a), f (b), f (c) are dependent variable, and a, b, c are independent variable, and e is constant.
It further, include: quantization storage bit number, fixed position for the inside modules parameter information of the quantization modules Information;
The quantization modules are specifically used for sending out outside according to the quantization storage bit number and the fixed position information The result come carries out displacement truncation, to obtain the intermediate data for meeting memory requirement, and exports the intermediate data.
On the other hand, the present invention provides a kind of data processing sides based on any of the above-described convolved data processing circuit Method, comprising:
It by the control module, is indicated, is determined for the reconfigurable interconnection module according to externally input instruction First control information, for the second control information of the adder array basic module, for the of the cumulative temporary storage module Three control information control information for the 4th control information of the data activation module, for the 5th of the quantization modules;
By the reconfigurable interconnection module, the first control information sent according to the control module is matched respectively Set the adder array basic module, the cumulative temporary storage module, the data activation module, the module of quantization modules ginseng Number, and the deployment adder array basic module, the cumulative temporary storage module, the data activation module, the quantization mould Input and output connection between block;
By the adder array basic module, the second control information sent according to the control module, externally The result that portion is sent exports after carrying out read group total;
By the cumulative temporary storage module, information is controlled according to the third that the control module is sent, outside is sent out The result come exports after carrying out accumulation process;
By the data activation module, the 4th control information sent according to the control module sends out outside The result come exports after carrying out activation processing;
By the quantization modules, the 5th control information sent according to the control module sends outside As a result it is exported after carrying out quantification treatment.
The present invention provides a kind of convolved data processing circuit and data processing method, which includes Control module, reconfigurable interconnection module, adder array basic module, cumulative temporary storage module, data activation module, quantization modules. Control module controls information according to outside instruction to determine;Reconfigurable interconnection module configuration module parameter and portion according to the control information Affix one's name to the input and output connection of intermodule;Adder array basic module, cumulative temporary storage module, data activation module, quantization modules point The result that do not send according to the control information to outside exports after handling.As it can be seen that based on external instruction, module retained, module Parameter, intermodule connection are configurable, so that circuit can configure on demand.Therefore, the present invention can be suitable for continuing to optimize Convolutional neural networks model.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of schematic diagram for convolved data processing circuit that one embodiment of the invention provides;
Fig. 2 is a kind of schematic diagram for parallel cumulative formula that one embodiment of the invention provides;
Fig. 3 is a kind of schematic diagram for progressively increase type step by step that one embodiment of the invention provides;
A kind of formula cumulative parallel that Fig. 4 is that one embodiment of the invention provides and the step by step combined schematic diagram of progressively increase type;
Fig. 5 is a kind of process for data processing method based on convolved data processing circuit that one embodiment of the invention provides Figure.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, may include: the embodiment of the invention provides a kind of convolved data processing circuit
Control module 101, reconfigurable interconnection module 102, adder array basic module 103, cumulative temporary storage module 104, number According to active module 105, quantization modules 106;
The control module 101 determines for being indicated according to externally input instruction and is directed to the reconfigurable interconnection module 102 the first control information is kept in for the second control information of the adder array basic module 103, for described add up The third control information of module 104 controls information for the 4th of the data activation module 105, is directed to the quantization modules 106 the 5th control information;
The reconfigurable interconnection module 102, the first control information for being sent according to the control module 101, The adder array basic module 103, the cumulative temporary storage module 104, the data activation module 105, described is respectively configured The module parameter of quantization modules 106, and the deployment adder array basic module 103, the cumulative temporary storage module 104, institute State the input and output connection between data activation module 105, the quantization modules 106;
The adder array basic module 103, second control for being sent according to the control module 101 are believed Breath exports after carrying out read group total to the result that outside is sent;
The cumulative temporary storage module 104, the third for being sent according to the control module 101 controls information, right The result that outside is sent exports after carrying out accumulation process;
The data activation module 105, the 4th control information for being sent according to the control module 101 are right The result that outside is sent exports after carrying out activation processing;
The quantization modules 106, the 5th control information for being sent according to the control module 101, to outside The result sent exports after carrying out quantification treatment.
The embodiment of the invention provides a kind of convolved data processing circuit, which includes control mould Block, reconfigurable interconnection module, adder array basic module, cumulative temporary storage module, data activation module, quantization modules.Control mould Root tuber controls information according to outside instruction to determine;Reconfigurable interconnection module configuration module parameter and deployment module according to the control information Between input and output connection;Adder array basic module, temporary storage module, data activation module, the quantization modules of adding up basis respectively The result that control information sends outside exports after handling.As it can be seen that based on external instruction, module retained, module parameter, mould Connecting between block can configure, so that circuit can configure on demand.Therefore, the embodiment of the present invention can be suitable for continuing to optimize Convolutional neural networks model.
In detail, control module can be indicated according to superior instructions, and it is each that each control information correspondence is sent to circuit Other modules, with processes such as control summation, cumulative, activation, quantization and transmission.
In detail, reconfigurable interconnection module can according to the control information that control module is sent to intermodule connection type into Row deployment, to form final circuit.
Therefore, in one embodiment of the invention, in order to illustrate between a kind of possible deployment module connection relationship can It is able to achieve mode, so, the reconfigurable interconnection module 102 is specifically used for disposing each connecting line according to connection request;
The connection request includes: that the connecting line includes an input terminal and an output end;
When the input terminal is connected with the output interface of external prime module, the output end can be with the adder array base This module 103, the cumulative temporary storage module 104, the data activation module 105, any one in the quantization modules 106 Input interface be connected;
When the input terminal is connected with an output interface of the adder array basic module 103, the output end can be with The cumulative temporary storage module 104, the data activation module 105, the input of any one in the quantization modules 106 connect Mouth is connected;
When the input terminal is connected with an output interface of the cumulative temporary storage module 104, the output end can with it is described One input interface of data activation module 105 or the quantization modules 106 is connected;
When the input terminal is connected with an output interface of the data activation module 105, the output end can with it is described One input interface of quantization modules 106 is connected;
When the output end is connected with an input interface of external post-module, the input terminal can be with the adder array It is basic module 103, the cumulative temporary storage module 104, the data activation module 105, any one in the quantization modules 106 An a output interface is connected.
Under normal conditions, sum, add up, activating, the quantifying execution priority of this four processing operations is successively successively decreased.Than Such as, superior instructions instruction require configuration one can a full set of circuit for executing this four processing operations when, flow chart of data processing is logical Chang Weixian summation, then add up, it then activates, finally quantifies.
Under normal conditions, it adds up and self-loopa may be implemented in activation.For example, superior instructions instruction requires circulation to swash When one time living, the activation result after first time activation is not exported first, but after inside is activated again, it is secondary sharp just to export this Slip-knot fruit.
Based on above content it is found that a connecting line includes two ends, an input terminal, an output end, to connect respectively Connect two modules.Due to the case where there are self-loopas, therefore two modules connected can be different modules, or phase Same module.
It in the embodiment of the present invention, sums, add up, activating, quantifying this four processing operations and can all execute, it can also portion Divide and executes.For example indicated according to superior instructions, it only needs to execute summation in the circuit of current desired configuration, activates, quantifies these three Processing operation, therefore the output end of adder array basic module can be connected with the input terminal of data activation module.In this way, cumulative Temporary storage module can not be connected with other any modules.In this way, module retain it is configurable.
In the embodiment of the present invention, adder array basic module, cumulative temporary storage module, data activation module, in quantization modules Any module, can have at least one input terminal and at least one output end.Either end can be corresponding with a connection Line.In this way, reconfigurable interconnection module can according to the control information, input terminal number and output end number to modules are carried out Configuration, and the connection between input terminal and output end is configured.In this way, intermodule connection type is configurable.
In an embodiment of the invention, the second control information, third control information, the 4th control letter The information type of breath, the 5th control information is flow chart of data processing control information;
The first control information includes: intermodule connection type deployment information, and, it is directed to the adder array base respectively This module 103, the cumulative temporary storage module 104, the data activation module 105, the inside modules of the quantization modules 106 ginseng Number information and module number to be configured.
In detail, when modules receive flow chart of data processing control information, that is, can determine when itself starts to work, what When power cut-off etc..
In detail, be sent to the control information of reconfigurable interconnection module, may include intermodule connection type deployment information, For the inside modules parameter information and module number to be configured of modules.Wherein, reconfigurable interconnection module can be based on mould Connection type deployment information between block realizes the accurate configuration of above-mentioned each connecting line;Based on inside modules parameter information, to phase Module is answered to carry out module parameter configuration;Based on module number to be configured, the quantity of corresponding module in circuit is configured.Such as This, module parameter is configurable, module number is configurable.
In an embodiment of the invention, module parameter may include in specific when each module is used to form final circuit Portion's parameter, such as data bit width, effective ranks number, cascade number etc..
Based on above content, in the embodiment of the present invention, adder array basic module, cumulative temporary storage module, data activation mould The existence number of block, quantization modules in circuit all can be multiple.
For example, referring to FIG. 1, reconfigurable interconnection module is disposed according to the intermodule connection type that control module is sent Adder array basic module, cumulative temporary storage module, data activation module, quantization modules are sequentially connected end to end by information.That is, outer After the image data of portion's input enters the convolved data processing circuit, need successively by adduction, cumulative, activation, one system of storage Column processing.
In addition, the input terminal of adder array basic module is connected with external input, the output end of quantization modules and outside are defeated It is connected out.In this way, adder array basic module can be quantified with multi-channel data after input data effective index signal, convolution etc. The output of intermediate features diagram data may be implemented in module.
In an embodiment of the invention, for the inside modules parameter information packet of the adder array basic module 103 Include: adder cascades quantity, adder cascade system;
The reconfigurable interconnection module 102 is specifically used for cascading quantity according to the adder and the adder cascades Mode configures the module parameter of the adder array basic module 103, so that the adder array basic module 103 includes electricity The basic addition unit in road cascade at least two;
The adder cascade system include: parallel cumulative formula, step by step progressively increase type, the formula cumulative parallel and it is described step by step Any one in the combination of progressively increase type.
In detail, adder array basic module, or basic addition unit array, can be by a certain number of basic additions Element circuit cascades to be formed, and carries out read group total to prime convolution results in convolutional neural networks parallel and adds according to the control information Method result is sent into subsequent process of convolution module.Convolved data processing circuit as shown in Figure 1, subsequent process of convolution module here As cumulative temporary storage module.
In detail, for above-mentioned formula cumulative parallel:
In an embodiment of the invention, referring to FIG. 2, in order to illustrate a kind of possible addition for parallel cumulative formula Device cascade system, so, each described basic addition unit all have bypass instruction input, first input and second input, Bypass instruction output, the first output, bypass instruction output;
The adder cascade system is when adding up formula parallel, for basic addition unit described in each: current basic When addition unit is connected with next stage basic addition unit, there is that current basic addition unit is associated is located at same level-one with this The basic addition unit of target, wherein basic addition unit associated by different basic addition units is different;This currently adds substantially Method unit first output and the basic addition unit of the target first export respectively with the basic addition unit of the next stage First input is connected with the second input;The bypass instruction output of the current basic addition unit and the basic addition unit of the target Bypass instruction output collect after, be connected with the bypass of the basic addition unit of next stage instruction input.
As an example it is assumed that an adder array basic module includes 7 basic addition units, adder cascade system is simultaneously When capable cumulative formula, the connection type between this 7 basic addition units can be as shown in Figure 2.
Referring to FIG. 2, above-mentioned first input can correspond to the input A in Fig. 2, above-mentioned second input can correspond to figure Input B in 2, above-mentioned first output can correspond to the output Y in Fig. 2.
In detail, for above-mentioned progressively increase type step by step:
In an embodiment of the invention, referring to FIG. 3, in order to illustrate a kind of possible addition for progressively increase type step by step Device cascade system, so, each described basic addition unit all have bypass instruction input, first input and second input, Bypass instruction output, the first output;
The adder cascade system be step by step progressively increase type when, for basic addition unit described in each: current basic When addition unit is connected with next stage basic addition unit, the first output of the current basic addition unit is basic with the next stage First input of addition unit is connected;Second input of the current basic addition unit is communicated with the outside;The current basic addition The bypass instruction output of unit is connected with the bypass of the basic addition unit of next stage instruction input.
As an example it is assumed that an adder array basic module include 4 basic addition units, adder cascade system be by When grade progressively increase type, the connection type between this 4 basic addition units can be as shown in Figure 3.
Referring to FIG. 3, above-mentioned first input can correspond to the input A in Fig. 3, above-mentioned second input can correspond to figure Input B in 3, above-mentioned first output can correspond to the output Y in Fig. 3.
In detail, for said combination formula:
In an embodiment of the invention, referring to FIG. 4, providing a kind of possible pass for cumulative formula parallel and step by step Add the combined adder cascade system of formula.
As an example it is assumed that an adder array basic module includes 4 basic addition units, adder cascade system is group When box-like, the connection type between this 4 basic addition units can be as shown in Figure 4.Wherein 3 in this 4 basic addition units It is a to correspond to cumulative formula parallel, wherein 2 correspond to progressively increase type step by step.
In an embodiment of the invention, the inside modules parameter information for the cumulative temporary storage module 104 includes: tired Add number, and/or, if it is fed back to itself.
In detail, cumulative temporary storage module can carry out the cumulative of certain number to input results and deposit according to the control information Storage, accumulation result are sent into subsequent process of convolution module.Convolved data processing circuit as shown in Figure 1, input results here are For addition results, subsequent process of convolution module here is data activation module.
In an embodiment of the invention, the inside modules parameter information for the data activation module 105 includes: sharp Mode living, and/or, if it is fed back to itself;
The active mode includes: by any one function in function algorithm one, function algorithm two, function algorithm three Algorithm realizes activation, and any function algorithm passes through any one hardware electricity in register circuit, comparison circuit, lookup table circuit It realizes on road;
The function algorithm one includes: f (a)=a;
The function algorithm two includes:
The function algorithm three includes:
Wherein, f (a), f (b), f (c) are dependent variable, and a, b, c are independent variable, and e is constant.
In detail, the active mode that data activation module can be certain carries out nonlinear activation processing to input results, swashs Slip-knot fruit is sent into subsequent process of convolution module.Convolved data processing circuit as shown in Figure 1, input results here are cumulative As a result, subsequent process of convolution module here is quantization modules.
It in detail, can be real by any of the above-described hardware circuit mode as any of the above-described function algorithm of software algorithm It is existing.
In an embodiment of the invention, the inside modules parameter information for the quantization modules 106 includes: that quantization is deposited Storage space number, fixed position information;
The quantization modules 106 are specifically used for according to the quantization storage bit number and the fixed position information, to outside The result sent carries out displacement truncation, to obtain the intermediate data for meeting memory requirement, and exports the intermediate data.
In detail, the quantization modules can according to storage bit number after quantization and decimal point setpoint information to input results into Row displacement truncation, finally obtains the intermediate data for meeting memory requirement and is sent into rear class process of convolution module.As shown in Figure 1 Convolved data processing circuit, input results here are activation result.
In conclusion the embodiment of the invention provides a kind of configurable convolutional neural networks convolved data processing circuit, Module retains, module parameter, module number, intermodule connection type etc. can configure on demand.Specifically, multichannel is summed, is swashed Live circuit can realize a variety of model types of attachment by configuring, and rapidly and efficiently complete characteristic pattern intermediate data and calculate;It can basis Scale of model, which is made rational planning for, to be cut out, and reserves threshold doseag for convolution algorithm and data access;The setting of sample circuit can save a large amount of biographies Defeated bandwidth and storage resource, so that mobile end equipment realizes that convolutional neural networks are more convenient, lower power consumption;Hardware circuit form And module connection type is configurable, greatly improves circuit flexibility and versatility, can more preferably be adapted to the convolution mind continued to optimize Through network model, product competitiveness is promoted, while can also carry out fast verification and optimization to new model new technology.
The embodiment of the invention provides a kind of convolved data processing circuits, and module, which retains configurable, module number, to match Set, module parameter is configurable, intermodule connection type is configurable, flow chart of data processing is configurable so that hardware can configure degree It improves, hardware circuit is difficult to completely specified when solving the problems, such as that convolutional neural networks model is continued to optimize, therefore is suitable for breath change Technology trend while can also promote the quick development of model optimization so that hardware product promotes competitiveness.
As shown in figure 5, one embodiment of the invention provides one kind based on any of the above-described convolved data processing circuit Data processing method, specifically includes the following steps:
Step 501: by the control module, being indicated according to externally input instruction, determine and be directed to the programmable company First control information of connection module is kept in for the second control information of the adder array basic module, for described add up The third control information of module controls information, for the 5th of the quantization modules for the 4th of the data activation module Control information.
Step 502: by the reconfigurable interconnection module, being believed according to first control that the control module is sent Breath, is respectively configured the adder array basic module, the cumulative temporary storage module, the data activation module, the quantization mould The module parameter of block, and the deployment adder array basic module, the cumulative temporary storage module, the data activation module, Input and output connection between the quantization modules.
Step 503: by the adder array basic module, being believed according to second control that the control module is sent Breath exports after carrying out read group total to the result that outside is sent.
Step 504: by the cumulative temporary storage module, information is controlled according to the third that the control module is sent, It is exported after carrying out accumulation process to the result that outside is sent.
Step 505: by the data activation module, the 4th control information sent according to the control module, It is exported after carrying out activation processing to the result that outside is sent.
Step 506: by the quantization modules, the 5th control information sent according to the control module, externally The result that portion is sent exports after carrying out quantification treatment.
The contents such as information exchange, the implementation procedure between each unit, module in the above method, due to product of the present invention Embodiment is based on same design, and particular content can be found in the narration in product of the present invention embodiment, and details are not described herein again.
In conclusion each embodiment of the invention at least has the following beneficial effects:
1, in the embodiment of the present invention, convolved data processing circuit includes control module, reconfigurable interconnection module, adder array Basic module, cumulative temporary storage module, data activation module, quantization modules.Control module determines control letter according to outside instruction Breath;The input and output connection between configuration module parameter and deployment module according to the control information of reconfigurable interconnection module;Adder array The result that basic module, cumulative temporary storage module, data activation module, quantization modules respectively according to the control information send outside into It is exported after row processing.As it can be seen that based on external instruction, module is retained, the connection of module parameter, intermodule is configurable, so that electric Road can configure on demand.Therefore, the convolutional neural networks model that the embodiment of the present invention can be suitable for continuing to optimize.
2, in the embodiment of the present invention, a kind of configurable convolutional neural networks convolved data processing circuit, module are provided It retains, module parameter, module number, intermodule connection type etc. can configure on demand.Specifically, multichannel summation, activation electricity Road can realize a variety of model types of attachment by configuring, and rapidly and efficiently complete characteristic pattern intermediate data and calculate;It can be according to model Scale, which is made rational planning for, cuts out, and reserves threshold doseag for convolution algorithm and data access;The setting of sample circuit can save a large amount of transmission belts Wide and storage resource, so that mobile end equipment realizes that convolutional neural networks are more convenient, lower power consumption;Hardware circuit form and mould Block connection type is configurable, greatly improves circuit flexibility and versatility, can more preferably be adapted to the convolutional Neural net continued to optimize Network model promotes product competitiveness, while also can carry out fast verification and optimization to new model new technology.
3, in the embodiment of the present invention, a kind of convolved data processing circuit is provided, module retains configurable, module number Configurable, module parameter can configure, intermodule connection type is configurable, flow chart of data processing is configurable, so that hardware is configurable Degree improves, and hardware circuit is difficult to completely specified when solving the problems, such as that convolutional neural networks model is continued to optimize, therefore is suitable for The technology trend become is ceased, so that hardware product promotes competitiveness, while can also promote the quick development of model optimization.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including one ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (10)

1. a kind of convolved data processing circuit characterized by comprising
Control module, reconfigurable interconnection module, adder array basic module, cumulative temporary storage module, data activation module, quantization mould Block;
The control module determines for being indicated according to externally input instruction and is directed to the first of the reconfigurable interconnection module It controls information, control information, for the third control of the cumulative temporary storage module for the second of the adder array basic module Information processed controls information for the 4th control information of the data activation module, for the 5th of the quantization modules;
The reconfigurable interconnection module, the first control information for being sent according to the control module, is respectively configured institute The module parameter of adder array basic module, the cumulative temporary storage module, the data activation module, the quantization modules is stated, And the deployment adder array basic module, the cumulative temporary storage module, the data activation module, the quantization modules it Between input and output connection;
The adder array basic module, the second control information for being sent according to the control module, sends out outside The result come exports after carrying out read group total;
The cumulative temporary storage module, the third for being sent according to the control module control information, send to outside As a result it is exported after carrying out accumulation process;
The data activation module, the 4th control information for being sent according to the control module, sends outside As a result it is exported after carrying out activation processing;
The quantization modules, the 5th control information for being sent according to the control module, the result that outside is sent It is exported after carrying out quantification treatment.
2. convolved data processing circuit according to claim 1, which is characterized in that
The reconfigurable interconnection module is specifically used for disposing each connecting line according to connection request;
The connection request includes: that the connecting line includes an input terminal and an output end;
When the input terminal is connected with the output interface of external prime module, the output end can be with the basic mould of the adder array Block, the cumulative temporary storage module, the data activation module, the input interface of any one in the quantization modules are connected;
When the input terminal is connected with an output interface of the adder array basic module, the output end can add up with described Temporary storage module, the data activation module, the input interface of any one in the quantization modules are connected;
When the input terminal is connected with an output interface of the cumulative temporary storage module, the output end can be with the data activation One input interface of module or the quantization modules is connected;
When the input terminal is connected with an output interface of the data activation module, the output end can be with the quantization modules An input interface be connected;
When the output end is connected with an input interface of external post-module, the input terminal can be basic with the adder array Module, the cumulative temporary storage module, the data activation module, the output interface phase of any one in the quantization modules Even.
3. convolved data processing circuit according to claim 1 or 2, which is characterized in that
The second control information, third control information, the 4th control information, the information of the 5th control information Type is flow chart of data processing control information;
The first control information includes: intermodule connection type deployment information, and, it is directed to the basic mould of the adder array respectively The inside modules parameter information and mould to be configured of block, the cumulative temporary storage module, the data activation module, the quantization modules Number of blocks.
4. convolved data processing circuit according to claim 3, which is characterized in that
Inside modules parameter information for the adder array basic module includes: adder cascade quantity, adder cascade Mode;
The reconfigurable interconnection module is specifically used for cascading quantity and the adder cascade system according to the adder, match The module parameter of the adder array basic module is set, so that the adder array basic module includes at least the two of circuits cascading A basic addition unit;
The adder cascade system include: parallel cumulative formula, progressively increase type, the formula cumulative parallel and described progressively increase step by step step by step Any one in the combination of formula.
5. convolved data processing circuit according to claim 4, which is characterized in that
Each described basic addition unit all have bypass instruction input, first input and second input, bypass instruction output, First output;
The adder cascade system is when adding up formula parallel, for basic addition unit described in each: current basic addition When unit is connected with next stage basic addition unit, there is the mesh being located at level-one associated with the current basic addition unit Mark basic addition unit, wherein basic addition unit associated by different basic addition units is different;The current basic addition list Member first output and the basic addition unit of the target first export respectively with the basic addition unit of the next stage first Input is connected with the second input;The side of bypass the instruction output and the basic addition unit of the target of the current basic addition unit After road instruction output collects, it is connected with the bypass of the basic addition unit of next stage instruction input.
6. convolved data processing circuit according to claim 4, which is characterized in that
Each described basic addition unit all have bypass instruction input, first input and second input, bypass instruction output, First output;
The adder cascade system be step by step progressively increase type when, for basic addition unit described in each: current basic addition When unit is connected with next stage basic addition unit, the first output of the current basic addition unit and the basic addition of the next stage First input of unit is connected;Second input of the current basic addition unit is communicated with the outside;The current basic addition unit Bypass instruction output input and be connected with the bypass of the basic addition unit of next stage instruction.
7. convolved data processing circuit according to claim 3, which is characterized in that
Inside modules parameter information for the cumulative temporary storage module includes: accumulative frequency, and/or, if it is fed back to itself.
8. convolved data processing circuit according to claim 3, which is characterized in that
Inside modules parameter information for the data activation module includes: active mode, and/or, if it is fed back to itself;
The active mode includes: by any one function algorithm in function algorithm one, function algorithm two, function algorithm three Realize activation, any function algorithm is real by any one hardware circuit in register circuit, comparison circuit, lookup table circuit It is existing;
The function algorithm one includes: f (a)=a;
The function algorithm two includes:
The function algorithm three includes:
Wherein, f (a), f (b), f (c) are dependent variable, and a, b, c are independent variable, and e is constant.
9. convolved data processing circuit according to claim 3, which is characterized in that
Inside modules parameter information for the quantization modules includes: quantization storage bit number, fixed position information;
The quantization modules are specifically used for sending outside according to the quantization storage bit number and the fixed position information As a result displacement truncation is carried out, to obtain the intermediate data for meeting memory requirement, and exports the intermediate data.
10. a kind of data processing method based on the convolved data processing circuit any in claim 1 to 9, feature exist In, comprising:
It by the control module, is indicated according to externally input instruction, determines and be directed to the first of the reconfigurable interconnection module It controls information, control information, for the third control of the cumulative temporary storage module for the second of the adder array basic module Information processed controls information for the 4th control information of the data activation module, for the 5th of the quantization modules;
By the reconfigurable interconnection module, institute is respectively configured in the first control information sent according to the control module The module parameter of adder array basic module, the cumulative temporary storage module, the data activation module, the quantization modules is stated, And the deployment adder array basic module, the cumulative temporary storage module, the data activation module, the quantization modules it Between input and output connection;
By the adder array basic module, the second control information sent according to the control module sends out outside The result come exports after carrying out read group total;
By the cumulative temporary storage module, information is controlled according to the third that the control module is sent, outside is sent As a result it is exported after carrying out accumulation process;
By the data activation module, the 4th control information sent according to the control module sends outside As a result it is exported after carrying out activation processing;
By the quantization modules, the 5th control information sent according to the control module, the result that outside is sent It is exported after carrying out quantification treatment.
CN201810876462.8A 2018-08-03 2018-08-03 A kind of convolved data processing circuit and data processing method Pending CN109146059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810876462.8A CN109146059A (en) 2018-08-03 2018-08-03 A kind of convolved data processing circuit and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810876462.8A CN109146059A (en) 2018-08-03 2018-08-03 A kind of convolved data processing circuit and data processing method

Publications (1)

Publication Number Publication Date
CN109146059A true CN109146059A (en) 2019-01-04

Family

ID=64791468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810876462.8A Pending CN109146059A (en) 2018-08-03 2018-08-03 A kind of convolved data processing circuit and data processing method

Country Status (1)

Country Link
CN (1) CN109146059A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512724A (en) * 2015-12-01 2016-04-20 中国科学院计算技术研究所 Adder device, data accumulation method, and data processing device
CN106355244A (en) * 2016-08-30 2017-01-25 深圳市诺比邻科技有限公司 CNN (convolutional neural network) construction method and system
CN106940815A (en) * 2017-02-13 2017-07-11 西安交通大学 A kind of programmable convolutional neural networks Crypto Coprocessor IP Core

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512724A (en) * 2015-12-01 2016-04-20 中国科学院计算技术研究所 Adder device, data accumulation method, and data processing device
CN106355244A (en) * 2016-08-30 2017-01-25 深圳市诺比邻科技有限公司 CNN (convolutional neural network) construction method and system
CN106940815A (en) * 2017-02-13 2017-07-11 西安交通大学 A kind of programmable convolutional neural networks Crypto Coprocessor IP Core

Similar Documents

Publication Publication Date Title
CN104025053B (en) It is tuned using the message passing interface that group performance models
CN110245140A (en) Data branch mailbox processing method and processing device, electronic equipment and computer-readable medium
CN110601977A (en) Configuration method and device of routing strategy and storage medium
CN104536997A (en) Method and device for data batch processing of client interface
CN109325590A (en) For realizing the device for the neural network processor that computational accuracy can be changed
Grimbleby Hybrid genetic algorithms for analogue network synthesis
CN105630419A (en) Partition view sending method of resource pools and management node
CN110532559A (en) The processing method and processing device of rule
CN109146059A (en) A kind of convolved data processing circuit and data processing method
CN110399423A (en) Processing method and processing device, storage medium and the electronic device of metadata genetic connection
CN103901402A (en) Reconstructed FPGA radar digital signal processing assembly and reconstructed FPGA radar digital signal processing method
CN109002885A (en) A kind of convolutional neural networks pond unit and pond calculation method
CN108445853A (en) A kind of shared workshop of the production capacity based on cloud data
CN108363727A (en) A kind of date storage method and device based on ZFS file system
CN110399600A (en) Generate the method and device of wide table
CN109857024B (en) Unit performance test method and system chip of artificial intelligence module
CN110532267A (en) Determination method, apparatus, storage medium and the electronic device of field
CN110222286A (en) Information acquisition method, device, terminal and computer readable storage medium
CN108171417B (en) Planting task adjusting method, electronic device and storage medium
CN114938376A (en) Industrial Internet of things based on priority processing data and control method thereof
CN109871632A (en) A kind of method, apparatus that tread pattern pitch automatically generates, system and equipment
CN109523019A (en) Accelerator, the acceleration system based on FPGA and control method, CNN network system
CN108108473A (en) Data query method and server
CN110019071A (en) Data processing method and device
CN109726820B (en) Energy node importance degree calculation method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104

RJ01 Rejection of invention patent application after publication