CPU-GPGPU communication system
Through the unified storage architecture and dynamic caching mechanism, the problem of low data communication efficiency between CPU and GPGPU is solved, efficient data transmission and access are achieved, communication efficiency is significantly improved, and strong support is provided for high-performance computing.
Patent Information
- Application Number
- CN202410930120.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-08-27
AI Technical Summary
The data communication efficiency between CPU and GPGPU is low and limited by independent storage space design, resulting in low data transmission efficiency, high latency and limited bandwidth, becoming a bottleneck in high-performance computing.
Adopting a unified storage architecture and dynamic caching mechanism, through the hit matching module, mark counting module, data management module and cache unit, intelligent identification, storage and access optimization of data are realized, and the cache content is dynamically adjusted to reduce the access delay to the main storage.
It significantly reduces data copy time and read and write delays, improves bandwidth utilization, significantly improves communication efficiency between CPU and GPGPU, and provides strong support for high-performance computing.
Smart Images

Figure CN118550869A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer architecture, and in particular to a CPU-GPGPU asynchronous computing platform, and proposes a CPU-GPGPU communication acceleration method based on unified storage and dynamic cache. Background Art
[0002] With the rapid development of artificial intelligence, scientific computing and other fields, the demand for high-performance computing capabilities is increasing. The combination of CPU and GPGPU (general-purpose graphics processing unit) has become the mainstream computing platform due to its complementary advantages.
[0003] However, the traditional method of data communication between CPU and GPGPU is limited by the independent storage space design, resulting in low data transmission efficiency, which becomes a bottleneck restricting the overall performance improvement.
[0004] Although a variety of technologies have been used to try to solve this problem, such as direct memory access and optimized data transfer libraries, it still faces challenges such as difficulty in maintaining data consistency, high transmission latency, and limited bandwidth.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0007] The disclosed embodiments provide a CPU-GPGPU communication system, which aims to significantly improve the data communication efficiency between the CPU and the GPGPU by introducing a unified storage architecture and a dynamic cache mechanism.
[0008] In some embodiments, the system comprises: A unified storage module is used for CPU and GPGPU to share physical storage space. The unified storage module is provided with a dynamic cache subsystem and a storage module. The dynamic cache subsystem includes a hit matching module, a tag counting module, a data management module and a cache unit; The hit matching module is used to receive data read requests from the CPU and GPGPU, determine whether the requested data has been cached, and retrieve the data based on the cache result; A tag counting module is responsible for recording and tracking the access frequency of data. The tag counting module has a built-in counter, which is combined with the address sent by the CPU / GPGPU into an entry containing address information and access frequency; A data management module dynamically adjusts cache content according to access frequency. The data management module has a built-in address index table and a sorter. The sorter sorts the received entries according to their access frequency. The address index table stores the addresses of the data placed in the cache unit. Cache unit, used to store frequently accessed data.
[0009] Optionally, the hit matching module is configured to directly provide the data to the CPU / GPGPU if the data exists in the cache unit, and otherwise issue a read request to the storage module.
[0010] Optionally, when the hit matching module receives an address request sent by the CPU / GPGPU, it traverses the matching from address 0. If the same address can be matched, it means that the matching is successful.
[0011] Optionally, after the counter overflows, the marking counting module sets the overflow bit and clears the counter, and at the same time ignores the sorting and directly sends the data of the corresponding entry to the cache unit.
[0012] Optionally, the storage module includes: The memory management unit is responsible for converting virtual addresses to physical addresses; The storage controller performs data read and write operations according to the physical address provided by the memory management unit; Physical storage medium, serving as storage space shared by the CPU and GPGPU.
[0013] Optionally, the data management module adjusts the cache content including: if the address bit already exists in the index table, the data management module no longer replaces the data; if the address bit does not exist in the index table, sending a request to the memory management unit of the data management module to replace the data.
[0014] Optionally, after the data is written into the cache unit, the data management module sends the overwritten data value to the memory management unit. After the memory management unit converts the virtual address into a physical address, the data value is stored in the storage unit through the storage controller.
[0015] Optionally, the cache unit is used to directly receive data and addresses from the CPU and GPGPU, and execute a write-back strategy, that is, temporarily store the data in the cache unit, and write the data back to the storage unit when appropriate.
[0016] The CPU-GPGPU communication system provided by the embodiments of the present disclosure can achieve the following technical effects: Innovation in architectural design: For the first time, the unified storage architecture is combined with a dynamic cache mechanism and applied to the field of CPU-GPGPU communication acceleration, breaking the limitations of traditional independent storage space and achieving a fundamental change in data storage and access modes.
[0017] Technology integration innovation: By integrating multiple functional units such as hit matching, tag counting, data management and cache units, a complete dynamic cache system is formed to achieve efficient identification, storage and access optimization of high-frequency data. Specifically, by caching high-frequency access data, the access delay to the main storage is reduced. Dynamically adjust the cache content to ensure that the most frequently accessed data is stored in the cache. Improve overall computing efficiency by reducing the communication delay between CPU and GPGPU. Intelligent tracking and management of data is achieved through tag counting and data management modules. By reducing unnecessary storage access, the communication efficiency between CPU and GPGPU is greatly improved.
[0018] Significant performance improvement: The communication acceleration method of the present invention can significantly reduce data copying time and read and write delays, improve bandwidth utilization, and thus significantly improve the communication efficiency between the CPU and GPGPU, providing strong support for high-performance computing.
[0019] The unified storage and dynamic cache technology of the present invention not only reduces the time consumption of data replication, but also reduces the read and write latency and improves the bandwidth utilization, thereby significantly improving the communication efficiency between the CPU and GPGPU. This improvement provides strong support for high-performance computing tasks, has compatibility and scalability, can be applied to a variety of CPU and GPGPU architectures, and is expected to promote technological progress and application development in related fields.
[0020] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein: Figure 1 is a schematic diagram of a unified storage module structure provided by an embodiment of the present disclosure; Figure 2 is a schematic diagram of a data writing process provided by an embodiment of the present disclosure; Figure 3 is a schematic diagram of a data reading process provided by an embodiment of the present disclosure; Figure 4It is a flowchart of data adjustment provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0023] The terms "first", "second", etc. in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0024] Unless otherwise stated, the term "plurality" means two or more.
[0025] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0026] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0027] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0028] The present invention proposes an innovative CPU-GPGPU communication system, and the specific invention contents are as follows: Unified storage architecture: The unified storage architecture enables the CPU and GPGPU to share the same physical storage space, fundamentally eliminating the need to copy data between different memory spaces, thereby significantly reducing data transmission latency and overhead.
[0029] Dynamic cache: In the unified storage architecture, the present invention innovatively integrates a dynamic cache subsystem, which consists of four core submodules: hit matching module, tag counting module, data management module and cache unit. These four modules work together to intelligently identify and cache high-frequency access data, and ensure that high-value data is always retained in the cache through dynamic replacement strategies, further accelerating the data access speed between the CPU and GPGPU.
[0030] Hit matching module: responsible for quickly identifying whether an access request hits the cache and reducing unnecessary memory accesses.
[0031] Tag counting module: tracks the access frequency of data and provides decision-making basis for data management.
[0032] Data management module: Dynamically adjust cache content according to access frequency to ensure that high-frequency data remains in the cache.
[0033] Cache unit: A physical space that actually stores frequently accessed data, optimizing the data storage layout to increase access speed.
[0034] Specifically, the hit matching module is responsible for detecting whether the requested data is in the cache when reading data. If the data exists in the cache, it directly provides the data to the CPU / GPGPU, otherwise it sends a read request to the storage module. The hit matching module receives the address request sent by the CPU / GPGPU and traverses the match from address 0. If the same address can be matched, it means the match is successful.
[0035] The tag counting module is used to track the frequency of data access and count the input data. Based on the count, the high-frequency data is determined and placed in the cache for reading. The tag counting module has a built-in 12-bit counter, which is combined with the address sent by the CPU / GPGPU to form an entry containing address information and access frequency; when the hit matching module does not hit, the counter of the corresponding address is incremented by one; at the same time, an overflow bit is set in the entry; after the counter overflows, the overflow position is set to 1, the counter is cleared, and the data of the corresponding entry is directly sent to the cache unit regardless of the sorting.
[0036] The data management module receives the output from the tag counting module and dynamically adjusts the cache content, keeping the data with high access frequency in the cache unit and moving the data with less access to the storage unit. The unit has a built-in address index table and a sorter. The sorter sorts the received entries according to the last 12 bits (i.e., the count bits). The address index table stores the addresses of the data placed in the cache unit. The index table searches the address bits from high to low frequency. If the address bit exists, it means that the data at the address has been stored in the cache and will not be replaced. If it does not exist, a request is sent to the memory management unit. The retrieval threshold should match the cache size.
[0037] The cache unit is a unit that stores data with high reading frequency. It has a small capacity but can ensure high-speed reading of data, thereby improving the efficiency of the CPU-GPGPU heterogeneous computing platform.
[0038] In addition, the unified storage module also includes: The memory management unit is responsible for converting virtual addresses into physical addresses to ensure the accuracy and efficiency of data access; The storage controller performs data read and write operations according to the physical address provided by the memory management unit; Physical storage medium, serving as storage space shared by the CPU and GPGPU.
[0039] Specifically, the memory management unit converts virtual addresses and physical addresses according to the address conversion rules. This module is responsible for solving the address problem between storage and cache, ensuring that the CPU and GPGPU can accurately access the required data while maintaining data consistency and transparency. The address conversion rules should be determined according to the size of the storage and cache. This module has a built-in address conversion table. When data needs to be moved from the cache to the storage, or when the data management module requests data from the storage unit, the module will convert the virtual address sent from the CPU / GPGPU into a physical address and update the information in the table to ensure that the address mapping is always valid.
[0040] The storage controller receives the physical address converted by the memory management unit and performs a read / write data operation on the storage unit.
[0041] The storage unit stores data. As a storage unit shared by the CPU and GPGPU, its capacity is large enough to store all required data including the operating system, instruction set, program data on the CPU side and parallel computing data, intermediate values, etc. on the GPGPU side, but the transmission rate is slow.
[0042] These modules constitute the entire storage module, ensuring the accuracy and consistency of the data address. Even if the data is sent from the cache to the storage, the data can still be accurately selected when it is accessed, ensuring that the data can be adjusted dynamically and in real time.
[0043] The following effects can be achieved through the system disclosed in this disclosure: Innovation in architectural design: For the first time, the unified storage architecture is combined with a dynamic cache mechanism and applied to the field of CPU-GPGPU communication acceleration, breaking the limitations of traditional independent storage space and achieving a fundamental change in data storage and access modes.
[0044] Technology integration innovation: By integrating multiple functional units such as hit matching, tag counting, data management and cache units, a complete dynamic cache system is formed to achieve efficient identification, storage and access optimization of high-frequency data. Specifically, by caching high-frequency access data, the access delay to the main storage is reduced. Dynamically adjust the cache content to ensure that the most frequently accessed data is stored in the cache. Improve overall computing efficiency by reducing the communication delay between CPU and GPGPU. Intelligent tracking and management of data is achieved through tag counting and data management modules. By reducing unnecessary storage access, the communication efficiency between CPU and GPGPU is greatly improved.
[0045] Significant performance improvement: The communication acceleration method of the present invention can significantly reduce data copying time and read and write delays, improve bandwidth utilization, and thus significantly improve the communication efficiency between the CPU and GPGPU, providing strong support for high-performance computing.
[0046] The unified storage and dynamic cache technology of the present invention not only reduces the time consumption of data replication, but also reduces the read and write latency and improves the bandwidth utilization, thereby significantly improving the communication efficiency between the CPU and GPGPU. This improvement provides strong support for high-performance computing tasks, has compatibility and scalability, can be applied to a variety of CPU and GPGPU architectures, and is expected to promote technological progress and application development in related fields.
[0047] For ease of understanding, the specific implementation of the present invention is explained step by step according to the three states of data writing, data reading and data adjustment as follows: 1. Data Writing The data writing process is relatively simple. The present invention adopts a write-back strategy, that is, data is directly written into the cache unit, and the data is written back to the storage at an appropriate time.
[0048] As attached Figure 2 As shown, the CPU and GPGPU send the data and virtual address to the cache unit (operation ①) to complete the writing. At the same time, the data management module takes out the overwritten value in the cache unit (operation ②) and sends it to the memory management unit (operation ③). This is to ensure the integrity of the data. In the memory management unit, the virtual address received in the cache unit is converted into a physical address and sent to the storage controller (operation ④). After receiving the data and address, the storage controller writes it into the storage unit (operation ⑤) to complete the storage of the replaced data.
[0049] Accordingly, the data management module will update the data just written into the cache unit according to the access frequency (updating after reading and writing is to avoid data conflicts during the reading and writing process). If the written value is not frequently accessed in the subsequent process, it will be sent to the storage unit.
[0050] 2. Data Reading When reading data, Figure 3 As shown, the CPU and GPGPU first send a read request to the unified storage module (operation ①). After receiving the request, the hit matching module will match the received address and select to send the request to the cache unit or the memory management unit according to the matching result (operation ②): If the match is hit, it means that the read data is in the cache, and the data is read directly from the cache according to the received address (operation ③); if the match is not hit, it is necessary to go to the storage unit to read, and the hit matching module will send the request to the memory management unit. The memory management unit converts the received virtual address into a physical address according to the address conversion rule and sends it to the storage controller (operation ④). After receiving the physical address, the storage controller reads the value from the storage unit according to the address (operation ⑤, operation ⑥) and sends it back to the memory management unit (operation ⑦). The memory management unit will convert the physical address back to the virtual address and send the data back to the hit matching module (operation ⑧). The hit matching module will send the read data to the CPU and GPGPU (operation ⑨) to complete the data reading.
[0051] Similarly, after reading the data, the data management module will decide whether to update the data just read according to the access frequency.
[0052] 3. Data Adjustment After the data is written into the cache unit or read, the data management module will update the relevant data.
[0053] As attached Figure 4As shown in the figure, when a read request is sent to the hit matching module, the hit matching module will match the data. Regardless of whether the matching result is a hit or not, a signal will be sent to the tag counting module (operation ①). After the tag counting module receives the signal, the counter of the corresponding address is incremented by 1, which means that the number of times the data is accessed is incremented by 1. Subsequently, the counter value and the address constitute an entry and are sent to the data management module (operation ②). In this module, the entries will be sorted, and the addresses with high frequency in the sorting results will be sent to the cache unit. Before sending, the module will index in the address index table: if the address index is successful, that is, the address already exists in the cache unit, no adjustment will be made; if the address index fails, it means that adjustment is required, and the data management module will read the data and address to be replaced in the cache, and send it to the memory management unit together with the new high-frequency data request to be written to the cache (operation ③). After completing the conversion from virtual address to physical address in the memory management unit, the request is sent to the French network storage controller (operation ④). The storage controller will write the new high-frequency data into the storage unit according to the corresponding address (operation ⑤), and read the value in the storage unit according to the address of the adjusted data (operation ⑥) and send it back to the memory management unit (operation ⑦). After the physical address is converted into a virtual address again in the memory management unit, the data and address data are sent back to the data management module (operation ⑧), which writes it into the cache unit (operation ⑨), completing the replacement of the high-frequency data.
[0054] The process after the write operation is completed is similar to that after the read operation is completed. The subsequent operations starting from operation ③ are the data adjustment process after the write operation is completed, which will not be described in detail here.
[0055] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the scope of protection. As used in the description in the text, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0056] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians may clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0057] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit.
[0058] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A CPU-GPGPU communication system, characterized in that: include: A unified storage module is used for CPU and GPGPU to share physical storage space. The unified storage module is provided with a dynamic cache subsystem and a storage module. The dynamic cache subsystem includes a hit matching module, a tag counting module, a data management module and a cache unit; The hit matching module is used to receive data read requests from the CPU and GPGPU, determine whether the requested data has been cached, and retrieve the data based on the cache result; A tag counting module is responsible for recording and tracking the access frequency of data. The tag counting module has a built-in counter, which is combined with the address sent by the CPU / GPGPU into an entry containing address information and access frequency; A data management module dynamically adjusts cache content according to access frequency. The data management module has a built-in address index table and a sorter. The sorter sorts the received entries according to their access frequency. The address index table stores the addresses of the data placed in the cache unit. Cache unit, used to store frequently accessed data.
2. The system according to claim 1, characterized in that The hit matching module is configured to directly provide the data to the CPU / GPGPU if the data exists in the cache unit, and otherwise issue a read request to the storage module.
3. The system according to claim 2, characterized in that When the hit matching module receives the address request sent by the CPU / GPGPU, it traverses the matching from address 0. If the same address can be matched, it means that the matching is successful.
4. The system according to claim 1, characterized in that After the counter overflows, the mark counting module sets the overflow bit and clears the counter, and at the same time ignores the order and directly sends the data of the corresponding entry to the cache unit.
5. The system according to any one of claims 1 to 4, characterized in that: The storage module comprises: The memory management unit is responsible for converting virtual addresses to physical addresses; The storage controller performs data read and write operations according to the physical address provided by the memory management unit; Physical storage medium, serving as storage space shared by the CPU and GPGPU.
6. The system according to claim 5, characterized in that The data management module adjusts the cache content including: If the address bit already exists in the index table, the data management module will no longer perform data replacement; If the address bit does not exist in the index table, a request is sent to the memory management unit of the data management module to replace the data.
7. The system according to claim 6, characterized in that After the data is written into the cache unit, the data management module sends the overwritten data value to the memory management unit. After the memory management unit converts the virtual address into a physical address, the data value is stored in the storage unit through the storage controller.
8. The system according to claim 5, characterized in that The cache unit is used to directly receive data and addresses from the CPU and GPGPU, and execute a write-back strategy, that is, temporarily store the data in the cache unit and write the data back to the storage unit when appropriate.
Citation Information
Cited By
Multi-granularity cache management system applied to GPGPU
CN118819426A
