A GPGPU-based Cache replacement method and system
By designing the thread warp dynamic statistics table and access threshold mechanism in GPGPU, the cache replacement algorithm is optimized, which solves the problem of frequent swapping in and out of data blocks and improves system performance and cache space utilization efficiency.
Patent Information
- Application Number
- CN202410985440.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Existing cache replacement algorithms cannot effectively utilize the data locality of thread warps in GPGPU, causing data blocks to be frequently swapped in and out, wasting cache space, and affecting system performance.
A Cache replacement method based on GPGPU is designed. Through the thread warp dynamic statistics table, the access threshold is set, priority is given to replacing thread warps with low access frequency, and cache space is reserved for thread warps with high access frequency to prevent infrequently accessed data blocks from being used. replace.
This effectively avoids frequent swapping in and out of data blocks, improves system performance, and ensures efficient use of cache space.
Smart Images

Figure CN118519929B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of GPGPU storage control design, in particular to a GPGPU-based Cache replacement method and system. Background Art
[0002] Cache is a storage layer that is quite close to GPGPU. A cache hit means that the data item that the CPU needs to access is found in the cache. If the data item that the GPGPU needs to access is not found in the cache, it is a cache miss.
[0003] When a thread requests a new location and the appropriate part of the cache is full, the replacement algorithm comes into play, which means that some locations in the cache are replaced by new locations.
[0004] There are several classic cache replacement algorithms: FIFO: First-In First-Out (FIFO), the algorithm selects the earliest cache line as the line to be replaced. LFU: Least Frequently Used Algorithm (LFU), the line with the lowest frequency of use is eliminated. LRU: Least Recently Used Algorithm (LRU), the cache line that has not been accessed for the longest time in the recent period is swapped out.
[0005] The cache replacement strategy currently used is mainly the LRU algorithm. According to the LRU rule, an accessed data block will be swapped out if it has not been accessed again after a certain period of time. If the data block is replaced by a new data block, the new data block is only used once and will not be accessed again, which will waste cache space in vain. In addition, the current GPGPU belongs to the SIMT structure with a large number of concurrent threads. In a processing unit, there is a strong data correlation between thread bundles. Different thread bundles may reuse the same cache block, and the same thread bundle will frequently read the same data. All current replacement algorithms do not combine the thread bundle level to update the data in the cache. Summary of the invention
[0006] The technical task of the present invention is to address the above shortcomings and provide a GPGPU-based Cache replacement method and system, which can avoid the loss of system performance caused by frequent swapping in and out of data blocks, and reserve the storage space of the data Cache for thread warps with higher access frequency.
[0007] The technical solution adopted by the present invention to solve its technical problem is:
[0008] A GPGPU-based cache replacement method realizes cache replacement based on GPGPU thread bundle memory access dynamic statistics. A dynamic statistics table of thread bundles is designed in a GPGPU processing unit. Combined with the data locality of thread bundles, thread bundles are used as units. When the data cache is full, a threshold is set. Thread bundles with access times below the threshold within a period of time will not be stored in the data cache. When the access times are higher than the threshold, the data cache space corresponding to the thread bundle that least frequently accesses memory is replaced first, and the storage space of the data cache is reserved for thread bundles with higher access frequency, and it is avoided that a data block that is not frequently accessed is replaced when the data cache is full.
[0009] Furthermore, the implementation of this method includes:
[0010] The thread warp program counter cache is used to store the program counter value (PC) of each thread warp that needs to be executed;
[0011] Instruction cache, used to cache the instructions executed by the thread warp, and fetch the instructions to be executed according to the thread warp program count value;
[0012] A decoding unit, which decodes the fetched instructions;
[0013] The storage loading unit controls the reading of the data cache and processes the actual status of the cache;
[0014] Dynamic statistics table, which maintains a dynamic multi-depth table entry for a thread warp, and then controls the cache replacement control unit;
[0015] The cache replacement control unit controls the data cache replacement behavior according to the control signal transmitted from the dynamic statistics table;
[0016] Data Cache is used to store the data required for the calculation process.
[0017] Furthermore, the thread warp program count value cache, inside the GPGPU processing unit, each thread warp can adopt multiple operation strategies; each thread warp is polled and executed, and only one instruction is executed each time.
[0018] Furthermore, the GPGPU processing unit data cache is loaded as follows:
[0019] The GPGPU processing unit polls and executes multiple thread bundles, each of which has its own independent program count value. During the front-end value acquisition process, the instruction cache retrieves the running instruction based on the program count value and sends it to the decoding unit. The decoding unit makes a judgment, and if it is a storage load instruction, it will be sent to the subsequent storage load unit to execute data loading. At the same time, the dynamic statistical table will dynamically generate table entries, record the thread bundle information corresponding to each storage load instruction, and then control the cache replacement control unit to replace the data cache.
[0020] Furthermore, the dynamic statistics table includes:
[0021] Wid, represents the thread bundle ID of this memory access;
[0022] W_pc, represents the memory access address of the memory access instruction corresponding to the thread warp;
[0023] W_counter, which indicates the cumulative number of times the warp requests data;
[0024] W_threhold, represents the threshold to be replaced;
[0025] W_valid, used to indicate whether the current table entry exists;
[0026] W_select indicates whether the data requested by the warp is stored in the data cache.
[0027] Furthermore, when the data cache is not full, the dynamic statistics table update creation process is as follows:
[0028] At the beginning of the run, there is no data in the data cache, and there is no entry in the dynamic statistics table. When the instruction issued by a thread warp is determined to be a storage load instruction, the dynamic statistics table checks whether the table entry corresponding to the thread warp exists. Each table entry is uniquely determined by the thread warp ID (Wid) and the memory access address (W_pc) of the memory access instruction corresponding to the thread warp.
[0029] If the result is no, that is, this entry does not exist in the dynamic statistics table, a corresponding entry is initialized and W_vaild is set to true. At the same time, since the data cache is not full, the requested data is stored in the data cache, and W_select is set to true, indicating that the cache line requested by the thread warp already exists in the data cache;
[0030] If the answer is yes, it means that the entry exists in the dynamic statistics table, and the W_counter in the corresponding entry is incremented by 1, indicating that the GPGPU processing unit has requested the data corresponding to the thread warp again, and the cache line corresponding to the thread warp in the data cache can be directly read out.
[0031] Furthermore, when the data cache is full, the dynamic statistics table update creation process is as follows:
[0032] When the data cache is full, if you want to store data in the data cache, you need to replace the data cache line: first check whether the table entry of the corresponding thread bundle exists. If not, create a new table entry, and the requested data is not stored in the data cache, that is, the data cache is not replaced;
[0033] If it is determined that the corresponding table entry exists in the dynamic statistics table, it is further determined whether W_select is true, that is, whether the requested data of the thread bundle exists in the data cache; if it exists in the data cache, the data of the cache line in the original data cache is directly overwritten; if it does not exist in the data cache, it is compared whether W_counter is greater than W_threhold. If it is, the cache block corresponding to the thread bundle with a smaller W_counter in the data cache is replaced. If not, the data cache will not be replaced.
[0034] The present invention also claims a GPGPU-based Cache replacement system, comprising:
[0035] A thread warp program counter value cache module is used to store the program counter value (PC) of each thread warp that needs to be executed;
[0036] An instruction cache module is used to cache instructions executed by the thread warp and fetch instructions to be executed according to the thread warp program count value;
[0037] A decoding module, used for decoding the fetched instructions;
[0038] The storage loading module is used to control the reading of the data cache and process the actual situation of the cache;
[0039] A dynamic statistics table is used to maintain a dynamic multi-depth table entry for a thread warp, thereby controlling the cache replacement control unit;
[0040] The cache replacement control module is used to control the replacement behavior of the data cache according to the control signal transmitted from the dynamic statistics table;
[0041] Data Cache, used to store data required for the calculation process;
[0042] The system realizes cache replacement through the above-mentioned GPGPU-based cache replacement method.
[0043] The present invention also claims a GPGPU-based Cache replacement device, comprising: at least one memory and at least one processor;
[0044] The at least one memory is used to store a machine-readable program;
[0045] The at least one processor is used to call the machine-readable program to implement the above method.
[0046] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-mentioned method.
[0047] Compared with the prior art, the GPGPU-based Cache replacement method and system of the present invention has the following beneficial effects:
[0048] The present invention improves the method of replacing when the cache is full, designs a dynamic statistical table of thread bundles in the processing unit of GPGPU, utilizes the data locality of thread bundles, and controls the replacement of data cache when the data cache is full, taking thread bundles as units. The cache control design applied to the GPGPU chip can reserve the storage space of the data cache for thread bundles with higher access frequency, and avoids replacing a data block that is not frequently accessed when the data cache is full, and avoids the loss of system performance caused by frequent swapping in and out of data blocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a schematic diagram of data cache loading for a GPGPU processing unit provided by an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of dynamic statistical table items provided by an embodiment of the present invention;
[0051] Figure 3 The figure is a schematic diagram of a dynamic statistics table update creation process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The present invention will be further described below in conjunction with specific embodiments.
[0053] The embodiment of the present invention provides a GPGPU-based cache replacement method, which implements cache replacement based on GPGPU thread warp memory access dynamic statistics, designs a thread warp dynamic statistics table in the GPGPU processing unit, combines the data locality of the thread warp, takes the thread warp as a unit, and when the data cache is full, sets a threshold value, sets a thread warp with a number of accesses below the threshold value within a period of time and will not be stored in the data cache, and when the number of accesses is higher than the threshold value, preferentially replaces the data cache space corresponding to the thread warp that least frequently performs memory access operations, reserves the storage space of the data cache for the thread warp with a higher access frequency, and avoids replacing a data block that is not frequently accessed when the data cache is full.
[0054] The implementation of the method includes a thread warp program counter value cache, an instruction cache, a decoding unit, a storage load unit, a dynamic statistics table, a cache replacement control unit, and a data cache:
[0055] The thread warp program counter value cache is used to store the program counter value (PC) of each thread warp that needs to be executed each time; inside the GPGPU processing unit, each thread warp can adopt multiple operation strategies. Here, the polling execution of each thread warp is taken as an example, and only one instruction is executed each time.
[0056] The instruction cache is used to cache instructions executed by the warp, and fetch instructions to be executed according to the warp program count value.
[0057] The decoding unit decodes the fetched instruction.
[0058] The storage loading unit controls the reading of the data Cache and processes the actual situation of the cache.
[0059] The dynamic statistics table maintains a dynamic multi-depth table entry for a thread warp, thereby controlling the cache replacement control unit.
[0060] The cache replacement control unit controls the replacement behavior of the data cache according to the control signal transmitted from the dynamic statistical table.
[0061] The data Cache is used to store data required for the calculation process.
[0062] The method is described in detail below with reference to the accompanying drawings.
[0063] As attached Figure 1 As shown, the GPGPU processing unit data cache is loaded as follows:
[0064] The GPGPU processing unit polls and executes multiple thread bundles, each of which has its own independent program count value. During the front-end value acquisition process, the instruction cache retrieves the running instruction based on the program count value and sends it to the decoding unit. The decoding unit makes a judgment, and if it is a storage load instruction, it will be sent to the subsequent storage load unit to execute data loading. At the same time, the dynamic statistical table will dynamically generate table entries, record the thread bundle information corresponding to each storage load instruction, and then control the cache replacement control unit to replace the data cache.
[0065] As attached Figure 2 The following table shows the entries of the dynamic statistics table:
[0066] Wid, represents the thread bundle ID of this memory access;
[0067] W_pc, represents the memory access address of the memory access instruction corresponding to the thread warp;
[0068] W_counter, which indicates the cumulative number of times the warp requests data;
[0069] W_threhold, represents the threshold to be replaced;
[0070] W_valid, used to indicate whether the current table entry exists;
[0071] W_select indicates whether the data requested by the warp is stored in the data cache.
[0072] As attached Figure 3 As shown in FIG. 1 , a schematic diagram of the dynamic statistics table update creation process is provided, which is mainly divided into two situations, namely, the data cache is not full and is full.
[0073] (1) When the data cache is not full, the dynamic statistics table update creation process is as follows:
[0074] At the beginning of the run, there is no data in the data cache, and there is no entry in the dynamic statistics table. When the instruction issued by a thread warp is determined to be a storage load instruction, the dynamic statistics table checks whether the table entry corresponding to the thread warp exists. It should be noted that each table entry is uniquely determined by the thread warp ID (Wid) and the memory access address (W_pc) of the memory access instruction corresponding to the thread warp;
[0075] If the result is no, that is, this entry does not exist in the dynamic statistics table, a corresponding entry is initialized and W_vaild is set to true. At the same time, since the data cache is not full, the requested data is stored in the data cache, and W_select is set to true, indicating that the cache line requested by the thread warp already exists in the data cache;
[0076] If the answer is yes, it means that the entry exists in the dynamic statistics table, and the W_counter in the corresponding entry is incremented by 1, indicating that the GPGPU processing unit has requested the data corresponding to the thread warp again, and the cache line corresponding to the thread warp in the data cache can be directly read out.
[0077] (2) When the data cache is full, the dynamic statistics table update creation process is as follows:
[0078] When the data cache is full, if you want to store data in the data cache, you need to replace the data cache line. First, check whether the table entry of the corresponding thread bundle exists. If not, create a new table entry, and the requested data is not stored in the data cache, that is, the data cache is not replaced;
[0079] If it is determined that the corresponding table entry exists in the dynamic statistics table, it is further determined whether W_select is true, that is, whether the requested data of the thread bundle exists in the data cache; if it exists in the data cache, the data of the cache line in the original data cache is directly overwritten; if it does not exist in the data cache, it is compared whether W_counter is greater than W_threhold. If it is, the cache block corresponding to the thread bundle with a smaller W_counter in the data cache is replaced. If not, the data cache will not be replaced.
[0080] The embodiment of the present invention further provides a GPGPU-based Cache replacement system, which implements Cache replacement through the GPGPU-based Cache replacement method described in the above embodiment.
[0081] The system includes:
[0082] The thread warp program count value cache module is used to store the program count value (PC) of each thread warp that needs to be executed each time; inside the GPGPU processing unit, each thread warp can adopt multiple operation strategies. Here, the polling execution of each thread warp is taken as an example, and only one instruction is executed each time.
[0083] The instruction cache module is used to cache the instructions executed by the thread warp and fetch the instructions to be executed according to the thread warp program count value.
[0084] The decoding module is used to decode the fetched instructions.
[0085] The storage loading module is used to control the reading of the data cache and process the actual situation of the cache.
[0086] The dynamic statistics table is used to maintain a dynamic multi-depth table entry for a thread warp, thereby controlling the cache replacement control unit.
[0087] The cache replacement control module is used to control the replacement behavior of the data cache according to the control signal transmitted from the dynamic statistical table.
[0088] Data Cache is used to store the data required for the calculation process.
[0089] The system realizes cache replacement based on dynamic statistics of memory access of GPGPU thread bundles. A dynamic statistics table of thread bundles is designed in the processing unit of GPGPU. Combined with the data locality of thread bundles, thread bundles are used as units. When the data cache is full, a threshold is set. Thread bundles with access times below the threshold within a period of time will not be stored in the data cache. When the access times are higher than the threshold, the data cache space corresponding to the thread bundle that least frequently accesses memory is replaced first, and the storage space of the data cache is reserved for thread bundles with higher access frequency, and it is avoided to replace a data block that is not frequently accessed when the data cache is full.
[0090] The GPGPU processing unit data cache is loaded as follows:
[0091] The GPGPU processing unit polls and executes multiple thread bundles, each of which has its own independent program count value. During the front-end value acquisition process, the instruction cache module retrieves the running instruction based on the program count value and sends it to the decoding module. The decoding module makes a judgment, and if it is a storage load instruction, it will be sent to the subsequent storage load module to execute data loading. At the same time, the dynamic statistical table will dynamically generate table entries, record the thread bundle information corresponding to each storage load instruction, and then control the cache replacement control module to replace the data cache.
[0092] The dynamic statistics table includes:
[0093] Wid, represents the thread bundle ID of this memory access;
[0094] W_pc, represents the memory access address of the memory access instruction corresponding to the thread warp;
[0095] W_counter, which indicates the cumulative number of times the warp requests data;
[0096] W_threhold, represents the threshold to be replaced;
[0097] W_valid, used to indicate whether the current table entry exists;
[0098] W_select indicates whether the data requested by the warp is stored in the data cache.
[0099] There are two main situations for updating and creating dynamic statistics tables, namely, when the data cache is not full or full:
[0100] (1) When the data cache is not full, the dynamic statistics table update creation process is as follows:
[0101] At the beginning of the run, there is no data in the data cache, and there is no entry in the dynamic statistics table. When the instruction issued by a thread warp is determined to be a storage load instruction, the dynamic statistics table checks whether the table entry corresponding to the thread warp exists. It should be noted that each table entry is uniquely determined by the thread warp ID (Wid) and the memory access address (W_pc) of the memory access instruction corresponding to the thread warp;
[0102] If the result is no, that is, this entry does not exist in the dynamic statistics table, a corresponding entry is initialized and W_vaild is set to true. At the same time, since the data cache is not full, the requested data is stored in the data cache, and W_select is set to true, indicating that the cache line requested by the thread warp already exists in the data cache;
[0103] If the answer is yes, it means that the entry exists in the dynamic statistics table, and the W_counter in the corresponding entry is incremented by 1, indicating that the GPGPU processing unit has requested the data corresponding to the thread warp again, and the cache line corresponding to the thread warp in the data cache can be directly read out.
[0104] (2) When the data cache is full, the dynamic statistics table update creation process is as follows:
[0105] When the data cache is full, if you want to store data in the data cache, you need to replace the data cache line. First, check whether the table entry of the corresponding thread bundle exists. If not, create a new table entry, and the requested data is not stored in the data cache, that is, the data cache is not replaced;
[0106] If it is determined that the corresponding table entry exists in the dynamic statistics table, it is further determined whether W_select is true, that is, whether the requested data of the thread bundle exists in the data cache; if it exists in the data cache, the data of the cache line in the original data cache is directly overwritten; if it does not exist in the data cache, it is compared whether W_counter is greater than W_threhold. If it is, the cache block corresponding to the thread bundle with a smaller W_counter in the data cache is replaced. If not, the data cache will not be replaced.
[0107] The embodiment of the present invention further provides a GPGPU-based Cache replacement device, comprising: at least one memory and at least one processor;
[0108] The at least one memory is used to store a machine-readable program;
[0109] The at least one processor is used to call the machine-readable program to implement the GPGPU-based Cache replacement method described in the above embodiment.
[0110] The embodiment of the present invention also provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the processor executes the GPGPU-based Cache replacement method described in the above embodiment. Specifically, a system or device equipped with a storage medium can be provided, on which software program codes for implementing the functions of any of the above embodiments are stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0111] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0112] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0113] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0114] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0115] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A GPGPU-based Cache replacement method, characterized in that: Cache replacement is implemented based on the dynamic statistics of GPGPU thread bundle memory access. A dynamic statistics table of thread bundles is designed in the GPGPU processing unit. With thread bundles as units, when the data cache is full, a threshold is set. Thread bundles with access times below the threshold within a period of time will not be stored in the data cache. When the access times are higher than the threshold, the data cache space corresponding to the thread bundle that performs the least frequent memory access operation is replaced first. The dynamic statistics table includes: Wid, represents the thread bundle ID of this memory access; W_pc, represents the memory access address of the memory access instruction corresponding to the thread warp; W_counter, which indicates the cumulative number of times the warp requests data; W_threhold, represents the threshold to be replaced; W_valid, used to indicate whether the current table entry exists; W_select, indicating whether the requested data of the warp is stored in the data cache; When the data cache is not full, the dynamic statistics table update creation process is as follows: At the beginning of the run, there is no data in the data cache, and there is no entry in the dynamic statistics table. When the instruction issued by a thread warp is determined to be a store load instruction, the dynamic statistics table checks whether the entry corresponding to the thread warp exists; If the result is no, that is, this entry does not exist in the dynamic statistics table, a corresponding entry is initialized and W_vaild is set to true. At the same time, since the data cache is not full, the requested data is stored in the data cache, and W_select is set to true, indicating that the cache line requested by the thread warp already exists in the data cache; If the answer is yes, it means that the entry exists in the dynamic statistics table, and the W_counter in the corresponding entry is incremented by 1, indicating that the GPGPU processing unit has requested the data corresponding to the thread warp again, and the cache line corresponding to the thread warp in the data cache can be directly read out; When the data cache is full, the dynamic statistics table update creation process is as follows: First, check whether the table entry of the corresponding thread bundle exists. If not, create a new table entry. At the same time, the requested data is not stored in the data cache, that is, the data cache is not replaced; If it is determined that the corresponding table entry exists in the dynamic statistics table, it is further determined whether W_select is true, that is, whether the requested data of the thread bundle exists in the data cache; if it exists in the data cache, the data of the cache line in the original data cache is directly overwritten; if it does not exist in the data cache, it is compared whether W_counter is greater than W_threhold. If it is, the cache block corresponding to the thread bundle with a smaller W_counter in the data cache is replaced. If not, the data cache will not be replaced.
2. The GPGPU-based Cache replacement method according to claim 1, characterized in that: The implementation of this method includes: A thread warp program counter value cache is used to store the program counter value of each thread warp that needs to be executed; Instruction cache, used to cache the instructions executed by the thread warp, and fetch the instructions to be executed according to the thread warp program count value; A decoding unit, used for decoding the fetched instructions; The storage loading unit controls the reading of the data cache and processes the actual status of the cache; Dynamic statistics table, which maintains a dynamic multi-depth table entry for a thread warp, and then controls the cache replacement control unit; The cache replacement control unit controls the data cache replacement behavior according to the control signal transmitted from the dynamic statistics table; Data Cache is used to store the data required for the calculation process.
3. The GPGPU-based Cache replacement method according to claim 2, characterized in that: The thread warp program count value cache is inside the GPGPU processing unit, and each thread warp can adopt multiple operation strategies; each thread warp is polled and executed, and only one instruction is executed each time.
4. A GPGPU-based Cache replacement method according to claim 1 or 2, characterized in that: The GPGPU processing unit data cache is loaded as follows: The GPGPU processing unit polls and executes multiple thread bundles, each of which has its own independent program count value. During the front-end value acquisition process, the instruction cache retrieves the running instruction based on the program count value and sends it to the decoding unit. The decoding unit makes a judgment, and if it is a storage load instruction, it will be sent to the subsequent storage load unit to execute data loading. At the same time, the dynamic statistical table will dynamically generate table entries, record the thread bundle information corresponding to each storage load instruction, and then control the cache replacement control unit to replace the data cache.
5. A GPGPU-based cache replacement system, characterized in that: include: A thread warp program count value cache module, used to store the program count value of each thread warp that needs to be executed; An instruction cache module is used to cache instructions executed by the thread warp and fetch instructions to be executed according to the thread warp program count value; A decoding module decodes the fetched instructions; The storage loading module controls the reading of the data cache and processes the actual situation of the cache; Dynamic statistics table, which maintains a dynamic multi-depth table entry for a thread warp, and then controls the cache replacement control unit; The cache replacement control module controls the data cache replacement behavior according to the control signal transmitted from the dynamic statistics table; Data Cache, used to store data required for the calculation process; The system realizes cache replacement through the GPGPU-based cache replacement method described in any one of claims 1 to 4.
6. A GPGPU-based Cache replacement device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to implement the method described in any one of claims 1 to 4.
7. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, and when the computer instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
L1 Cache management method of GPGPU based on the number of data accesses
CN109408411A
Cache resource allocation method and device, electronic device and storage medium
CN114138685A
Parking threads in bucket processor for managing cache eviction requests
CN117632466A
Cache management method, cache management device, processor and electronic device
CN118245186A
Cache management method, cache management device, processor and electronic device
CN118245218A
