Data processing device, data processing method, data processing system, and sensor system

By dividing memory into banks with status registers and power management units, the data processing device optimally manages power usage during DNN processing, addressing the high memory access power consumption issue in edge devices and enhancing the efficiency of low-power edge devices.

WO2024185484A1PCT designated stage expired Publication Date: 2024-09-12SONY GROUP CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/005924
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-09
Filing Date
2024-02-20
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Current technologies lack an effective method to reduce power consumption, particularly in memory access, for Deep Neural Networks (DNN) processing in edge devices, where memory access power consumption accounts for 80% to 90%, hindering the development of low-power edge devices.

Method used

A data processing device and system that divides memory into multiple banks, each with a status register and power management unit, which transitions unused memory banks to an off state or low power consumption mode based on usage status information, optimizing power usage during DNN processing.

Benefits of technology

This approach significantly reduces memory power consumption by turning off or putting unused memory banks into a low power state, thereby minimizing leakage and dynamic power usage, while maintaining data accessibility when needed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024005924_12092024_PF_FP_ABST
    Figure JP2024005924_12092024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing device, a data processing method, a data processing system, and a sensor system which can reduce the power consumption of a memory. Provided is a data processing device which comprises: a memory which is divided into a plurality of memory banks and stores data used in DNN processing; a holding unit which is provided for each of the memory banks and holds use state information indicating a use state of data stored for each of memory words; and a power management unit which transitions, on the basis of the held use state information, a power supply of a memory bank in which data stored in each of all the memory words has been used from an ON state to an OFF state or a low power consumption state in which operation is performed with lower power than that in the ON state. The present disclosure can be applied to, for example, a sensor system including image sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing device, data processing method, data processing system, and sensor system

[0001] The present disclosure relates to a data processing device, a data processing method, a data processing system, and a sensor system, and more particularly to a data processing device, a data processing method, a data processing system, and a sensor system that are capable of reducing memory power consumption.

[0002] With the spread of IoT (Internet of Things), it is expected that various edge devices, including sensors, will be equipped with AI functions for extracting meaningful information from large amounts of sensor data, and DNN (Deep Neural Network) processing to achieve this (see, for example, Patent Document 1).

[0003] Since edge devices have very limited power budgets, it is essential to reduce the power consumption of DNN processing. The power consumption in DNN processing is dominated by the power consumption for memory access, which can sometimes account for 80% to 90%. To realize and popularize low-power edge devices, it is necessary to reduce the power consumption of memory access in DNN processing.

[0004] Japanese Patent Publication No. 2022-041873

[0005] However, currently, there is no established technology for reducing the power consumption of memory accesses in DNN processing, and there is a need to propose a technology for reducing memory power consumption.

[0006] The present disclosure has been made in view of these circumstances, and aims to make it possible to reduce the power consumption of a memory.

[0007] A data processing device according to one aspect of the present disclosure comprises a memory divided into multiple memory banks for storing data used in DNN processing, a storage unit provided for each of the memory banks for storing usage status information indicating the usage status of the data stored for each memory word, and a power management unit that transitions the power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low-power consumption state that operates with less power than the on state, based on the stored usage status information.

[0008] A data processing method according to one aspect of the present disclosure is a data processing method in which a data processing device divides a memory that stores data used in DNN processing into a plurality of memory banks, and for each memory bank, retains usage status information indicating the usage status of the data stored in each memory word, and, based on the retained usage status information, transitions the power supply of a memory bank that has finished using all of the data stored in each memory word from an on state to an off state or a low-power consumption state that operates with less power than the on state.

[0009] A data processing system according to one aspect of the present disclosure comprises a processor, a buffer for storing data from the outside, and a data processing device controlled by the processor and receiving the data stored in the buffer. The data processing device comprises a memory divided into a plurality of memory banks for storing data used in DNN processing, a storage unit provided for each memory bank for storing usage status information indicating the usage status of the data stored for each memory word, and a power management unit that transitions the power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low-power consumption state that operates with less power than the on state, based on the stored usage status information.

[0010] A sensor system according to one aspect of the present disclosure comprises a sensor and a data processing system that processes data from the sensor, the data processing system comprising a processor, a buffer that stores the data from the sensor, and a data processing device controlled by the processor and into which the data stored in the buffer is input, the data processing device having a memory divided into multiple memory banks that stores data to be used in DNN processing, a storage unit provided for each memory bank that stores usage status information indicating the usage status of the data stored for each memory word, and a power management unit that, based on the stored usage status information, transitions the power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low-power consumption state that operates with less power than the on state.

[0011] In a data processing device, a data processing method, a data processing system, and a sensor system according to one aspect of the present disclosure, when a memory for storing data used in DNN processing is divided into a plurality of memory banks, usage status information indicating the usage status of the data stored in each memory word is retained for each memory bank, and based on the retained usage status information, the power supply of a memory bank that has finished using all of the data stored in each memory word is transitioned from an on state to an off state or a low-power consumption state that operates with less power than the on state.

[0012] The data processing device, data processing system, and sensor system according to one aspect of the present disclosure may be independent devices, or may be internal blocks constituting a single device.

[0013] 13 is a diagram explaining four dimensions used in convolution calculations. 14 is a diagram explaining the configuration of a sensor system equipped with a DNN accelerator. 15 is a diagram explaining a technique for reducing memory power consumption in the DNN accelerator of FIG. 2. 16 is a diagram explaining an example configuration of an embodiment of a sensor system to which the present disclosure is applied. 17 is a diagram explaining a technique for reducing memory power consumption in the DNN accelerator of FIG. 4. 18 is a diagram explaining an example configuration of a memory in the DNN accelerator of FIG. 4. 19 is a diagram showing the order of data use during convolution corresponding to the memory configuration of FIG. 20. 21 is a diagram showing the relationship between the value of the status register, instructions from the PMU, and the power supply state of the memory bank for each step of convolution. 22 is a diagram showing the control flow of an AGU. 23 is a diagram showing the control flow of a PMU. 24 is a diagram explaining another example of the memory configuration in the DNN accelerator of FIG. 21. 25 is a diagram explaining another example of memory power control in the DNN accelerator of FIG. 22. 26 is a diagram explaining yet another example of the memory configuration in the DNN accelerator of FIG. 23. 27 is a diagram showing the order of data use during convolution corresponding to the memory configuration of FIG. 24.

