WO2023013649A1 - Data cache device and program - Google Patents

Data cache device and program Download PDF

Info

Publication number
WO2023013649A1
WO2023013649A1 PCT/JP2022/029689 JP2022029689W WO2023013649A1 WO 2023013649 A1 WO2023013649 A1 WO 2023013649A1 JP 2022029689 W JP2022029689 W JP 2022029689W WO 2023013649 A1 WO2023013649 A1 WO 2023013649A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
unit
read
cache device
prediction table
Prior art date
Application number
PCT/JP2022/029689
Other languages
French (fr)
Japanese (ja)
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 JP2023540369A priority Critical patent/JPWO2023013649A1/ja
Publication of WO2023013649A1 publication Critical patent/WO2023013649A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • 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 disclosure relates to a data cache device that temporarily holds digital data.
  • inference is performed by continuously executing convolutional operations. That is, the convolution operation is performed on the original input data by a predetermined algorithm, and the convolution operation is further performed on the output data by the following algorithm.
  • a layer the process of performing a convolution operation on one piece of input data and obtaining an output is called a layer.
  • an algorithm for convolution operation is defined for each layer, and a network is constructed by combining these layers.
  • the weight value is multiplied with the input data, and the sum of products operation is performed by adding the result.
  • This weight value is defined by the kernel size by the convolution algorithm.
  • Patent Document 1 is known as a semiconductor device capable of reducing power consumption.
  • Japanese Patent Application Laid-Open No. 2002-200000 the power supply to a set with a low access frequency among the sets in the cache memory is cut off.
  • a neural network processing device may be equipped with a cache device.
  • a typical cache device stores data once read from the outside in an internal cache device based on temporal proximity or positional proximity. When the same data is read again, the data is read from the cache device without accessing to the outside.
  • This cache device can be expected to have the effect of hiding the time delay caused by reading data from the outside. Also, it is possible to reduce the power consumption due to the difference in implementation between the external storage device and the cache device.
  • input data may be cut out in processing units, and multiple layers of processing may be continuously performed on the cut out input data.
  • the output data of a layer can be immediately reused as the next input data, and unnecessary memory accesses and delays can be reduced.
  • an object of the present disclosure is to provide a data cache device that is effective in reducing power consumption.
  • a data cache device of the present disclosure is a data cache device that temporarily holds digital data, and includes a data holding section that holds data and a data input interface section for inputting data from the outside of the data cache device.
  • a data output interface unit for outputting data to the outside of said data cache device; a path for transferring data from said data input interface unit to said data holding unit; a selector section for simultaneously selecting one or more of a path for transferring data from the data holding section to the data output interface section; a selector control section for controlling the selector section; and a readout prediction table section for holding a scheduled number of readouts at which the data is read out during processing, and controls the selector section according to the number of readouts set in the readout prediction table section.
  • a program of the present disclosure includes a data holding unit that holds data, a data input interface unit that inputs data from outside the data cache device, and a data output interface that outputs data to the outside of the data cache device. a path for transferring data from the data input interface section to the data holding section; a path for transferring data from the data input interface section to the data output interface section; and a path for transferring data from the data holding section.
  • a program for controlling a data cache device comprising: a selector section for simultaneously selecting one or more of the paths for transferring to the data output interface section; The program functions as readout prediction table means for holding the number of readouts and selector control means for controlling the selector unit according to the number of readouts set in the readout prediction table means.
  • a program according to another aspect of the present disclosure is a program that creates a table that sets whether to read data held in a data cache device or to read data from an external storage device as data necessary for executing an operation by an arithmetic device.
  • a read count means for counting the number of times each data is read during execution of a calculation by performing an arithmetic simulation of the arithmetic unit by means of an arithmetic simulator;
  • This is a program for functioning as table creation means for creating a table.
  • FIG. 1 is a diagram showing the configuration of a data cache device according to the first embodiment
  • FIG. 2 is a diagram showing the overall configuration of an arithmetic device including a data cache device according to the first embodiment
  • FIG. 3 is a flowchart showing the operation of the data cache device of the first embodiment
  • FIG. 4 is a diagram showing the configuration of a data cache device according to the second embodiment
  • FIG. 5 is a diagram showing the configuration of a data cache device according to the third embodiment
  • FIG. 6 is a flowchart showing the operation of the data cache device of the third embodiment
  • FIG. 7 is a diagram showing the configuration of a data cache device according to the fourth embodiment.
  • FIG. 1 shows the configuration of the data cache device 1 of the first embodiment
  • FIG. 2 shows the overall configuration including the data cache device 1, the external storage device 2, the arithmetic device 3, and the arithmetic algorithm control unit 4.
  • the data cache device 1 is connected to an external storage device 2 , an arithmetic device 3 and an arithmetic algorithm control section 4 .
  • the data cache device 1 inputs data from the external storage device 2 , holds part of the data, and outputs the data to the arithmetic device 3 .
  • the arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 1 and the arithmetic device 3 in conjunction.
  • 101 is a data holding unit.
  • This data holding unit 101 is a cache memory that temporarily holds the Weight data of the neural network in this embodiment.
  • the data holding unit 101 is implemented with an SRAM or flip-flop circuit. Note that the data holding unit 101 is also called a "local buffer”.
  • Data input interface unit 102 is a data input interface unit 102 .
  • Data input interface unit 102 is connected to external storage device 2 and receives data from external storage device 2 .
  • a bus interface or the like may be provided in the middle, so long as the data can be logically acquired.
  • the data input interface section 102 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 104 .
  • the data output interface section 103 is a data output interface.
  • the data output interface section 103 is connected to the arithmetic device 3 .
  • the selector unit 104 is a selector unit.
  • the selector unit 104 is a circuit that selects the destination of input data from the data input interface unit 102 and the source of request data from the data output interface unit 103 .
  • Selector control unit 105 is a selector control unit.
  • the selector control unit 105 is a part that controls the selector unit 104, and controls connection of the selector unit 104 in units of instruction execution cycles.
  • Selector control section 105 includes a path for transferring data from data input interface section 102 to data holding section 101, a path for transferring data from data input interface section 102 to data output interface section 103, and a path for transferring data from data holding section 101 to data output interface section 103. , one or a plurality of paths are selected at the same time from the paths for transferring the data of .
  • the read counter unit 106 is a read counter unit.
  • the read counter unit 106 has a function of counting the number of times the data output interface unit 103 is accessed. It internally holds a plurality of counters, and independently counts readout for each address requested by the arithmetic unit 3 via the data output interface unit 103 .
  • the reading prediction table unit 107 is a read prediction table section.
  • the reading prediction table unit 107 is implemented by an SRAM or a flip-flop circuit, and stores the number of times the weight value in each layer is read. The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
  • the readout prediction table control unit 108 is a read prediction table control unit.
  • the readout prediction table control unit 108 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 107, and sends a selector selection signal to the selector control unit 105. to be issued.
  • the read prediction table control unit 108 has a function of acquiring read counter information from the read counter unit 106 and updating the values of the read prediction table unit 107 based on instructions from the arithmetic algorithm control unit 4 .
  • FIG. 3 is a flowchart showing the operation of the data cache device 1.
  • the computation device 3 will be described as an example of computation for moving image processing using a neural network.
  • the computing device 3 performs image processing for each frame that constitutes a moving image. More specifically, a frame image or feature map to be processed is divided into a plurality of processing unit regions, and the regions are called tiles, and inference processing is performed by a neural network for each tile. The inference process performed for each frame is the same.
  • the reading prediction table control unit 108 receives a list of algorithms to be processed from the arithmetic algorithm control unit 4 .
  • the information includes the number of layers, the number of kernels in each layer, the number of input data channels, the number of output data channels, and the input activation size.
  • the readout prediction table control unit 108 calculates the required weight retention amount and the number of tiles for which the calculation is to be repeated.
  • the calculation algorithm control unit 4 itself may calculate the weight retention amount and receive the result.
  • the read prediction table control unit 108 determines whether or not the required weight holding amount is equal to or less than the capacity of the data holding unit. If the amount of weight required for multi-layer processing is equal to or less than the capacity of the data holding unit 101 ("Yes" in S001), the reading prediction table control unit 108 continues the process of step S002.
  • step S002 the reading prediction table control unit 108 receives information on the number of tiles when processing multiple layers from the arithmetic algorithm control unit 4, and determines whether the number of tiles is two or more.
  • the read prediction table control unit 108 updates the read prediction table unit 107 so that the data is directly transferred from the external storage device 2 without going through the data holding unit 101 . If the number of tiles is 2 or more ("Yes" in S002), proceed to step S004, and update the readout prediction table unit 107 with a flag indicating that the entire region of the prediction table is to be transferred to the data holding unit 101. do. Note that the order of determination in steps S001 and S002 described above may be reversed.
  • step S012 data is transferred from the external storage device 2 according to the reading prediction table section 107. Specifically, when the number of tiles to be processed is 1, the data is directly transferred without going through the data holding unit 101, and when the number of tiles to be processed is 2 or more, the data is transferred from the external storage device 2 to the data holding unit 101. .
  • step S001 if the amount of Weight data is equal to or greater than the capacity of the data storage unit 101 in step S001 ("No" in S001), the process proceeds to step S005, and the data in the data storage unit 101 is stored in descending order of the number of tiles processed.
  • the reading prediction table unit 107 is updated so that the weight data for the layers up to the capacity is transferred to the data holding unit 101 .
  • Step S006 is a step of transferring the Weight data to be read from the data holding unit 101 from the external storage device 2 to the data holding unit 101.
  • the readout prediction table control unit 108 sends a readout request to the data input interface unit 102 for weight data that needs to be read out from the data holding unit 101 .
  • the request may be notified via the arithmetic algorithm control unit 4 .
  • the data input interface unit 102 transfers Weight data to be newly read from the data holding unit 101 from the external storage device 2 to the data holding unit 101 .
  • the data input interface unit 102 functions as a bus master, generates the address of the external storage device 2 from the weight position information held in the read prediction table, and issues a data transfer request.
  • equivalent functions may be replaced.
  • Step S007 and subsequent steps are steps after the start of the processing of the first tile.
  • Step S007 is the timing at which the arithmetic algorithm control unit 4 sends a processing start signal to the arithmetic unit 3, and the arithmetic unit 3 sends a request to acquire the necessary weight data to the data output interface unit 103 together with the address. Occur.
  • the data output interface unit 103 receives a weight data transfer request from the arithmetic unit 3 together with an address. At this time, data output interface section 103 transmits the requested address information to selector control section 105 .
  • the selector control unit 105 refers to the read prediction table unit 107 to determine whether the requested data exists in the external storage device 2 or is held in the data holding unit 101, controls the selector unit 104, A path to the storage area is connected so that the data output interface unit 103 can access the data.
  • the selector control unit 105 notifies the data output interface unit 103 of map information indicating whether the data exists in the external storage device 2 or in the data holding unit 101 as a path establishment signal.
  • the data output interface unit 103 increments the requested transfer data amount of the read counter unit 106 for each information indicating which layer's weight data the data requested by itself belongs to and the map information returned from the selector control unit 105 . Based on the map information, the read counter unit 106 counts and holds the number of times the weight data is read from the data holding unit and the number of times the weight data is directly read from the data input interface unit.
  • step S008 the arithmetic unit 3 continues to acquire Weight data via the data output interface unit 103 until all tiles are completed. During this time, data output interface section 103 continues step S007. If the processing of all tiles is completed in step S008 ("Yes" in S008), the process proceeds to step S009. In the processing up to this point, the read counter unit 106 counts the number of times the weight data is read in each layer when one frame is processed.
  • step S ⁇ b>009 the readout prediction table control unit 108 reads count data from the readout counter unit 106 for each layer, and compares it with a threshold specified in advance by the arithmetic algorithm control unit 4 .
  • the threshold is calculated from the amount of power consumed for reading and transferring data. That is, the amount of power required to transfer data from the external storage device 2 without going through the data holding unit 101 and the amount of power required to transfer data from the external storage device 2 to the data holding unit 101 and read data from the data holding unit 101 is determined based on the amount of power required for
  • reading the weight data from the data holding unit 101 consumes less power than obtaining the data directly from the external storage device 2 .
  • the reading prediction table control unit 108 compares the weight data reading count with the threshold value, and sets a flag for the weight data of the layer whose reading count is equal to or greater than the threshold value. In step S ⁇ b>010 , the flag information set in step S ⁇ b>009 is read out and written in the readout prediction table section 107 .
  • a flag may be set in the read prediction table unit 107 to read from the data holding unit 101 in descending order of the read count, that is, in descending order of the read amount, without performing threshold evaluation in step S009.
  • Step S011 is a step of transferring data to the data holding unit 101 based on the information in the reading prediction table unit 107.
  • Readout prediction table control unit 108 sends a readout request to data input interface unit 102 for weight data that needs to be read out from data holding unit 101 anew. Alternatively, the request may be notified via the arithmetic algorithm control unit 4 .
  • the data input interface unit 102 overwrites the weight data to be newly read from the data holding unit 101 in the area of the weight data newly read directly from the external storage device 2 .
  • step S ⁇ b>006 may be executed again based on the newly updated contents of readout prediction table section 107 .
  • step S013 the remaining frames are processed using the readout prediction table section 107 and the data holding section 101 prepared by the above process.
  • the weight data is described as an example of the data held in the data holding unit 101, but the present disclosure is not applied only to the weight data, and other data such as activation data and other It goes without saying that it may also be applied to weighted data.
  • the configuration of the data cache device 1 of this embodiment has been described above. is stored in the storage means, and the CPU executes the program, thereby realizing the data cache device 1 that performs the above-described control. Such programs are also included within the scope of this disclosure.
  • the data cache device 1 of the present embodiment sets a flag in the weight data of the layer whose read count is equal to or greater than the threshold value and writes it to the read prediction table section 107 when performing the first frame processing. Since the weight data is transferred to the data holding unit 101 based on the reading prediction table unit 107, the weight data stored in the data holding unit 101 can be used when performing the remaining frame processing, thereby reducing power consumption. It is possible to improve the arithmetic performance while suppressing the In addition, when performing the remaining frame processing, power for evaluation may be reduced by stopping the counting and comparison processing of the present embodiment.
  • FIG. 4 is a diagram showing the configuration of the data cache device 5 according to the second embodiment.
  • the basic configuration of the data cache device 5 of the second embodiment is the same as that of the data cache device 1 of the first embodiment, but the data cache device 5 of the second embodiment is compressed. The difference is that weight data is handled.
  • the data cache device 5 is connected to the external storage device 2, arithmetic device 3, and arithmetic algorithm control section 4 described in FIG.
  • the data cache device 5 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 .
  • the arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 5 and the arithmetic device 3 in conjunction.
  • 501 is a data holding unit.
  • This data holding unit 501 is a cache memory that temporarily holds Weight data.
  • the data holding unit 501 is implemented with an SRAM or flip-flop circuit.
  • Data input interface unit 502 is a data input interface unit.
  • Data input interface unit 502 is connected to external storage device 2 and receives data from external storage device 2 .
  • a bus interface or the like may be provided in the middle as long as the data can be logically acquired.
  • the data input interface section 502 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 504 .
  • the data output interface section 503 is a data output interface unit.
  • the data output interface section 503 is connected to the arithmetic device 3 .
  • a selector unit 504 is a selector part.
  • a selector unit 504 is a circuit that selects the destination of input data from the data input interface unit 502 and the source of request data from the data output interface unit 503 .
  • a selector control unit 505 is a selector control unit.
  • a selector control unit 505 is a portion that controls the selector unit 504, and controls connection of the selector unit 504 in units of instruction execution cycles.
  • a read counter unit 506 is a read counter unit.
  • a read counter unit 506 has a function of counting the number of accesses to the data output interface unit 503 . It internally holds a plurality of counters, and independently counts readout for each address requested by the arithmetic unit 3 via the data output interface unit 503 .
  • the reading prediction table section 507 is a read prediction table section.
  • the reading prediction table section 507 is implemented by an SRAM or a flip-flop circuit, and stores the number of times weight data is read for each layer. The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
  • the readout prediction table control unit 508 is a read prediction table control unit.
  • the readout prediction table control unit 508 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 507, and sends a selector selection signal to the selector control unit 505. to be issued.
  • the read prediction table control unit 508 has a function of acquiring read counter information from the read counter unit 506 and updating the values of the read prediction table unit 507 based on instructions from the arithmetic algorithm control unit 4 .
  • a data decompression unit 509 is a data decompression unit.
  • a data decompression unit 509 decompresses the compressed weight data transferred based on the data request of the arithmetic unit 3 by a predetermined method.
  • the method of compression is not limited to any particular method, and its algorithm does not affect the validity of this disclosure, but may be, for example, run-length encoding.
  • the operation of the data cache device 5 of the second embodiment conforms to the flowchart of FIG. However, in creating the prediction table in steps S002, S003 to S005, it is necessary to calculate the compressed Weight data amount.
  • weight data has been described as an example, but it goes without saying that the present disclosure is not applied only to weight, and may be applied to other data such as activation data and other weight data. stomach.
  • the data cache device 5 of the second embodiment can improve the computational performance while suppressing power consumption.
  • FIG. 5 is a diagram showing the configuration of the data cache device 6 according to the third embodiment.
  • the data cache device 6 is connected to the external storage device 2 , arithmetic device 3 and arithmetic algorithm control section 4 .
  • the data cache device 6 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 .
  • the arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network and controls the arithmetic unit 3 .
  • This weight placement program 7 is the Weight placement program. This weight placement program 7 is a program for determining whether to place the weight data in the external storage device 2 or in the data holding unit 601 .
  • the arithmetic simulator 8 is a calculation simulator.
  • the arithmetic simulator 8 is software that logically simulates the operations of the external storage device 2 , the arithmetic device 3 , the arithmetic algorithm control section 4 and the data cache device 6 .
  • 601 is a data holding unit.
  • This data holding unit 601 is a cache memory that temporarily holds Weight data.
  • the data holding unit 601 is implemented with an SRAM or flip-flop circuit.
  • the 602 is a data input interface unit.
  • the data input interface unit 602 is connected to the external storage device 2 and receives data from the external storage device 2 .
  • a bus interface or the like may be provided in the middle as long as the data can be logically acquired.
  • the data input interface unit 602 includes a function as a bus master, and acquires data from the external storage device 2 in response to requests transmitted from the arithmetic unit 3 via the selector unit 604 .
  • the 603 is a data output interface unit.
  • the data output interface section 603 is connected to the arithmetic device 3 .
  • the 604 is a selector unit.
  • the selector unit 604 is a circuit that selects the destination of input data from the data input interface unit 602 and the source of request data from the data output interface unit 603 .
  • the selector unit 604 connects data from the data holding unit 601 or to the data input interface unit 602 according to the request address issued by the data output interface unit 603 .
  • a selector control unit 605 is a selector control unit.
  • a selector control unit 605 is a portion that controls whether data is transferred from the data input interface unit 602 to the data holding unit 601 or data is sent according to a request from the data output interface unit 603 .
  • the data arrangement table section 606 is a data arrangement table.
  • the data arrangement table section 606 is implemented by an SRAM or a flip-flop circuit, and records which layer's Weight value is held in the data holding section 601 .
  • Reference numeral 701 denotes weight arrangement table creation means.
  • Weight arrangement table creation means 701 determines whether to arrange the weight data of each layer in the external storage device 2 or hold it in the data holding unit 601 based on the access frequency prediction.
  • the 702 is read count means, which calculates the number of weight readouts for each layer. This read count calculation is performed by causing the calculation simulator 8 to execute layer processing, thereby acquiring the read count of each weight data from the calculation simulator 8 .
  • the weight placement table creation means 701 and the read count means 702 are configured by program modules, and their functions are exhibited by executing the weight placement program 7 by a computer.
  • FIG. 6 is a diagram showing the operation of the data cache device 6 of the third embodiment.
  • S101 is a step in which the weight placement program 7 uses the calculation simulator 8 to perform calculation simulation.
  • the weight allocation program 7 calculates the number of accesses to the weight data using the arithmetic simulator 8 based on information such as the algorithm, the number of kernels, the number of layers, the input data size, etc., which are input information to the arithmetic algorithm control unit 4. .
  • the weight arrangement table creation means 701 executes this process for all tile layers, and lists the number of accesses for each layer in the read count means 702 . After step S102 is completed ("Yes" in step S102), the process proceeds to step S103.
  • Step S103 is a step of counting the number of times of Weight access for each layer.
  • the weight arrangement table creation means 701 sorts the read counts for each layer held in the read count means 702 in descending order.
  • Steps S104 to S106 are steps for creating a weight arrangement table.
  • the weight allocation table creation means 701 sets the address of the allocation table so as to arrange data in the data holding unit 601 in descending order of the number of weight accesses based on the capacity of the data holding unit 601 previously acquired. For example, when the address of the data holding unit 601 and the address of the external storage device 2 are designed independently, the address of the data holding unit 601 should be mapped to the weight area with the high access frequency.
  • the processing in step S104 is performed in descending order of the number of accesses, and in step S105, it is determined whether the amount of data held in the data holding unit 601 is full. If the area of the data holding unit 601 is used up in step S105 ("Yes" in step S105), the process proceeds to step S106.
  • Step S106 is a step of specifying an area to be allocated in the external storage device 2.
  • the address of the external storage device 2 is specified for the weight data of the layer that could not be held in the data holding unit 601.
  • Step S107 is a step of transferring the created weight arrangement table to the data arrangement table section 606 of the data cache device 6.
  • the weight placement program 7 transfers the created weight placement table information to the data placement table section 606 for actual processing.
  • the transfer means may read via the data input interface section 102, or the data arrangement table section 606 may be memory-mapped from an external area and transferred using an external master or the like (not shown).
  • Step S108 is a step of transferring Weight data to be read from the data holding unit 601 to the data holding unit 601 according to the transferred data arrangement table unit 606.
  • the data input interface unit 602 reads the data arrangement table, switches the selector unit 604 to the data holding unit 601 by the selector control unit 605 , and transfers the weight describing the address of the data holding unit 601 from the external storage device 2 .
  • the transfer may be performed using the data input interface unit 102 or may be transferred by connecting an external master to the data holding unit 601 .
  • Step S109 is a step of transferring data during arithmetic processing.
  • the data requested by the arithmetic unit 3 reaches the selector unit 604 via the data output interface unit 603 and is acquired from the data holding unit 601 or the data input interface unit 602 .
  • the data output interface unit 603 receives the necessary weight data from the arithmetic unit 3, refers to the data allocation table, and generates an address to the area where the weight is stored.
  • step S109 is continued until the processing is completed.
  • the data cache device 6 of the third embodiment includes a weight placement program 7 and a calculation simulator 8, and determines whether the weight data should be placed in the external storage device 2 or held in the data holding unit 601 based on the results of the calculation simulation.
  • the data allocation table section 606 is updated based on the determination result. By arranging the weight data according to this data arrangement table section 606, it is possible to improve the calculation performance while suppressing the power consumption.
  • FIG. 7 is a diagram showing the configuration of the data cache device 9 of the fourth embodiment.
  • the basic configuration of the data cache device 9 of the fourth embodiment is the same as that of the data cache device 1 of the first embodiment. is provided with three arithmetic units 3.
  • FIG. 7 illustrates a case where there are three output destinations, the number of computing devices 3 as output destinations is not limited to three, and may be two or four or more.
  • the data cache device 9 is connected to the external storage device 2, arithmetic device 3, and arithmetic algorithm control section 4 described in FIG.
  • the data cache device 9 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 .
  • the arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 9 and the arithmetic device 3 in conjunction with each other.
  • 901 is a data holding unit.
  • This data holding unit 901 is a cache memory that temporarily holds Weight data.
  • the data holding unit 901 is implemented with an SRAM or flip-flop circuit.
  • the 902 is a data input interface unit.
  • the data input interface section 902 is connected to the external storage device 2 and receives data from the external storage device 2 .
  • a bus interface or the like may be provided in the middle, as long as the data can be logically acquired.
  • the data input interface section 902 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 904 .
  • the 903 is a data output interface unit.
  • the data output interface section 903 is connected to three arithmetic units 3 .
  • a selector unit 904 is a selector unit.
  • a selector unit 904 is a circuit that selects the destination of input data from the data input interface unit 902 and the source of request data from the data output interface unit 903 .
  • a selector control unit 905 is a selector control unit.
  • a selector control unit 905 is a portion that controls the selector unit 904, and controls connection of the selector unit 904 in units of instruction execution cycles.
  • a read counter unit 906 is a read counter unit.
  • a read counter unit 906 has a function of counting the number of accesses to the data output interface unit 903 . It internally holds a plurality of counters, and independently counts readout for each address requested by each arithmetic unit 3 via the data output interface unit 903 .
  • the reading prediction table section 907 is a read prediction table section.
  • the reading prediction table section 907 is implemented by an SRAM or a flip-flop circuit, and stores the number of times the Weight value in each layer is read. In this embodiment, the number of times of reading is stored for each arithmetic unit 3 . The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
  • the readout prediction table control unit 908 is a read prediction table control unit.
  • the readout prediction table control unit 908 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 907, and sends a selector selection signal to the selector control unit 905. to be issued.
  • the read prediction table control unit 908 has a function of acquiring read counter information from the read counter unit 906 and updating the values of the read prediction table unit 907 based on instructions from the arithmetic algorithm control unit 4 .
  • step S007 the data requested by the data output interface unit 103 is sent back from the selector control unit 105 together with information indicating from which arithmetic unit the data is requested and information indicating which layer Weight is.
  • the requested transfer data amount of the read counter unit 106 is incremented for each piece of map information obtained.
  • the number of times of reading data that is used when comparing the number of times of reading data with the threshold value is the number of times of reading that is linked to the arithmetic unit 3 used for processing.
  • the reading prediction table section 907 stores the number of reading times of the weight data of each layer in association with each of the three arithmetic units A, B, and C.
  • FIG. Assuming that arithmetic devices A and B are used and arithmetic device C is not used in the processing to be performed from now on, the total value of the number of times of reading linked to arithmetic devices A and B is compared with a threshold, and if the number of times of reading is equal to or greater than the threshold, Flag Weight data.
  • weight data has been described as an example, but it goes without saying that the present disclosure is not applied only to weight, and may be applied to other data such as activation data and other weight data. stomach.
  • the data cache device 9 of the fourth embodiment can improve the computational performance while suppressing power consumption.
  • the data cache device 9 of the fourth embodiment counts the number of times of reading for each arithmetic unit 3 and stores the number of times of reading in the read prediction table unit 907, the arithmetic unit executing the processing to be performed from now on is stored. 3, Weight data to be stored in the data holding unit 901 can be determined.
  • the present disclosure is not limited to the above-described embodiment.
  • a flag is set for data whose number of data reads is equal to or greater than the threshold (S009), and the read prediction table is updated ( S010) and transferring data to the data holding unit based on the updated readout prediction table (S011) have been described.
  • data that is effective in reducing power consumption when held in the data holding unit 101 is determined in units of frames, but this unit does not necessarily have to be in units of frames. It's okay. That is, when the processing of one tile is completed, a flag may be set for the data of the layer whose read count is equal to or greater than the threshold. In particular, this configuration is effective when the tile size is a neural network regardless of the layer.

