WO2022265044A1 - 演算処理装置 - Google Patents

演算処理装置 Download PDF

Info

Publication number
WO2022265044A1
WO2022265044A1 PCT/JP2022/023990 JP2022023990W WO2022265044A1 WO 2022265044 A1 WO2022265044 A1 WO 2022265044A1 JP 2022023990 W JP2022023990 W JP 2022023990W WO 2022265044 A1 WO2022265044 A1 WO 2022265044A1
Authority
WO
WIPO (PCT)
Prior art keywords
pooling
data
convolution operation
operation result
result data
Prior art date
Application number
PCT/JP2022/023990
Other languages
English (en)
French (fr)
Inventor
修 野村
哲郎 遠藤
奕涛 馬
浩 吉川
Original Assignee
国立大学法人東北大学
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 国立大学法人東北大学 filed Critical 国立大学法人東北大学
Priority to JP2023530377A priority Critical patent/JPWO2022265044A1/ja
Priority to US18/286,638 priority patent/US20240126616A1/en
Publication of WO2022265044A1 publication Critical patent/WO2022265044A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • 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
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C5/00Details of stores covered by group G11C11/00
    • G11C5/14Power supply arrangements, e.g. power down, chip selection or deselection, layout of wirings or power grids, or multiple supply levels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to an arithmetic processing device.
  • Arithmetic processing devices that perform image recognition, etc. using convolutional neural networks, that is, neural networks with convolutional layers, are known, and are expected to be applied to robot control and car driving control.
  • Convolutional computation processing and pooling processing are performed in convolutional neural networks such as those used for image recognition.
  • convolution operation processing an enormous sum-of-products operation is performed by weighting and adding the data of the input layer and the intermediate layer using the weight data of the convolution filter.
  • the pooling process for example, extraction of the maximum value and calculation of the average value are performed from a plurality of convolution calculation results obtained in the convolution calculation process.
  • power gating which cuts off the power supply to arithmetic circuits such as processor cores and suppresses leakage current, is known as a technique for reducing power consumption.
  • the present invention has been made in view of the above circumstances, and an object of the present invention is to provide an arithmetic processing device capable of further reducing power consumption.
  • an arithmetic processing apparatus of the present invention has a convolution operation unit for sequentially outputting convolution operation result data, a pooling operation circuit, and a nonvolatile storage circuit for pooling, wherein the storage circuit for pooling holds the convolution operation result data or the operation result of the pooling operation circuit as hold data, and each time the convolution operation result data from the convolution operation unit is input, the pooling operation circuit uses the hold data Power supply to the pooling storage circuit is interrupted between a pooling processing unit that calculates and outputs pooled data obtained by pooling processing in the pooling area and a waiting time for input of the convolution operation result data from the convolution operation unit. and a power gating section.
  • the arithmetic processing device of the present invention includes a convolution operation unit for sequentially outputting the convolution operation result data in the row direction of the channel for each row of a channel in which a plurality of convolution operation result data are two-dimensionally arranged, a pooling operation circuit, and Pooling having a non-volatile storage circuit for pooling, and outputting the convolution operation result data having the maximum value in each pooling area in which a plurality of the convolution operation result data are divided into 2 rows and 2 columns of the channel as pooling data.
  • the pooling storage circuit has buffers connected to Y+2 stages where the number of columns of the channels is Y (Y is an even number equal to or greater than 2), and the convolution operation from the convolution operation unit
  • Y is an even number equal to or greater than 2
  • the pooling operation circuit holds and outputs the convolution operation result data stored in the pooling operation circuit, and the pooling operation circuit is a data group consisting of the convolution operation result data from each of the buffers at the first stage, the second stage, the Y+1 stage, and the Y+2 stage.
  • a comparator for comparing each of the convolution operation result data of the data group, and selecting and outputting the convolution operation result data having the maximum value in the data group based on the comparison result of the comparator and the pooling processing unit performs the convolution operation output from the selector when each of the convolution operation result data of the data group is a combination of the convolution operation result data in one pooling area. It outputs the result data as pooling data.
  • the power gating unit cuts off the power supply to the nonvolatile storage circuit for pooling.
  • the power consumption of the processing device can be made smaller.
  • the number of buffers that hold convolution operation result data can be made smaller (number of columns + 2) than the number of channel element data (number of columns x number of rows), thereby further reducing power consumption. can be done.
  • FIG. 4 is an explanatory diagram showing an example of connected layers of a convolutional neural network
  • FIG. 10 is an explanatory diagram showing the relationship between the movement of the position of the convolutional area and the pooling area
  • 3 is a block diagram showing the configuration of an arithmetic unit
  • FIG. 3 is a block diagram showing the configuration of a convolution arithmetic circuit
  • FIG. 10 is an explanatory diagram showing the state of convolution operation processing when performing an operation on the first element data of the next hierarchy by channel parallelism;
  • FIG. 10 is an explanatory diagram showing the state of convolution operation processing when performing an operation on the first element data of the next hierarchy by channel parallelism;
  • FIG. 11 is an explanatory diagram showing the state of convolution operation processing when performing operation on the second element data of the next layer by channel parallelism;
  • FIG. 10 is an explanatory diagram showing a period in which the PG switch is turned off;
  • FIG. 4 is a block diagram showing a configuration example of a pooling processing unit that performs average value pooling processing;
  • FIG. 4 is a block diagram showing a configuration example of a pooling processing unit that performs weighted average value pooling processing;
  • FIG. 10 is a block diagram showing a pooling processing unit configured by buffers in which register units are connected in multiple stages;
  • the arithmetic processing unit 10 performs arithmetic processing based on a convolutional neural network.
  • the arithmetic processing unit 10 includes an arithmetic unit 11, a memory unit 12, and a power gating control unit 14 that perform convolution arithmetic processing using a convolution filter and pooling processing on a channel (also referred to as a characteristic plane). has a controller 15 for controlling the
  • the arithmetic unit 11 is provided in parallel with k (k is an integer equal to or greater than 2) arithmetic units 17 that perform convolution arithmetic processing and pooling processing, as will be described later in detail.
  • a plurality of layers are connected in the convolutional neural network on which the arithmetic processing device 10 is based. Each layer has one or more channels.
  • the first layer is the input layer, which is an image consisting of RGB channels, for example.
  • the 1st to 4th layers are connected.
  • the first hierarchy consists of three channels ch1-1 to ch1-3
  • the second hierarchy consists of four channels ch2-1 to ch2-4
  • the third hierarchy consists of three channels ch3-1 to ch3-3.
  • the fourth hierarchy has three channels ch4-1 to ch4-3, respectively.
  • the first and second hierarchies are the hierarchies to be subjected to convolution operation processing.
  • Channels ch2-1 to ch2-4 are generated, and channels ch3-1 to ch3-3 of the third hierarchy are generated from channels ch2-1 to ch2-4 of the second hierarchy.
  • the third hierarchy is a hierarchy targeted for pooling processing, and channels ch4-1 to ch4-3 of the fourth hierarchy are generated from channels ch3-1 to ch3-3 of the third hierarchy by pooling processing.
  • each layer can have one or more channels.
  • the number of channels may increase or decrease in the preceding and succeeding layers, but the number of channels may not change.
  • the number of channels is the same in the layers before and after.
  • Hierarchies may be three hierarchies or five or more hierarchies.
  • the calculation unit 11 generates the (n+1)th layer by performing convolution calculation processing or pooling processing on the channel of the nth layer, where n is an integer equal to or greater than 1.
  • Hierarchy generation is to generate each channel that constitutes the hierarchy, and channel generation is to calculate each element data that constitutes the channel.
  • the n-th layer may be called the previous layer with respect to the n+1-th layer, and the n+1-th layer may be called the next layer with respect to the n-th layer. Therefore, the channel of the next layer is generated by convolution operation processing and pooling processing for the channel of the previous layer.
  • a channel consists of multiple element data arranged two-dimensionally.
  • a two-dimensional array of element data is an array on the data structure, and each element data is positioned in two variables (row and column in this explanation), and the positional relationship between element data is identified. This means that location information is attached to The same applies to load data, which will be described later.
  • the size of each channel that is, the number of element data in the row and column directions is arbitrary and not particularly limited. Although two-dimensional channels are described in this example, one-dimensional or three-dimensional channels may be used.
  • element data is calculated by convolution calculation.
  • the element data calculated by the convolution operation is a value obtained by adding the results of applying a convolution filter to each element data in the convolution area for each channel in the previous layer, and adding the data in each convolution area at the same position of each channel. is.
  • the application of the convolution filter is to obtain the sum-of-products operation result of the element data in the convolution area and the weight data of the convolution filter.
  • a convolution filter is a two-dimensional array of weight data that serves as a weight for element data.
  • one convolution filter is composed of 3 ⁇ 3 (3 rows by 3 columns) weight data.
  • Each weight data of the convolution filter is set to a value according to the purpose of the convolution filter.
  • a convolution filter corresponding to the combination of the previous layer channel and the next layer channel is used.
  • the convolution region defines the range over which the convolution filter is applied on the channel, and has the same array size as the convolution filter (3 rows by 3 columns in this example).
  • the load data of the convolution filter and the element data of the convolution region are multiplied at corresponding positions.
  • the convolution area is moved so as to scan the entire channel while moving the position of the area by one piece of element data, and the element data calculation process is performed each time the convolution area is moved.
  • a convolution operation is performed on each channel of the next layer using all the channels of the previous layer. Also, a convolution operation is performed using a convolution filter corresponding to the combination of the channels of the previous layer and the channels of the next layer.
  • any number of channels of the previous layer can be used to generate one channel of the next layer, and one channel of the previous layer can be used to generate one channel of the next layer. can also be used.
  • all or part of a plurality of convolution filters used in one layer may be a common weight array.
  • one convolution filter with the common weight array may be prepared and used when calculating a plurality of channels.
  • each channel in the next layer is generated by reducing the size in the row and column directions from each channel in the previous layer.
  • a maximum value pooling process of extracting the maximum value from a pooling area of 2 rows and 2 columns is performed. For this reason, each channel is divided into a plurality of pooling regions of 2 rows and 2 columns so as not to overlap each other, and for each of these pooling regions, the maximum value element data in the region is output as a result of pooling processing.
  • the size of the pooling area is not limited to 2 rows and 2 columns.
  • One of p and q may be an integer of 1 or more, the other may be an integer of 2 or more, and the pooling area may be p rows and q columns. Further, instead of the maximum value pooling process, as will be described later, an average value pooling process of outputting the average value of the element data in the pooling area may be performed. Further convolution processing can be performed on the hierarchy consisting of the channels reduced by the pooling processing. The pooling areas can be divided so that they partially overlap each other. In this case, the pooling process can be performed so as to generate the next-layer channels having the same size in the row direction and column direction as the previous layer channels.
  • the convolution area Ra in this example has 3 rows and 3 columns.
  • the convolution area Ra in the channel ChA of the previous layer is calculated as shown in FIG.
  • the position shown in (A) the position shifted by one element data in the row direction from the position in FIG. 3 (A) as shown in FIG. 3(D), and then to a position shifted by one element data in the row direction from the position shown in FIG. 3(C) as shown in FIG. 3(D).
  • the element data in one pooling area Rb in the channel ChB of the next layer are continuously calculated.
  • the order of movement of the convolutional regions Ra is not limited to the above order as long as the element data in one pooling region Rb is calculated continuously.
  • the memory unit 12 stores the load data of the convolution filter, the layer to which the convolution operation process is applied, that is, the element data of each channel of the previous layer, and the convolution operation result data and pooling data, that is, each channel of the next layer. element data is written. Element data obtained by the convolution operation is handed over to the pooling process inside the arithmetic unit 17 for the layer targeted for the pooling process, so it is not written to the memory unit 12 .
  • the power gating control unit 14 controls power supply in each arithmetic unit 17 under the control of the controller 15, that is, controls power gating, as will be described later in detail.
  • the computation unit 17 has a convolution computation section 21 that performs convolution computation, a pooling processing section 22 that performs pooling (extraction of the maximum value in this example), and an activation function processing section 23 .
  • the arithmetic unit 17 is provided with a bit number adjusting circuit (not shown) for converting the data length of the element data output from the convolution arithmetic unit 21 into a predetermined data length.
  • the convolution operation unit 21 performs a convolution operation to obtain element data.
  • the convolution calculation unit 21 calculates one element data by one convolution calculation.
  • the convolution calculation unit 21 sequentially switches the channels of the previous layer, and calculates 9 element data in the convolution area and 9 elements of the convolution filter for each channel of the previous layer. Load data is entered.
  • the element data from the convolution calculation unit 21 is input to the activation function processing unit 23 and converted using the activation function.
  • the activation function include a step function, a sigmoid function, a normalized linear function (ReLU: Rectified Linear Unit), a leaky normalized linear function (Leaky ReLU), a hyperbolic tangent function, and the like.
  • Element data passed through the activation function processing unit 23 is sent to the memory unit 12 and the pooling processing unit 22 as element data of the next layer.
  • the pooling processing unit 22 performs the pooling processing described above and outputs the element data that has the maximum value within the pooling area. Power supply to the pooling processing unit 22 is controlled by the power gating control unit 14 .
  • the element data obtained by the convolution operation by the convolution operation unit 21 (including the data passed through the activation function processing unit 23) is particularly referred to as the convolution operation result data, and is obtained by the pooling processing by the pooling processing unit 22.
  • the element data that is stored is sometimes called pooling data.
  • the convolution calculation unit 21 is composed of the same number of multipliers 24, multiplexers 25, adders 26, registers 27, etc. as the weight data of the convolution filter (nine in this example).
  • Each multiplier 24 receives element data and load data, and outputs a multiplication result obtained by multiplying them.
  • the multiplexer 25 selects and outputs the multiplication results from each multiplier 24 one by one.
  • Register 27 holds the addition result of adder 26 .
  • the adder 26 adds the multiplication result from the multiplexer 25 and the data held in the register 27 each time one multiplication result is output from the multiplexer 25 and causes the register 27 to hold the addition result.
  • the element data of each channel of the previous layer and the weight data of the convolution filter are input to the convolution operation unit 21, and finally the addition result held in the register 27 is output as the convolution operation result data (element data).
  • the configuration of the convolution calculation unit 21 is not limited to this.
  • the pooling processing unit 22 has a pooling arithmetic circuit 31 and a register 32 as a non-volatile storage circuit for pooling.
  • the pooling arithmetic circuit 31 cooperates with the register 32 to perform extraction processing for extracting the element data having the maximum value within the pooling area.
  • This pooling arithmetic circuit 31 is composed of a comparator 33 and a multiplexer 34 .
  • the register 32 is composed of, for example, a plurality of nonvolatile flip-flops (NV-FF) using magnetic tunnel junction (MTJ) elements.
  • NV-FF nonvolatile flip-flops
  • MTJ magnetic tunnel junction
  • a nonvolatile flip-flop using a magnetic tunnel junction device has a smaller substrate size than other nonvolatile flip-flops, and is advantageous in convolutional neural networks that require high-density integration. Since it is low, it is advantageous in reducing power consumption.
  • the register 32 Since the register 32 is non-volatile, it retains data even when the power supply is cut off, and by supplying power, it is possible to read and output the retained data when the power is cut off.
  • This register 32 holds the element data selected by the multiplexer 34 as holding data.
  • the register 32 is reset each time the output of the maximum value of the pooling area is completed, and the content held therein is set to the initial value (value "0"). Note that the configuration of the pooling storage circuit is not limited to the above.
  • the element data from the convolution operation unit 21 and the element data held by the register 32 are input to the comparator 33 and multiplexer 34 that constitute the pooling operation circuit 31 via the activation function processing unit 23 .
  • the comparator 33 compares the two input element data and outputs a selection signal to the multiplexer 34 to select the element data with the larger value.
  • the multiplexer 34 functions as a selector and selects and outputs one of the input element data based on the selection signal.
  • element data having a larger value between the element data from the convolution operation unit 21 and the element data held by the register 32 is output from the multiplexer 34, and the output element data is transferred to the register 32 as new held data. is held to
  • a drive voltage (VDD) is applied to the register 32 via the PG switch 35 .
  • the PG switch 35 constitutes a power gating section together with the power gating control section 14 .
  • the PG switch 35 is composed of a MOS transistor or the like, and is controlled to be turned on/off by the power gating control section 14 .
  • the register 32 receives power and becomes capable of writing and outputting (reading) data.
  • the PG switch 35 is turned off, no drive voltage is applied to the register 32, that is, the power supply is cut off, making it impossible to write and output data. Thereby, power gating can be performed on the register 32 .
  • the PG switch 35 is provided for each pooling processing unit 22, but one PG switch 35 common to each pooling processing unit 22 may be provided.
  • the power gating control unit 14 turns on the PG switch 35 at least while writing and outputting element data to the register 32, and turns off the PG switch 35 during other periods to reduce power consumption. Reduce.
  • the PG switch 35 is turned off while the pooling processing unit 22 is waiting for input of element data from the convolution operation unit 21, that is, while the pooling processing unit 22 does not perform processing. , otherwise the PG switch 35 is turned on.
  • new element data is generated by the processing of the pooling operation circuit 31 from the timing of the output of the element data from the convolution operation unit 21, that is, the input of the element data to the pooling processing unit 22. This is the period until it is held in the register 32, or until the output of the pooled data is completed.
  • the PG switch 35 is turned off except during the pooling processing period.
  • each element data of the pooling region sequentially calculated by the convolution operation unit 21 as described above is input to the pooling processing unit 22 each time the element data is calculated.
  • the pooling processing period is started when the convolution operation processing for generating the channel of the layer targeted for the pooling processing is started, or when the first element data in the layer targeted for the pooling processing is sent to the pooling processing unit 22. at the time of input.
  • the end of the pooling processing period is when the final element data of the channel generated by the pooling processing has been output from the pooling processing unit 22 .
  • the pooling process starts when the convolution operation for calculating the element data of the pooling area is started or when the first element data of the pooling area is input to the pooling processing unit 22. This is the start of the period, and the end of the pooling processing period is the completion of the output of the element data that is the maximum value of the pooling area held in the register 32 .
  • the output of the element data held in the register 32 is completed when the element data output from the register 27 is acquired by the circuit to be acquired from the register 27 . In this example, the output of the element data is completed when the memory unit 12 latches the element data.
  • the arithmetic processing unit 10 uses the K arithmetic units 17 provided in the arithmetic unit 11 to perform convolution arithmetic processing in a mode called channel parallelism in which one element data is calculated in parallel for each of k channels of the next layer. I do. Further, when the layer generated by the convolution operation process is subject to the pooling process, the arithmetic processing unit 10 performs pooling as described above every time one element data is calculated for each of the k channels of the next layer. Move the convolution region in the k-channel so as to successively calculate the multiple element data in the region. In addition, when the next layer generated by the convolution operation processing is not subject to the pooling processing, the element data may be calculated in a manner other than the above.
  • the action of the above configuration will be described for the case where the n+1th layer is generated by convolution operation processing on the nth layer, and the n+2th layer is generated by performing pooling processing on the n+1th layer.
  • the nth layer consists of channels ChA1, ChA2, . Assume that n+1 layers are generated.
  • each arithmetic unit 17 of the arithmetic unit 11 performs an arithmetic operation to apply a convolution filter to the convolution area Ra of the first channel ChA1 of the n-th hierarchy.
  • Nine element data of the convolution area Ra of the channel ChA1 are read out from the memory section 12 and input to the convolution calculation section 21 of each calculation unit 17 .
  • nine weight data of one convolution filter are input to one convolution operation unit 21, and the first channel ChA1 and the first to k-th channels ChB1, ChB2, . . . corresponding to the convolution filters FA1B1, FA1B2, . . .
  • each convolution operation unit 21 multiplies the input element data of the convolution area Ra of the channel ChA1 and the weight data of the convolution filter by the corresponding data, and the sum of the multiplication results is the sum of products.
  • the results are stored in the registers 27 (FIG. 7(A)).
  • each calculation unit 17 performs a calculation to apply a convolution filter to the convolution area Ra at the same position as the first channel ChA1 in the second channel ChA2 of the n-th layer.
  • Nine element data of the convolution area Ra in the channel ChA2 are input to the convolution operation section 21 of each operation unit 17, and the second channel ChA2 and the first to kth channels ChB1, ChB2, .
  • Each arithmetic unit 17 corresponds to one channel of the next hierarchy, and the corresponding channel of the next hierarchy does not change, for example, until the calculation of all the element data of the k channel is completed. For this reason, for example, in the computation unit 17 to which the weight data of the convolution filter FA1B1 corresponding to the second channel ChB1 is input during computation targeting the first channel ChA1 in the previous hierarchy, the second channel ChA2 , the load data of the convolution filter FA2B2 corresponding to the second channel ChB2 is also input.
  • each convolution calculation unit 21 stores the product-sum result obtained by applying the convolution filter to the convolution area Ra of the channel ChA1 as follows: A value obtained by adding the sum of products obtained by applying the convolution filter to the convolution area Ra of the channel ChA2 is stored (FIG. 7(B)).
  • the convolution calculation section 21 of each calculation unit 17 sequentially performs calculations for applying the convolution filter to the convolution area Ra at the same position as the first channel ChA1 for each of the third and subsequent channels of the n-th layer. .
  • the register 27 of each convolution calculation unit 21 stores the sum of products obtained by applying the convolution filter to the convolution area Ra of each channel of the previous layer.
  • the sum of the results that is, the 1st element data for each of the 1st to kth channels in the next layer is stored.
  • the first element data (convolution operation result data) thus obtained is output from the convolution operation unit 21 .
  • the convolution operation section 21 of each operation unit 17 shifts the convolution area Ra by one piece of element data in the row direction as shown in FIG. , to the convolution area Ra of the first channel ChA1 in the previous hierarchy, applying the convolution filters FA1B1, FA1B2, . . . After that, in the same procedure, as shown in FIG. conduct. Thereafter, in the same manner, operations are sequentially performed to apply a convolution filter to the convolution area Ra for each of the third and subsequent channels of the previous layer, and the second element data is calculated for each of the first to k-th channels, and the convolution operation is performed. Output from the unit 21 .
  • the convolution area Ra is shifted by one piece of element data in the column direction from the first position, and the third element data is calculated and output by the convolution operation unit 21 by the same procedure as above. .
  • the convolution area Ra is shifted by one piece of element data in the row direction, and the fourth element data is calculated and output by the convolution operation unit 21 by the same procedure as above. In this way, the four element data of the pooling area to be pooled are calculated continuously.
  • the pooling processing unit 22 is in a state of waiting for input of element data during the period T1 when the convolution operation unit 21 is performing the convolution operation.
  • the power gating control unit 14 turns off the PG switch 35 and cuts off the power supply to the registers 32 of the pooling processing units 22 .
  • the PG switch 35 is turned on by the power gating control unit 14 at the timing when the first element data (convolution operation result data) is output from the convolution operation unit 21 .
  • power is supplied to the register 32 of each pooling processing unit 22 and data can be written.
  • the input element data and the data held in the register 32 are compared by the comparator 33. and the multiplexer 34 is controlled based on the result of the comparison. Since the register 32 is reset and holds the initial value (value "0") when the convolution operation is started, the input element data is selected by the multiplexer 34 and the element data is transferred to the register 32. written.
  • the pooling processing unit 22 waits for input of the second element data calculated by the convolution operation unit 21 in the period T2.
  • the power gating control unit 14 turns off the PG switch 35 and cuts off the power supply to the register 32 of each pooling processing unit 22 .
  • the power gating control unit 14 turns on the PG switch 35 to supply power to the register 32 .
  • the second element data output from the convolution operation unit 21 is compared with the element data held in the register 32 by the comparator 33, and the multiplexer 34 is controlled based on the comparison result. Since the register 32 is non-volatile, it outputs the data held before the power shutdown when the power supply is restarted. Therefore, the second element data output from the convolution operation section 21 is compared with the element data held in the register 32 by the comparator 33, and the multiplexer 34 is controlled based on the comparison result.
  • the comparator 33 compares the first element data and the second element data. By this comparison, the multiplexer 34 selects the element data having the larger value among those element data, and the selected element data is written to the register 32 .
  • the convolution operation unit 21 waits for the third element data calculated in the period T3, the PG switch 35 is turned off, and the register of each pooling processing unit 22 is turned off. 32 is cut off.
  • the power gating control unit 14 turns on the PG switch 35 to supply power to the register 32 . Then, the third element data and the element data held in the register 32 are compared by the comparator 33 . A multiplexer 34 selects element data having a large value among those element data, and the selected element data is written to the register 32 .
  • the convolution operation unit 21 waits for the fourth element data calculated in the period T4, the PG switch 35 is turned off, and each pooling processing unit 22 is transferred to the register 32. Power supply is interrupted.
  • the PG switch 35 is turned on and power is supplied to the register 32 . Then, the fourth element data is compared with the element data held in the register 32 , and the element data having the larger value is selected and written to the register 32 .
  • the register 32 holds the element data having the largest value among the 1st to 4th element data in the pooling area of the (n+1)th layer, and the element data held in this register 32 becomes the (n+2)th layer. is output from the pooling processing unit 22 as element data (pooling data).
  • element data (pooling data)
  • the PG switch 35 is turned off, and the register 32 power is cut off.
  • the convolution operation unit 21 After outputting the fourth element data, the convolution operation unit 21 further moves the convolution area Ra and calculates the element data for the next pooling area in the same procedure as above.
  • the pooling processing unit 22 compares the element data with the data held in the register 32 each time the first to fourth element data are output, thereby determining the largest value in the new pooling area.
  • the element data is held in the register 32, and the element data is output as the element data of the (n+2)th layer. While the pooling processing unit 22 is waiting for the input of the element data as described above, the PG switch 35 is turned off and the power supply to the register 32 is cut off.
  • the arithmetic processing unit 10 performs the pooling processing by the pooling processing unit 22. While the pooling processing unit 22 is waiting for the input of the element data, the power game is performed so as to cut off the power supply to the register 32. ting. Therefore, the leakage current of the register 32 is suppressed while waiting for input of the element data, and the power consumption of the arithmetic processing unit 10 is small.
  • Nonvolatile configuration Power consumption (operating power consumption) when the register 32 is configured with a nonvolatile flip-flop using a magnetic tunnel junction element (hereinafter referred to as a nonvolatile configuration) when configured with a normal nonvolatile flip-flop
  • a calculated ratio to the power consumption (power consumption during operation+power consumption during standby) in (hereinafter referred to as normal configuration) can be set to 0.22, for example.
  • the operating power consumption of the non-volatile configuration is assumed to be 10 times that of the normal configuration, and the normal configuration is assumed to have “standby power consumption:operating power consumption” of “30:110”, and the registers in the arithmetic processing unit 10
  • the ratio of the number of operation cycles of 32 to the number of standby cycles is calculated as "0.006".
  • FIG. 10 shows an example in which the pooling processing unit 22 is configured to perform average value pooling processing for outputting the average value of the element data in the pooling area.
  • the pooling processing unit 22 is composed of a pooling arithmetic circuit 31 and a register 42.
  • the pooling arithmetic circuit 31 is composed of an adder 43 and a 2-bit shifter 44, and cooperates with the register 42 to average the element data of the pooling area. Calculate the value.
  • the adder 43 adds the data held in the register 42 and the input element data, which is the convolution operation result data.
  • the register 42 is a nonvolatile storage circuit for pooling and holds the addition result of the adder 43 .
  • the 2-bit shifter 44 is a bit shift circuit and is provided as a divider. The 2-bit shifter 44 shifts the result of addition by the adder 43 up to the final element data in the pooling area by 2 bits, thereby calculating the quotient obtained by dividing by the number of element data in the pooling
  • the pooling processing unit 22 converts element data (pooling data).
  • the register 42 is non-volatile like the register 32 (see FIG. 6), and is power gated by turning the PG switch 35 on and off. Therefore, during the pooling processing period, the PG switch 35 is turned off while the pooling processing unit 22 is waiting for input of element data from the convolution operation unit 21, that is, while the pooling processing unit 22 is not performing processing. power supply is cut off. Thereby, the power consumption of the arithmetic processing unit 10 is reduced.
  • a multiplier 45 that multiplies a predetermined weight may be provided in the preceding stage of the adder 43, and the element data input as the result of the convolution operation may be weighted according to the position of the element data. good.
  • the weight can be, for example, a two-dimensional Gaussian weight.
  • FIG. 12 shows an example of the pooling processing unit 22 configured by buffers 51a in which register units 51 as storage circuits for pooling are provided in multiple stages.
  • the pooling processing unit 22 in this example includes a register unit 51, a comparator 52, and a multiplexer 53 as a selector. Element data (convolution operation result data) from the convolution operation unit 21 is input to the register unit 51 .
  • the pooling area is 2 rows and 2 columns.
  • the convolution operation unit 21 calculates element data for each row in order from the first row, and for each row, sequentially from one end of the row to the other end. Calculate element data.
  • the number of columns of channels in the layer to be pooled is an even number.
  • Each bit of data is input to each buffer 51a in parallel, and each buffer 51a holds data that is input in synchronization with a clock, for example, and outputs the held data in parallel.
  • a parallel input parallel output type PIPO: Parallel-In, Parallel-Out
  • the register unit 51 includes buffers 51a in (Y+2) stages. is connected.
  • Each buffer 51a is connected in multiple stages so that the output of the previous stage is input to the buffer 51a of the subsequent stage. That is, the element data from the convolution operation unit 21 is input to the first-stage buffer 51a via the activation function processing unit 23, and the second-stage and subsequent buffers 51a receive the output from the preceding-stage buffer 51a as the subsequent-stage buffer. 51a.
  • a clock is input to each buffer 51a in synchronization with the input of element data to the buffer 51a of the first stage.
  • Element data from the buffers 51a of the first stage, the second stage, the Y+1 stage, and the Y+2 stage are input to the comparator 52 and the multiplexer 53 that constitute the pooling operation circuit 31 as a data group.
  • the comparator 52 compares the four input element data and outputs a selection signal for selecting and outputting the element data with the largest value.
  • the multiplexer 53 selects and outputs one of the input four element data based on the selection signal.
  • the pooling arithmetic circuit 31 stores the four data elements output (held) by the buffers 51a of the first stage, the second stage, the Y+1 stage, and the Y+2 stage within one pooling area.
  • comparison by the comparator 52 and selection by the multiplexer 53 are performed. Specifically, where m is an integer of 1 or more, after the (2m-1) Y-th element data is input, two element data are input until the 2m-Y-th element data is input. is input, comparison by the comparator 52 and selection by the multiplexer 53 are performed.
  • the multiplexer 53 selects the element data having the maximum value of each pooling area divided into a plurality of 2 rows and 2 columns without overlapping the channels to be pooled. are output as pooling data.
  • the register unit 51 is configured as a nonvolatile memory circuit. That is, each buffer 51a is non-volatile. As in the other examples, it is preferable to configure the buffer 51a with a plurality of nonvolatile flip-flops (NV-FF) using magnetic tunnel junction elements.
  • a driving voltage (VDD) is applied to the register unit 51 via the PG switch 35, and during the pooling processing period, while the pooling processing unit 22 is waiting for input of element data from the convolution operation unit 21, , the PG switch 35 is turned off to reduce power consumption.
  • the PG switch 35 When outputting the pooling data, the PG switch 35 is turned on until the comparison of the element data by the comparator 52 and the selection by the multiplexer 53 are performed, and the output from the multiplexer 53 is completed. While the unit 22 does not need to operate, the PG switch 35 is turned off and power supply to the register unit 51 is interrupted.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Power Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Computer Hardware Design (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Complex Calculations (AREA)

Abstract

消費電力をより小さくすることができる演算処理装置を提供する。プーリング処理部22は、プーリング領域内の要素データが畳み込み演算部から順次に入力される。プーリング処理部22は、不揮発性のレジスタ32、比較器33、マルチプレクサ34を有する。比較器33は、畳み込み演算部からの要素データとレジスタ32が保持している要素データとを比較する。この比較結果に基づいて、マルチプレクサ34が値の大きな要素データを選択し、選択された要素データがレジスタ32に保持される。プーリング領域内の各要素データの入力後、レジスタ32に保持されている要素データがプーリングデータとして出力される。レジスタ32は、プーリング処理部22が要素データの入力待ちとなっている間は、PGスイッチ35がオフとされて電力供給が遮断される。

Description

演算処理装置
 本発明は、演算処理装置に関する。
 畳み込みニューラルネットワーク、すなわち畳み込み層を有するニューラルネットワークを用いて画像認識等を行う演算処理装置が知られており、ロボットの制御や車の運転制御等への応用が期待されている。このような画像認識をはじめとする畳み込みニューラルネットワークでは、畳み込み演算処理、プーリング処理が行われる。畳み込み演算処理では、入力層や中間層のデータを畳み込みフィルタの荷重データを用いて重み付けして加算する膨大な積和演算を行っている。プーリング処理では、畳み込み演算処理で得られる複数の畳み込み演算結果から例えば最大値の抽出や平均値の算出を行っている。
 特許文献1では、畳み込みニューラルネットワークの演算処理を演算処理装置において、1演算サイクルごとに、1回のプーリング処理で必要な全ての畳み込み演算結果のうち一部が得られるようにすることで、畳み込み演算を行う回路規模を小さくすることが提案されている。
 一方、消費電力を抑える技術として、プロセッサコア等の演算回路に対して、電力供給を遮断し、リーク電流を抑制するパワーゲーティングが知られている。
特開2015-210709号公報
 ところで、畳み込みニューラルネットワークの演算処理装置では、上記のように膨大な演算数の積和演算等が必要であり消費電力が問題になっていた。特に、ロボットや車、携帯端末等の末端の機器等においては消費電力をできるだけ抑えることが重要である。このため、畳み込みニューラルネットワークのような演算を行う演算処理装置においては、消費電力をより小さくすることが望まれている。
 本発明は、上記事情に鑑みてなされたものであり、消費電力をより小さくすることができる演算処理装置を提供することを目的とする。
 上記目的を達成するために、本発明の演算処理装置は、畳み込み演算結果データを順次に出力する畳み込み演算部と、プーリング演算回路及び不揮発性のプーリング用記憶回路を有し、前記プーリング用記憶回路が前記畳み込み演算結果データまたは前記プーリング演算回路の演算結果を保持データとして保持し、前記畳み込み演算部からの前記畳み込み演算結果データが入力されるごとに、前記プーリング演算回路が前記保持データを用いてプーリング領域にプーリング処理を行ったプーリングデータを算出して出力するプーリング処理部と、前記畳み込み演算部からの前記畳み込み演算結果データの入力待ちの間における前記プーリング用記憶回路への電力供給を遮断するパワーゲーティング部とを備えるものである。
 本発明の演算処理装置は、複数の畳み込み演算結果データが2次元配列されるチャネルの行ごとに前記畳み込み演算結果データを前記チャネルの行方向に順次に出力する畳み込み演算部と、プーリング演算回路及び不揮発性のプーリング用記憶回路を有し、複数の前記畳み込み演算結果データを前記チャネルの2行2列ごとに区分した各プーリング領域について最大値となる前記畳み込み演算結果データをプーリングデータとして出力するプーリング処理部とを備え、前記プーリング用記憶回路は、前記チャネルの列数をY(Yは2以上の偶数)として、Y+2段に接続されたバッファを有し、前記畳み込み演算部からの前記畳み込み演算結果データが1段目のバッファに入力されるごとに、1段目のバッファが入力される前記畳み込み演算結果データを保持して出力し、2段目以降の各バッファが前段のバッファから出力されている前記畳み込み演算結果データを保持して出力し、前記プーリング演算回路は、1段目、2段目、Y+1段目及びY+2段目の各バッファからの各前記畳み込み演算結果データからなるデータ群が入力され、前記データ群の各前記畳み込み演算結果データを比較する比較器と、前記比較器の比較結果に基づいて前記データ群のうちで最大値となる前記畳み込み演算結果データを選択して出力するセレクタとを有し、前記プーリング処理部は、前記データ群の各前記畳み込み演算結果データが1つのプーリング領域内の前記畳み込み演算結果データの組み合わせとなるときのセレクタから出力されている前記畳み込み演算結果データをプーリングデータとして出力するものである。
 本発明によれば、プーリング処理部が畳み込み演算部からの畳み込み演算結果データの入力待ちとなっているときに、パワーゲーティング部によって不揮発性のプーリング用記憶回路への電力供給を遮断するので、演算処理装置の消費電力をより小さくすることができる。
 本発明によれば、畳み込み演算結果データを保持するバッファ数をチャネルの要素データ数(列数×行数)よりも少ない(列数+2)個とすることができ、消費電力をより小さくすることができる。
演算処理装置の概略を示すブロック図である。 畳み込みニューラルネットワークの接続された階層の例を示す説明図である。 畳み込み領域の位置の移動とプーリング領域の関係を示す説明図である。 演算ユニットの構成を示すブロック図である。 畳み込み演算回路の構成を示すブロック図である。 プーリング処理部の構成を示すブロック図である。 チャネル並列による次階層の1番目の要素データに対して演算を行う際の畳み込み演算処理の状態を示す説明図である。 チャネル並列による次階層の2番目の要素データに対して演算を行う際の畳み込み演算処理の状態を示す説明図である。 PGスイッチをオフとしている期間を示す説明図である。 平均値プーリング処理を行うプーリング処理部の構成例を示すブロック図である。 重み付け平均値プーリング処理を行うプーリング処理部の構成例を示すブロック図である。 レジスタ部を多段に接続したバッファで構成したプーリング処理部を示すブロック図である。
 図1において、演算処理装置10は、畳み込みニューラルネットワークに基づく演算処理を行う。演算処理装置10は、チャネル(特徴面とも称される)に対して、畳み込みフィルタを用いた畳み込み演算処理、プーリング処理を行う演算部11、メモリ部12、パワーゲーティング制御部14、これらを統括的に制御するコントローラ15を有している。演算部11は、詳細を後述するように、畳み込み演算処理及びプーリング処理を行うk個(kは2以上の整数)の演算ユニット17が並列に設けられている。
 上述の演算処理装置10が基づく畳み込みニューラルネットワークは、複数の階層が接続されている。各階層は、1または複数のチャネルを有している。最初の階層は、入力層であって、例えばRGBの各チャネルからなる画像等である。図2に一例として示す畳み込みニューラルネットワークでは、第1~第4階層が接続されている。第1階層は、3つのチャネルch1-1~ch1-3を、第2階層は、4つのチャネルch2-1~ch2-4を、第3階層は、3つのチャネルch3-1~ch3-3を、第4階層は、3つのチャネルch4-1~ch4-3をそれぞれ有している。
 第1~第4階層のうち第1階層、第2階層は、畳み込み演算処理の対象とされる階層であり、畳み込み演算処理によって第1階層のチャネルch1-1~ch1-3から第2階層のチャネルch2-1~ch2-4を、第2階層のチャネルch2-1~ch2-4から第3階層のチャネルch3-1~ch3-3をそれぞれ生成する。第3階層は、プーリング処理の対象とされる階層であり、プーリング処理によって第3階層のチャネルch3-1~ch3-3から第4階層のチャネルch4-1~ch4-3を生成する。
 なお、各階層のチャネルは、1または複数とすることができる。また、畳み込み演算処理では、前後の階層において、チャネル数が増減する場合もあるがチャネル数が変化しない場合もある。プーリング処理では、前後の階層におけるチャネル数が同じである。階層は、3階層あるいは5階層以上としてもよい。
 演算部11は、nを1以上の整数として第n階層のチャネルに対して畳み込み演算処理またはプーリング処理を行うことにより第n+1階層を生成する。階層の生成は、階層を構成する各チャネルを生成することであり、チャネルの生成は、チャネルを構成する各要素データを算出することである。なお、以下の説明において、第n+1階層に対して第n階層を前階層、第n階層に対して第n+1階層を次階層と称することがある。したがって、前階層のチャネルに対する畳み込み演算処理、プーリング処理により次階層のチャネルが生成される。
 チャネルは、2次元配列された複数の要素データにより構成される。要素データの2次元配列は、データ構造上の並びであり、各々の要素データが2つの変数(この説明では行と列)において位置が特定され、また要素データ同士の位置関係が特定されるように位置情報が付与されていることを意味する。後述する荷重データについても同様である。各チャネルのサイズすなわち行方向及び列方向の要素データの個数は任意であり特に限定されない。なお、この例では、2次元のチャネルについて説明するが、1次元あるいは3次元以上のチャネルであってもよい。
 畳み込み演算処理では、畳み込み演算により要素データを算出する。畳み込み演算で算出される要素データは、前階層の各チャネルについて畳み込み領域内の各要素データに対して畳み込みフィルタを適用した結果を、各チャネルの同じ位置の各畳み込み領域のもの同士で加算した値である。畳み込みフィルタの適用は、畳み込み領域内の要素データと畳み込みフィルタの荷重データの積和演算結果を求めることである。
 畳み込みフィルタは、要素データに対する重みとなる荷重データを2次元配列したものである。この例では、1つの畳み込みフィルタは、3×3(3行3列)の荷重データで構成される。畳み込みフィルタの各荷重データは、その畳み込みフィルタの目的等に応じた値にそれぞれ設定される。また、この例では、前階層のチャネルと次階層のチャネルの組み合わせに対応した畳み込みフィルタを用いる。
 畳み込み領域は、チャネル上で畳み込みフィルタが適用される範囲を規定しており、畳み込みフィルタと同じ配列サイズ(この例では3行3列)である。畳み込み演算では、畳み込みフィルタの荷重データと畳み込み領域の要素データとが対応する位置同士で乗算される。畳み込み演算処理では、領域の位置を要素データの1個分ずつ移動しながらチャネルの全域を走査するように畳み込み領域を移動させ、畳み込み領域を移動するごとに、要素データ算出処理を行う。
 この例においては、次階層の各々のチャネルについて前階層の全てのチャネルを用いて畳み込み演算を行う。また、前階層のチャネルと次階層のチャネルの組み合わせに対応した畳み込みフィルタを用いて畳み込み演算を行う。
 したがって、図2に示される例においては、例えば第3階層のチャネルch3-1を生成する際に、チャネルch2-1に対して畳み込みフィルタを適用するときには、チャネルch2-1とチャネルch3-1との組み合わせに対応付けられた畳み込みフィルタを用い、またチャネルch2-2に対して畳み込みフィルタを適用するときには、チャネルch2-2とチャネルch3-1との組み合わせに対応付けられた畳み込みフィルタを用いる。このようにして、チャネルch3-1を生成する際には、チャネルch3-1とチャネルch2-1~ch2-4との4通りの各組み合わせに対応した4個の畳み込みフィルタを用いて畳み込み演算を行う。同様に、チャネルch3-2を生成する際には、チャネルch3-2とチャネルch2-1~ch2-4の4通りの各組み合わせに対応した4個の畳み込みフィルタを用いて畳み込み演算を行い、チャネルch3-3を生成する際には、チャネルch3-3とチャネルch2-1~ch2-4の4通りの各組み合わせに対応した4個の畳み込みフィルタを用いて畳み込み演算を行う。
 なお、畳み込み演算処理において、次階層の1つのチャネルを生成するために、前階層の任意の個数のチャネルを用いることもでき、次階層の1つのチャネルを生成するために前階層の1つのチャネルを用いることもできる。また、1つの階層に用いられる複数の畳み込みフィルタの全部または一部が共通な重みの配列となってかまわない。さらに、畳み込みフィルタの重みの配列が共通な場合に、その共通な重みの配列の1つの畳み込みフィルタを用意しておき、この1つの畳み込みフィルタを複数のチャネルを算出する際に用いてもよい。
 プーリング処理は、一例として、前階層の各々のチャネルから行方向列方向のサイズを縮小した次階層のチャネルをそれぞれ生成する。この例では、プーリング処理として、2行2列のプーリング領域から最大値を抽出する最大値プーリング処理を行う。このため、各々のチャネルについて、チャネルを2行2列の複数のプーリング領域に互いに重複しないよう分け、これらプーリング領域のそれぞれについて領域内の最大値の要素データをプーリング処理の結果として出力する。なお、プーリング領域のサイズは、2行2列に限らない。p、qのうちの一方を1以上の整数、他方を2以上の整数として、プーリング領域をp行q列としてもよい。さらに、最大値プーリング処理に代えて、後述するように、プーリング領域の要素データの平均値を出力する平均値プーリング処理としてもよい。プーリング処理で縮小されたチャネルからなる階層に対して、さらに畳み込み演算処理を行うこともできる。プーリング領域は、互いに一部が重複するように分けることもでき、この場合、前階層のチャネルと行方向列方向のサイズが同じ次階層のチャネルを生成するようにプーリング処理を行うこともできる。
 図3(A)に示すように、この例の畳み込み領域Raは、3行3列である。演算部11では、プーリング処理の対象となる階層(次階層、図2の例では第3階層)のチャネルChBの要素データを求める際には、前階層のチャネルChAにおける畳み込み領域Raは、図3(A)に示される位置、図3(B)示すように図3(A)の位置から行方向に1要素データ分移動した位置、図3(C)に示すように図3(A)に示される位置から列方向に1要素データ分移動した位置、図3(D)に示すように図3(C)に示される位置から行方向に1要素データ分移動した位置に順次に移動する。これにより、次階層のチャネルChBにおける1つのプーリング領域Rb内の要素データを連続して算出する。なお、1つのプーリング領域Rb内の要素データを連続して算出するのであれば、畳み込み領域Raの移動の順番は、上記の順序に限定されない。
 図1において、メモリ部12は、畳み込みフィルタの荷重データ、畳み込み演算処理が適用される階層すなわち前階層の各チャネルの要素データを記憶するとともに、畳み込み演算結果データ及びプーリングデータすなわち次階層の各チャネルの要素データが書き込まれる。プーリング処理の対象の階層については、畳み込み演算で得られる要素データを演算ユニット17の内部でプーリング処理に引き渡すため、メモリ部12には書き込まれない。
 パワーゲーティング制御部14は、詳細を後述するように、コントローラ15の制御下で各演算ユニット17内の電力供給の制御、すなわちパワーゲーティングを制御する。
 図4に示すように、演算ユニット17は、畳み込み演算を行う畳み込み演算部21、プーリング(この例では最大値の抽出)を行うプーリング処理部22、活性化関数処理部23を有している。演算ユニット17は、これらの他に、畳み込み演算部21から出力される要素データのデータ長を所定のデータ長に変換するビット数調整回路(図示省略)等が設けられている。
 畳み込み演算部21は、畳み込み演算を行って要素データを求める。畳み込み演算部21は、1回の畳み込み演算によって1つの要素データを算出する。畳み込み演算部21には、1つの要素データを算出する際に、前階層のチャネルを順次に切り替えながら、前階層の各々のチャネルについて畳み込み領域内の9個の要素データと畳み込みフィルタの9個の荷重データとが入力される。
 畳み込み演算部21からの要素データは、活性化関数処理部23に入力され、活性化関数を用いて変換される。活性化関数としては、例えばステップ関数、シグモイド関数、正規化線形関数(ReLU:Rectified Linear Unit)、リーク正規化線形関数(Leaky ReLU)、双曲線正接(Hyperbolic tangent)関数等である。活性化関数処理部23を通した要素データが次階層の要素データとしてメモリ部12及びプーリング処理部22に送られる。
 プーリング処理部22は、上述のプーリング処理を行い、プーリング領域内の最大値となる要素データを出力する。このプーリング処理部22は、パワーゲーティング制御部14により、電力供給の制御がなされる。
 なお、以下の説明において、畳み込み演算部21による畳み込み演算によって得られる要素データ(活性化関数処理部23を通したもの含む)を特に畳み込み演算結果データと称し、プーリング処理部22によるプーリング処理によって得られる要素データを特にプーリングデータと称することがある。
 図5に畳み込み演算部21の一例を示す。この畳み込み演算部21は、畳み込みフィルタの荷重データと同じ個数(この例では9個)の乗算器24、マルチプレクサ25、加算器26及びレジスタ27等で構成される。各乗算器24は、それぞれ要素データと荷重データとが入力され、それらを乗算した乗算結果を出力する。マルチプレクサ25は、各乗算器24からの乗算結果を1つずつ選択して出力する。レジスタ27は、加算器26の加算結果を保持する。加算器26は、マルチプレクサ25から1つの乗算結果が出力されるごとに、そのマルチプレクサ25からの乗算結果とレジスタ27に保持されているデータとを加算し、その加算結果をレジスタ27に保持させる。前階層の各チャネルの要素データ及び畳み込みフィルタの荷重データを畳み込み演算部21に入力して、最終的にレジスタ27に保持されている加算結果を、畳み込み演算結果データ(要素データ)として出力する。なお、畳み込み演算部21の構成は、これに限定されない。
 図6において、プーリング処理部22は、プーリング演算回路31と、不揮発性のプーリング用記憶回路としてのレジスタ32とを有している。プーリング演算回路31は、レジスタ32と協働してプーリング領域内の最大値となる要素データを抽出する抽出処理を行う。このプーリング演算回路31は、比較器33とマルチプレクサ34とで構成される。レジスタ32は、例えば、磁気トンネル接合(MTJ :Magnetic tunnel junciton)素子を用いた複数の不揮発性フリップフロップ(NV-FF)等で構成されている。磁気トンネル接合素子を用いた不揮発性フリップフロップは、他の不揮発性フリップフロップと比較して基板上のサイズが小さく、高密度な集積が要求される畳み込みニューラルネットワークにおいて有利であり、また動作電圧が低いため消費電力を低くする上で有利である。
 レジスタ32は、不揮発性であるため、電力供給を遮断してもデータを保持し、電力供給を行うことで電源遮断時に保持しているデータの読み出し、データの出力が可能である。このレジスタ32は、保持データとしてマルチプレクサ34で選択される要素データを保持する。レジスタ32は、プーリング領域の最大値の出力が完了するごとにリセットされて、保持している内容が初期値(値「0」)にされる。なお、プーリング用記憶回路の構成は、上記のものに限定されない。
 プーリング演算回路31を構成する比較器33及びマルチプレクサ34には、活性化関数処理部23を介して畳み込み演算部21からの要素データとレジスタ32が保持している要素データとが入力される。比較器33は、入力される2つの要素データを比較し、値の大きな要素データを選択させる選択信号をマルチプレクサ34に出力する。マルチプレクサ34は、セレクタとして機能し、選択信号に基づいて入力されている要素データの一方を選択して出力する。これにより、畳み込み演算部21からの要素データとレジスタ32が保持している要素データとで値の大きな要素データがマルチプレクサ34から出力され、新たな保持データとして、その出力される要素データがレジスタ32に保持される。
 プーリング演算回路31に畳み込み演算部21で算出されるプーリング領域の各要素データを順次に入力することによって、プーリング領域中の最大値となる要素データがレジスタ32に保持され、その保持されている要素データが1つのプーリング領域についてのプーリングデータとして出力される。
 レジスタ32には、PGスイッチ35を介して駆動電圧(VDD)が印加されている。PGスイッチ35は、パワーゲーティング制御部14とともにパワーゲーティング部を構成する。PGスイッチ35は、MOSトランジスタ等で構成され、パワーゲーティング制御部14によってオン・オフが制御される。PGスイッチ35のオンにより、レジスタ32は、電力供給を受けてデータの書き込み、出力(読み出し)が可能になる。PGスイッチ35をオフとすると、レジスタ32は、駆動電圧が印加されなくなり、すなわち電力供給が遮断され、データの書き込み、出力が不可能になる。これにより、レジスタ32に対してパワーゲーティングを行うことができる。なお、この例では、プーリング処理部22ごとにPGスイッチ35を設けているが、各プーリング処理部22に共通な1つのPGスイッチ35を設けてもよい。
 パワーゲーティング制御部14は、プーリング処理期間中において、少なくともレジスタ32への要素データの書き込みと出力とを行う間ではPGスイッチ35をオンとし、それ以外の間ではPGスイッチ35をオフとして電力消費を低減する。この例では、プーリング処理期間中において、プーリング処理部22が畳み込み演算部21からの要素データの入力待ちとなっている間すなわちプーリング処理部22が処理を行わない間は、PGスイッチ35をオフとし、それ以外ではPGスイッチ35をオンとする。具体的にPGスイッチ35をオンとする期間は、畳み込み演算部21からの要素データの出力すなわちプーリング処理部22への要素データの入力のタイミングから、プーリング演算回路31の処理によって新たな要素データがレジスタ32に保持されるまで、またプーリングデータを出力する場合にはその出力が完了するまでの期間である。PGスイッチ35は、プーリング処理期間以外ではオフとされる。
 なお、この例では、上述のように畳み込み演算部21で順次に算出されるプーリング領域の各要素データを、要素データが算出されるごとにプーリング処理部22に入力している。このためプーリング処理期間の開始は、プーリング処理の対象とする階層のチャネルを生成するための畳み込み演算処理の開始時またはプーリング処理の対象とする階層における1番目の要素データのプーリング処理部22への入力時点である。また、プーリング処理期間の終了は、プーリング処理により生成されるチャネルの最終の要素データのプーリング処理部22からの出力が完了した時点である。
 1つのプーリング領域に注目した場合には、当該プーリング領域の要素データの算出のための畳み込み演算の開始時または当該プーリング領域の1番目の要素データがプーリング処理部22に入力される時点がプーリング処理期間の開始であり、レジスタ32に保持されている当該プーリング領域の最大値となる要素データの出力の完了時がプーリング処理期間の終了である。レジスタ32に保持されている要素データの出力の完了は、レジスタ27から出力されている要素データが、レジスタ27から取得すべき回路によって取得された時点である。この例では、メモリ部12が要素データをラッチした時点が要素データの出力の完了である。
 演算処理装置10は、演算部11に設けたK個の演算ユニット17を用いて、次階層のkチャネルのそれぞれについて1つの要素データを並列に算出するチャネル並列と称される態様で畳み込み演算処理を行う。また、演算処理装置10は、畳み込み演算処理で生成される階層がプーリング処理の対象となる場合には、次階層のkチャネルのそれぞれについて1つの要素データを算出するごとに、上述のようにプーリング領域内の複数の要素データを連続的に算出するように、当該kチャネルにおいて畳み込み領域を移動する。なお、畳み込み演算処理により生成される次階層がプーリング処理の対象とならない場合には、上記以外の態様で要素データを算出してもかまわない。
 次に上記構成の作用について、第n階層に対して畳み込み演算処理を行って第n+1階層を生成し、この第n+1階層に対してプーリング処理を行って第n+2階層を生成する場合について説明する。畳み込み演算処理では、図7及び図8に示すように、第n階層は、チャネルChA1、ChA2、・・・から構成され、この第n階層からチャネルChB1、ChB2、・・・から構成される第n+1階層を生成するものとする。
 まず、演算部11の各演算ユニット17により第n階層の1番目のチャネルChA1の畳み込み領域Raに畳み込みフィルタを適用する演算が行われる。チャネルChA1の畳み込み領域Raの9個の要素データがメモリ部12から読み出されて各演算ユニット17の畳み込み演算部21に入力される。また、1つの畳み込みフィルタの9個の荷重データが1つの畳み込み演算部21に入力されるようにして、1番目のチャネルChA1と次階層の1番目~k番目のチャネルChB1、ChB2、・・・に対応する畳み込みフィルタFA1B1、FA1B2、・・・の荷重データがメモリ部12から読み出されて各演算ユニット17の畳み込み演算部21にそれぞれ入力される。これにより、各畳み込み演算部21は、それらに入力されたチャネルChA1の畳み込み領域Raの要素データと畳み込みフィルタの荷重データとを対応するデータ同士で乗算し、それらの乗算結果の和である積和結果をレジスタ27にそれぞれ格納する(図7(A))。
 次に、各演算ユニット17により第n階層の2番目のチャネルChA2における、1番目のチャネルChA1と同一位置の畳み込み領域Raに畳み込みフィルタを適用する演算を行う。チャネルChA2における畳み込み領域Raの9個の要素データが各演算ユニット17の畳み込み演算部21に入力されるとともに、2番目のチャネルChA2と次階層の1番目~k番目のチャネルChB1、ChB2、・・・に対応する畳み込みフィルタFA2B1、FA2B2、・・・の荷重データが各演算ユニット17にそれぞれ入力される。
 各々の演算ユニット17は、例えばkチャネルの全ての要素データの算出が完了するまで、次階層の1つのチャネルに対応し、対応する次階層のチャネルは変わらない。このため、例えば、前階層の1番目のチャネルChA1を対象とした演算の際に2番目のチャネルChB1に対応する畳み込みフィルタFA1B1の荷重データが入力された演算ユニット17には、2番目のチャネルChA2の演算の際にも2番目のチャネルChB2に対応する畳み込みフィルタFA2B2の荷重データが入力される。
 上記のように要素データと荷重データとが各演算ユニット17に  入力されることにより、各畳み込み演算部21のレジスタ27には、チャネルChA1の畳み込み領域Raに畳み込みフィルタを適用した積和結果に、チャネルChA2の畳み込み領域Raに畳み込みフィルタを適用することで得られる積和結果を加算した値が格納される(図7(B))。
 以降同様に、各演算ユニット17の畳み込み演算部21により、第n階層の3番目以降の各チャネルについて、1番目のチャネルChA1と同一位置の畳み込み領域Raに畳み込みフィルタを適用する演算を順次に行う。第n階層の最終のチャネルの畳み込み領域Raに畳み込みフィルタを適用する演算が完了すると、各畳み込み演算部21のレジスタ27には、前階層の各チャネルの畳み込み領域Raに畳み込みフィルタを適用した積和結果の総和、すなわち次階層の1番目~k番目のチャネルの各々について1番目の要素データがそれぞれ格納される。このようにして得られた1番目の各要素データ(畳み込み演算結果データ)が畳み込み演算部21から出力される。
 各演算ユニット17の畳み込み演算部21は、上記のように1番目の要素データを算出した後、図8(A)に示すように、畳み込み領域Raを行方向に要素データ1個分ずらし、上記と同じ手順で前階層の1番目のチャネルChA1の畳み込み領域Raに畳み込みフィルタFA1B1、FA1B2、・・・を適用する演算を行う。この後、やはり同じ手順で、図8(B)に示すように、前階層の2番目のチャネルChA2における畳み込み領域Raに畳み込みフィルタFA2B1、FA2B2、・・・を適用する演算を畳み込み演算部21によって行う。以降同様に、前階層の3番目以降の各チャネルについて畳み込み領域Raに畳み込みフィルタを適用する演算を順次に行い、1番目~k番目のチャネルの各々について2番目の要素データを算出して畳み込み演算部21から出力する。
 2番目の要素データの算出後、畳み込み領域Raを、最初の位置から列方向に要素データ1個分ずらし、上記と同じ手順により、3番目の要素データを畳み込み演算部21により算出して出力する。3番目の要素データの算出後、畳み込み領域Raを、行方向に要素データ1個分ずらし、上記と同じ手順により、4番目の要素データを畳み込み演算部21により算出して出力する。このようにして、プーリング処理の対象となるプーリング領域の4つの要素データを連続的に算出する。
 一方、プーリング処理部22は、図9に示すように、畳み込み演算部21が畳み込み演算を行っている期間T1では、要素データの入力待ち状態である。そして、この要素データの入力待ち状態の期間T1では、パワーゲーティング制御部14によりPGスイッチ35がオフとされ、各プーリング処理部22のレジスタ32への電力供給がそれぞれ遮断されている。
 1番目の要素データ(畳み込み演算結果データ)が畳み込み演算部21から出力されるタイミングで、パワーゲーティング制御部14によりPGスイッチ35がオンとされる。これにより、各プーリング処理部22のレジスタ32に電力供給がなされデータの書き込みが可能になる。畳み込み演算部21から出力された要素データが活性化関数処理部23を介してプーリング処理部22に入力されると、この入力された要素データとレジスタ32に保持されているデータとが比較器33によって比較され、その比較結果に基づいてマルチプレクサ34が制御される。レジスタ32は、畳み込み演算が開始されるときにリセットされて初期値(値「0」)を保持しているから、入力された要素データがマルチプレクサ34によって選択されて、その要素データがレジスタ32に書き込まれる。
 上記のように1番目の要素データがレジスタ32に書き込まれると、プーリング処理部22は、畳み込み演算部21が期間T2で算出する2番目の要素データの入力待ちになる。パワーゲーティング制御部14によりPGスイッチ35がオフとされ、各プーリング処理部22のレジスタ32への電力供給が遮断される。
 畳み込み演算部21が2番目の要素データを出力するタイミングで、パワーゲーティング制御部14によりPGスイッチ35がオンとされ、レジスタ32への電力供給がなされる。畳み込み演算部21から出力された2番目の要素データは、レジスタ32に保持されている要素データと比較器33によって比較され、その比較結果に基づいてマルチプレクサ34が制御される。レジスタ32は、不揮発性であるため、電力供給が再開されることによって、電源遮断前に保持していたデータを出力する。このため、畳み込み演算部21から出力された2番目の要素データは、比較器33によってレジスタ32に保持されている要素データと比較され、その比較結果に基づいてマルチプレクサ34が制御される。
 レジスタ32には、1番目の要素データが保持されているから、1番目の要素データと2番目の要素データとが比較器33によって比較される。この比較によって、それらの要素データのうち値の大きな要素データがマルチプレクサ34で選択され、その選択された要素データがレジスタ32に書き込まれる。このようにレジスタ32に要素データが新たに書き込まれると、畳み込み演算部21が期間T3で算出する3番目の要素データ待ちとなって、PGスイッチ35がオフとされ、各プーリング処理部22のレジスタ32への電力供給が遮断される。
 畳み込み演算部21が3番目の要素データを出力するタイミングで、パワーゲーティング制御部14によりPGスイッチ35がオンとされ、レジスタ32への電力供給がなされる。そして、3番目の要素データとレジスタ32に保持されている要素データとが比較器33によって比較される。それらの要素データのうち値の大きな要素データがマルチプレクサ34で選択されて、選択された要素データがレジスタ32に書き込まれる。レジスタ32に要素データが新たに書き込まれると、畳み込み演算部21が期間T4で算出する4番目の要素データ待ちとなって、PGスイッチ35がオフとされ、各プーリング処理部22のレジスタ32への電力供給が遮断される。
 畳み込み演算部21が4番目の要素データを出力するタイミングで、PGスイッチ35がオンとされ、レジスタ32への電力供給がなされる。そして、4番目の要素データとレジスタ32に保持されている要素データとが比較され、それらの要素データのうち値の大きな要素データが選択されてレジスタ32に書き込まれる。
 これにより、レジスタ32には、第n+1階層のプーリング領域内の1番目から4番目の要素データのうち最も値が大きい要素データが保持され、このレジスタ32に保持されている要素データが第n+2階層の要素データ(プーリングデータ)としてプーリング処理部22から出力される。このプーリング処理部22からの要素データが例えばメモリ部12にラッチされると、すなわち出力が完了すると、次のプーリング領域の1番目の要素データの入力待ちとなり、PGスイッチ35がオフとされレジスタ32への電力供給が遮断される。
 畳み込み演算部21は、4番目の要素データを出力した後、畳み込み領域Raをさらに移動して、上記と同じ手順で、次のプーリング領域のための要素データを算出する。また、プーリング処理部22は、1番目~4番目の要素データが出力されるごとに要素データとレジスタ32に保持しているデータとを比較することで、新たなプーリング領域内の最も値が大きい要素データをレジスタ32に保持し、その要素データを第n+2階層の要素データとして出力する。そして、プーリング処理部22が、上記のように要素データの入力待ちの間は、PGスイッチ35がオフとされレジスタ32への電力供給が遮断される。
 上記手順を繰り返し行うことにより、第n+2階層の1番目~k番目のチャネルの各々について全ての要素データを算出する。第n+2階層にk+1番目以降のチャネルがある場合には、上記と同じ手順を繰り返すことにより、全てのチャネルの各々について全ての要素データを算出する。なお、プーリングデータを算出するチャネル数が演算ユニット17の個数よりも少ない場合、一部の演算ユニット17で演算を行わないが、このような場合には、演算を行わない演算ユニット17内のレジスタ32への電力供給を遮断してもよい。
 上記のようにして演算処理装置10は、プーリング処理部22によってプーリング処理を行うが、プーリング処理部22が要素データの入力待ちとなっている間では、レジスタ32の電力供給を遮断するようにパワーゲーティングしている。このため、要素データの入力待ち状態におけるレジスタ32のリーク電流が抑制されており、演算処理装置10の消費電力が小さい。
 レジスタ32を、磁気トンネル接合素子を用いた不揮発性フリップフロップで構成した場合(以下、不揮発性構成という)の消費電力(動作時消費電力)の、不揮発性ではない通常のフリップフロップで構成した場合(以下、通常構成という)における消費電力(動作時消費電力+待機時消費電力)に対する計算上の比率は、例えば0.22とすることができる。この比率の計算では、不揮発性構成の動作時消費電力を通常構成の10倍とし、通常構成を「待機時消費電力:動作時消費電力」が「30:110」とし、演算処理装置10におけるレジスタ32の動作サイクル数の待機サイクル数に対する比を「0.006」として計算している。
 図10は、プーリング領域の要素データの平均値を出力する平均値プーリング処理を行うようにプーリング処理部22を構成した例を示す。プーリング処理部22は、プーリング演算回路31と、レジスタ42とで構成され、プーリング演算回路31は、加算器43、2ビットシフタ44で構成され、レジスタ42と協働してプーリング領域の要素データの平均値を算出する。加算器43は、レジスタ42に保持されているデータと入力される畳み込み演算結果データである要素データとを加算する。レジスタ42は、不揮発性のプーリング用記憶回路であり、加算器43の加算結果を保持する。2ビットシフタ44は、ビットシフト回路であり、除算器として設けられている。2ビットシフタ44により、プーリング領域の最終の要素データまでを加算器43で加算した加算結果を2ビットシフトすることで、プーリング領域の要素データの個数(4個)で除した商を算出する。
 プーリング処理部22は、上記の構成により、プーリング領域の4個の要素データが入力されるごとに、2ビットシフタ44からのシフト演算の結果がプーリング領域の要素データの平均値である要素データ(プーリングデータ)として出力する。
 レジスタ42は、レジスタ32(図6参照)と同様に不揮発性とされており、PGスイッチ35のオン・オフにより、パワーゲーティングされる。したがって、プーリング処理期間中において、プーリング処理部22が畳み込み演算部21からの要素データの入力待ちとなっている間すなわちプーリング処理部22が処理を行っていない間は、PGスイッチ35がオフとされて電力供給が遮断される。これにより、演算処理装置10の消費電力を低減している。
 図11に示す例のように、加算器43の前段に所定の重みを乗算する乗算器45を設け、畳み込み演算結果として入力される要素データに、要素データの位置に応じた重み付けを行ってもよい。重みとしては、例えば二次元ガウシアンにしたがった重みとすることができる。
 図12は、プーリング用記憶回路としてのレジスタ部51を多段に設けたバッファ51aで構成したプーリング処理部22の例を示している。この例におけるプーリング処理部22は、レジスタ部51の他、比較器52とセレクタとしてのマルチプレクサ53とを有する。畳み込み演算部21からの要素データ(畳み込み演算結果データ)は、レジスタ部51に入力される。
 なお、この例では、プーリング領域を2行2列とする。また、プーリング処理の対象となる階層のチャネルについて、畳み込み演算部21が、1行目から順番に各行について要素データを算出し、各々の行については、行の一端から他端に向けて順番に要素データを算出する。また、プーリング処理の対象となる階層のチャネルの列数は偶数であるとする。
 各バッファ51aは、データの各ビットがパラレルに入力され、例えばクロックに同期して入力されるデータを保持し、保持しているデータをパラレルに出力するものである。例えば、このようなバッファ51aとしては、並列入力並列出力形(PIPO:Parallel-In, Parallel-Out)のシフトレジスタを用いることができる。プーリング処理の対象となる階層の各チャネルの列数(1行の要素データの個数)をY(Yは、2以上の偶数)としたときに、レジスタ部51は、(Y+2)段にバッファ51aが接続されている。
 各バッファ51aは、前段の出力が後段のバッファ51aに入力されるように多段に接続されている。すなわち、1段目のバッファ51aに畳み込み演算部21からの要素データが活性化関数処理部23を介して入力され、2段目以降のバッファ51aは、前段のバッファ51aからの出力が後段のバッファ51aに入力されるように接続されている。各バッファ51aには、1段目のバッファ51aへの要素データの入力に同期して、クロックが入力される。これにより、レジスタ部51に要素データが入力されるごとに、1段目のバッファ51aには畳み込み演算部21からの要素データが保持され、2段目以降のバッファ51aは前段のバッファ51aから出力されている要素データを保持する。
 プーリング演算回路31を構成する比較器52及びマルチプレクサ53には、1段目、2段目、Y+1段目及びY+2段目の各バッファ51aからの要素データがデータ群として入力される。比較器52は、入力される4つの要素データを比較して、最も大きな値の要素データを選択して出力させるための選択信号を出力する。マルチプレクサ53は、選択信号に基づき入力されている4つの要素データのうちの1つの要素データを選択して出力する。
 プーリング演算回路31は、コントローラ15の制御により、1段目、2段目、Y+1段目及びY+2段目の各バッファ51aが出力(保持)している4個の要素データが1つのプーリング領域内の要素データの組み合わせとなるときに比較器52による比較とマルチプレクサ53による選択とを行う。具体的には、mを1以上の整数として、(2m-1)・Y番目の要素データが入力された後、2m・Y番目の要素データが入力されるまでの間、2個の要素データが入力されるごとに、比較器52による比較とマルチプレクサ53による選択とを行う。
 上記のようにプーリング処理部22を構成することにより、プーリング処理の対象のチャネルを重複することなく複数の2行2列に区分した各プーリング領域の最大値となる要素データがマルチプレクサ53によって選択されて、プーリングデータとして出力される。
 レジスタ部51は、不揮発性の記憶回路として構成される。すなわち、各バッファ51aが不揮発性とされている。他の例と同様に、バッファ51aを、磁気トンネル接合素子を用いた複数の不揮発性フリップフロップ(NV-FF)で構成することが好ましい。レジスタ部51は、PGスイッチ35を介して駆動電圧(VDD)が印加されており、プーリング処理期間中において、プーリング処理部22が畳み込み演算部21からの要素データの入力待ちとなっている間では、PGスイッチ35をオフとして電力消費を低減する。すなわち、1段目のバッファ51aが畳み込み演算部21からの要素データが入力されて格納し、同時に2段目以降の各バッファ51aが前段のバッファ51aからの要素データが入力されて格納するとき、またプーリングデータを出力するときには、比較器52による要素データの比較とマルチプレクサ53による選択を行ってマルチプレクサ53からの出力が完了するまでの間は、PGスイッチ35がオンとされ、それ以外のプーリング処理部22が動作する必要がない間はPGスイッチ35がオフとされてレジスタ部51への電力供給が遮断される。
 10 演算処理装置
 14 パワーゲーティング制御部
 21 畳み込み演算部
 22 プーリング処理部
 32、42 レジスタ
 33 比較器
 34 マルチプレクサ
 51 レジスタ部
 51a バッファ
 52 比較器
 53 マルチプレクサ

 

Claims (14)

  1.  畳み込み演算結果データを順次に出力する畳み込み演算部と、
     プーリング演算回路及び不揮発性のプーリング用記憶回路を有し、前記プーリング用記憶回路が前記畳み込み演算結果データまたは前記プーリング演算回路の演算結果を保持データとして保持し、前記畳み込み演算部からの前記畳み込み演算結果データが入力されるごとに、前記プーリング演算回路が前記保持データを用いてプーリング領域にプーリング処理を行ったプーリングデータを算出して出力するプーリング処理部と、
     前記畳み込み演算部からの前記畳み込み演算結果データの入力待ちの間における前記プーリング用記憶回路への電力供給を遮断するパワーゲーティング部と
     を備えることを特徴とする演算処理装置。
  2.  前記プーリング演算回路は、前記畳み込み演算部からの前記畳み込み演算結果データと前記保持データとを比較する比較器と、前記畳み込み演算部からの前記畳み込み演算結果データと前記保持データとが入力され、前記比較器の比較結果に基づき、入力されるデータのうちの値の大きなデータを選択して出力するセレクタとを有し、
     前記プーリング用記憶回路は、前記プーリング演算回路の出力するデータを新たな前記保持データとして保持し、
     前記プーリング処理部は、前記プーリング演算回路への前記プーリング領域の各前記畳み込み演算結果データの入力により前記プーリング用記憶回路が保持する前記保持データをプーリングデータとして出力する
     ことを特徴とする請求項1に記載の演算処理装置。
  3.  前記プーリング演算回路は、前記畳み込み演算部からの前記畳み込み演算結果データと前記保持データとを加算する加算器と、前記加算器の加算結果を前記プーリング領域内の前記畳み込み演算結果データの個数で除算する除算器とを有し、
     前記プーリング用記憶回路は、前記加算器の加算結果を新たな前記保持データとして保持し、
     前記プーリング処理部は、前記プーリング演算回路への前記プーリング領域の各前記畳み込み演算結果データの入力により得られる前記加算器の加算結果を前記除算器で除算したデータをプーリングデータとして出力する
     ことを特徴とする請求項1に記載の演算処理装置。
  4.  前記プーリング演算回路は、前記畳み込み演算部からの前記畳み込み演算結果データに所定の重みを乗算して重み付けする乗算器と、前記乗算器からの乗算結果と前記保持データとを加算する加算器と、前記加算器の加算結果を前記プーリング領域内の前記畳み込み演算結果データの個数で除算する除算器とを有し、
     前記プーリング用記憶回路は、前記加算器の加算結果を新たな前記保持データとして保持し、
     前記プーリング処理部は、前記プーリング演算回路への前記プーリング領域の各前記畳み込み演算結果データの入力により得られる前記加算器の加算結果を前記除算器で除算したデータをプーリングデータとして出力する
     ことを特徴とする請求項1に記載の演算処理装置。
  5.  前記除算器は、前記プーリング領域の各前記畳み込み演算結果データの個数に応じたビット数でデータをシフトするビットシフト回路であることを特徴とする請求項3または4に記載の演算処理装置。
  6.  複数の前記畳み込み演算結果データが2次元配列されたチャネル上のp行q列の前記プーリング領域内の前記畳み込み演算結果データが前記プーリング処理部に入力されることを特徴とする請求項1ないし5のいずれか1項に記載の演算処理装置。
  7.  前記プーリング領域は、2行2列であることを特徴とする請求項6に記載の演算処理装置。
  8.  前記プーリング用記憶回路は、不揮発性のレジスタにより構成されていることを特徴とする請求項1ないし7のいずれか1項に記載の演算処理装置。
  9.  前記レジスタは、不揮発性のフリップフロップにより構成されることを特徴とする請求項8に記載の演算処理装置。
  10.  前記畳み込み演算部は、複数の前記畳み込み演算結果データが2次元配列されるチャネルの行ごとに前記畳み込み演算結果データを前記チャネルの行方向に順次に出力し、
     前記プーリング処理部は、複数の前記畳み込み演算結果データを前記チャネルの2行2列ごとに区分した各プーリング領域について最大値となる前記畳み込み演算結果データをプーリングデータとして出力し、
     前記プーリング用記憶回路は、前記チャネルの列数をY(Yは2以上の偶数)として、Y+2段に接続された不揮発性のバッファを有し、前記畳み込み演算部からの前記畳み込み演算結果データが1段目のバッファに入力されるごとに、1段目のバッファが入力される前記畳み込み演算結果データを保持して出力し、2段目以降の各バッファが前段のバッファから出力されている前記畳み込み演算結果データを保持して出力し、
     前記プーリング演算回路は、1段目、2段目、Y+1段目及びY+2段目の各バッファからの各前記畳み込み演算結果データからなるデータ群が入力され、前記データ群の各前記畳み込み演算結果データを比較する比較器と、前記比較器の比較結果に基づいて前記データ群のうちで最大値となる前記畳み込み演算結果データを選択して出力するセレクタとを有し、
     前記プーリング処理部は、前記データ群の各前記畳み込み演算結果データが1つの前記プーリング領域内の前記畳み込み演算結果データの組み合わせとなるときの前記セレクタから出力されている前記畳み込み演算結果データをプーリングデータとして出力する
     ことを特徴とする請求項1に記載の演算処理装置。
  11.  前記バッファは、不揮発性の並列入力並列出力形のシフトレジスタであることを特徴とする請求項10に記載の演算処理装置。
  12.  前記シフトレジスタは、不揮発性のフリップフロップにより構成されることを特徴とする請求項11に記載の演算処理装置。
  13.  前記不揮発性のフリップフロップは、磁気トンネル接合素子を含む回路であることを特徴とする請求項12に記載の演算処理装置。
  14.  複数の畳み込み演算結果データが2次元配列されるチャネルの行ごとに前記畳み込み演算結果データを前記チャネルの行方向に順次に出力する畳み込み演算部と、
     プーリング演算回路及び不揮発性のプーリング用記憶回路を有し、複数の前記畳み込み演算結果データを前記チャネルの2行2列ごとに区分した各プーリング領域について最大値となる前記畳み込み演算結果データをプーリングデータとして出力するプーリング処理部と
     を備え、
     前記プーリング用記憶回路は、前記チャネルの列数をY(Yは2以上の偶数)として、Y+2段に接続されたバッファを有し、前記畳み込み演算部からの前記畳み込み演算結果データが1段目のバッファに入力されるごとに、1段目のバッファが入力される前記畳み込み演算結果データを保持して出力し、2段目以降の各バッファが前段のバッファから出力されている前記畳み込み演算結果データを保持して出力し、
     前記プーリング演算回路は、1段目、2段目、Y+1段目及びY+2段目の各バッファからの各前記畳み込み演算結果データからなるデータ群が入力され、前記データ群の各前記畳み込み演算結果データを比較する比較器と、前記比較器の比較結果に基づいて前記データ群のうちで最大値となる前記畳み込み演算結果データを選択して出力するセレクタとを有し、
     前記プーリング処理部は、前記データ群の各前記畳み込み演算結果データが1つの前記プーリング領域内の前記畳み込み演算結果データの組み合わせとなるときの前記セレクタから出力されている前記畳み込み演算結果データをプーリングデータとして出力する
     ことを特徴とする演算処理装置。

     
PCT/JP2022/023990 2021-06-18 2022-06-15 演算処理装置 WO2022265044A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023530377A JPWO2022265044A1 (ja) 2021-06-18 2022-06-15
US18/286,638 US20240126616A1 (en) 2021-06-18 2022-06-15 Computation processing device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021101996 2021-06-18
JP2021-101996 2021-06-18

Publications (1)

Publication Number Publication Date
WO2022265044A1 true WO2022265044A1 (ja) 2022-12-22

Family

ID=84527110

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/023990 WO2022265044A1 (ja) 2021-06-18 2022-06-15 演算処理装置

Country Status (3)

Country Link
US (1) US20240126616A1 (ja)
JP (1) JPWO2022265044A1 (ja)
WO (1) WO2022265044A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018018569A (ja) * 2016-07-14 2018-02-01 株式会社半導体エネルギー研究所 半導体装置、表示システム及び電子機器
WO2018189620A1 (ja) * 2017-04-14 2018-10-18 株式会社半導体エネルギー研究所 ニューラルネットワーク回路
WO2019189895A1 (ja) * 2018-03-30 2019-10-03 国立大学法人東北大学 ニューラルネットワーク回路装置
WO2020161845A1 (ja) * 2019-02-06 2020-08-13 国立大学法人東北大学 クラスタリング装置及びクラスタリング方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018018569A (ja) * 2016-07-14 2018-02-01 株式会社半導体エネルギー研究所 半導体装置、表示システム及び電子機器
WO2018189620A1 (ja) * 2017-04-14 2018-10-18 株式会社半導体エネルギー研究所 ニューラルネットワーク回路
WO2019189895A1 (ja) * 2018-03-30 2019-10-03 国立大学法人東北大学 ニューラルネットワーク回路装置
WO2020161845A1 (ja) * 2019-02-06 2020-08-13 国立大学法人東北大学 クラスタリング装置及びクラスタリング方法

Also Published As

Publication number Publication date
JPWO2022265044A1 (ja) 2022-12-22
US20240126616A1 (en) 2024-04-18

Similar Documents

Publication Publication Date Title
CN109034373B (zh) 卷积神经网络的并行处理器及处理方法
JP6945986B2 (ja) 演算回路、その制御方法及びプログラム
US10846591B2 (en) Configurable and programmable multi-core architecture with a specialized instruction set for embedded application based on neural networks
US11487845B2 (en) Convolutional operation device with dimensional conversion
US4601006A (en) Architecture for two dimensional fast fourier transform
KR20190138815A (ko) 동형 암호화에 의한 보안 계산 가속화를 위한 동형 처리 유닛(hpu)
US5285524A (en) Neural network with daisy chain control
KR20220088943A (ko) 멤리스터 기반 신경망 병렬 가속 방법, 프로세서 및 장치
WO2020172951A1 (zh) 可软件定义存算一体芯片及其软件定义方法
JPH04293151A (ja) 並列データ処理方式
US11966833B2 (en) Accelerating neural networks in hardware using interconnected crossbars
CN109144469B (zh) 流水线结构神经网络矩阵运算架构及方法
CN112151095A (zh) 存算一体芯片、存储单元阵列结构
JPH05233473A (ja) 半導体メモリテストシステム
US10884736B1 (en) Method and apparatus for a low energy programmable vector processing unit for neural networks backend processing
US5854760A (en) Two-dimensional PE array, content addressable memory, data transfer method and mathematical morphology processing method
WO2022265044A1 (ja) 演算処理装置
CN114418080A (zh) 存算一体运算方法、忆阻器神经网络芯片及存储介质
KR20210022455A (ko) 심층 신경망 학습 장치 및 그 방법
CN112712457A (zh) 数据处理方法以及人工智能处理器
US9417841B2 (en) Reconfigurable sorter and method of sorting
JP7435602B2 (ja) 演算装置および演算システム
CN110673824A (zh) 矩阵向量乘电路以及循环神经网络硬件加速器
WO2020093669A1 (en) Convolution block array for implementing neural network application and method using the same, and convolution block circuit
CN115374395A (zh) 一种通过算法控制单元进行调度计算的硬件结构

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22825032

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023530377

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 18286638

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22825032

Country of ref document: EP

Kind code of ref document: A1