[0014] <Basic structure> Typical processing layers of a feedforward DNN (Deep Neural Network) are the convolution layer (hereinafter referred to as the convolution layer) and the fully connected layer (hereinafter referred to as the FC layer). The FC layer can be said to be a special case of the convolution layer. The basic calculation of the convolution layer is the multiply-accumulate operation (hereinafter referred to as MAC (Multiply-accumulate)). The data handled in the calculation of the convolution layer can have a maximum of four dimensions.

[0015] Figure 1 is a diagram for explaining the four dimensions used in convolution calculations. In Figure 1, the dimensions of the symbols W, H, C, M, and N are explained and examples of their use are as follows:

[0016] W represents the width of the input feature map, which is the input feature map. W corresponds to the first-dimensional data of the image sensor and is used, for example, for the width of the image frame. H represents the height of the input feature map. H corresponds to the second-dimensional data of the image sensor and is used, for example, for the height of the image frame.

[0017] C represents the number of channels in the input feature map and the number of channels in the weight. When convolution is performed on the R, G, and B directions of an image frame, or when convolution processing is performed on data from multiple image sensors, the dimension of the sum of the convolution layer is increased by one and defined as a channel.

[0018] M represents the number of channels of the output feature map, the number of filters, and the number of biases. This dimension is used to apply the above-mentioned concept of channels between convolution layers. It corresponds to C in the next layer. N represents the number of batches of input feature maps and the number of batches of output feature maps. This dimension is defined when the input data is divided into multiple groups and processed in parallel using the same coefficients.

[0019] Although five parameters, W, H, C, M, and N, are shown here, if we focus on individual data, the maximum dimension is 4. For example, when we focus on the input feature map, the four parameters, W, H, C, and N, become the target, resulting in four dimensions.

[0020] In addition to the five parameters mentioned above, Fig. 1 also shows the width X and height Y of the output feature map, and the width w and height y of the weight as parameters of the convolution layer. Furthermore, although not shown in Fig. 1, the convolution layer also includes a width-direction slide sw and a height-direction slide sh that indicate the interval by which the weight is shifted within the input feature map.

[0021] The convolution can be defined as follows using the above parameters:

[0022]

[0023] Each pixel in the output feature map is the calculation result of the convolution layer processing. The calculation does not necessarily have to be performed in the order of i in Equation (1). For example, in the case of i in Equation (1), the calculation result is first output pixel by pixel along the X dimension of the output feature map. Alternatively, the calculation result may be first output pixel by pixel along the channel M direction of the output feature map. Regardless of the order in which the calculation loop is performed, there is a rule in the order in which the data required for the calculation is accessed from memory.

[0024] The output feature map is stored as the value obtained by applying an activation function to the MAC operation result of the convolution, and is therefore also referred to as activation. Furthermore, since this output feature map becomes the input feature map of the next layer, the input feature map and output feature map together are also referred to as activation.

[0025] Fig. 2 shows the configuration of a sensor system equipped with a DNN accelerator. In Fig. 2, the sensor system 10 is composed of a stack of an image sensor 11 that captures an image of a subject and outputs pixel signals, and a logic chip 12 that has a subsystem 21 for DNN processing.

[0026] The pixel signals generated by the image sensor 11 are processed by an ISP (Image Signal Processor) and then stored in a frame buffer 34 in the subsystem 21. The frame buffer 34 is composed of a static random access memory (SRAM). The weight values ​​required for DNN processing are loaded in advance into a weight memory 43 of the DNN accelerator 32 by a central processing unit (CPU) 31. If the chip application is fixed, the weight values ​​are loaded into the weight memory 43 during the chip manufacturing stage. In the former case, the weight memory 43 is composed of an SRAM, and in the latter case, it is composed of a read-only memory (ROM).

[0027] The necessary portion of the input feature map that the DNN accelerator 32 can process at one time is loaded by the CPU 31 into the work memory 44 of the DNN accelerator 32. The work memory 44 is configured with SRAM. In this state, the CPU 31 controls the AGU / DMAC 45 and MAC calculation unit 46 according to pre-set configuration information via the control I / F 41 and the control unit 42, thereby performing the MAC calculation of the DNN (DNN processing).

[0028] The AGU / DMAC 45 is composed of an AGU (Address Generation Unit) circuit that generates addresses for reading and writing data to memory, and a DMAC (Direct Memory Access Controller) circuit that controls memory access based on the generated addresses. The MAC calculation unit 46 is composed of an ALU (Arithmetic Logic Unit) that performs MAC calculations. The AGU / DMAC 45 reads operands to be input to the MAC calculation unit 46 from the wait memory 43 or work memory 44, and these processes are repeated until the MAC calculation is completed.

[0029] Partial sums of intermediate results of multiple MAC calculations are also stored in the work memory 44. In the subsystem 21, if other processing is required before or after the DNN processing, the pre-processing unit 35 and the post-processing unit 36 ​​can perform the necessary processing, respectively, under control of the CPU 31 via the bus 33.

[0030] 2, the power supply of the entire system is often kept on even when the DNN accelerator 32 is not in use. In this case, even when there is no access to the weight memory 43 or the work memory 44, a leakage current flows, consuming unnecessary power.