Abstract

A data cache device for temporarily holding digital data comprising: a data holding unit (101) that holds data; a data input interface unit (102) for inputting data from outside of the data cache device; a data output interface unit (103) for outputting data to outside of the data cache device; a selector unit (104) that selects one or a plurality of paths simultaneously among a path for transferring the data from the data input interface unit to the data holding unit, a path for transferring the data from the data input interface unit to the data output interface unit, and a path for transferring the data from the data holding unit to the data output interface unit; a selector control unit (105) that controls the selector unit; and a read prediction table unit (107) that holds the number of times of planned reading of the data which is read during processing. The selector unit is controlled in accordance with the number of times of reading that is set in the read prediction table unit.

Description

データキャッシュ装置およびプログラムData cache device and program 関連出願の相互参照Cross-reference to related applications
 本出願は、2021年8月6日に出願された日本出願番号2021-129531号に基づくものであって、その優先権の利益を主張するものであり、その特許出願の全ての内容が、参照により本明細書に組み入れられる。 This application is based on Japanese Application No. 2021-129531 filed on August 6, 2021, and claims the benefit of its priority, and the entire contents of that patent application are incorporated by reference. incorporated herein by.
 本開示は、デジタルデータを一時的に保持するデータキャッシュ装置に関する。 The present disclosure relates to a data cache device that temporarily holds digital data.
 例えば、ニューラルネットワークの処理を実行する演算装置においては、畳込み演算を連続的に実行することで推論を行う。すなわち、元の入力データに対して所定のアルゴリズムで畳込み演算を行い、その出力データに対して、さらに次のアルゴリズムで畳込み演算を実行する。 For example, in an arithmetic unit that executes neural network processing, inference is performed by continuously executing convolutional operations. That is, the convolution operation is performed on the original input data by a predetermined algorithm, and the convolution operation is further performed on the output data by the following algorithm.
 ここで、一つの入力データに対して畳込み演算を実行し出力を得る処理をレイヤと呼ぶ。ニューラルネットワークでは、各レイヤの畳込み演算のアルゴリズムが定義されており、それらレイヤの組み合わせによってネットワークを構成している。 Here, the process of performing a convolution operation on one piece of input data and obtaining an output is called a layer. In a neural network, an algorithm for convolution operation is defined for each layer, and a network is constructed by combining these layers.
 畳込み演算を行うためには、入力データに対してWeight値を積算し、その結果を加算する積和演算を行う。このWeight値は畳込みのアルゴリズムによってKernelサイズが規定されており、例えばKernel 3×3の処理である場合には、1つの入力データに対して縦3×横3の9つの要素のWeightを積和することになる。この畳込み処理は入力データの要素に応じて必要となるため、ニューラルネットワークの畳込み演算では大量のWeightデータの読出しが必要になる。  In order to perform the convolution operation, the weight value is multiplied with the input data, and the sum of products operation is performed by adding the result. This weight value is defined by the kernel size by the convolution algorithm. will be reconciled. Since this convolution process is required according to the elements of the input data, the convolution operation of the neural network requires reading a large amount of weight data.
特開2018-88256号公報JP 2018-88256 A
 このWeightを必要なタイミングで外部読出し装置から読み出すと、膨大な読出しアクセスが発生し、結果的に読出し電力が増大する。また、多くの場合、外部読出し装置からの読出し時間が処理全体のボトルネックになる可能性がある。消費電力の低減が可能な半導体装置として、例えば特許文献1が知られている。特許文献1では、キャッシュメモリ内のセットのうち、アクセス頻度が低いセットへの電源供給を遮断する。 If this weight is read from an external reading device at the required timing, a huge number of read accesses will occur, resulting in an increase in read power. Also, in many cases, the read time from the external reader can become the bottleneck of the overall process. For example, Patent Document 1 is known as a semiconductor device capable of reducing power consumption. In Japanese Patent Application Laid-Open No. 2002-200000, the power supply to a set with a low access frequency among the sets in the cache memory is cut off.
 ニューラルネットワーク処理装置では、キャッシュ装置を搭載することが考えられる。一般的なキャッシュ装置は、時間的近傍性または位置的近傍性に基づいて、一旦外部から読み出したデータを内部のキャッシュ装置に保存する。再度同じデータの読出しが発生した場合には、外部へのアクセスは行わずキャッシュ装置からデータを読み出す。このキャッシュ装置は、外部からのデータ読出しによる時間的遅延を隠ぺいする効果が期待できる。また、外部記憶装置とキャッシュ装置の実装の差異によって電力消費量を削減することが可能である。 A neural network processing device may be equipped with a cache device. A typical cache device stores data once read from the outside in an internal cache device based on temporal proximity or positional proximity. When the same data is read again, the data is read from the cache device without accessing to the outside. This cache device can be expected to have the effect of hiding the time delay caused by reading data from the outside. Also, it is possible to reduce the power consumption due to the difference in implementation between the external storage device and the cache device.
 しかしながら、ニューラルネットワーク処理においては、複数レイヤをまとめて処理することがある。すなわち、入力データを処理単位に切り出し、切り出された入力データに対して複数レイヤの処理を連続的に実行することがある。これにより、あるレイヤの出力データを即座に次の入力データとして再利用することが可能となり、不要なメモリアクセスや遅延を削減することが可能である。 However, in neural network processing, multiple layers may be processed together. In other words, input data may be cut out in processing units, and multiple layers of processing may be continuously performed on the cut out input data. As a result, the output data of a layer can be immediately reused as the next input data, and unnecessary memory accesses and delays can be reduced.
 発明者の詳細な検討の結果、このような処理を行う場合には、レイヤごとのWeightを頻繁に切り替え、複雑な読出しが必要となるが、この場合には時間的近傍性や位置的近傍性が必ずしも担保されず、結果的にキャッシュミスが増大するため、従来技術のキャッシュ装置では効果的な電力削減ができないという課題が見出された。 As a result of the inventor's detailed study, when performing such processing, it is necessary to frequently switch the weight of each layer and perform complicated readout. is not always guaranteed, resulting in an increase in cache misses.
 そこで、本開示は、電力削減の効果があるデータキャッシュ装置を提供することを目的とする。 Therefore, an object of the present disclosure is to provide a data cache device that is effective in reducing power consumption.
 本開示は上記課題を解決するために以下の技術的手段を採用する。特許請求の範囲は、ひとつの態様として後述する実施形態に記載の具体的手段との対応関係を示す一例であって、本発明の技術的範囲を限定するものではない。 The present disclosure employs the following technical means to solve the above problems. The scope of claims is an example showing the corresponding relationship with specific means described in the embodiment described later as one aspect, and does not limit the technical scope of the present invention.
 本開示のデータキャッシュ装置は、デジタルデータを一時的に保持するデータキャッシュ装置であって、データを保持するデータ保持部と、前記データキャッシュ装置の外部からデータを入力するためのデータ入力インターフェイス部と、前記データキャッシュ装置の外部へデータを出力するためのデータ出力インターフェイス部と、前記データ入力インターフェイス部からのデータを前記データ保持部に転送する経路と、前記データ入力インターフェイス部からのデータを前記データ出力インターフェイス部に転送する経路と、前記データ保持部からのデータを前記データ出力インターフェイス部に転送する経路のうち1つまたは複数を同時に選択するセレクタ部と、前記セレクタ部を制御するセレクタ制御部と、前記データが処理時に読み出される予定読出し回数を保持する読出し予測テーブル部と、を備え、前記読出し予測テーブル部に設定された読出し回数に応じて前記セレクタ部を制御する。 A data cache device of the present disclosure is a data cache device that temporarily holds digital data, and includes a data holding section that holds data and a data input interface section for inputting data from the outside of the data cache device. a data output interface unit for outputting data to the outside of said data cache device; a path for transferring data from said data input interface unit to said data holding unit; a selector section for simultaneously selecting one or more of a path for transferring data from the data holding section to the data output interface section; a selector control section for controlling the selector section; and a readout prediction table section for holding a scheduled number of readouts at which the data is read out during processing, and controls the selector section according to the number of readouts set in the readout prediction table section.
 本開示のプログラムは、データを保持するデータ保持部と、前記データキャッシュ装置の外部からデータを入力するためのデータ入力インターフェイス部と、前記データキャッシュ装置の外部へデータを出力するためのデータ出力インターフェイス部と、前記データ入力インターフェイス部からのデータを前記データ保持部に転送する経路と、前記データ入力インターフェイス部からのデータを前記データ出力インターフェイス部に転送する経路と、前記データ保持部からのデータを前記データ出力インターフェイス部に転送する経路のうち1つまたは複数を同時に選択するセレクタ部と、を備えるデータキャッシュ装置を制御するためのプログラムであって、コンピュータを、前記データが処理時に読み出される予定読出し回数を保持する読出し予測テーブル手段、前記読出し予測テーブル手段に設定された読出し回数に応じて前記セレクタ部を制御するセレクタ制御手段として機能させるためのプログラムである。 A program of the present disclosure includes a data holding unit that holds data, a data input interface unit that inputs data from outside the data cache device, and a data output interface that outputs data to the outside of the data cache device. a path for transferring data from the data input interface section to the data holding section; a path for transferring data from the data input interface section to the data output interface section; and a path for transferring data from the data holding section. A program for controlling a data cache device comprising: a selector section for simultaneously selecting one or more of the paths for transferring to the data output interface section; The program functions as readout prediction table means for holding the number of readouts and selector control means for controlling the selector unit according to the number of readouts set in the readout prediction table means.
 本開示の別の態様のプログラムは、演算装置による演算を実行するのに必要なデータとして、データキャッシュ装置に保持したデータを読み出すか、外部記憶装置から読み出すかを設定するテーブルを作成するプログラムであって、コンピュータを、演算シミュレータによって前記演算装置の演算シミュレーションを行って、演算実行時の各データの読出し回数をカウントする読出しカウント手段、前記読出しカウント手段による各データの読出し回数に基づいて、前記テーブルを作成するテーブル作成手段として機能させるためのプログラムである。 A program according to another aspect of the present disclosure is a program that creates a table that sets whether to read data held in a data cache device or to read data from an external storage device as data necessary for executing an operation by an arithmetic device. a read count means for counting the number of times each data is read during execution of a calculation by performing an arithmetic simulation of the arithmetic unit by means of an arithmetic simulator; This is a program for functioning as table creation means for creating a table.
 本開示についての上記目的およびその他の目的、特徴や利点は、添付の図面を参照しながら下記の詳細な記述により、より明確になる。その図面は、
図1は、第1の実施の形態のデータキャッシュ装置の構成を示す図であり、 図2は、第1の実施の形態のデータキャッシュ装置を含む演算装置の全体構成を示す図であり、 図3は、第1の実施の形態のデータキャッシュ装置の動作を示すフローチャートであり、 図4は、第2の実施の形態のデータキャッシュ装置の構成を示す図であり、 図5は、第3の実施の形態のデータキャッシュ装置の構成を示す図であり、 図6は、第3の実施の形態のデータキャッシュ装置の動作を示すフローチャートであり、 図7は、第4の実施の形態のデータキャッシュ装置の構成を示す図である。
The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description with reference to the accompanying drawings. The drawing is
FIG. 1 is a diagram showing the configuration of a data cache device according to the first embodiment; FIG. 2 is a diagram showing the overall configuration of an arithmetic device including a data cache device according to the first embodiment; FIG. 3 is a flowchart showing the operation of the data cache device of the first embodiment; FIG. 4 is a diagram showing the configuration of a data cache device according to the second embodiment; FIG. 5 is a diagram showing the configuration of a data cache device according to the third embodiment; FIG. 6 is a flowchart showing the operation of the data cache device of the third embodiment; FIG. 7 is a diagram showing the configuration of a data cache device according to the fourth embodiment.
 以下、本開示の実施の形態のデータキャッシュ装置について、図面を参照しながら説明する。
(第1の実施の形態)
 図1は、第1の実施の形態のデータキャッシュ装置1の構成を示す図、図2はデータキャッシュ装置1、外部記憶装置2、演算装置3と演算アルゴリズム制御部4を含む全体構成を示す図である。図2に示すようにデータキャッシュ装置1は、外部記憶装置2と演算装置3と演算アルゴリズム制御部4に接続されている。データキャッシュ装置1は外部記憶装置2からのデータを入力し、一部のデータを保持したうえで、演算装置3に出力する。演算アルゴリズム制御部4は、ニューラルネットワークのレイヤパラメタやアルゴリズムを管理し、データキャッシュ装置1および演算装置3を連動して制御する。