[0031] To reduce such unnecessary power consumption, in the sensor system 10 of Figure 2, when the DNN accelerator 32 is not in use, the CPU 31 may use software to turn off the power supply to the wait memory 43 and the work memory 44 or to put them in a low-power state. For example, the low-power state (low-power mode) for the work memory 44 is a retention state (data retention mode). However, this method does not provide a power reduction effect when the DNN accelerator 32 is in use.

[0032] Figure 3 is a diagram illustrating a method for reducing memory power consumption in the DNN accelerator 32 of Figure 2. Figure 3 schematically illustrates the relationship between one frame of an activation being processed and the allocation of activation data in the work memory 44, with data for one pixel of the activation (frame) being stored in each rectangular area of ​​the work memory 44 (P1, P2, ... in the figure). Also, frame A1 indicates the status of access to the work memory 44 at a certain time during DNN processing, and frame B1 indicates the position of the data to be accessed in the activation (frame).

[0033] As shown in Figure 3, at a certain time during DNN processing, only a portion of the work memory 44 shown in box A1 is used, but the power to the entire memory, including the unused portion, is always on, resulting in unnecessary power consumption. On the other hand, when DNN processing is not being performed, the power to the entire memory is turned off or put into a low-power consumption state using a switch. Note that while Figure 3 illustrates the work memory 44, the same applies to the weight memory 43.

[0034] By taking into consideration the regularity of the order of accesses to the weight memory 43 and the work memory 44 in DNN processing, it is possible to control the memory power supply at a finer granularity and maximize the power reduction effect. In this disclosure, we propose a method that utilizes such regularity of memory access to reduce memory power consumption in accordance with memory access in DNN processing.

[0035] <Method of the Present Disclosure> Fig. 4 is a diagram showing an example configuration of an embodiment of a sensor system to which the present disclosure is applied. In Fig. 4, the sensor system 100 is configured by stacking an image sensor 111 and a logic chip 112. For example, the sensor system 100 is configured as an edge device such as a sensor device (sensor apparatus). The logic chip 112 has a subsystem 121 for DNN processing.

[0036] The subsystem 121 includes a CPU 131, a DNN accelerator 132, a bus 133, a frame buffer 134, a pre-processing unit 135, and a post-processing unit 136. The DNN accelerator 132 includes a control I / F 141, a control unit 142, a weight memory 143, a work memory 144, an AGU / DMAC 145, and a MAC calculation unit 146.

[0037] The CPU 131 controls the operations of the DNN accelerator 132, the frame buffer 134, the pre-processing unit 135, and the post-processing unit 136 via the bus 133. The pixel signals generated by the image sensor 111 are stored in the frame buffer 134 on a frame-by-frame basis after undergoing ISP processing. The CPU 131 loads weight values ​​required for DNN processing into the weight memory 143 via the control I / F 141.

[0038] The CPU 131 loads the data of the necessary part of the input feature map, which can be processed at one time by the DNN accelerator 132, from among the activation frames stored in the frame buffer 134 into the work memory 144. If other processing is required before the DNN processing, the preprocessing unit 135 performs the necessary processing under the control of the CPU 131.

[0039] With weight values ​​loaded into the weight memory 143 and the necessary data of the input feature map loaded into the work memory 144, the CPU 131 controls the control unit 142 via the control I / F 141, and the DNN MAC calculation (DNN processing) is performed by the AGU / DMAC 145 and the MAC calculation unit 146 according to the pre-set configuration information.

[0040] The AGU / DMAC 145 is composed of an AGU circuit (AGU 145A in FIG. 6 , which will be described later) and a DMAC circuit. The MAC calculation unit 146 is composed of an ALU. The AGU / DMAC 145 reads operands to be input to the MAC calculation unit 146 from the weight memory 143 or work memory 144, and these processes are repeated until the MAC calculation is completed. The work memory 144 also stores partial sums of intermediate results of multiple MAC calculations. An output feature map obtained by such MAC calculations is output. Note that if other processing is required after the DNN processing, the post-processing unit 136 performs the necessary processing under control of the CPU 131.

[0041] In the DNN accelerator 132 configured as described above, the work memory 144 is divided into multiple memory banks, and each memory bank holds and manages a flag indicating whether the use of data stored for each memory word has ended. Depending on the status of the held flag, the power supply of a memory bank that has finished using all of the data stored for each memory word is transitioned from an on state to an off state or a low-power consumption state. A memory word is a unit of data that can be read in one memory access cycle (one-cycle read unit). Data is stored in each memory word in a memory bank. The data stored in each memory word in a memory bank may also be considered a memory word or data stored in a memory word. The flag can also be considered usage status information indicating the usage status of the data stored for each memory word. In FIG. 4, the work memory 144 is divided into divided memories 144-0 to 144-k (k: an integer greater than or equal to 1) according to the number of divisions of the memory bank.

[0042] 4, divided memory 144-0 corresponds to memory bank Bank0. Divided memory 144-0 has memory array 151-0 corresponding to the memory bank, status register 152-0 configured with a flip-flop circuit that holds one bit of information for each memory word, and PMU (Power Management Unit) 153-0 configured with dedicated hardware for controlling the power supply of the memory bank. Status register 152-0 and PMU 153-0 can also be considered control peripheral circuits provided for memory array 151-0.

[0043] The status register 152-0 holds a flag indicating whether use of each memory word (or the data stored therein) has ended, in accordance with the sideband signal input from the AGU / DMAC 145. When use of a memory word has ended, the status register 152-0 holds a flag of done (for example, 1) for that memory word, indicating that the memory word will no longer be used. Furthermore, when use of a memory word has not ended, the status register 152-0 holds a flag of use (for example, 0) for that memory word. When the flags for all memory words in the status register 152-0 become done (1), the PMU 153-0 transitions the power supply of the memory bank Bank0 (the power supply of the memory array 151-0) from the on state to the off state or to a low power consumption state.

[0044] Although the description will be omitted to avoid repetition, in the work memory 144, the divided memories 144-1 to 144-k are configured in the same manner as the divided memory 144-0. That is, a status register 152 and a PMU 153 are provided for each of the memory banks Bank1 to Bank k. Note that, in the above description, the work memory 144 is divided into a plurality of memory banks and power is managed for each memory bank, but the wait memory 143 may also be similarly divided into a plurality of memory banks and power is managed for each memory bank. Also, in the above description, an example is shown in which the work memory 144 uses an input sideband signal, but the wait memory 143 can also use an input sideband signal in the same way.

[0045] Figure 5 is a diagram illustrating a method for reducing memory power consumption in the DNN accelerator 132 of Figure 4. In Figure 5, similar to Figure 3, data for one pixel of the activation (frame) being processed is stored in each rectangular area (memory word) of the work memory 144 (P1, P2, ... in the figure). Also, frame A1 indicates the status of access to the work memory 144 at a certain time during DNN processing, and frame B1 indicates the position of the data to be accessed on the activation (frame).

[0046] As shown in Fig. 5, the work memory 144 that stores activations is divided into a plurality of memory banks. In the example of Fig. 5, five memory banks, Bank0 to Bank4, are shown as the plurality of memory banks.

[0047] In the work memory 144, a flag indicating whether the pixels (data) in each memory word of each memory bank have been used is held simultaneously with memory access, using each bit of the status register 152. The PMU 153 then determines, based on the held flag, which memory bank has used all of its memory words, and transitions the power state from the on state to the off state or a low-power state (e.g., retention state). In the retention state, the data stored in each memory word when transitioning from the on state remains accessible when transitioning back to the on state.

[0048] In the example of Figure 5, as indicated by arrow B2, the frames of the activation being processed are used up sequentially from the top, so the flags for Bank0 and Bank1 indicate "done" (1), and the power is turned off or in a low-power mode. Also, in the example of Figure 5, memory words in Bank2 and Bank3 are accessed, so the power to Bank2 to Bank4 is turned on. By controlling the power supply for each memory bank in this way, the power supply to memory banks that have been used can be turned off or in a low-power mode. Note that when a memory word in a memory bank that has been in a low-power mode (e.g., retention mode) is accessed again, that memory bank can be switched (returned) to an on state (normal mode). The initial power supply state for all memory banks can be set to the on state.

[0049] Next, the memory configuration and memory power control in the DNN accelerator 132 in Fig. 4 will be described in more detail with reference to Fig. 6 and Fig. 7. Fig. 6 is a diagram illustrating an example of the configuration of the work memory 144 in the DNN accelerator 132. Fig. 7 is a diagram illustrating the order of data use during convolution in the DNN accelerator 132.

[0050] As shown in each step from Step 1 to Step X in Figure 7, the convolution 3x3 filter F starts from the top left of the input feature map (activation A) and proceeds widthwise, then heightwise. At this time, once the convolution of the 3x3 matrix is ​​completed at each step, filter F proceeds to the next step. In Figure 7, pixels that are no longer needed in the input feature map at each step are indicated by "done" and dotted. To utilize the information on these no longer needed pixels, the work memory 144 of the DNN accelerator 132 employs the memory structure shown in Figure 6.

[0051] 6 shows an example of the configuration of the work memory 144 as an activation memory that stores an input feature map. The work memory 144 is divided into multiple memory banks, such as Bank0, Bank1, ..., and one pixel (data) is stored in one memory word of the memory bank, as shown by "data" in the rectangular area of ​​the memory array 151. In the memory bank, a flag indicating whether each pixel has been used is held in each bit of the status register 152 for each memory word.

[0052] At the start of convolution processing, all memory banks are powered on. When convolution processing begins, the AGU 145A of the AGU / DMAC 145 reads pixels of the input feature map required for calculation from the work memory 144 based on the convolution parameters (e.g., the parameters described in FIG. 1) set in the control unit 142, and supplies them to the MAC calculation unit 146. As the convolution processing progresses, unnecessary pixels appear. The AGU 145A runs an address calculation loop using dedicated hardware, and can calculate at what point a pixel at a certain address becomes unnecessary.

[0053] The AGU 145A issues an address for reading the pixel for the final time, and at the same time notifies the work memory 144 that the pixel has been used using a sideband signal from the connection matrix 161 of the work memory 144. The connection matrix 161 is, for example, an AHB (Advanced High-Performance Bus) bus. The status register 152 receives the sideband signal from the AGU 145A and sets the bit of the memory word in question to done (1), i.e., a flag indicating that the memory word will not be used any further. Furthermore, if the sideband signal is 0, the status register 152 does not update the bit of the memory word in question.

[0054] PMU 153 is provided to control the power supply of each memory bank, and when the bits of status register 152 for all memory words in a memory bank become "done (1)," it turns off the power supply to that memory bank. For example, in Figure 6, when the pixels stored in each memory word in memory bank Bank0 have been used up (e.g., the state of Step X in Figure 7), all bits of status register 152-0 become "done (1)," and PMU 153-0 switches the power supply to the memory bank to the "off" state.

[0055] When one convolution is completed and new data is loaded into the same bank for use again, the power to the memory bank can be turned off. However, if you want to use the same data again, for example, when using a different filter for the same input feature map, the power to the memory bank can be turned off and placed in a low-power state that does not cause data loss, such as a retention state.