A data cache device according to an embodiment of the present disclosure will be described below with reference to the drawings.
(First embodiment)
FIG. 1 shows the configuration of the data cache device 1 of the first embodiment, and FIG. 2 shows the overall configuration including the data cache device 1, the external storage device 2, the arithmetic device 3, and the arithmetic algorithm control unit 4. is. As shown in FIG. 2, the data cache device 1 is connected to an external storage device 2 , an arithmetic device 3 and an arithmetic algorithm control section 4 . The data cache device 1 inputs data from the external storage device 2 , holds part of the data, and outputs the data to the arithmetic device 3 . The arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 1 and the arithmetic device 3 in conjunction.
 次に、本実施の形態のデータキャッシュ装置1の内部構成について説明する。101はデータ保持部である。このデータ保持部101は、本実施の形態ではニューラルネットワークのWeightデータを一時的に保持するキャッシュメモリである。該データ保持部101は、SRAMまたはフリップフロップ回路で実装される。なお、データ保持部101は、「ローカルバッファ」ともいう。 Next, the internal configuration of the data cache device 1 of this embodiment will be described. 101 is a data holding unit. This data holding unit 101 is a cache memory that temporarily holds the Weight data of the neural network in this embodiment. The data holding unit 101 is implemented with an SRAM or flip-flop circuit. Note that the data holding unit 101 is also called a "local buffer".
 102はデータ入力インターフェイス部102である。データ入力インターフェイス部102は、外部記憶装置2と接続され、外部記憶装置2からのデータを受信する。データ入力インターフェイス部102と外部記憶装置2の接続については、中間にバスインターフェイス等があってもよく、論理的にデータが取得できる状態であればよい。データ入力インターフェイス部102はバスマスタとしての機能を内包し、演算装置3からセレクタ部104を経由して伝達された要求に応じて外部記憶装置2からデータを取得する。 102 is a data input interface unit 102 . Data input interface unit 102 is connected to external storage device 2 and receives data from external storage device 2 . As for the connection between the data input interface section 102 and the external storage device 2, a bus interface or the like may be provided in the middle, so long as the data can be logically acquired. The data input interface section 102 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 104 .
 103はデータ出力インターフェイスである。データ出力インターフェイス部103は演算装置3と接続されている。 103 is a data output interface. The data output interface section 103 is connected to the arithmetic device 3 .
 104はセレクタ部である。セレクタ部104はデータ入力インターフェイス部102からの入力データの送出先とデータ出力インターフェイス部103の要求データの取得元を選択する回路である。  104 is a selector unit. The selector unit 104 is a circuit that selects the destination of input data from the data input interface unit 102 and the source of request data from the data output interface unit 103 .
 105はセレクタ制御部である。セレクタ制御部105はセレクタ部104を制御する部分であり、命令実行サイクル単位でセレクタ部104の接続を制御する。セレクタ制御部105は、データ入力インターフェイス部102からのデータをデータ保持部101に転送する経路と、データ入力インターフェイス部102からのデータをデータ出力インターフェイス部103に転送する経路と、データ保持部101からのデータをデータ出力インターフェイス部103に転送する経路のうち1つまたは複数を同時に選択する。 105 is a selector control unit. The selector control unit 105 is a part that controls the selector unit 104, and controls connection of the selector unit 104 in units of instruction execution cycles. Selector control section 105 includes a path for transferring data from data input interface section 102 to data holding section 101, a path for transferring data from data input interface section 102 to data output interface section 103, and a path for transferring data from data holding section 101 to data output interface section 103. , one or a plurality of paths are selected at the same time from the paths for transferring the data of .
 106は読出しカウンタ部である。読出しカウンタ部106は、データ出力インターフェイス部103のアクセス数をカウントする機能である。内部にカウンタを複数保持し、データ出力インターフェイス部103を経由して、演算装置3が要求するアドレスごとの読出しを独立してカウントする。 106 is a read counter unit. The read counter unit 106 has a function of counting the number of times the data output interface unit 103 is accessed. It internally holds a plurality of counters, and independently counts readout for each address requested by the arithmetic unit 3 via the data output interface unit 103 .
 107は読出し予測テーブル部である。読出し予測テーブル部107はSRAMまたはフリップフロップ回路にて実装され、各レイヤでのWeight値が読み出される読出し回数が格納されている。予測回数はシステム起動時に初期値が書き込まれ、その後任意のタイミングで更新されてもよい。また、実装方針によっては、従前に設定された読出し回数閾値との大小関係のみを保持してもよい。  107 is a read prediction table section. The reading prediction table unit 107 is implemented by an SRAM or a flip-flop circuit, and stores the number of times the weight value in each layer is read. The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
 108は読出し予測テーブル制御部である。読出し予測テーブル制御部108は演算アルゴリズム制御部4から指定されたアルゴリズム情報を取得し、読出し予測テーブル部107から該当レイヤに対するWeightデータの読出し予測回数を読み出し、セレクタ制御部105に対してセレクタ選択信号を発出する。加えて、読出し予測テーブル制御部108は演算アルゴリズム制御部4の指示に基づいて、読出しカウンタ部106から読出しカウンタ情報を取得し、読出し予測テーブル部107の値を更新する機能を持つ。  108 is a read prediction table control unit. The readout prediction table control unit 108 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 107, and sends a selector selection signal to the selector control unit 105. to be issued. In addition, the read prediction table control unit 108 has a function of acquiring read counter information from the read counter unit 106 and updating the values of the read prediction table unit 107 based on instructions from the arithmetic algorithm control unit 4 .
 図3は、データキャッシュ装置1の動作を示すフローチャートである。以下に説明する例では、演算装置3は、ニューラルネットワークによる動画処理の演算を例として説明する。演算装置3は、動画を構成するフレームごとに、画像処理を行う。より具体的には、処理対象のフレーム画像または特徴マップを複数の処理単位の領域に分割し、該領域をタイルと呼ぶが、タイルごとにニューラルネットワークによる推論処理を行う。各フレームに対して行う推論処理は同じである。 FIG. 3 is a flowchart showing the operation of the data cache device 1. FIG. In the example described below, the computation device 3 will be described as an example of computation for moving image processing using a neural network. The computing device 3 performs image processing for each frame that constitutes a moving image. More specifically, a frame image or feature map to be processed is divided into a plurality of processing unit regions, and the regions are called tiles, and inference processing is performed by a neural network for each tile. The inference process performed for each frame is the same.
 ステップS001において、読出し予測テーブル制御部108は、演算アルゴリズム制御部4から処理するアルゴリズムのリストを受信する。例えば、ニューラルネットワークの複数レイヤを一括して処理する場合には、そのレイヤ数、各レイヤのカーネル数、入力データチャネル数および出力データチャネル数および入力アクティベーションサイズの情報などである。読出し予測テーブル制御部108は、受信した情報に基づいて、必要となるWeight保持量と、演算を繰り返すタイル数を算出する。または、演算アルゴリズム制御部4自身がWeight保持量を計算し、その結果を受信する実装としてもよい。 In step S<b>001 , the reading prediction table control unit 108 receives a list of algorithms to be processed from the arithmetic algorithm control unit 4 . For example, when processing multiple layers of a neural network collectively, the information includes the number of layers, the number of kernels in each layer, the number of input data channels, the number of output data channels, and the input activation size. Based on the received information, the readout prediction table control unit 108 calculates the required weight retention amount and the number of tiles for which the calculation is to be repeated. Alternatively, the calculation algorithm control unit 4 itself may calculate the weight retention amount and receive the result.
 読出し予測テーブル制御部108は、必要となるWeight保持量がデータ保持部の容量以下であるか否かを判定する。複数レイヤ処理分に必要となるWeight量がデータ保持部101の容量以下である場合には(S001で「はい」)、読出し予測テーブル制御部108は、引き続きステップS002の処理を実行する。 The read prediction table control unit 108 determines whether or not the required weight holding amount is equal to or less than the capacity of the data holding unit. If the amount of weight required for multi-layer processing is equal to or less than the capacity of the data holding unit 101 ("Yes" in S001), the reading prediction table control unit 108 continues the process of step S002.
 ステップS002において、読出し予測テーブル制御部108は、複数レイヤを処理する際のタイル数の情報を演算アルゴリズム制御部4から受信し、タイル数が2以上か否かを判定する。 In step S002, the reading prediction table control unit 108 receives information on the number of tiles when processing multiple layers from the arithmetic algorithm control unit 4, and determines whether the number of tiles is two or more.
 このとき、処理タイル数が1のときには(S002で「いいえ」)、データをデータ保持部101に転送して一時的保持しておくことの電力的および性能的メリットがないため、ステップS003に進み、読出し予測テーブル制御部108は外部記憶装置2からデータ保持部101を介さずに直接データを転送するように読出し予測テーブル部107を更新する。タイル数が2以上の場合には(S002で「はい」)、ステップS004に進み、予測テーブルの全領域をデータ保持部101に転送する旨のフラグを立てた状態で読出し予測テーブル部107を更新する。なお、以上に説明したステップS001とステップS002の判断の順序は逆でもよい。 At this time, when the number of tiles to be processed is 1 ("No" in S002), there is no power or performance advantage in transferring data to the data holding unit 101 and temporarily holding it, so the process proceeds to step S003. , the read prediction table control unit 108 updates the read prediction table unit 107 so that the data is directly transferred from the external storage device 2 without going through the data holding unit 101 . If the number of tiles is 2 or more ("Yes" in S002), proceed to step S004, and update the readout prediction table unit 107 with a flag indicating that the entire region of the prediction table is to be transferred to the data holding unit 101. do. Note that the order of determination in steps S001 and S002 described above may be reversed.
 続いて、ステップS012において、読出し予測テーブル部107にしたがって、外部記憶装置2からデータを転送する。具体的には、処理タイル数が1のときには、データ保持部101を介さずに直接データを転送し、処理タイル数が2以上のときには、外部記憶装置2からデータ保持部101へデータを転送する。 Subsequently, in step S012, data is transferred from the external storage device 2 according to the reading prediction table section 107. Specifically, when the number of tiles to be processed is 1, the data is directly transferred without going through the data holding unit 101, and when the number of tiles to be processed is 2 or more, the data is transferred from the external storage device 2 to the data holding unit 101. .
 一方、ステップS001においてWeightデータの量がデータ保持部101の容量以上である場合には(S001で「いいえ」)、ステップS005に進み、処理タイル数が大きいレイヤのデータから順にデータ保持部101の容量に収まりきるまでのレイヤ分のWeightデータをデータ保持部101に転送するように読出し予測テーブル部107を更新する。 On the other hand, if the amount of Weight data is equal to or greater than the capacity of the data storage unit 101 in step S001 ("No" in S001), the process proceeds to step S005, and the data in the data storage unit 101 is stored in descending order of the number of tiles processed. The reading prediction table unit 107 is updated so that the weight data for the layers up to the capacity is transferred to the data holding unit 101 .
 ステップS006は、データ保持部101から読み出されるべきWeightデータを外部記憶装置2からデータ保持部101に対して転送するステップである。読出し予測テーブル制御部108はデータ保持部101から読出しが必要となるWeightデータについて、データ入力インターフェイス部102に対して読み出し要求を送出する。または、演算アルゴリズム制御部4を経由して要求を通知してもよい。 Step S006 is a step of transferring the Weight data to be read from the data holding unit 101 from the external storage device 2 to the data holding unit 101. The readout prediction table control unit 108 sends a readout request to the data input interface unit 102 for weight data that needs to be read out from the data holding unit 101 . Alternatively, the request may be notified via the arithmetic algorithm control unit 4 .
 データ入力インターフェイス部102は新たにデータ保持部101から読み出されるべきWeightデータを外部記憶装置2からデータ保持部101に転送する。このときデータ入力インターフェイス部102はバスマスタとして機能し、読出し予測テーブルに保持されたWeightの位置情報から外部記憶装置2のアドレスを生成し、データ転送要求を出す。または、外部記憶装置2とデータ入力インターフェイス部102の間にDMAコントローラなどを設けることで、同等の機能を代替してもよい。 The data input interface unit 102 transfers Weight data to be newly read from the data holding unit 101 from the external storage device 2 to the data holding unit 101 . At this time, the data input interface unit 102 functions as a bus master, generates the address of the external storage device 2 from the weight position information held in the read prediction table, and issues a data transfer request. Alternatively, by providing a DMA controller or the like between the external storage device 2 and the data input interface unit 102, equivalent functions may be replaced.
 ステップS007以降は最初のタイルの処理が開始された後のステップである。ステップS007は演算アルゴリズム制御部4が演算装置3に対して処理開始の信号を送出し、演算装置3がデータ出力インターフェイス部103に対して必要となるWeightデータの取得要求をアドレスとともに送出するタイミングで発生する。データ出力インターフェイス部103は演算装置3からWeightデータの転送要求をアドレスとともに受信する。このとき、データ出力インターフェイス部103は、セレクタ制御部105に対して要求されているアドレス情報を伝達する。 Step S007 and subsequent steps are steps after the start of the processing of the first tile. Step S007 is the timing at which the arithmetic algorithm control unit 4 sends a processing start signal to the arithmetic unit 3, and the arithmetic unit 3 sends a request to acquire the necessary weight data to the data output interface unit 103 together with the address. Occur. The data output interface unit 103 receives a weight data transfer request from the arithmetic unit 3 together with an address. At this time, data output interface section 103 transmits the requested address information to selector control section 105 .
 セレクタ制御部105は読出し予測テーブル部107を参照し、該要求データが外部記憶装置2に存在するか、データ保持部101に保持されているかを判定し、セレクタ部104を制御して、必要な記憶域への経路を接続し、データ出力インターフェイス部103がデータにアクセスできるようにする。セレクタ制御部105は経路の確立の信号として該データが外部記憶装置2に存在するのか、データ保持部101に存在するのかのマップ情報をデータ出力インターフェイス部103に通知する。 The selector control unit 105 refers to the read prediction table unit 107 to determine whether the requested data exists in the external storage device 2 or is held in the data holding unit 101, controls the selector unit 104, A path to the storage area is connected so that the data output interface unit 103 can access the data. The selector control unit 105 notifies the data output interface unit 103 of map information indicating whether the data exists in the external storage device 2 or in the data holding unit 101 as a path establishment signal.
 データ出力インターフェイス部103は自身が要求したデータがどのレイヤのWeightデータであるかの情報と、セレクタ制御部105から返送されたマップ情報ごとに読出しカウンタ部106の要求転送データ量をインクリメントする。読出しカウンタ部106は、マップ情報に基づいて、Weightデータがデータ保持部からデータが読み出された読出し回数と、データ入力インターフェイス部から直接読み出された読出し回数をそれぞれにカウントし保持する。 The data output interface unit 103 increments the requested transfer data amount of the read counter unit 106 for each information indicating which layer's weight data the data requested by itself belongs to and the map information returned from the selector control unit 105 . Based on the map information, the read counter unit 106 counts and holds the number of times the weight data is read from the data holding unit and the number of times the weight data is directly read from the data input interface unit.
 ステップS008において、演算装置3は全タイルが完了するまでデータ出力インターフェイス部103を経由しWeightデータを取得し続ける。この間データ出力インターフェイス部103はステップS007を継続する。ステップS008において全タイルの処理が完了した場合(S008で「はい」)、ステップS009に進む。ここまでの処理で、1つのフレームを処理したときに、各レイヤでWeightデータが読み出された回数のカウントデータが読出しカウンタ部106によってカウントされる。 In step S008, the arithmetic unit 3 continues to acquire Weight data via the data output interface unit 103 until all tiles are completed. During this time, data output interface section 103 continues step S007. If the processing of all tiles is completed in step S008 ("Yes" in S008), the process proceeds to step S009. In the processing up to this point, the read counter unit 106 counts the number of times the weight data is read in each layer when one frame is processed.
 ステップS009において、読出し予測テーブル制御部108はレイヤごとに読出しカウンタ部106からカウントデータを読み出し、演算アルゴリズム制御部4により予め指定された閾値と比較を行う。該閾値は、データの読み出し及び転送に消費される電力量から算出される。すなわち、外部記憶装置2からデータ保持部101を介さずにデータを転送するのに要する電力量と、外部記憶装置2からデータ保持部101にデータを転送し、データ保持部101からデータを読み出すのに要する電力量とに基づいて決定される。 In step S<b>009 , the readout prediction table control unit 108 reads count data from the readout counter unit 106 for each layer, and compares it with a threshold specified in advance by the arithmetic algorithm control unit 4 . The threshold is calculated from the amount of power consumed for reading and transferring data. That is, the amount of power required to transfer data from the external storage device 2 without going through the data holding unit 101 and the amount of power required to transfer data from the external storage device 2 to the data holding unit 101 and read data from the data holding unit 101 is determined based on the amount of power required for
 読出し回数が閾値以上の場合には、データ保持部101からWeightデータを読み出したほうが外部記憶装置2から直接データを取得するよりも消費電力が低くなる。読出し予測テーブル制御部108はWeightデータの読出し回数と閾値との大小比較の結果として、読出し回数が閾値以上のレイヤのWeightデータについてはフラグ設定する。ステップS010において、前述のステップS009において設定されたフラグ情報を読み出し、読出し予測テーブル部107に書き込む。 When the number of readings is equal to or greater than the threshold, reading the weight data from the data holding unit 101 consumes less power than obtaining the data directly from the external storage device 2 . The reading prediction table control unit 108 compares the weight data reading count with the threshold value, and sets a flag for the weight data of the layer whose reading count is equal to or greater than the threshold value. In step S<b>010 , the flag information set in step S<b>009 is read out and written in the readout prediction table section 107 .
 なお、ステップS009において閾値評価を行わず、読出しカウント数の多い順、すなわち読出し量の多いレイヤから順に読出し予測テーブル部107にデータ保持部101から読み出す旨のフラグを設定してもよい。 Note that a flag may be set in the read prediction table unit 107 to read from the data holding unit 101 in descending order of the read count, that is, in descending order of the read amount, without performing threshold evaluation in step S009.
 ステップS011は読出し予測テーブル部107の情報に基づいて、データ保持部101にデータを転送するステップである。読出し予測テーブル制御部108は新たにデータ保持部101から読出しが必要となるWeightデータについて、データ入力インターフェイス部102に対して読み出し要求を送出する。または、演算アルゴリズム制御部4を経由して要求を通知してもよい。データ入力インターフェイス部102は新たにデータ保持部101から読み出されるべきWeightデータを、新たに外部記憶装置2から直接読み出すようになったWeightデータの領域に上書きする。または、新たに更新された読出し予測テーブル部107の内容に基づき、改めてステップS006を実行してもよい。 Step S011 is a step of transferring data to the data holding unit 101 based on the information in the reading prediction table unit 107. Readout prediction table control unit 108 sends a readout request to data input interface unit 102 for weight data that needs to be read out from data holding unit 101 anew. Alternatively, the request may be notified via the arithmetic algorithm control unit 4 . The data input interface unit 102 overwrites the weight data to be newly read from the data holding unit 101 in the area of the weight data newly read directly from the external storage device 2 . Alternatively, step S<b>006 may be executed again based on the newly updated contents of readout prediction table section 107 .
 ステップS013において、上述の処理によって準備された読出し予測テーブル部107およびデータ保持部101のデータを用いて、残りのフレームについての処理を実施する。 In step S013, the remaining frames are processed using the readout prediction table section 107 and the data holding section 101 prepared by the above process.
 本実施の形態においては、データ保持部101に保持するデータとしてWeightデータを例として説明したが、本開示はWeightデータのみに適用されるものではなく、その他のデータ、例えばアクティベーションデータやその他の重みデータに適用してもよいことは言うまでもない。 In the present embodiment, the weight data is described as an example of the data held in the data holding unit 101, but the present disclosure is not applied only to the weight data, and other data such as activation data and other It goes without saying that it may also be applied to weighted data.
 以上、本実施の形態のデータキャッシュ装置1の構成について説明したが、セレクタ制御部105、読出しカウンタ部106、読出し予測テーブル部107、読出し予測テーブル制御部108の各機能を実現するモジュールを有するプログラムを記憶手段に格納しておき、CPUによって当該プログラムを実行することによって、上記した制御を行うデータキャッシュ装置1が実現される。このようなプログラムも本開示の範囲に含まれる。 The configuration of the data cache device 1 of this embodiment has been described above. is stored in the storage means, and the CPU executes the program, thereby realizing the data cache device 1 that performs the above-described control. Such programs are also included within the scope of this disclosure.
 本実施の形態のデータキャッシュ装置1は、最初のフレーム処理を行う際に、読出し回数が閾値以上のレイヤのWeightデータにフラグを設定し、読出し予測テーブル部107に書き込んでおく。読出し予測テーブル部107に基づいてデータ保持部101にWeightデータを転送しておくので、残りのフレーム処理を行う際に、データ保持部101に記憶されたWeightデータを用いることができ、電力消費量を抑制しつつ演算性能を向上させることができる。加えて、残りのフレーム処理を行う際には、本実施の形態のカウントおよび比較処理を停止することで、評価用の電力を削減してもよい。 The data cache device 1 of the present embodiment sets a flag in the weight data of the layer whose read count is equal to or greater than the threshold value and writes it to the read prediction table section 107 when performing the first frame processing. Since the weight data is transferred to the data holding unit 101 based on the reading prediction table unit 107, the weight data stored in the data holding unit 101 can be used when performing the remaining frame processing, thereby reducing power consumption. It is possible to improve the arithmetic performance while suppressing the In addition, when performing the remaining frame processing, power for evaluation may be reduced by stopping the counting and comparison processing of the present embodiment.