[0056] The status register 152 can be initialized by, for example, the following methods. In a first method, the initial value of the status register 152 is automatically set to 0 when the reset is released. However, if an area in the same memory bank is not intentionally used, the CPU 131 can directly set the bit of the status register 152 to 1. In a second method, the initial value of the status register 152 is automatically set to 1 when the reset is released, and then, when loading an input feature map before convolution, the sideband signal can set 0 only to the bit of the status register 152 for the required memory word.

[0057] Once a memory bank has been turned off or in a retention state, it can be powered on under control of the CPU 131 before the next convolution, or the PMU 153 can sense via a sideband signal that the memory bank is being accessed again and power it on.

[0058] 6, in the memory bank Bank1, the pixels stored in each memory word have not been used up and all bits of the status register 152-1 are not set to done(1) (including use(0)), so the power supply to the memory bank remains on. After that, when the pixels stored in each memory word of the memory bank Bank1 have been used up and all bits of the status register 152-1 are set to done(1), the PMU 153-1 transitions the power supply to the memory bank to the off state or retention state.

[0059] 8 shows the relationship between the value of the status register 152, the instruction of the PMU 153, and the power supply state of the memory banks for each step of the convolution. Fig. 8 illustrates the states of three memory banks, Bank0, Bank1, and Bank2, out of the multiple memory banks.

[0060] FIG. 8 illustrates several steps of convolution using a 3×3 filter on a QVGA image (320×240). The data format of the input feature map is 32-bit float, and the size of the memory bank in the work memory 144 is 320×4 bytes. For simplicity, the bandwidth of the memory bank is assumed to be 1 pixel / cycle. Performing one step of 3×3 convolution requires 9 pixels of the input feature map, so 9 cycles are required. In FIG. 8, these 9 cycles are shown as one step.

[0061] 8, in Steps 0 to 317, since not all bits of the status register 152-0 of the memory bank Bank0 are set to "done (1)," the instruction to PMU 153-0 is "none," and the power supply to Bank0 is turned on. In Step 318, since all bits of the status register 152-0 of Bank0 are set to "done (1)," the instruction to PMU 153-0 is "Bank0 off" in Step 319. Then, in Step 320, the power supply to the memory bank Bank0 is turned off, and each bit of the status register 152-0 of Bank0 is reset. In other words, in Step 318, the pixels stored in each memory word of the memory bank Bank0 have been used, and Step 319 indicates that the process has moved to the next line on the input feature map.

[0062] <Control Flow> FIG. 9 is a diagram showing the control flow of the AGU 145A.

[0063] The AGU 145A determines whether the loop has ended (S11), and if the loop has not ended, generates an address (S12). The AGU 145A also determines whether the generated address has not occurred since then and the final address has occurred (S13).

[0064] If the final address has occurred, the AGU 145A sets the sideband signal to 1 (done) (S14), and if the final address has not occurred, the AGU 145A sets the sideband signal to 0 (S15).Then, the AGU 145A notifies the work memory 144 of the sideband signal indicating 1 or 0 (S16).

[0065] When step S16 is completed, the process returns to step S11, and steps S11 to S16 are repeated until it is determined that the loop has ended. If it is determined in step S11 that the loop has ended, the series of processes ends.

[0066] FIG. 10 is a diagram showing the control flow of the PMU 153.

[0067] The PMU 153 determines whether the power supply to the memory bank is on (S31), and if the power supply to the memory bank is on, determines whether all bits of the status register 152 are 1 (done) (S32). If all bits of the status register 152 are not 1, the power supply to the memory bank remains on. On the other hand, if all bits of the status register 152 are 1, the PMU 153 controls the power supply to the memory bank to be off (S33). Here, the power supply to the memory bank may be set to a low-power consumption state such as a retention state instead of being off.

[0068] When step S33 is completed, the process returns to step S31. If the power supply of the memory bank is not in the ON state, the PMU 153 determines whether a memory bank in the OFF state or the low power consumption state has been accessed (S34). If a memory bank in the OFF state or the low power consumption state has been accessed, the PMU 153 controls the power supply of the memory bank to the ON state (S35). Here, if the power supply of the memory bank is in the retention state, the process controls the memory bank to return to the normal mode. When step S35 is completed, the process returns to step S31, and the above-mentioned process is repeated.

[0069] As described above, according to the present disclosure, it is possible to reduce memory power consumption in response to memory accesses in DNN processing. That is, memory banks that are sequentially used are automatically switched off or into a low-power consumption state, thereby reducing leakage power. Furthermore, the memory array of a powered-on memory bank is smaller than when it is not divided into conventional memory banks, thereby reducing dynamic power consumption during memory access. Although dividing a memory into multiple memory banks generates overhead in peripheral circuits, by selecting an appropriate bank size taking into account the type of memory and the generation of the CMOS (Complementary Metal Oxide Semiconductor) process (taking into account the trade-offs involved in dividing the memory into multiple memory banks), the power reduction effect can outweigh the overhead.

[0070] Furthermore, by providing the functions of the status register 152 and PMU 153 on the memory side, such as the work memory 144, rather than on the AGU / DMAC 145 (AGU 145A) side, it is possible to improve the reusability of the design. For example, when manufacturing another chip with an expanded memory capacity in the same system, it is possible to reuse the AGU / DMAC 145 (AGU 145A) circuit without changing it by simply adding the status register 152, thereby reducing design costs.

[0071] <Modifications> <<First Modification>> FIG. 11 is a diagram illustrating another example of the memory configuration in the DNN accelerator 132.

[0072] Instead of having the status register 152 of a memory bank hold a flag with one bit per memory word, the status register 152 may hold the total number of unnecessary memory words in the memory bank, thereby controlling power supply for each memory bank. In Fig. 11, the status register 152 is configured with log2(n) bits instead of n bits, where n indicates the number of memory words in the memory bank.

[0073] 11, status register 152 holds the total number of unnecessary memory words in the memory bank by incrementing it by one each time the number of unused memory words increases. When the total number of unnecessary memory words held by status register 152 reaches n (Status Register = n), PMU 153 transitions the power supply of the memory bank from the on state to the off state or to a low power consumption state. The total number of unnecessary memory words in the memory bank can also be considered usage status information that indicates the usage status of the data stored in each memory word.

[0074] 11, when all pixels (data) stored in each memory word in memory bank Bank0 have been used up, the total number of unnecessary memory words held in status register 152-0 reaches n, and PMU 153-0 switches the power supply to the memory bank to the OFF state. Also, in memory bank Bank1, all pixels stored in each memory word have not been used up, and the total number of unnecessary memory words held in status register 152-1 has not yet reached n, so the power supply to the memory bank remains ON. Later, when all pixels stored in each memory word in memory bank Bank1 have been used up, and the total number of unnecessary memory words held in status register 152-1 reaches n, PMU 153-1 switches the power supply to the memory bank to the OFF state.

[0075] In this way, in the configuration of FIG. 11, the status register 152 of each memory bank holds the total number of unnecessary words in the memory bank, so that it is possible to achieve the same power reduction effect with a smaller circuit configuration than the configuration of FIG. 6 described above.

[0076] <<Second Modification>> FIG. 12 is a diagram illustrating another example of memory power supply control in the DNN accelerator 132.

[0077] The initial power state of the memory banks may not be all on, but may be off or in a low-power state (e.g., retention state). In this case, the PMU 153 must wake up and use the required memory banks when they are accessed. Unlike the configuration shown in FIG. 5, the initial value of the status register 152 is not reset when the memory banks are initially in the off or low-power state. Subsequently, as the convolution process progresses, the status register 152 is reset for the first time when the PMU 153 turns off the power to the memory banks.

[0078] 12, similarly to the above-mentioned FIG. 5, data for one pixel of activation (frame) is stored in each rectangular area (memory word) of the work memory 144 (P1, P2, ... in the figure). Also, the state of access to the work memory 144 at a certain time during DNN processing is shown by frame A1, and the position of the data to be accessed on activation (frame) is shown by frame B1.

[0079] FIG. 12 illustrates five memory banks, Bank0 to Bank4, and the initial power state of each memory bank is off or in a low-power consumption state. As indicated by arrow B2, activation frames being processed are used up sequentially from the top. Therefore, Bank0 and Bank1 are in a state where all pixels stored in each memory word of the memory bank have been used up, and the power is in an off or low-power consumption state. In other words, the initial power state of Bank0 and Bank1 is off or in a low-power consumption state, but when accessed by the PMU 153, they are turned on, and then turned off or in a low-power consumption state when the pixels stored in each memory word have been used up. At this time, the status registers 152 of Bank0 and Bank1 are reset.

[0080] The power supplies of Bank2 and Bank3 are initially off or in a low-power consumption state, but when access is detected, the PMU 153 controls them to transition to the on state. The power supply of Bank4 transitions to its initial off or low-power consumption state. At this time, the status register 152 of Bank4 is not reset; that is, the reset is released and the initial value (e.g., 0) can be read by the PMU 153. In this way, by turning off or in a low-power consumption state not only for the memory banks (Bank0 and Bank1) that have been used up, but also for the memory bank (Bank4) that follows the memory bank being accessed (Bank2 and Bank3), further power reduction effects can be achieved.

[0081] <<Third Modification>> Another example of the memory configuration and memory power control in the DNN accelerator 132 is described with reference to Fig. 13 and Fig. 14. Fig. 13 is a diagram illustrating yet another example of the memory configuration in the DNN accelerator 132. Fig. 14 is a diagram illustrating the order of data use during convolution corresponding to the memory configuration in Fig. 13.

[0082] In addition to keeping a flag for memory words that have been used, it is also possible to set a flag for memory words that have not been used but will not be used for a while (not scheduled to be used for a specified period of time). By using such flags appropriately, it is possible to transition even more memory banks to a low-power consumption state (for example, retention state). When the same memory bank contains a mixture of memory words that have been used and memory words that will not be used for a while, the power supply for that memory bank can be set to the retention state. Then, when all the memory words in that memory bank have been used, the power supply can be turned off.

[0083] 13, the number of bits per memory word in the status register 152 is two, representing a flag indicating nuw (not in use for a while) in addition to done (1) and use (0). In FIG. 13, the status register 152 receives a sideband signal from the AGU 145A and can set a flag indicating nuw in two bits of the corresponding memory word, that is, a flag indicating that the memory has not been used but will not be used for a while. If the status register 152 of a memory bank does not contain use but contains a mixture of flags indicating done and nuw, the PMU 153 transitions the power supply of that memory bank to the retention state.

[0084] 13, when the pixels stored in each memory word in memory bank Bank0 have been used, all two bits of status register 152-0 indicate "done (1)," and PMU 153-0 turns off the power to the memory bank. Also, in memory bank Bank1, a flag indicating "nuw" is set in two bits of status register 152-1 for memory words that are not scheduled to be used for a predetermined period.

[0085] 14, similar to the above-mentioned Fig. 7, shows how a 3x3 filter F starts from the top left of the input feature map as activation A, proceeds in the width direction, and then proceeds in the height direction after the width direction. When the state of Step 3 in Fig. 14 corresponds to the two bits of the status register 152-1 in Fig. 13, the pixel indicated by "nuw" in Step 3 in Fig. 14 is a pixel that has not been used but will not be used for a while, so a flag indicating nuw is set in the corresponding two bits.