(第2の実施の形態)
 図4は、第2の実施の形態のデータキャッシュ装置5の構成を示す図である。第2の実施の形態のデータキャッシュ装置5の基本的な構成は、第1の実施の形態のデータキャッシュ装置1と同じであるが、第2の実施の形態のデータキャッシュ装置5は、圧縮されたWeightデータを扱う点が異なる。
(Second embodiment)
FIG. 4 is a diagram showing the configuration of the data cache device 5 according to the second embodiment. The basic configuration of the data cache device 5 of the second embodiment is the same as that of the data cache device 1 of the first embodiment, but the data cache device 5 of the second embodiment is compressed. The difference is that weight data is handled.
 データキャッシュ装置5は、図2で説明した外部記憶装置2、演算装置3、及び演算アルゴリズム制御部4と接続されている。データキャッシュ装置5は外部記憶装置2からのデータを入力し、一部のデータを保持したうえで、演算装置3に出力する。演算アルゴリズム制御部4は、ニューラルネットワークのレイヤパラメタやアルゴリズムを管理し、データキャッシュ装置5及び演算装置3を連動して制御する。 The data cache device 5 is connected to the external storage device 2, arithmetic device 3, and arithmetic algorithm control section 4 described in FIG. The data cache device 5 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 . The arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 5 and the arithmetic device 3 in conjunction.
 次に、第2の実施の形態のデータキャッシュ装置5の内部構成について説明する。
 501はデータ保持部である。このデータ保持部501はWeightデータを一時的に保持するキャッシュメモリである。データ保持部501はSRAMまたはフリップフロップ回路で実装される。
Next, the internal configuration of the data cache device 5 of the second embodiment will be explained.
501 is a data holding unit. This data holding unit 501 is a cache memory that temporarily holds Weight data. The data holding unit 501 is implemented with an SRAM or flip-flop circuit.
 502はデータ入力インターフェイス部である。データ入力インターフェイス部502は、外部記憶装置2と接続され、外部記憶装置2からのデータを受信する。データ入力インターフェイス部502と外部記憶装置2の接続については、中間にバスインターフェイス等があってもよく、論理的にデータが取得できる状態であればよい。データ入力インターフェイス部502はバスマスタとしての機能を内包し、演算装置3からセレクタ部504を経由して伝達された要求に応じて、外部記憶装置2からデータを取得する。  502 is a data input interface unit. Data input interface unit 502 is connected to external storage device 2 and receives data from external storage device 2 . As for the connection between the data input interface section 502 and the external storage device 2, a bus interface or the like may be provided in the middle as long as the data can be logically acquired. The data input interface section 502 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 504 .
 503は、データ出力インターフェイス部である。データ出力インターフェイス部503は演算装置3と接続されている。  503 is a data output interface unit. The data output interface section 503 is connected to the arithmetic device 3 .
 504は、セレクタ部である。セレクタ部504はデータ入力インターフェイス部502からの入力データの送出先とデータ出力インターフェイス部503の要求データの取得元を選択する回路である。  504 is a selector part. A selector unit 504 is a circuit that selects the destination of input data from the data input interface unit 502 and the source of request data from the data output interface unit 503 .
 505は、セレクタ制御部である。セレクタ制御部505はセレクタ部504を制御する部分であり、命令実行サイクル単位でセレクタ部504の接続を制御する。 505 is a selector control unit. A selector control unit 505 is a portion that controls the selector unit 504, and controls connection of the selector unit 504 in units of instruction execution cycles.
 506は読出しカウンタ部である。読出しカウンタ部506は、データ出力インターフェイス部503のアクセス数をカウントする機能である。内部にカウンタを複数保持し、データ出力インターフェイス部503を経由して、演算装置3が要求するアドレスごとの読出しを独立してカウントする。  506 is a read counter unit. A read counter unit 506 has a function of counting the number of accesses to the data output interface unit 503 . It internally holds a plurality of counters, and independently counts readout for each address requested by the arithmetic unit 3 via the data output interface unit 503 .
 507は、読出し予測テーブル部である。読出し予測テーブル部507は、SRAMまたはフリップフロップ回路にて実装され、各レイヤでのWeightデータが読み出される読出し回数が格納されている。予測回数はシステム起動時に初期値が書き込まれ、その後任意のタイミングで更新されてもよい。また、実装方針によっては、従前に設定された読出し回数閾値との大小関係のみを保持してもよい。  507 is a read prediction table section. The reading prediction table section 507 is implemented by an SRAM or a flip-flop circuit, and stores the number of times weight data is read for each layer. The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
 508は、読出し予測テーブル制御部である。読出し予測テーブル制御部508は演算アルゴリズム制御部4から指定されたアルゴリズム情報を取得し、読出し予測テーブル部507から該当レイヤに対するWeightデータの読出し予測回数を読み出し、セレクタ制御部505に対してセレクタ選択信号を発出する。加えて、読出し予測テーブル制御部508は演算アルゴリズム制御部4の指示に基づいて、読出しカウンタ情報を読出しカウンタ部506から取得し、読出し予測テーブル部507の値を更新する機能を持つ。  508 is a read prediction table control unit. The readout prediction table control unit 508 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 507, and sends a selector selection signal to the selector control unit 505. to be issued. In addition, the read prediction table control unit 508 has a function of acquiring read counter information from the read counter unit 506 and updating the values of the read prediction table unit 507 based on instructions from the arithmetic algorithm control unit 4 .
 509は、データ伸長部である。データ伸長部509は演算装置3のデータ要求に基づいて転送されてくる圧縮されたWeightデータを所定の方法で伸長する。圧縮の方法は特定の方法に限定されることはなく、そのアルゴリズムは本開示の有効性に影響を及ぼすものではないが、たとえばランレングス符号化などであればよい。  509 is a data decompression unit. A data decompression unit 509 decompresses the compressed weight data transferred based on the data request of the arithmetic unit 3 by a predetermined method. The method of compression is not limited to any particular method, and its algorithm does not affect the validity of this disclosure, but may be, for example, run-length encoding.
 第2の実施の形態のデータキャッシュ装置5の動作については、図3のフローチャートに準じる。ただし、ステップS002,S003からS005の予測テーブル作成においては、圧縮されたWeightのデータ量によって算出される必要がある。 The operation of the data cache device 5 of the second embodiment conforms to the flowchart of FIG. However, in creating the prediction table in steps S002, S003 to S005, it is necessary to calculate the compressed Weight data amount.
 本実施の形態では、Weightデータを例に説明したが、本開示はWeightのみに適用されるものではなく、その他のデータ、例えばアクティベーションデータやその他の重みデータに適用してもよいことは言うまでもない。 In the present embodiment, weight data has been described as an example, but it goes without saying that the present disclosure is not applied only to weight, and may be applied to other data such as activation data and other weight data. stomach.
 第2の実施の形態のデータキャッシュ装置5も、第1の実施の形態のデータキャッシュ装置1と同様に、電力消費量を抑制しつつ演算性能を向上させることができる。 Similarly to the data cache device 1 of the first embodiment, the data cache device 5 of the second embodiment can improve the computational performance while suppressing power consumption.