[0086] For example, if a memory bank called Bank1 contains a mixture of used memory words and memory words that will not be used for a while, the two bits of the status register 152-1 contain a mixture of flags indicating "done" and "nuw," and the PMU 153-1 transitions the power supply of the memory bank to the retention state. Alternatively, if the pixels stored in each memory word in the memory bank called Bank1 have been used, all two bits of the status register 152-1 indicate "done," and the PMU 153-1 transitions the power supply of the memory bank to the off state. Note that if only memory words that will not be used for a while exist in the memory bank called Bank1, all two bits of the status register 152-1 indicate "nuw," and the PMU 153-1 transitions the power supply of the memory bank to the retention state.

[0087] 13 shows a case where the number of bits per memory word in the status register 152 is two, but if the number of bits is one, as in the configuration of Fig. 6 described above, it is possible to use only the retention state as the power supply state of the memory bank without using the off state. This eliminates the need to distinguish between done and nuw, and only requires distinguishing between 0 (use) and 1 (done, nuw), which can be expressed in one bit.

[0088] <<Other Configuration Examples>> In the above explanation, the work memory 144 is divided into multiple memory banks, and the power supply state of the memory banks is controlled according to the usage status of the data stored in each memory word of the memory bank. However, a similar configuration may be adopted not only for the work memory 144 but also for other memories such as the wait memory 143.

[0089] That is, by dividing the wait memory 143 into multiple memory banks and providing a status register and a PMU for each memory bank, and by holding a flag based on the sideband signal notified from the AGU 145A and the total number of memory words corresponding to data that has finished being used, it is possible to control the power state of the memory bank under control from the PMU. The configuration described above can be adopted for at least one of the work memory 144 and the wait memory 143. Note that while the sideband signal is a signal that complies with a predetermined standard, other signals may be used as long as they can update the value held in the status register.

[0090] In the above explanation, the activation of the input feature map or the like is two-dimensional in the width and height directions, but the channel direction can also be processed in the same way. In other words, by storing one channel's worth of images (two-dimensional images) one by one in one memory bank, the images of each channel can be processed in the same way. The input feature map and the output feature map are examples of features.

[0091] In this disclosure, a system refers to a logical collection of multiple devices, and is assumed to be composed of devices (chips, etc.) housed in the same housing. In FIG. 4 , the DNN accelerator 132 is a data processing device that processes data stored in a memory, and the subsystem 121 may be considered a data processing system including the DNN accelerator 132 configured as a data processing device. For example, the subsystem 121 may be configured as a single-core processor system or a multi-core processor system including a processor such as a CPU 131 or a coprocessor, and the DNN accelerator 132. A sensor system 100 equipped with such a processor system can be configured as a sensor device or edge device. The sensor system 100 is not limited to the image sensor 111, and may also include other sensors such as a depth sensor or a ranging sensor. Furthermore, the data used by the DNN accelerator 132 may not be data intended for DNN processing.

[0092] It should be noted that the embodiments of the present disclosure are not limited to the above-described embodiments, and various modifications are possible within the scope of the gist of the present disclosure. Furthermore, the effects described in this specification are merely examples and are not intended to be limiting, and other effects may also be obtained.

[0093] The present disclosure can also be configured as follows.

[0094] (1) A data processing device comprising: a memory divided into a plurality of memory banks for storing data used in DNN processing; a storage unit provided for each of the memory banks and storing usage status information indicating a usage status of the data stored for each memory word; and a power management unit that transitions a power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state based on the stored usage status information. (2) The usage status information is a flag that indicates whether use of the data stored for each memory word has finished, and the power management unit transitions a power supply of the memory bank in which the storage unit that has stored the flag is provided from the on state to the off state or the low power consumption state when the stored flag indicates that use of all of the data stored for each memory word in the memory bank has finished. (3) The data processing device according to (1), wherein the usage status information is a total number of the memory words corresponding to the data that has finished being used for each of the memory banks, and the power management unit transitions the power supply of the memory bank in which the retention unit that retains the total number is provided from the on state to the off state or the low power consumption state when the retained total number reaches the number of memory words in the memory bank. (4) In the low power consumption state, the data stored for each of the memory words when transitioning from the on state is kept accessible when transitioning back to the on state, and the power management unit transitions the power supply of the memory bank to the on state when there is again access to the data stored for each of the memory words in the memory bank that transitioned from the on state to the low power consumption state.(5) The data processing device according to any one of (1) to (4), wherein an initial state of the power supply of the memory bank is the on state, and the power supply management unit transitions the power supply of the memory bank that has finished using all of the data stored for each memory word from the on state to the off state or the low power consumption state based on the held usage status information. (6) The data processing device according to any one of (1) to (4), wherein an initial state of the power supply of the memory bank is the off state or the low power consumption state, and the power supply management unit transitions the power supply of the memory bank from the off state or the low power consumption state to the on state when the data stored for each memory word of the memory bank is accessed, and transitions the power supply of the memory bank that has finished using all of the data stored for each memory word from the on state to the off state or the low power consumption state based on the held usage status information. (7) The data processing device according to (2), wherein the flag further indicates a state in which the data stored for each memory word is not scheduled to be used for a predetermined period, and the power management unit transitions the power supply of the memory bank from the on state to the low power consumption state when the retained flag for each of the data stored for each memory word in the memory bank indicates completion of use or indicates that use is not scheduled for a predetermined period. (8) The data processing device according to any of (1) to (4), wherein the retaining unit retains the usage status information based on a signal notified from an address generating unit that generates addresses for reading and writing data from and to the memory. (9) The data processing device according to any of (1) to (4), wherein the data is feature map data used in DNN processing.a power management unit that, based on the stored usage information, transitions a power supply of a memory bank that has finished using all of the data stored in the buffer from an ON state to an OFF state or a low-power consumption state that operates with less power than the ON state. (11) A data processing system comprising: a processor; a buffer that stores data from an external device; and a data processing unit that is controlled by the processor and receives input of the data stored in the buffer, wherein the data processing unit comprises: a memory that is divided into a plurality of memory banks and that stores data to be used in DNN processing; a retention unit that is provided for each of the memory banks and that retains usage information that indicates the usage status of the data stored in each memory word; and a power management unit that, based on the stored usage information, transitions a power supply of a memory bank that has finished using all of the data stored in the buffer from an ON state to an OFF state or a low-power consumption state that operates with less power than the ON state. (12) A sensor system comprising: a sensor; and a data processing system that processes data from the sensor, wherein the data processing system comprises: a processor; a buffer that stores the data from the sensor; and a data processing device that is controlled by the processor and to which the data stored in the buffer is input, the data processing device having: a memory that is divided into a plurality of memory banks and stores data to be used in DNN processing; a storage unit that is provided for each of the memory banks and stores usage status information that indicates the usage status of the data stored for each memory word; and a power management unit that, based on the stored usage status information, transitions the power supply of the memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state.(13) The sensor system according to (12), wherein the sensor is an image sensor.

[0095] 100 Sensor system, 111 Image sensor, 112 Logic chip, 121 Subsystem, 131 CPU, 132 DNN accelerator, 133 Bus, 134 Frame buffer, 135 Pre-processing unit, 136 Post-processing unit, 141 Control I / F, 142 Control unit, 143 Wait memory, 144 Work memory, 144-0, 144-1 Split memory, 145 AGU / DMAC, 145A AGU, 146 MAC operation unit, 151-0, 151-1 Memory array, 152-0, 152-1, 152 Status register, 153-0, 153-1, 153 PMU, 161 Connection matrix

Claims

1. A data processing device comprising: a memory divided into a plurality of memory banks for storing data used in DNN processing; a storage unit provided for each of the memory banks for storing usage status information indicating the usage status of the data stored for each memory word; and a power management unit for transitioning the power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state, based on the stored usage status information.

2. The data processing device of claim 1, wherein the usage status information is a flag indicating whether or not use of the data stored for each memory word has ended, and when the held flag indicates that use of the data stored for all of the memory words in the memory bank has ended, the power management unit transitions the power supply of the memory bank in which the holding unit that holds the flag is located from the on state to the off state or the low power consumption state.

3. The data processing device of claim 1, wherein the usage information is, for each memory bank, a total number of memory words corresponding to the data that has been finished being used, and the power management unit, when the held total number reaches the number of memory words in the memory bank, transitions the power supply of the memory bank in which the holding unit that holds the total number is located from the on state to the off state or the low power consumption state.

4. The data processing device of claim 1, wherein in the low power consumption state, the data stored for each memory word when transitioning from the on state is maintained accessible when transitioning back to the on state, and the power management unit transitions the power supply of the memory bank to the on state when there is again access to the data stored for each memory word of the memory bank that transitioned from the on state to the low power consumption state.

5. A data processing device as described in claim 1, wherein an initial state of the power supply of the memory bank is the on state, and the power supply management unit transitions the power supply of the memory bank that has finished using the data stored for each of the memory words from the on state to the off state or the low power consumption state based on the retained usage status information.

6. A data processing device as described in claim 1, wherein an initial state of the power supply of the memory bank is the off state or the low power consumption state, and the power supply management unit transitions the power supply of the memory bank from the off state or the low power consumption state to the on state when the data stored for each memory word of the memory bank is accessed, and transitions the power supply of the memory bank that has finished using all of the data stored for each memory word based on the retained usage status information from the on state to the off state or the low power consumption state.

7. The data processing device of claim 2, wherein the flag further indicates a state in which the data stored in each of the memory words is not scheduled to be used for a specified period of time, and the power management unit transitions the power supply of the memory bank from the on state to the low power consumption state when the retained flag for each of the data stored in each of all of the memory words in the memory bank indicates end of use or indicates that it is not scheduled to be used for a specified period of time.

8. The data processing device according to claim 1, wherein said holding section holds said usage information based on a signal notified by an address generating section which generates addresses for reading and writing data from and to said memory.

9. The data processing device according to claim 1, wherein the data is feature map data used in DNN processing.

10. A data processing method in which a data processing device holds usage status information indicating the usage status of the data stored in each memory word for each memory bank when a memory that stores data used in DNN processing is divided into a plurality of memory banks, and based on the held usage status information, transitions the power supply of a memory bank that has finished using all of the data stored in each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state.

11. A data processing system comprising: a processor; a buffer for storing data from an external source; and a data processing device controlled by the processor and receiving as input the data stored in the buffer, wherein the data processing device has: a memory divided into a plurality of memory banks for storing data used in DNN processing; a storage unit provided for each of the memory banks for storing usage status information indicating the usage status of the data stored for each memory word; and a power management unit for transitioning the power supply of a memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state, based on the stored usage status information.

12. A sensor system comprising: a sensor; and a data processing system that processes data from the sensor, wherein the data processing system comprises: a processor; a buffer that stores the data from the sensor; and a data processing device controlled by the processor and to which the data stored in the buffer is input, the data processing device having: a memory that is divided into a plurality of memory banks and stores data to be used in DNN processing; a storage unit that is provided for each of the memory banks and stores usage status information indicating the usage status of the data stored for each memory word; and a power management unit that transitions the power supply of the memory bank that has finished using all of the data stored for each memory word from an on state to an off state or a low power consumption state that operates with less power than the on state based on the stored usage status information.

13. The sensor system according to claim 12, wherein the sensor is an image sensor.

Citation Information

Patent Citations

  • Memory management device, memory management method and program

    JP2005196343A

  • Memory

    JP2006146998A

  • Distributed deep learning system and data transfer method

    JP2020077300A

  • System and method of pipeline data access to remote data

    US20060047677A1

  • Three-dimensional array device

    WO2021205941A1