(第3の実施の形態)
 図5は、第3の実施の形態のデータキャッシュ装置6の構成を示す図である。データキャッシュ装置6は、外部記憶装置2、演算装置3、及び、演算アルゴリズム制御部4と接続されている。データキャッシュ装置6は、外部記憶装置2からのデータを入力し、一部のデータを保持したうえで、演算装置3に出力する。演算アルゴリズム制御部4は、ニューラルネットワークのレイヤパラメタやアルゴリズムを管理し、演算装置3を制御する。
(Third Embodiment)
FIG. 5 is a diagram showing the configuration of the data cache device 6 according to the third embodiment. The data cache device 6 is connected to the external storage device 2 , arithmetic device 3 and arithmetic algorithm control section 4 . The data cache device 6 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 . The arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network and controls the arithmetic unit 3 .
 7はWeight配置プログラムである。このWeight配置プログラム7はWeightデータを外部記憶装置2に配置するか、データ保持部601に配置するかを決定するためのプログラムである。  7 is the Weight placement program. This weight placement program 7 is a program for determining whether to place the weight data in the external storage device 2 or in the data holding unit 601 .
 8は、演算シミュレータである。演算シミュレータ8は外部記憶装置2、演算装置3、演算アルゴリズム制御部4およびデータキャッシュ装置6の動作を論理的に模擬するソフトウェアである。  8 is a calculation simulator. The arithmetic simulator 8 is software that logically simulates the operations of the external storage device 2 , the arithmetic device 3 , the arithmetic algorithm control section 4 and the data cache device 6 .
 次に、本実施の形態のデータキャッシュ装置6の内部構成について説明する。
 601は、データ保持部である。このデータ保持部601はWeightデータを一時的に保持するキャッシュメモリである。データ保持部601はSRAMまたはフリップフロップ回路で実装される。
Next, the internal configuration of the data cache device 6 of this embodiment will be described.
601 is a data holding unit. This data holding unit 601 is a cache memory that temporarily holds Weight data. The data holding unit 601 is implemented with an SRAM or flip-flop circuit.
 602は、データ入力インターフェイス部である。データ入力インターフェイス部602は、外部記憶装置2と接続され、外部記憶装置2からのデータを受信する。データ入力インターフェイス部602と外部記憶装置2の接続については、中間にバスインターフェイス等があってもよく、論理的にデータが取得できる状態であればよい。データ入力インターフェイス部602はバスマスタとしての機能を内包し、演算装置3からセレクタ部604を経由して伝達された要求に応じて、外部記憶装置2からデータを取得する。 602 is a data input interface unit. The data input interface unit 602 is connected to the external storage device 2 and receives data from the external storage device 2 . As for the connection between the data input interface unit 602 and the external storage device 2, a bus interface or the like may be provided in the middle as long as the data can be logically acquired. The data input interface unit 602 includes a function as a bus master, and acquires data from the external storage device 2 in response to requests transmitted from the arithmetic unit 3 via the selector unit 604 .
 603は、データ出力インターフェイス部である。データ出力インターフェイス部603は演算装置3と接続されている。 603 is a data output interface unit. The data output interface section 603 is connected to the arithmetic device 3 .
 604は、セレクタ部である。セレクタ部604は、データ入力インターフェイス部602からの入力データの送出先とデータ出力インターフェイス部603の要求データの取得元を選択する回路である。セレクタ部604はデータ出力インターフェイス部603が発行する要求アドレスによってデータをデータ保持部601から、またはデータ入力インターフェイス部602への経路を接続する。 604 is a selector unit. The selector unit 604 is a circuit that selects the destination of input data from the data input interface unit 602 and the source of request data from the data output interface unit 603 . The selector unit 604 connects data from the data holding unit 601 or to the data input interface unit 602 according to the request address issued by the data output interface unit 603 .
 605はセレクタ制御部である。セレクタ制御部605はデータ入力インターフェイス部602からデータ保持部601に対してデータを転送するか、データ出力インターフェイス部603の要求に応じてデータを送出するかの制御を行う部分である。 605 is a selector control unit. A selector control unit 605 is a portion that controls whether data is transferred from the data input interface unit 602 to the data holding unit 601 or data is sent according to a request from the data output interface unit 603 .
 606は、データ配置テーブルである。データ配置テーブル部606はSRAMまたはフリップフロップ回路にて実装され、どのレイヤのWeight値がデータ保持部601に保持されているかが記録されている。 606 is a data arrangement table. The data arrangement table section 606 is implemented by an SRAM or a flip-flop circuit, and records which layer's Weight value is held in the data holding section 601 .
 次に、Weight配置プログラム7の内部構成について説明する。
 701は、Weight配置テーブル作成手段である。Weight配置テーブル作成手段701は各レイヤのWeightデータを外部記憶装置2に配置するかデータ保持部601に保持するかをアクセス回数予測に基づき判定する。
Next, the internal configuration of the weight placement program 7 will be described.
Reference numeral 701 denotes weight arrangement table creation means. Weight arrangement table creation means 701 determines whether to arrange the weight data of each layer in the external storage device 2 or hold it in the data holding unit 601 based on the access frequency prediction.
 702は読出しカウント手段であり、レイヤごとのWeight読出し回数を算出する。この読出し回数算出は演算シミュレータ8にレイヤ処理を実行させることで、演算シミュレータ8から各Weightデータの読出し回数を取得する。  702 is read count means, which calculates the number of weight readouts for each layer. This read count calculation is performed by causing the calculation simulator 8 to execute layer processing, thereby acquiring the read count of each weight data from the calculation simulator 8 .
 なお、Weight配置テーブル作成手段701と読出しカウント手段702は、プログラムのモジュールによって構成され、Weight配置プログラム7をコンピュータにより実行することにより、その機能が発揮される。 The weight placement table creation means 701 and the read count means 702 are configured by program modules, and their functions are exhibited by executing the weight placement program 7 by a computer.
 次に、図6は、第3の実施の形態のデータキャッシュ装置6の動作を示す図である。
 S101は、Weight配置プログラム7が演算シミュレータ8を使用して、演算のシミュレーションを実行するステップである。Weight配置プログラム7は、演算アルゴリズム制御部4への入力情報となるアルゴリズム、カーネル数、レイヤ数、入力データサイズ等の情報に基づいて、演算シミュレータ8を用いてWeightデータへのアクセス回数を算出する。該処理をステップS102において、Weight配置テーブル作成手段701は全タイル・レイヤ分実行し、レイヤごとのアクセス数を読出しカウント手段702にリスト化する。ステップS102が完了後(ステップS102で「はい」)、ステップS103に進む。
Next, FIG. 6 is a diagram showing the operation of the data cache device 6 of the third embodiment.
S101 is a step in which the weight placement program 7 uses the calculation simulator 8 to perform calculation simulation. The weight allocation program 7 calculates the number of accesses to the weight data using the arithmetic simulator 8 based on information such as the algorithm, the number of kernels, the number of layers, the input data size, etc., which are input information to the arithmetic algorithm control unit 4. . In step S 102 , the weight arrangement table creation means 701 executes this process for all tile layers, and lists the number of accesses for each layer in the read count means 702 . After step S102 is completed ("Yes" in step S102), the process proceeds to step S103.
 ステップS103は、レイヤごとのWeightアクセス回数を集計するステップである。ステップS103においてWeight配置テーブル作成手段701は読出しカウント手段702に保持されたレイヤごとの読出しカウントを降順にソートする。 Step S103 is a step of counting the number of times of Weight access for each layer. In step S103, the weight arrangement table creation means 701 sorts the read counts for each layer held in the read count means 702 in descending order.
 ステップS104からステップS106はWeight配置テーブルを作成するステップである。Weight配置テーブル作成手段701は、従前に取得したデータ保持部601の容量に基づき、Weightアクセス数の多い順にデータ保持部601にデータを配置するように配置テーブルのアドレスを設定する。例えば、データ保持部601のアドレスと外部記憶装置2のアドレスが独立に設計されている場合、データ保持部601のアドレスを該アクセス数の多いWeight領域にマッピングするようにすればよい。ステップS104の処理はアクセス数の多い順に順次実施し、ステップS105で、データ保持部601のデータ保持量がいっぱいになったかを判定する。ステップS105でデータ保持部601の領域を使い切った場合には(ステップS105で「はい」)、ステップS106に進む。 Steps S104 to S106 are steps for creating a weight arrangement table. The weight allocation table creation means 701 sets the address of the allocation table so as to arrange data in the data holding unit 601 in descending order of the number of weight accesses based on the capacity of the data holding unit 601 previously acquired. For example, when the address of the data holding unit 601 and the address of the external storage device 2 are designed independently, the address of the data holding unit 601 should be mapped to the weight area with the high access frequency. The processing in step S104 is performed in descending order of the number of accesses, and in step S105, it is determined whether the amount of data held in the data holding unit 601 is full. If the area of the data holding unit 601 is used up in step S105 ("Yes" in step S105), the process proceeds to step S106.
 ステップS106は、外部記憶装置2に配置する領域を指定するステップである。当該ステップS106において、データ保持部601に保持しきれなかったレイヤのWeightデータに対して外部記憶装置2のアドレスを指定する。 Step S106 is a step of specifying an area to be allocated in the external storage device 2. In the step S106, the address of the external storage device 2 is specified for the weight data of the layer that could not be held in the data holding unit 601. FIG.
 ステップS107は、作成されたWeight配置テーブルを、データキャッシュ装置6のデータ配置テーブル部606に転送するステップである。該ステップS107では、実際の処理を実施するためにWeight配置プログラム7は作成したWeight配置テーブル情報をデータ配置テーブル部606に転送する。転送手段はデータ入力インターフェイス部102経由で読み込んでもよいし、データ配置テーブル部606を外部領域からメモリマップしておいて、不図示の外部マスタなどを用いて転送してもよい。 Step S107 is a step of transferring the created weight arrangement table to the data arrangement table section 606 of the data cache device 6. In step S107, the weight placement program 7 transfers the created weight placement table information to the data placement table section 606 for actual processing. The transfer means may read via the data input interface section 102, or the data arrangement table section 606 may be memory-mapped from an external area and transferred using an external master or the like (not shown).
 ステップS108は転送されたデータ配置テーブル部606に準じてデータ保持部601から読み出されるべきWeightデータをデータ保持部601に転送するステップである。データ入力インターフェイス部602はデータ配置テーブルを読出し、セレクタ制御部605によってセレクタ部604をデータ保持部601に切り替え、データ保持部601のアドレスが記載されているWeightを外部記憶装置2から転送する。該転送は、データ入力インターフェイス部102を用いて実施してもよいし、外部のマスタをデータ保持部601に接続して転送してもよい。 Step S108 is a step of transferring Weight data to be read from the data holding unit 601 to the data holding unit 601 according to the transferred data arrangement table unit 606. The data input interface unit 602 reads the data arrangement table, switches the selector unit 604 to the data holding unit 601 by the selector control unit 605 , and transfers the weight describing the address of the data holding unit 601 from the external storage device 2 . The transfer may be performed using the data input interface unit 102 or may be transferred by connecting an external master to the data holding unit 601 .
 ステップS109は演算処理中にデータを転送するステップである。このステップにおいて、演算装置3が要求されるデータは、データ出力インターフェイス部603経由でセレクタ部604に到達し、データ保持部601またはデータ入力インターフェイス部602から取得される。データ出力インターフェイス部603は演算装置3から必要となるWeightデータを受信し、データ配置テーブルを参照して、当該Weightが格納されている領域へのアドレスを生成する。演算処理中は該ステップS109を処理が完了するまで継続する。 Step S109 is a step of transferring data during arithmetic processing. In this step, the data requested by the arithmetic unit 3 reaches the selector unit 604 via the data output interface unit 603 and is acquired from the data holding unit 601 or the data input interface unit 602 . The data output interface unit 603 receives the necessary weight data from the arithmetic unit 3, refers to the data allocation table, and generates an address to the area where the weight is stored. During the arithmetic processing, step S109 is continued until the processing is completed.
 第3の実施の形態のデータキャッシュ装置6は、Weight配置プログラム7と演算シミュレータ8を備え、Weightデータを外部記憶装置2に配置するかデータ保持部601に保持するかを演算シミュレーション結果に基づいて判定し、判定結果に基づいてデータ配置テーブル部606を更新する。このデータ配置テーブル部606に従ってWeightデータを配置することで、電力消費量を抑制しつつ演算性能を向上させることができる。 The data cache device 6 of the third embodiment includes a weight placement program 7 and a calculation simulator 8, and determines whether the weight data should be placed in the external storage device 2 or held in the data holding unit 601 based on the results of the calculation simulation. The data allocation table section 606 is updated based on the determination result. By arranging the weight data according to this data arrangement table section 606, it is possible to improve the calculation performance while suppressing the power consumption.
(第4の実施の形態)
 図7は、第4の実施の形態のデータキャッシュ装置9の構成を示す図である。第4の実施の形態のデータキャッシュ装置9の基本的な構成は、第1の実施の形態のデータキャッシュ装置1と同じであるが、第4の実施の形態のデータキャッシュ装置9は、出力先の演算装置3を3台備えている点が異なる。なお、図7では、出力先が3台の場合を例示したが、出力先の演算装置3の台数は3台に限らず、2台あるいは4台以上であってもよい。
(Fourth embodiment)
FIG. 7 is a diagram showing the configuration of the data cache device 9 of the fourth embodiment. The basic configuration of the data cache device 9 of the fourth embodiment is the same as that of the data cache device 1 of the first embodiment. is provided with three arithmetic units 3. Although FIG. 7 illustrates a case where there are three output destinations, the number of computing devices 3 as output destinations is not limited to three, and may be two or four or more.
 データキャッシュ装置9は、図2で説明した外部記憶装置2、演算装置3、及び演算アルゴリズム制御部4と接続されている。データキャッシュ装置9は外部記憶装置2からのデータを入力し、一部のデータを保持したうえで、演算装置3に出力する。演算アルゴリズム制御部4は、ニューラルネットワークのレイヤパラメタやアルゴリズムを管理し、データキャッシュ装置9及び演算装置3を連動して制御する。 The data cache device 9 is connected to the external storage device 2, arithmetic device 3, and arithmetic algorithm control section 4 described in FIG. The data cache device 9 inputs data from the external storage device 2 , holds a part of the data, and outputs the data to the arithmetic device 3 . The arithmetic algorithm control unit 4 manages layer parameters and algorithms of the neural network, and controls the data cache device 9 and the arithmetic device 3 in conjunction with each other.
 次に、第4の実施の形態のデータキャッシュ装置9の内部構成について説明する。
 901はデータ保持部である。このデータ保持部901はWeightデータを一時的に保持するキャッシュメモリである。データ保持部901はSRAMまたはフリップフロップ回路で実装される。
Next, the internal configuration of the data cache device 9 of the fourth embodiment will be explained.
901 is a data holding unit. This data holding unit 901 is a cache memory that temporarily holds Weight data. The data holding unit 901 is implemented with an SRAM or flip-flop circuit.
 902はデータ入力インターフェイス部である。データ入力インターフェイス部902は、外部記憶装置2と接続され、外部記憶装置2からのデータを受信する。データ入力インターフェイス部902と外部記憶装置2の接続については、中間にバスインターフェイス等があってもよく、論理的にデータが取得できる状態であればよい。データ入力インターフェイス部902はバスマスタとしての機能を内包し、演算装置3からセレクタ部904を経由して伝達された要求に応じて、外部記憶装置2からデータを取得する。  902 is a data input interface unit. The data input interface section 902 is connected to the external storage device 2 and receives data from the external storage device 2 . As for the connection between the data input interface section 902 and the external storage device 2, a bus interface or the like may be provided in the middle, as long as the data can be logically acquired. The data input interface section 902 includes a function as a bus master, and acquires data from the external storage device 2 in response to a request transmitted from the arithmetic device 3 via the selector section 904 .
 903は、データ出力インターフェイス部である。データ出力インターフェイス部903は3台の演算装置3と接続されている。  903 is a data output interface unit. The data output interface section 903 is connected to three arithmetic units 3 .
 904は、セレクタ部である。セレクタ部904はデータ入力インターフェイス部902からの入力データの送出先とデータ出力インターフェイス部903の要求データの取得元を選択する回路である。 904 is a selector unit. A selector unit 904 is a circuit that selects the destination of input data from the data input interface unit 902 and the source of request data from the data output interface unit 903 .
 905は、セレクタ制御部である。セレクタ制御部905はセレクタ部904を制御する部分であり、命令実行サイクル単位でセレクタ部904の接続を制御する。 905 is a selector control unit. A selector control unit 905 is a portion that controls the selector unit 904, and controls connection of the selector unit 904 in units of instruction execution cycles.
 906は読出しカウンタ部である。読出しカウンタ部906は、データ出力インターフェイス部903のアクセス数をカウントする機能である。内部にカウンタを複数保持し、データ出力インターフェイス部903を経由して、それぞれの演算装置3について演算装置3が要求するアドレスごとの読出しを独立してカウントする。 906 is a read counter unit. A read counter unit 906 has a function of counting the number of accesses to the data output interface unit 903 . It internally holds a plurality of counters, and independently counts readout for each address requested by each arithmetic unit 3 via the data output interface unit 903 .
 907は、読出し予測テーブル部である。読出し予測テーブル部907は、SRAMまたはフリップフロップ回路にて実装され、各レイヤでのWeight値が読み出される読出し回数が格納されている。本実施の形態では、読出し回数は演算装置3ごとに格納される。予測回数はシステム起動時に初期値が書き込まれ、その後任意のタイミングで更新されてもよい。また、実装方針によっては、従前に設定された読出し回数閾値との大小関係のみを保持してもよい。 907 is a read prediction table section. The reading prediction table section 907 is implemented by an SRAM or a flip-flop circuit, and stores the number of times the Weight value in each layer is read. In this embodiment, the number of times of reading is stored for each arithmetic unit 3 . The predicted number of times may be written as an initial value when the system is started, and then updated at any timing. Also, depending on the implementation policy, only the magnitude relationship with the previously set read number threshold may be retained.
 908は、読出し予測テーブル制御部である。読出し予測テーブル制御部908は演算アルゴリズム制御部4から指定されたアルゴリズム情報を取得し、読出し予測テーブル部907から該当レイヤに対するWeightデータの読出し予測回数を読み出し、セレクタ制御部905に対してセレクタ選択信号を発出する。加えて、読出し予測テーブル制御部908は演算アルゴリズム制御部4の指示に基づいて、読出しカウンタ情報を読出しカウンタ部906から取得し、読出し予測テーブル部907の値を更新する機能を持つ。 908 is a read prediction table control unit. The readout prediction table control unit 908 acquires the algorithm information specified by the arithmetic algorithm control unit 4, reads out the weight data readout prediction number for the corresponding layer from the readout prediction table unit 907, and sends a selector selection signal to the selector control unit 905. to be issued. In addition, the read prediction table control unit 908 has a function of acquiring read counter information from the read counter unit 906 and updating the values of the read prediction table unit 907 based on instructions from the arithmetic algorithm control unit 4 .
 第4の実施の形態のデータキャッシュ装置9の動作については、図3のフローチャートに準じる。ただし、ステップS007において、データ出力インターフェイス部103が自身が要求したデータが、どの演算装置からの要求であるかの情報と、どのレイヤのWeightであるかの情報と、セレクタ制御部105から返送されたマップ情報ごとに読出しカウンタ部106の要求転送データ量をインクリメントする。 The operation of the data cache device 9 of the fourth embodiment conforms to the flowchart of FIG. However, in step S007, the data requested by the data output interface unit 103 is sent back from the selector control unit 105 together with information indicating from which arithmetic unit the data is requested and information indicating which layer Weight is. The requested transfer data amount of the read counter unit 106 is incremented for each piece of map information obtained.
 また、S009において、データの読出し回数と閾値とを比較する際に用いるデータの読出し回数は、処理に用いる演算装置3に紐付けられた読出し回数を用いる。例えば、読出し予測テーブル部907に3台の演算装置A,B,Cのそれぞれに関連付けて、各レイヤのWeightデータの読出し回数が記憶されているとする。これから行う処理で、演算装置A,Bを用い、演算装置Cを用いないとすると、演算装置A,Bに紐づけられた読出し回数の合計値と閾値とを比較し、読出し回数が閾値以上のWeightデータにフラグを立てる。 In addition, in S009, the number of times of reading data that is used when comparing the number of times of reading data with the threshold value is the number of times of reading that is linked to the arithmetic unit 3 used for processing. For example, it is assumed that the reading prediction table section 907 stores the number of reading times of the weight data of each layer in association with each of the three arithmetic units A, B, and C. FIG. Assuming that arithmetic devices A and B are used and arithmetic device C is not used in the processing to be performed from now on, the total value of the number of times of reading linked to arithmetic devices A and B is compared with a threshold, and if the number of times of reading is equal to or greater than the threshold, Flag Weight data.
 本実施の形態では、Weightデータを例に説明したが、本開示はWeightのみに適用されるものではなく、その他のデータ、例えばアクティベーションデータやその他の重みデータに適用してもよいことは言うまでもない。 In the present embodiment, weight data has been described as an example, but it goes without saying that the present disclosure is not applied only to weight, and may be applied to other data such as activation data and other weight data. stomach.
 第4の実施の形態のデータキャッシュ装置9も、第1の実施の形態のデータキャッシュ装置1と同様に、電力消費量を抑制しつつ演算性能を向上させることができる。 Similarly to the data cache device 1 of the first embodiment, the data cache device 9 of the fourth embodiment can improve the computational performance while suppressing power consumption.
 また、第4の実施の形態のデータキャッシュ装置9は、演算装置3ごとに読出し回数をカウントして、読出し予測テーブル部907に読出し回数を記憶しておくので、これから行う処理を実行する演算装置3に合わせて、データ保持部901に記憶するWeightデータを決定することができる。 Further, since the data cache device 9 of the fourth embodiment counts the number of times of reading for each arithmetic unit 3 and stores the number of times of reading in the read prediction table unit 907, the arithmetic unit executing the processing to be performed from now on is stored. 3, Weight data to be stored in the data holding unit 901 can be determined.
 以上、本開示の実施の形態に係るデータキャッシュ装置について説明したが、本開示は上記した実施の形態に限定されるものではない。
 上記した実施の形態では、全タイルの処理が完了したところで(図3,S008で「はい」)、データの読出し回数が閾値以上のデータにフラグを立て(S009)、読出し予測テーブルを更新し(S010)、更新後の読出し予測テーブルに基づいてデータ保持部にデータを転送する(S011)例を説明した。つまり、データ保持部101にデータ保持しておくと電力消費量の低減に効果のあるデータをフレーム単位で決定しているが、この単位は必ずしもフレーム単位でなくてもよく、例えば、タイルの単位でもよい。すなわち、1タイルの処理が終了したところで、読出し回数が閾値以上のレイヤのデータのフラグを立ててもよい。特に、レイヤのかかわらずタイルのサイズがニューラルネットワークの場合には、この構成が有効である。

 
Although the data cache device according to the embodiment of the present disclosure has been described above, the present disclosure is not limited to the above-described embodiment.
In the above-described embodiment, when the processing of all tiles is completed ("Yes" in S008 in FIG. 3), a flag is set for data whose number of data reads is equal to or greater than the threshold (S009), and the read prediction table is updated ( S010) and transferring data to the data holding unit based on the updated readout prediction table (S011) have been described. In other words, data that is effective in reducing power consumption when held in the data holding unit 101 is determined in units of frames, but this unit does not necessarily have to be in units of frames. It's okay. That is, when the processing of one tile is completed, a flag may be set for the data of the layer whose read count is equal to or greater than the threshold. In particular, this configuration is effective when the tile size is a neural network regardless of the layer.

Claims (12)

  1.  デジタルデータを一時的に保持するデータキャッシュ装置であって、
     データを保持するデータ保持部(101)と、
     前記データキャッシュ装置の外部からデータを入力するためのデータ入力インターフェイス部(102)と、
     前記データキャッシュ装置の外部へデータを出力するためのデータ出力インターフェイス部(103)と、
     前記データ入力インターフェイス部からのデータを前記データ保持部に転送する経路と、前記データ入力インターフェイス部からのデータを前記データ出力インターフェイス部に転送する経路と、前記データ保持部からのデータを前記データ出力インターフェイス部に転送する経路のうち1つまたは複数を同時に選択するセレクタ部(104)と、
     前記セレクタ部を制御するセレクタ制御部(105)と、
     前記データが処理時に読み出される予定読出し回数を保持する読出し予測テーブル部(107)と、を備え、
     前記読出し予測テーブル部に設定された読出し回数に応じて前記セレクタ部を制御するデータキャッシュ装置。
    A data cache device that temporarily holds digital data,
    a data holding unit (101) holding data;
    a data input interface unit (102) for inputting data from the outside of the data cache device;
    a data output interface unit (103) for outputting data to the outside of the data cache device;
    a path for transferring data from the data input interface section to the data holding section; a path for transferring data from the data input interface section to the data output interface section; and a path for transferring data from the data holding section to the data output section. a selector unit (104) that simultaneously selects one or more of the routes to be transferred to the interface unit;
    a selector control unit (105) for controlling the selector unit;
    a readout prediction table unit (107) that holds a scheduled number of readouts at which the data is read out during processing;
    A data cache device that controls the selector unit according to the number of times of reading set in the read prediction table unit.
  2.  請求項1に記載のデータキャッシュ装置であって、
     前記データ出力インターフェイス部からの読出し回数をカウントする読出しカウンタ部(106)と、
     前記読出し予測テーブル部にアルゴリズムに応じた読出し回数を設定する読出し予測テーブル制御部(108)と、をさらに備え、
     前記読出し予測テーブル制御部は、前記読出しカウンタ部の出力に応じて、前記読出し予測テーブルを更新するデータキャッシュ装置。
    The data cache device according to claim 1,
    a read counter section (106) for counting the number of times read from the data output interface section;
    further comprising a readout prediction table control unit (108) that sets the number of times of readout according to an algorithm in the readout prediction table unit;
    The read prediction table control section updates the read prediction table according to the output of the read counter section.
  3.  請求項2に記載されたデータキャッシュ装置であって、
     前記読出しカウンタ部は、前記データ保持部からデータが読み出された読出し回数と、前記データ入力インターフェイス部から直接読み出された読出し回数をそれぞれにカウントし保持するデータキャッシュ装置。
    A data cache device according to claim 2,
    The read counter section counts and holds the number of times data is read from the data holding section and the number of times data is read directly from the data input interface section.
  4.  請求項2に記載されたデータキャッシュ装置であって、
     前記読出し予測テーブル制御部は、前記データキャッシュ装置からデータを取得して処理を行う演算装置(3)が実行するアルゴリズムのリストを具備し、アルゴリズムに応じた予測読出し回数を計算し、読出し予測テーブル部を更新するデータキャッシュ装置。
    A data cache device according to claim 2,
    The read prediction table control unit has a list of algorithms to be executed by an arithmetic unit (3) that acquires data from the data cache device and processes it, calculates the predicted number of read times according to the algorithm, and calculates the read prediction table. A data cache device that updates the part.
  5.  請求項2に記載されたデータキャッシュ装置であって、
     前記読出しカウンタ部は、前記データキャッシュ装置がデータを出力する出力先ごとに読出し回数をカウントし、
     前記読出し予測テーブル制御部は、前記出力先ごとの前記読出し回数により前記読出し予測テーブルを更新するキャッシュ装置。
    A data cache device according to claim 2,
    The read counter unit counts the number of times of reading for each output destination to which the data cache device outputs data,
    The read prediction table control unit is a cache device that updates the read prediction table according to the read count for each output destination.
  6.  データを保持するデータ保持部と、データキャッシュ装置の外部からデータを入力するためのデータ入力インターフェイス部と、前記データキャッシュ装置の外部へデータを出力するためのデータ出力インターフェイス部と、前記データ入力インターフェイス部からのデータを前記データ保持部に転送する経路と、前記データ入力インターフェイス部からのデータを前記データ出力インターフェイス部に転送する経路と、前記データ保持部からのデータを前記データ出力インターフェイス部に転送する経路のうち1つまたは複数を同時に選択するセレクタ部と、を備えるデータキャッシュ装置を制御するためのプログラムであって、コンピュータを、
     前記データが処理時に読み出される予定読出し回数を保持する読出し予測テーブル手段、
     前記読出し予測テーブル手段に設定された読出し回数に応じて前記セレクタ部を制御するセレクタ制御手段、
     として機能させるためのプログラム。
    a data holding unit for holding data, a data input interface unit for inputting data from outside the data cache device, a data output interface unit for outputting data to the outside of the data cache device, and the data input interface a path for transferring data from the unit to the data holding unit; a path for transferring data from the data input interface unit to the data output interface unit; and a route for transferring data from the data holding unit to the data output interface unit. A program for controlling a data cache device comprising: a selector unit for simultaneously selecting one or more of the paths to
    reading prediction table means for holding a scheduled reading number of times that the data is read during processing;
    selector control means for controlling the selector unit according to the number of times of reading set in the reading prediction table means;
    A program to function as
  7.  請求項6に記載のプログラムであって、コンピュータを、
     前記データ出力インターフェイス部からの読出し回数をカウントする読出しカウンタ手段、
     前記読出し予測テーブル手段にアルゴリズムに応じた読出し回数を設定すると共に、前記読出しカウンタ手段の出力に応じて前記読出し予測テーブルを更新する読出し予測テーブル制御手段、
    として機能させるためのプログラム。
    7. The program according to claim 6, wherein the computer is
    read counter means for counting the number of times read from the data output interface section;
    readout prediction table control means for setting the number of times of readout according to an algorithm in said readout prediction table means and updating said readout prediction table according to the output of said readout counter means;
    A program to function as
  8.  請求項7に記載されたプログラムであって、
     前記読出しカウンタ手段を、前記データ保持部からデータが読み出された読出し回数と、前記データ入力インターフェイス部から直接読み出された読出し回数をそれぞれにカウントし保持するようにコンピュータを機能させるためのプログラム。
    A program according to claim 7,
    A program for causing the computer to function so that the read counter means counts and holds the number of times data is read from the data holding section and the number of times data is read directly from the data input interface section. .
  9.  請求項7に記載されたプログラムであって、
     前記読出し予測テーブル制御手段を、前記データキャッシュ装置からデータを取得して処理を行う演算装置が実行するアルゴリズムのリストを具備し、アルゴリズムに応じた予測読出し回数を計算し、読出し予測テーブル手段を更新するようにコンピュータを機能させるためのプログラム。
    A program according to claim 7,
    The read prediction table control means is provided with a list of algorithms executed by an arithmetic unit that acquires and processes data from the data cache device, calculates the number of predicted reads according to the algorithm, and updates the read prediction table means. A program that makes a computer work.
  10.  請求項7に記載されたプログラムであって、
     前記読出しカウンタ手段を、前記データキャッシュ装置がデータを出力する出力先ごとに読出し回数をカウントさせ、
     前記読出し予測テーブル制御手段を、前記出力先ごとの前記読出し回数により前記読出し予測テーブル手段を更新するようにコンピュータを機能させるためのプログラム。
    A program according to claim 7,
    causing the read counter means to count the number of times of reading for each output destination to which the data cache device outputs data;
    A program for making a computer function such that the readout prediction table control means updates the readout prediction table means according to the number of times of reading for each of the output destinations.
  11.  演算装置による演算を実行するのに必要なデータとして、データキャッシュ装置に保持したデータを読み出すか、外部記憶装置から読み出すかを設定するテーブルを作成するプログラムであって、コンピュータを、
     演算シミュレータによって前記演算装置の演算シミュレーションを行って、演算実行時の各データの読出し回数をカウントする読出しカウント手段(702)、
     前記読出しカウント手段による各データの読出し回数に基づいて、前記テーブルを作成するテーブル作成手段(701)、
     として機能させるためのプログラム。
    A program for creating a table for setting whether to read out data held in a data cache device or read out from an external storage device as data necessary for executing an operation by an arithmetic device, the computer comprising:
    a read count means (702) for performing an arithmetic simulation of the arithmetic unit by an arithmetic simulator and counting the number of times each data is read during arithmetic execution;
    table creation means (701) for creating the table based on the number of times each data is read by the read count means;
    A program to function as
  12.  請求項11に記載のプログラムであって、
     前記テーブル作成手段が、前記各データの読出し回数と前記データキャッシュ装置のデータ保持部のサイズとに基づいて前記テーブルを作成するようにコンピュータを機能させるためのプログラム。

     
    A program according to claim 11,
    A program for causing a computer to function so that the table creation means creates the table based on the number of times each data has been read and the size of the data holding unit of the data cache device.

PCT/JP2022/029689 2021-08-06 2022-08-02 Data cache device and program WO2023013649A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023540369A JPWO2023013649A1 (en) 2021-08-06 2022-08-02

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021129531 2021-08-06
JP2021-129531 2021-08-06

Publications (1)

Publication Number Publication Date
WO2023013649A1 true WO2023013649A1 (en) 2023-02-09

Family

ID=85155661

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/029689 WO2023013649A1 (en) 2021-08-06 2022-08-02 Data cache device and program

Country Status (2)

Country Link
JP (1) JPWO2023013649A1 (en)
WO (1) WO2023013649A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844625A (en) * 1994-07-28 1996-02-16 Nec Software Ltd Buffer cache mechanism
JP2004192403A (en) * 2002-12-12 2004-07-08 Fuji Xerox Co Ltd Information processing system and method for managing data in cache memory
JP2015525940A (en) * 2012-09-28 2015-09-07 インテル コーポレイション Method, system and apparatus for caching code in non-volatile memory
JP2019114013A (en) * 2017-12-22 2019-07-11 株式会社富士通アドバンストエンジニアリング Arithmetic processing apparatus and control method of arithmetic processing apparatus
JP2020140507A (en) * 2019-02-28 2020-09-03 Necプラットフォームズ株式会社 Convolution arithmetic processing device and convolution arithmetic processing method
US20200327061A1 (en) * 2017-12-29 2020-10-15 Huawei Technologies Co., Ltd. Data prefetching method and apparatus, and storage device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844625A (en) * 1994-07-28 1996-02-16 Nec Software Ltd Buffer cache mechanism
JP2004192403A (en) * 2002-12-12 2004-07-08 Fuji Xerox Co Ltd Information processing system and method for managing data in cache memory
JP2015525940A (en) * 2012-09-28 2015-09-07 インテル コーポレイション Method, system and apparatus for caching code in non-volatile memory
JP2019114013A (en) * 2017-12-22 2019-07-11 株式会社富士通アドバンストエンジニアリング Arithmetic processing apparatus and control method of arithmetic processing apparatus
US20200327061A1 (en) * 2017-12-29 2020-10-15 Huawei Technologies Co., Ltd. Data prefetching method and apparatus, and storage device
JP2020140507A (en) * 2019-02-28 2020-09-03 Necプラットフォームズ株式会社 Convolution arithmetic processing device and convolution arithmetic processing method

Also Published As

Publication number Publication date
JPWO2023013649A1 (en) 2023-02-09

Similar Documents

Publication Publication Date Title
JP4346612B2 (en) Information processing method and apparatus
JP5498505B2 (en) Resolving contention between data bursts
JP5776688B2 (en) Information processing apparatus and task switching method
JP2006107513A (en) Power management in processing environment
JP2006221639A (en) Particle manipulation method and device using graphic processing
US8560803B2 (en) Dynamic cache queue allocation based on destination availability
JP5131188B2 (en) Data processing device
JP2008152470A (en) Data processing system and semiconductor integrated circuit
US20010047456A1 (en) Processor
JP5040050B2 (en) Multi-channel DMA controller and processor system
JP2006338538A (en) Stream processor
US20070157207A1 (en) Hardwired scheduler for low power wireless device processor and method for using the same
JPWO2010016169A1 (en) Multiprocessor system and control method thereof
GB2396445A (en) Interrupt controllers for prioritizing interrupt requests generated by a plurality of interrupt sources
US9811466B2 (en) Expedited servicing of store operations in a data processing system
WO2023013649A1 (en) Data cache device and program
JP4748609B2 (en) Image processing system
US20240143530A1 (en) DMA Control Circuit with Quality of Service Indications
US9632942B2 (en) Expedited servicing of store operations in a data processing system
US20230418677A1 (en) Preemption in a machine learning hardware accelerator
JP6817827B2 (en) Accelerator processing management device, host device, accelerator processing execution system, method and program
JP2006215621A (en) Dma controller
JP6849908B2 (en) Information processing device, PLD management program and PLD management method
JP4170330B2 (en) Information processing device
US20080209085A1 (en) Semiconductor device and dma transfer method

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: 22853068

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023540369

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE