Data transmission method, device, heterogeneous system and consistent interconnection processing device
By using consistent interconnection processing devices in heterogeneous systems, dynamically sensing the topology and generating memory consistent interconnection communication links, the problem of interconnection complexity between devices in heterogeneous systems is solved, and memory consistent interconnection is achieved. , improving distributed computing performance.
Patent Information
- Application Number
- CN202410954443.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-17
AI Technical Summary
The interconnections between different types of devices in heterogeneous systems are fragmented, resulting in complex management, inability to achieve consistent interconnection, and affecting distributed computing performance.
By dynamically sensing the topology structure in the consistent interconnection processing device, automatically generating memory consistent interconnection communication links, allocating cache space, and processing transactions based on the four-state cache consistency protocol, the memory consistent interconnection between devices is realized. Transfer request.
It realizes memory consistent interconnection between devices in heterogeneous systems, reduces the number of accesses to local and remote memory, improves access performance, and eliminates the problem of being unable to establish memory interconnection due to different interconnection protocols.
Smart Images

Figure CN118503195B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and in particular to a data transmission method, device, heterogeneous system and consistent interconnection processing device. Background Art
[0002] Device memory interconnection in a distributed system refers to the memory sharing and communication mechanism between different physical or logical devices in a distributed computing environment. This interconnection allows nodes in a distributed system to efficiently exchange data and coordinate work. In a heterogeneous system, there are many different types of devices, and the interconnection protocols they use may be different. This results in the fragmentation of interconnection between different types of devices in the current heterogeneous system, requiring the maintenance of multiple different interconnection buses, which is complex to manage.
[0003] How to achieve consistent interconnection between different types of devices in a heterogeneous system is a technical problem that technical personnel in this field need to solve. Summary of the invention
[0004] The purpose of the present invention is to provide a data transmission method, device, heterogeneous system and consistent interconnection processing device, which are used to achieve consistent interconnection between different types of devices in a heterogeneous system and improve the performance of the heterogeneous system in performing distributed computing.
[0005] In order to solve the above technical problems, the present invention provides a data transmission method, which is applied to a consistent interconnection processing device, comprising:
[0006] According to the number of other devices in the heterogeneous system that need to establish memory consistency interconnection with the device, the corresponding consistency interconnection interface is enabled from the device, and the physical communication link between the device and the other devices is initialized based on the consistency interconnection interface to obtain the memory interconnection parameters of the other devices;
[0007] Establish a memory consistency interconnection communication link between the device and other devices according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, and allocate corresponding cache space from the device;
[0008] Cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement memory consistency interconnect transmission requests between the device and other devices.
[0009] On the one hand, according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, the corresponding cache space is allocated from the device, including:
[0010] The amount of cache space is determined according to the device type in the memory interconnection parameter, and the cache space corresponding to the memory of the device and the memory of other devices is allocated from the device.
[0011] On the other hand, a cache space corresponding to the memory of the device and the memory of other devices is allocated from the device, including:
[0012] Determine the size of each cache space according to the device memory size in the memory interconnection parameter, so that the larger the device memory size, the larger the allocated cache space;
[0013] Cache space from the device based on the size of the cache space.
[0014] On the other hand, a cache space corresponding to the memory of the device and the memory of other devices is allocated from the device, including:
[0015] Determine the length of the access path from the device to the target device memory according to the memory interconnection parameter, and determine the size of each cache space according to the length of the access path, so that the longer the length of the access path, the larger the allocated cache space;
[0016] Cache space from the device based on the size of the cache space.
[0017] On the other hand, a cache space corresponding to the memory of the device and the memory of other devices is allocated from the device, including:
[0018] Determine the length of an access path from the device to the target device memory according to the memory interconnection parameters, and determine the size of each cache space according to the length of the access path and the device memory size in the memory interconnection parameters, so that the larger the device memory size, the larger the allocated cache space, and the longer the length of the access path, the larger the allocated cache space;
[0019] Cache space from the device based on the size of the cache space.
[0020] On the other hand, a cache space corresponding to the memory of the device and the memory of other devices is allocated from the device, including:
[0021] Determine, according to the memory interconnection parameters, a first query time for the device to access the target device memory and a second query time for the device to access the target cache space corresponding to the target device memory, and determine the size of each cache space according to the balance relationship between the first query time and the second query time when executing the memory coherent interconnection transmission request;
[0022] Cache space from the device based on the size of the cache space.
[0023] On the other hand, cache consistency transaction processing is performed between the device and other devices based on the memory consistency interconnect communication link and the cache space to implement a memory consistency interconnect transmission request between the device and other devices, including:
[0024] A target cache space corresponding to a target memory address corresponding to the memory coherent interconnect transmission request is queried, and a data transmission operation corresponding to the data transmission request is performed based on the target cache space.
[0025] On the other hand, memory interconnect parameters include business type;
[0026] The service type is that there are multiple processing units performing read and write operations on the device memory or there is only one processing unit performing read and write operations on the device memory.
[0027] On the other hand, if the memory consistency interconnect transmission request is a request issued by the device to other devices, cache consistency transaction processing between the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement the memory consistency interconnect transmission request between the device and other devices, including:
[0028] If the service type in the memory interconnection parameters of the requested target device is that there are multiple processing units performing read and write operations on the device memory, a non-cacheable data transfer request is initiated to the coherent interconnection interface of the target device to perform read and write operations on the memory of the target device without changing the cache state of the target device;
[0029] If the business type in the memory interconnection parameters of the target device is that there is only one processing unit performing read and write operations on the device memory, a cache consistency read request is initiated to the consistency interconnection interface of the target device to perform read and write operations on the cache space of the target device and the memory of the target device.
[0030] On the other hand, cache consistency transaction processing is performed between the device and other devices based on the memory consistency interconnect communication link and the cache space to implement a memory consistency interconnect transmission request between the device and other devices, including:
[0031] The memory consistency interconnect transmission request is converted into a read and write operation on the memory, so that when the local read and write misses the cache, the corresponding consistency interconnect interface is selected according to address arbitration to transmit the message of the memory consistency interconnect transmission request, and cache consistency processing of the corresponding cache space is performed after completing the processing of the response message.
[0032] On the other hand, the cache space corresponds to the device type;
[0033] The memory coherent interconnect transmission request is converted into a read and write operation on the memory, so that when the local read and write misses the cache, the corresponding coherent interconnect interface is selected according to the address arbitration to transmit the message of the memory coherent interconnect transmission request, and after completing the processing of the response message, the cache coherence processing of the corresponding cache space is performed, including:
[0034] Determine a local cache space corresponding to the target memory address according to the target memory address of the memory coherent interconnect transmission request, and trigger a corresponding cache controller to query the target data from the corresponding cache space;
[0035] If the target data is not found in the corresponding cache space, the consistency interconnect interface corresponding to the target memory address is determined according to address arbitration to transmit the message of the memory consistency interconnect transmission request, and after completing the processing of the response message, the corresponding cache controller is triggered to perform cache consistency processing of the corresponding cache space.
[0036] On the other hand, according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, a memory consistency interconnection communication link between the device and other devices is established, and corresponding cache space is allocated from the device, including:
[0037] According to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, a four-state cache coherence protocol is used to establish the memory coherence interconnection communication link between the device and the other devices, and corresponding cache space is allocated from the device;
[0038] The four-state cache consistency protocol represents the cache state through four states: modification, exclusive, sharing, and invalidation.
[0039] On the other hand, cache consistency transaction processing is performed between the device and other devices based on the memory consistency interconnect communication link and the cache space to implement a memory consistency interconnect transmission request between the device and other devices, including:
[0040] Convert the memory coherent interconnection transmission request into a coherent interconnection protocol message;
[0041] Among them, the types of the consistency interconnection protocol messages include request transaction messages and response transaction messages; the content of the request transaction message includes a request message valid flag, a request transaction type, a physical address of the request transaction and a unique identifier of the request transaction; the content of the response transaction message includes a response message valid flag, a response transaction type, an identifier of the response transaction and response return data; the identifier of the response transaction corresponds to the identifier of the request transaction.
[0042] On the other hand, the length of the physical address of the request transaction is determined according to the scale of devices in the heterogeneous system.
[0043] On the other hand, the corresponding consistent interconnection interface is enabled on the device, including:
[0044] The consistent interconnection interface is implemented using the Ethernet physical media access control interface of the device.
[0045] In order to solve the above technical problems, the present invention also provides a consistent interconnect processing device, including: a consistent interconnect interface, a consistent interconnect controller and a dynamic address configuration engine;
[0046] Among them, the coherent interconnect controller is used to enable the corresponding coherent interconnect interface from the device where it is located according to the number of other devices in the heterogeneous system that need to establish memory coherent interconnection with the device where it is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where it is located and the other devices based on the coherent interconnection interface; establish a memory coherent interconnection communication link between the device where it is located and the other devices according to the memory interconnection parameters of the device where it is located and the memory interconnection parameters of the other devices, and call the dynamic address configuration engine to allocate the corresponding cache space from the device where it is located; perform cache coherence transaction processing between the device where it is located and the other devices based on the memory coherent interconnection communication link and the cache space to realize the memory coherent interconnection transmission request between the device where it is located and the other devices.
[0047] In order to solve the above technical problems, the present invention further provides a heterogeneous system, comprising a plurality of heterogeneous devices, each of which is equipped with a consistent interconnection processing device;
[0048] The coherent interconnect processing device is used to enable the corresponding coherent interconnect interface from the device where it is located according to the number of other devices in the heterogeneous system that need to establish memory coherent interconnection with the device where it is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where it is located and the other devices based on the coherent interconnection interface; establish a memory coherent interconnection communication link between the device where it is located and the other devices according to the memory interconnection parameters of the device where it is located and the memory interconnection parameters of the other devices, and allocate corresponding cache space from the device where it is located; perform cache coherent transaction processing between the device where it is located and the other devices based on the memory coherent interconnection communication link and the cache space to realize the memory coherent interconnection transmission request between the device where it is located and the other devices.
[0049] In order to solve the above technical problems, the present invention further provides a data transmission device, comprising:
[0050] Memory for storing computer programs;
[0051] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of any one of the data transmission methods described above are implemented.
[0052] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transmission method as described in any one of the above items are implemented.
[0053] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of any one of the above data transmission methods when executed by a processor.
[0054] The data transmission method provided by the present invention has the beneficial effect that a consistency interconnection processing device installed on a device is used to establish a memory consistency interconnection with the number of other devices in a heterogeneous system according to the number of other devices in the device, and the corresponding consistency interconnection interface is enabled from the device, and the physical communication link between the device and other devices is initialized based on the consistency interconnection interface, and then the memory interconnection parameters of other devices are obtained, and the memory interconnection parameters of the device and other devices are established according to the memory interconnection parameters of the device and the memory interconnection parameters of the other devices, and the corresponding cache space is allocated from the device; based on the memory consistency interconnection communication link and the cache space, the cache consistency transaction processing of the device and other devices is performed to realize the memory consistency interconnection transmission request between the device and other devices, and a solution for dynamically perceiving the topology and automatically building the memory consistency interconnection communication link between devices of the heterogeneous system is realized. During deployment, there is no need to manually configure according to the topology between devices, and the problem that different types of devices in the heterogeneous system cannot establish memory interconnection due to different interconnection protocols can be eliminated. At the same time, cache consistency between devices is realized to reduce the number of times the local memory and remote memory are accessed, and the access performance is further improved.
[0055] The present invention also provides a consistent interconnect processing device, a heterogeneous system, a data transmission device and a non-volatile storage medium, which have the above-mentioned beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1A schematic diagram of the structure of a consistent interconnect processing device provided by an embodiment of the present invention;
[0058] Figure 2 A schematic diagram of the structure of a consistent interconnection interface provided by an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of the structure of a coherent interconnect controller provided by an embodiment of the present invention;
[0060] Figure 4 An architecture diagram of a heterogeneous system provided by an embodiment of the present invention;
[0061] Figure 5 A flowchart of a data transmission method provided by an embodiment of the present invention;
[0062] Figure 6 A schematic diagram of system global address space allocation provided by an embodiment of the present invention;
[0063] Figure 7 A method provided by an embodiment of the present invention Figure 5 Flow chart of a specific implementation method of S503;
[0064] Figure 8 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The core of the present invention is to provide a data transmission method, device, heterogeneous system and consistent interconnection processing device, which are used to achieve consistent interconnection between different types of devices in a heterogeneous system and improve the performance of the heterogeneous system in performing distributed computing.
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] To facilitate understanding of the technical solution provided by the embodiment of the present invention, some key terms used in the embodiment of the present invention are first explained here.
[0068] Inter-chip interconnection of heterogeneous systems includes interconnection between processors, interconnection between processors and accelerators, and interconnection between accelerators. Among them, the interconnection buses between processors include Ultra Path Interconnect (UPI) bus, Quick Path Interconnect (QPI) bus, Hyper-Transport (HT) bus, CoreLink bus, Hyper-Transport (HT) bus, etc. The most common way to interconnect processors and accelerators is to use the high-speed Peripheral Component Interconnect Express (PCIe) bus. In recent years, in order to solve the problems of "memory wall" and "IO wall", the industry has proposed cache coherent interconnect buses for processors and accelerators, including the Cache Coherent Interconnect for Accelerators (CCIX) standard and the Compute Express Link (CXL) protocol. The consistent interconnection buses between accelerators mainly include the NVLink bus that interconnects the graphics processing units (GPUs) and the high-speed custom communication system (HCCS) bus between artificial intelligence (Artificial Intelligence) processors.
[0069] Cache consistency refers to the consistency of the cache of a multi-core processor, the cache of a device, and memory in space. Device memory with cache consistency can be accessed as unified memory.
[0070] It can be seen that multiple protocol buses are integrated in the current heterogeneous systems. The interconnection protocol between processors is usually defined by the processor manufacturer. The interconnection between processors and accelerators currently uses the PCIe bus more. For interconnection buses with cache consistency functions such as CXL, each equipment manufacturer has basically defined an independent protocol bus, which is inconsistent with the interconnection bus between processors. The interconnection protocol between accelerators is also defined by the accelerator manufacturer. As a result, many different bus protocols have been generated. When building the distributed computing topology of a heterogeneous system, it is necessary to complete the topology deployment first, then perform initialization configuration, configure the bus protocol, and then perform data communication. If the topology is changed, it is often necessary to re-initialize the configuration, which is complex to implement and labor-intensive.
[0071] In order to solve the problem of consistent interconnection between different types of devices in a heterogeneous system, an embodiment of the present invention provides a solution for consistent interconnection between devices in a heterogeneous system, and provides a consistent interconnection processing device in the form of hardware. The consistent interconnection processing device is used to dynamically perceive the topology of installed devices, and configure consistent interconnection between devices according to the topology perception result. When transmitting data, the differences in interconnection protocols of different types of devices are shielded, and the problem that different types of devices in a heterogeneous system cannot establish memory interconnection due to different interconnection protocols is eliminated. At the same time, by realizing cache consistency between devices to reduce the number of times local memory and remote memory are accessed, the access performance is further improved.
[0072] For ease of understanding, the coherent interconnect processing device provided by the present invention is first described.
[0073] Figure 1 A schematic diagram of the structure of a consistent interconnect processing device provided by an embodiment of the present invention.
[0074] like Figure 1 As shown, the coherent interconnect processing device provided by the embodiment of the present invention may include: a coherent interconnect interface, a coherent interconnect controller and a dynamic address configuration engine.
[0075] Among them, the consistency interconnect controller is used to enable the corresponding consistency interconnect interface from the device where it is located according to the number of other devices in the heterogeneous system that need to establish memory consistency interconnection with the device where it is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where it is located and the other devices based on the consistency interconnection interface; establish a memory consistency interconnection communication link between the device where it is located and the other devices according to the memory interconnection parameters of the device where it is located and the memory interconnection parameters of the other devices, and call the dynamic address configuration engine to allocate the corresponding cache space from the device where it is located; perform cache consistency transaction processing between the device where it is located and the other devices based on the memory consistency interconnection communication link and the cache space to realize the memory consistency interconnection transmission request between the device where it is located and the other devices.
[0076] It should be noted that in the embodiments of the present invention, the types of "devices" mainly include processors and accelerators. In a hardware environment, these processors and accelerators may be devices installed on the same server or on different servers.
[0077] The consistent interconnection processing device provided by the embodiment of the present invention can be installed on a device as a hardware. In an application scenario provided by the embodiment of the present invention, the consistent interconnection processing device provided by the embodiment of the present invention can be installed on the device used when building a heterogeneous system. At this time, the consistent interconnection processing device provided by the embodiment of the present invention can shield the differences in the interconnection protocols defined when the device leaves the factory, and realize consistent interconnection between heterogeneous devices. In another application scenario provided by the embodiment of the present invention, for a programmable controller such as a Field Programmable Gate Array (FPGA), the consistent interconnection processing device provided by the embodiment of the present invention can be installed to have a consistent interconnection function with other devices.
[0078] For ease of understanding, the consistent interconnect processing device provided by the embodiment of the present invention is first described in the context of the device and the heterogeneous system in which it is located. Figure 1 As shown, the consistent interconnect processing device provided in the embodiment of the present invention supports consistent interconnection between accelerators, consistent interconnection between processors and accelerators, and consistent interconnection between processors, and also includes interconnection between the device and other local devices installed on the same server and interconnection between the device and remote devices installed on different servers.
[0079] In an embodiment of the present invention, a consistent interconnect interface can be implemented based on the hardware resources of the device, and a unified consistent interconnect bus can be used to establish a physical communication link between devices. The consistent interconnect interface can dynamically adapt to connect with different types of devices, including consistent interconnect with processors and consistent interconnect with accelerators. It is also used to dynamically adapt to different topologies, obtain memory interconnect parameters of devices, configure global address pools, and complete consistent interconnect protocol processing of global memory of heterogeneous systems. The consistent interconnect interface may include a physical layer, a link layer, and a transport layer.
[0080] On the device, the corresponding coherent interconnect interface can be enabled according to the number of other devices that need to establish memory coherent interconnect. In some optional implementations of the embodiments of the present invention, if the device is an accelerator, a 4-way coherent interconnect interface can be pre-prepared on the accelerator, and the 4-way coherent interconnect interface can enable 1 / 2 / 3 / 4 ways according to different topological connections to adapt to different topologies. Figure 1 As shown, the accelerator can be interconnected with two processors using a 2-way coherent interconnect interface, and another 2-way coherent interconnect interface can be interconnected with another two accelerators.
[0081] In the coherent interconnect processing device provided in the embodiment of the present invention, the cache coherence function is managed through the coherent interconnect controller to achieve cache coherence management between the caches of each device in the heterogeneous system and the system memory. The coherent interconnect controller can be used to receive the memory resource handshake information initiated by the interconnect device, extract the memory interconnect parameters to complete the global memory allocation, and set the routing window; receive the access request initiated by the accelerated application unit of the device, perform cache hit search, and initiate different memory transaction requests according to the cache hit situation and the search address range (to clarify which device's memory it is), and complete the coherent search function processing.
[0082] In the coherent interconnect processing device provided in the embodiment of the present invention, the local cache space and the mapping mechanism between the cache address and the memory address are configured according to the memory interconnect parameters obtained by the coherent interconnect interface through the dynamic address configuration engine, which is used to accelerate the address routing of the application and can be dynamically configured according to the topology to improve the cache hit rate. The dynamic address configuration engine can also be used to allocate the global address space for accessing the global address, and the above configuration can be completed dynamically according to the topology.
[0083] Figure 1 In this context, the memory subsystem refers to the memory of the device, which is a component of the consistent unified memory in a heterogeneous system.
[0084] Figure 1 In the example, the accelerated application unit is a unit used to implement dynamic configuration of applications such as deep learning that require accelerated computing.
[0085] Figure 2 A schematic diagram of the structure of a consistent interconnection interface provided by an embodiment of the present invention.
[0086] In the embodiment of the present invention, the coherent interconnect interface is used to implement the cache coherence protocol provided by the embodiment of the present invention, including a physical layer, a link layer and a transport layer.
[0087] like Figure 2As shown, the physical layer and link layer are used to manage the link, including the initial connection of the link, the reliability management of the link, etc. The implementation of these two layers is relatively flexible and can be selected according to the physical link resources of the device board. For example, the Interlaken interface for lightweight packet interconnection can be selected, or the Ethernet Physical Medium Attachment Media Access Control (PHYMAC) interface can be selected, or the serial transceiver (Serdes) interface can be directly selected, and the interface type with a high link rate can be selected. In some optional implementations of the embodiments of the present invention, an Ethernet physical media access control interface is used to support a rate of 56Gbps / lane (channel). Using 8 lanes, the rate of a single interface can reach 448Gbps.
[0088] In the consistent interconnect interface provided by the embodiment of the present invention, the transport layer is a customized consistent transaction type to complete the processing of consistent transaction messages. In the embodiment of the present invention, the consistent transaction type can be based on the four-state cache consistency (Modify, Exclusive, Shared, Invalid, MESI) protocol specification.
[0089] Each cache line in a single-core cache has two flags: a dirty state (or modified state) and a valid state (valid) flag, which well describe the data relationship between the cache and the memory (whether the data is valid, whether the data has been modified). In a multi-core processor, multiple cores will share some data, and the MESI protocol includes a description of the shared state.
[0090] In the MESI protocol, each cache line has four states, which can be represented by two bits. They are Modify (M state for short), Exclusive (E state for short), Share (S state for short), and Invalid (I state for short). The Modify state indicates that the data in this line is valid, the data has been modified, and it is inconsistent with the data in the memory. The data only exists in this cache. The Exclusive state indicates that the data in this line is valid, the data is consistent with the data in the memory, and the data only exists in this cache. The Shared state indicates that the data in this line is valid, the data is consistent with the data in the memory, and the data exists in many caches. The Invalid state indicates that the data in this line is invalid.
[0091] The transport layer user interface is a customized cache coherence interface (CCI) bus. The embodiment of the present invention provides a set of reference message formats as follows.
[0092] Table 1 is a request transaction message format table provided by an embodiment of the present invention. In the coherent interconnection protocol defined in an embodiment of the present invention, the message format of the request transaction may be as shown in Table 1. Among them, the field indicates the message content type, and the bit width is the data size of the message content.
[0093] Table 1
[0094]
[0095] Table 2 is a response transaction message format table provided by an embodiment of the present invention. In the coherent interconnection protocol defined in an embodiment of the present invention, the message format of the response transaction may be as shown in Table 2. Among them, the field indicates the message content type, and the bit width is the data size of the message content.
[0096] Table 2
[0097]
[0098] In an embodiment of the present invention, the physical address (Address) can use 64B as the minimum granularity, so the lowest 6 bits are 0, which is the physical address of the requested system memory. The system memory includes the device memory and the remote device memory (remote processor memory, remote accelerator memory), and uses addresses of different bit widths according to the system topology connection.
[0099] Depending on the different deployments of the accelerated application, sometimes the read and write addresses are virtual addresses, and the coherent interconnect processing device can also be used to convert the virtual addresses into physical addresses and then encapsulate and parse them according to the above message format.
[0100] The operation code (Opcode) of the request transaction message and the response transaction message includes a consistency transaction flow, which is used to interact with consistency transactions of other devices. Table 3 is a table of request transaction message types provided in an embodiment of the present invention. As shown in Table 3, by applying the consistency interconnection protocol provided in an embodiment of the present invention, the request transaction types that can be implemented include read requests and write requests, wherein the read request may include read data (RdD), read memory (RdCur) and read permission (RdNoData), and the write request may include invalid (Invalid), read first and write later (RDITW), write data (WrM), refresh the specified cache line (CLFlush) and cache refreshed (CacheFlushed). The response transaction types include cache data response (CaDRsp), memory data response (MemDRsp), invalid (InvldRsp), cache data writable (WCaDRsp), memory data writable (WMemDRsp) and write completed (Wrdone). Please refer to the introduction of Table 3 for the operation process of each transaction type. Among them, the four states of M, E, S, and I refer to the description of the MESI protocol above.
[0101] Table 3
[0102]
[0103] In addition to implementing the consistency protocol transaction processing function at the transport layer, the function of sensing the memory interconnection parameters of the device can also be realized. The memory interconnection parameters may include device type, device memory size, service type, etc.
[0104] A consistency protocol transport layer control module (Cfg) can be deployed to realize the function of sensing memory interconnection parameters. Two groups of registers can be deployed in the consistency protocol transport layer control module. One group of registers is used to store the memory interconnection parameters of the device, which can be called local attribute registers. The other group of registers is used to store the memory interconnection parameters of other devices, which can be called remote attribute registers. In the registers, the device type register and the device memory size register are fixed values, which vary with the board type of the device, while the service type register can be initialized and configured by the acceleration service after the device is powered on, which varies with the service type. The value of the remote attribute register can be obtained by the consistency protocol transport layer control module sending a message to read the local register of other devices after the consistency interconnection processing device completes the link initialization configuration.
[0105] Figure 3 A schematic diagram of the structure of a coherent interconnect controller provided by an embodiment of the present invention.
[0106] In the coherent interconnect processing device provided in the embodiment of the present invention, the coherent interconnect controller is used to manage the cache coherence function, and its implementation module block diagram can be as follows: Figure 3 The interface processing module is deployed with the Cache Coherence Interface (CCI) protocol provided by the embodiment of the present invention, and is used to complete the parsing or encapsulation of the custom consistency bus message format of the embodiment of the present invention, including receiving the request or response information of the request response processing module, encapsulating it into a custom message format and sending it to the consistency interconnection interface; receiving the remote request or response message sent by the consistency interconnection interface, parsing it and sending it to the request response processing module for processing.
[0107] As described above in the embodiment of the present invention, a dynamic address configuration engine is used to configure the local cache space and the mapping mechanism between the cache address and the memory address according to the memory interconnection parameters obtained from the consistency interconnection interface. In the consistency interconnection controller, the request response processing module can be used to configure the capacity of the local cache space according to the memory interconnection parameters obtained from the dynamic address configuration engine, and to complete the processing related to the cache consistency transaction: converting the memory read and write request into the memory read and write operation, selecting the appropriate cache consistency interface path according to the address arbitration to send the protocol transaction message after the local read and write misses the cache, and completing the processing of the response message to write the data back to the cache or change the state of the cache line. The request response processing module can communicate with the memory subsystem and the acceleration application unit through the Advanced Extensible Interface (AXI) bus.
[0108] In some optional implementations of the embodiments of the present invention, a cache space may be deployed locally to establish cache coherence interconnection with the device where it is located and other devices.
[0109] For ease of management, in some other optional implementations of the present invention, cache space corresponding to the memory of the device and the memory of other devices can be allocated from the device according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices. Figure 3 As shown, the coherent interconnect controller provided by the embodiment of the present invention may also include a read-write processing (Cafu_proc) module and a cache controller. Multiple cache spaces are established locally, corresponding to local devices and other devices one by one. A cache controller may be set for each cache space to manage cache search tasks and cache line status update tasks of the cache space. A processor cache (Host cache) controller and an accelerator cache (device cache) controller may also be set to manage the cache spaces corresponding to the processor and accelerator, respectively.
[0110] The read / write processing module is used to complete the read / write operation processing of the accelerated application of the device, determine the corresponding cache space according to the read / write address, and trigger the corresponding cache controller to perform cache search and cache line status update.
[0111] Therefore, the embodiment of the present invention proposes a unified cache consistency interconnection scheme that can be used for hardware implementation of topology dynamic perception and can be used for interconnection between accelerators, between accelerators and processors, and between processors. The consistency interconnection processing device provided by the embodiment of the present invention unifies the interface protocol of the accelerator to the outside (with the remote accelerator and the remote processor), without the need to implement complex conversion of different consistency protocol interfaces. The accelerated application on the accelerator can use a unified consistency interconnection processing device to not only access the local device memory, but also access the memory of the remote processor and the memory on the remote accelerator in a consistent manner, expanding the capacity of the accelerator memory and improving the memory performance, thereby effectively breaking through the device performance bottleneck when implementing large-scale distributed computing and greatly improving the computing performance. The consistency interconnection processing device provided by the embodiment of the present invention can customize multiple consistency protocol transaction types to implement the cache consistency function in hardware, without the need for software program development, which not only reduces the programming difficulty of application developers, but also improves the memory access performance of the application. Based on this, the consistent interconnection processing device provided by the embodiment of the present invention can dynamically perceive the system topology, dynamically enable the consistent interconnection interface according to different topologies, dynamically allocate global memory space and cache capacity, dynamically select the corresponding cache consistency transaction, and can adapt to a variety of acceleration applications with different computing power, and support changes in a variety of topologies, such as wireless mesh networks (Mesh), Clos networks, and the adaptation of topologies such as Fat Tree topology, Crossbar topology, and fully interconnected topology based on the Clos network model, simplifying the deployment difficulty. In conjunction with the partial reconfiguration specifics supported by the FPGA hardware itself, it supports dynamic switching of different acceleration applications, and flexibly switches topologies according to the computing power of the acceleration application. Through the cache consistency protocol, it supports the unification of the memory of each device in the heterogeneous system, and realizes that the acceleration application can consistently access all the memory in the system, which greatly improves the acceleration performance of memory capacity sensitive applications such as deep learning.
[0112] Figure 4 An architectural diagram of a heterogeneous system provided in an embodiment of the present invention.
[0113] like Figure 4As shown, the heterogeneous system provided by the embodiment of the present invention includes multiple heterogeneous devices, and each heterogeneous device is equipped with a consistency interconnection processing device. The consistency interconnection processing device is used to enable the corresponding consistency interconnection interface from the device where the device is located according to the number of other devices in the heterogeneous system that need to establish memory consistency interconnection with the device where the device is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where the device is located and the other devices based on the consistency interconnection interface; establish a memory consistency interconnection communication link between the device where the device is located and the other devices according to the memory interconnection parameters of the device where the device is located and the memory interconnection parameters of the other devices, and allocate the corresponding cache space from the device where the device is located; perform cache consistency transaction processing between the device where the device is located and the other devices based on the memory consistency interconnection communication link and the cache space to realize the memory consistency interconnection transmission request between the device where the device is located and the other devices.
[0114] With reference to the coherent interconnect processing device provided in the above-mentioned embodiment of the present invention, in a heterogeneous system, cache coherent interconnections can be established between accelerators, between processors and accelerators, and between processors based on the coherent interconnect processing device provided in the embodiment of the present invention. Devices are connected through coherent interconnect interfaces and coherent interconnect buses. The working process is described in detail in the following embodiment of the present invention.
[0115] Based on the above architecture, the data transmission method provided by the embodiment of the present invention is described below with reference to the accompanying drawings.
[0116] Figure 5 A flowchart of a data transmission method provided by an embodiment of the present invention.
[0117] like Figure 5 As shown, applied to a consistent interconnect processing device, the data transmission method provided by an embodiment of the present invention includes: S501: according to the number of other devices in a heterogeneous system that need to establish memory consistent interconnection with the device where the device is located, enable the corresponding consistent interconnection interface from the device where the device is located, and obtain the memory interconnection parameters of the other devices after initializing the physical communication link between the device where the device is located and the other devices based on the consistent interconnection interface.
[0118] S502: Establish a memory consistency interconnection communication link between the device and the other device according to the memory interconnection parameters of the device and the memory interconnection parameters of the other device, and allocate corresponding cache space from the device.
[0119] S503: Perform cache consistency transaction processing between the device and other devices based on the memory consistency interconnect communication link and the cache space to implement a memory consistency interconnect transmission request between the device and other devices.
[0120] It should be noted that the specific implementation of the embodiments of the present invention may refer to part or all of the description of the coherent interconnect processing device and the heterogeneous system provided in the above embodiments.
[0121] In the embodiment of the present invention, for S501, after the device is powered on, the consistent interconnect processing device provided by the embodiment of the present invention automatically senses the device topology to determine other devices that need to establish memory consistent interconnection with the device, and enables a corresponding number of consistent interconnect interfaces. After the physical communication link is established between the devices through the consistent interconnect interface and the consistent interconnect bus, the memory resource handshake information is transmitted through the consistent interconnect processing device.
[0122] In the embodiment of the present invention, enabling the corresponding consistent interconnection interface from the device may include: using the Ethernet physical media access control interface of the device to implement the consistent interconnection interface. In practical applications, other types of interfaces may also be used, depending on the hardware resources provided by the device.
[0123] For S502, the coherent interconnect processing device establishes a memory coherent interconnect communication link between the device and other devices according to the memory interconnect parameters of the device and the memory interconnect parameters of other devices, including: extracting the memory interconnect parameters to complete the global memory allocation of the heterogeneous system and setting the route. On this basis, the coherent interconnect processing device allocates cache space corresponding to the memory of the device and the memory of other devices from the device, and implements the cache coherence protocol to further improve the data access efficiency of the distributed computing application acceleration.
[0124] In some optional implementations of the embodiments of the present invention, S502 may include: establishing a memory consistency interconnection communication link between the device and the other device according to the memory interconnection parameters of the device and the memory interconnection parameters of the other device, and allocating corresponding cache space from the device, which may include: establishing a memory consistency interconnection communication link between the device and the other device according to the memory interconnection parameters of the device and the memory interconnection parameters of the other device, and allocating corresponding cache space from the device; wherein the four-state cache consistency protocol represents the cache status through four states of modification (Modify), exclusive (Exclusive), sharing (Shared), and invalid (Invalid).
[0125] For S503, the memory consistency interconnection communication link and cache space established by the application consistency interconnection processing device are used to implement distributed computing acceleration tasks in heterogeneous systems, perform memory consistency and cache consistency transaction processing, shield the differences in the interconnection protocols that come with different devices when they leave the factory, and use the customized consistency interconnection protocol of the embodiment of the present invention to execute the memory consistency interconnection transmission request between the device where the device is located and other devices.
[0126] If a four-state cache consistency protocol is adopted, cache consistency transaction processing of the device and other devices is performed in S503 based on the memory consistency interconnection communication link and the cache space to realize the memory consistency interconnection transmission request between the device and other devices, which may include: converting the memory consistency interconnection transmission request into a consistency interconnection protocol message; wherein the types of consistency interconnection protocol messages include request transaction messages and response transaction messages; the content of the request transaction message includes a request message valid flag, a request transaction type, a physical address of the request transaction and a unique identifier of the request transaction; the content of the response transaction message includes a response message valid flag, a response transaction type, an identifier of the response transaction and response return data; and the identifier of the response transaction corresponds to the identifier of the request transaction.
[0127] In the embodiment of the present invention, the length of the physical address of the request transaction is determined according to the device scale in the heterogeneous system. That is, the more devices there are and the larger the device memory is, the more different physical addresses need to be maintained.
[0128] The data transmission method provided by the embodiment of the present invention uses a consistency interconnection processing device installed on a device to establish memory consistency interconnection with the device according to the number of other devices in the heterogeneous system as needed, enable the corresponding consistency interconnection interface from the device, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device and other devices based on the consistency interconnection interface, establish a memory consistency interconnection communication link between the device and other devices according to the memory interconnection parameters of the device and the memory interconnection parameters of the other devices, and allocate corresponding cache space from the device; perform cache consistency transaction processing on the device and other devices based on the memory consistency interconnection communication link and the cache space to realize memory consistency interconnection transmission request between the device and other devices, realize a solution for dynamically perceiving topology and automatically building memory consistency interconnection communication links between devices of the heterogeneous system, and do not need to manually configure according to the topology between devices during deployment, can eliminate the problem that different types of devices in the heterogeneous system cannot establish memory interconnection due to different interconnection protocols, and realize cache consistency between devices to reduce the number of times of accessing local memory and remote memory, further improving access performance.
[0129] Figure 6A schematic diagram of system global address space allocation provided by an embodiment of the present invention.
[0130] On the basis of the above-mentioned embodiment, the embodiment of the present invention further introduces the process of establishing the global address space and cache space of the heterogeneous system.
[0131] In the embodiment of the present invention, after the device is powered on and the coherent interconnect processing device completes the initialization connection of the link, the coherent protocol transport layer control module of the transport layer of the coherent interconnect interface sends message information to other devices to obtain memory interconnect parameters, and stores the obtained memory interconnect parameters in the local attribute register and the remote attribute register. The memory interconnect parameters may include device type and device memory size.
[0132] The memory interconnection parameters obtained by reading each consistent interconnection interface of the device are provided to the consistent interconnection controller of the consistent interconnection processing device for configuring the cache space.
[0133] The coherent interconnect processing device configures the global address space according to the memory size of the device where it is located and the memory size of other devices. Subsequent acceleration applications select the coherent interconnect interface for data transmission based on this memory space. Figure 6 As shown, taking a heterogeneous system including a processor and four accelerators as an example, assuming that the memory space of the processor is 128 GB and the memory space of the three accelerators is 16 GB, it can be recorded that the global address space 0~3FFFFFFFF corresponds to the memory space of accelerator 1, the global address space 3FFFFFFFF~7FFFFFFFF corresponds to the memory space of accelerator 2, the global address space 7FFFFFFFF~FFFFFFFF corresponds to the memory space of accelerator 3, and the global address space FFFFFFFFF~2FFFFFFFFF corresponds to the memory space of the corresponding processor.
[0134] To further improve data access efficiency, a cache space corresponding to the device memory is established. To facilitate management, in an embodiment of the present invention, in S502, the corresponding cache space is allocated from the device according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, which may include: determining the amount of cache space according to the device type in the memory interconnection parameters, and allocating the cache space corresponding to the memory of the device and the memory of other devices from the device.
[0135] In some optional implementations of the embodiments of the present invention, allocating cache space corresponding to the memory of the device and the memory of other devices from the device may include: determining the size of each cache space according to the device memory size in the memory interconnection parameter, so that the larger the device memory size, the larger the allocated cache space; caching space from the device according to the size of the cache space. Figure 6 In the example shown, the processor cache space can be configured to 128KB according to the processor memory size, and the accelerator cache space size can be configured to 48KB according to the accelerator memory size (the total memory size of three accelerators can be 48GB). When there are multiple processors or multiple accelerators, a one-to-one corresponding cache space can also be configured for each device.
[0136] In some other optional implementations of the embodiments of the present invention, allocating cache space corresponding to the memory of the device and the memory of other devices from the device may also include: determining the length of the access path from the device to the target device memory according to the memory interconnection parameters, determining the size of each cache space according to the length of the access path, so that the longer the access path is, the larger the allocated cache space is; caching space from the device according to the size of the cache space. The longer the access path from the device to the target device memory is, the longer it takes to access the target device memory. At this time, a larger cache space can be allocated locally for such target device memory to improve the hit rate of querying data in the target device memory in the local cache space, so as to reduce the target device memory accessed with a long path.
[0137] In some other optional implementations of the embodiments of the present invention, allocating cache space corresponding to the memory of the device and the memory of other devices from the device can also include: determining the length of the access path from the device to the target device memory according to the memory interconnection parameters, determining the size of each cache space according to the length of the access path and the device memory size in the memory interconnection parameters, so that the larger the device memory size, the larger the allocated cache space, and the longer the access path length, the larger the allocated cache space; caching space from the device according to the size of the cache space. That is, the factors of device memory size and access path length can be comprehensively considered to allocate appropriate cache space to the memory of the device and the memory of other devices to balance storage resources and access time overhead.
[0138] In actual applications, the larger the cache space, the longer it takes to query the cache. If the cache space is set too large, the access time may be extended. In other optional implementations of the embodiments of the present invention, allocating cache space corresponding to the memory of the device and the memory of other devices from the device may also include: determining the first query time for the device to access the target device memory and the second query time for the device to access the target cache space corresponding to the target device memory according to the memory interconnection parameters, determining the size of each cache space according to the balance relationship between the first query time and the second query time when executing the memory consistency interconnection transmission request; caching space from the device according to the size of the cache space.
[0139] Based on the above optional implementations provided in the embodiments of the present invention, it can be seen that the device type, device memory size, access path length and access time overhead can all be used as a basis for determining the size of the cache space corresponding to the device memory. In actual applications, it is not limited to considering only these factors. For example, the size of the cache space can be determined in combination with the frequency of access.
[0140] Since the corresponding cache space is allocated according to the device type, in an embodiment of the present invention, in S503, cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnection communication link and the cache space to realize the memory consistency interconnection transmission request between the device and other devices, which may include: querying the target cache space corresponding to the target memory address corresponding to the memory consistency interconnection transmission request, and performing the data transmission operation corresponding to the data transmission request based on the target cache space. With reference to the consistency interconnection processing device introduced in the above embodiment of the present invention, the read-write processing module in the consistency interconnection controller can determine the corresponding cache space according to the read-write address, and trigger the corresponding cache controller to perform cache search and cache line status update. When the read-write address is the processor memory address, the processor cache controller is triggered to perform a local processor cache space search; when the read-write address is the accelerator memory address, the accelerator cache controller is triggered to perform a local accelerator cache space search. If the corresponding cache space is divided for each device, it can be further distinguished that the device memory address is queried to the corresponding cache space and then the corresponding cache controller is triggered to perform a cache hit.
[0141] Based on the above embodiment, in an embodiment of the present invention, the memory interconnection parameters may further include a business type; the business type is whether there are multiple processing units performing read and write operations on the device memory or only one processing unit performing read and write operations on the device memory.
[0142] Different cache consistency implementation mechanisms can be selected according to the business type of the device. For example, when multiple accelerators perform model parallel acceleration, multiple accelerators will not operate on a memory address at the same time. In this case, the cache can be set only on the local device, and the remote device may not use the cache. A streamlined inter-device cache consistency protocol can be used. During operations such as synchronization, multiple devices will operate on the same memory address at the same time, and the cache of the remote accelerator needs to be enabled. In this case, a complete inter-device cache consistency protocol transaction is used.
[0143] In an embodiment of the present invention, if the memory consistency interconnection transmission request is a request issued by the device to other devices, cache consistency transaction processing between the device and other devices is performed based on the memory consistency interconnection communication link and the cache space in S503 to implement the memory consistency interconnection transmission request between the device and other devices, which may include: if the business type in the memory interconnection parameters of the requested target device is that there are multiple processing units reading and writing operations on the device memory, then a non-cacheable data transmission request is initiated to the consistency interconnection interface of the target device to perform read and write operations on the memory of the target device without changing the cache state of the target device; if the business type in the memory interconnection parameters of the target device is that there is only one processing unit reading and writing operations on the device memory, then a cache consistency read request is initiated to the consistency interconnection interface of the target device to perform read and write operations on the cache space and memory of the target device.
[0144] On the basis of the above-mentioned embodiments, in an embodiment of the present invention, in S503, cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and the cache space to realize the memory consistency interconnect transmission request between the device and other devices, which may include: converting the memory consistency interconnect transmission request into a read and write operation on the memory, so as to select the corresponding consistency interconnect interface to transmit the memory consistency interconnect transmission request message according to address arbitration when the local read and write misses the cache, and performing cache consistency processing of the corresponding cache space after completing the processing of the response message.
[0145] In an embodiment of the present invention, if the cache space is set to correspond to the device type, the memory consistency interconnect transmission request is converted into a read and write operation on the memory, so that when the local read and write misses the cache, the corresponding consistency interconnect interface is selected according to address arbitration to transmit the memory consistency interconnect transmission request message, and the cache consistency processing of the corresponding cache space is performed after the processing of the response message is completed. It can include: determining the cache space corresponding to the target memory address locally according to the target memory address of the memory consistency interconnect transmission request, and triggering the corresponding cache controller to query the target data from the corresponding cache space; if the target data is not queried in the corresponding cache space, determining the consistency interconnect interface corresponding to the target memory address to transmit the memory consistency interconnect transmission request message according to address arbitration, and triggering the corresponding cache controller to perform cache consistency processing of the corresponding cache space after the processing of the response message is completed.
[0146] Based on the above embodiments, Figure 4 Taking the heterogeneous system shown as an example, the embodiment of the present invention further illustrates the device memory access process.
[0147] Figure 4 The heterogeneous system shown in the figure includes a processor and three accelerators (accelerator 1, accelerator 2, and accelerator 3), which can be used to accelerate deep learning applications such as convolutional neural networks (CNNs). The devices form a fully interconnected topology as shown in the figure. Figure 4 shown.
[0148] The data transmission method provided by the embodiment of the present invention is described by taking accelerator 1 accessing the memory of accelerator 2 as an example, which mainly includes an initialization process and a consistency access process.
[0149] In the initialization process, such as Figure 4 In the topology shown, each device (processor or accelerator) physically supports 4-way consistent interconnect interfaces. After power-on, the physical link layer of the consistent interconnect interface performs initialization link operations. According to the actual connection topology, three consistent interconnect interfaces are enabled respectively, and four devices are interconnected in pairs to form a fully interconnected topology. It should be noted that the topology can be changed dynamically, and the consistent interconnect interface can be dynamically configured according to the actual topology.
[0150] After power-on and link initialization, the consistency protocol transport layer control module of the consistency interconnect interface transport layer sends message information to the other three devices to obtain the device type, device memory size, and service type of the other device boards. For example, the processor board type can be recorded as 0, the memory capacity is 128GB, and the service type is recorded as 0 (with cache); the device type of accelerator 2 and accelerator 3 can be recorded as 1, the memory capacity is 16GB, and the service type is recorded as 1 (without cache). Accelerator 1 stores the acquired memory interconnection parameters in local registers for other modules to read.
[0151] The dynamic address configuration engine reads the above-mentioned memory interconnection parameters obtained by each consistent interconnection interface of the device, and can configure the processor cache space to 128KB according to the processor memory size, configure the accelerator cache space capacity to 48KB according to the accelerator memory size (the sum of the memory sizes of three accelerators can be used), and configure the cache capacity size according to the memory capacity size to improve the cache hit rate.
[0152] At the same time, the global address space is configured according to the device memory size of the four devices. Subsequent acceleration applications select the consistent interconnect interface for transmission based on this memory space, such as Figure 6 shown.
[0153] Assuming that the service type of accelerator 2 is asynchronous operation, that is, there is only one processing unit reading and writing operations on the device memory, accelerator 1 can select the corresponding transaction type, reduce cache consistency detection operations, and speed up data reading.
[0154] Figure 7 A method provided by an embodiment of the present invention Figure 5 Flow chart of the specific implementation method of S503.
[0155] After completing the above initialization configuration, the application consistency interconnect processing device can accelerate the process of the application unit executing the memory consistency interconnect transmission request as follows: Figure 7 As shown, it includes: S701: the acceleration application unit of accelerator 1 initiates a request operation for a target read address (such as A=0x403458924).
[0156] S702: The coherent interconnect controller of accelerator 1 identifies that the target read address is located in the address space range of accelerator 2 according to the window position of the target read address in the global address, and searches for the cache space corresponding to accelerator 2 locally.
[0157] S703: The coherent interconnect controller of accelerator 1 determines whether the target data is queried from the cache space corresponding to accelerator 2. If yes, the process proceeds to S704; if not, the process proceeds to S705.
[0158] S704: Return the target data from the cache space corresponding to accelerator 2, and end.
[0159] S705: The consistency interconnect controller of accelerator 1 checks the service type of accelerator 2 according to the remote attribute register of the consistency protocol transport layer control module, and determines that there is only one processing unit in the acceleration application that performs read and write operations on the device memory, and then initiates a direct read data request transaction to the consistency interconnect interface of accelerator 2.
[0160] S706: The coherent interconnect interface of accelerator 1 encapsulates the received memory read request transaction into a coherent protocol message in a custom format and sends it to accelerator 2 through a physical communication link.
[0161] S707: The coherent interconnect interface of accelerator 2 parses the received coherent protocol message and sends an operation request signal to the local coherent interconnect controller.
[0162] S708: The coherent interconnect controller of accelerator 2 directly initiates a read request to the local memory according to the received read memory request transaction, and sends the read target data to the local coherent interconnect interface.
[0163] S709: The coherent interconnect interface of accelerator 2 encapsulates the target data into a customized coherent protocol message for returning data transactions from the remote device memory and sends it to accelerator 1 through the physical communication link.
[0164] S710: The coherent interconnect interface of accelerator 1 parses the received coherent protocol message and extracts the target data and sends it to the local coherent interconnect controller.
[0165] S711: The coherent interconnect controller of accelerator 1 stores the target data into the local accelerator cache space, and sends the target data to the acceleration application unit to complete the read request processing.
[0166] The process of an accelerator accessing other accelerators or processors is similar.
[0167] It should be noted that in the embodiments of the present invention, some of the steps or features may be ignored or not executed. The hardware or software functional modules divided for the convenience of description are not the only implementation form of the data transmission method provided in the embodiments of the present invention.
[0168] The above describes in detail various embodiments corresponding to the data transmission method. On this basis, the present invention also discloses a data transmission device, a non-volatile storage medium and a computer program product corresponding to the above method.
[0169] Figure 8 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention.
[0170] like Figure 8 As shown, the data transmission device provided in an embodiment of the present invention includes: a memory 810, used to store a computer program 811; a processor 820, used to execute the computer program 811, and when the computer program 811 is executed by the processor 820, the steps of the data transmission method provided in any of the above embodiments are implemented.
[0171] Among them, the processor 820 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 820 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 820 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 820 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 820 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0172] The memory 810 may include one or more non-volatile storage media, which may be non-transitory. The memory 810 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 810 is at least used to store the following computer program 811, wherein the computer program 811, after being loaded and executed by the processor 820, can implement the relevant steps in the data transmission method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 810 may also include an operating system 812 and data 813, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 812 may be Windows or other types of operating systems. Data 813 may include, but is not limited to, the data involved in the above method.
[0173] In some embodiments, the data transmission device may further include a display screen 830 , a power supply 840 , a communication interface 850 , an input / output interface 860 , a sensor 870 , and a communication bus 880 .
[0174] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the data transmission device, and may include more or fewer components than shown in the figure.
[0175] The data transmission device provided in the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the steps of the data transmission method provided in the above embodiment, and the effect is the same as above.
[0176] An embodiment of the present invention provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transmission method provided in any one of the above embodiments can be implemented.
[0177] The non-volatile storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0178] For the introduction of the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the data transmission method provided in the embodiment of the present invention, and the present invention will not elaborate on it here.
[0179] An embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data transmission method provided in any one of the above embodiments.
[0180] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the data transmission method provided by the embodiment of the present invention, and the present invention will not elaborate on it here.
[0181] The data transmission method, device, heterogeneous system and consistent interconnection processing device provided by the present invention are introduced in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can refer to each other. For the device, non-volatile storage medium and computer program product disclosed in the embodiment, since they correspond to the consistent interconnection processing device and data transmission method disclosed in the embodiment, the description is relatively simple. For the relevant parts, refer to the consistent interconnection processing device and data transmission method. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0182] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A data transmission method, It is characterized in that Applied to consistent interconnect processing devices, including: According to the number of other devices in the heterogeneous system that need to establish memory consistency interconnection with the device, the corresponding consistency interconnection interface is enabled from the device, and the physical communication link between the device and the other devices is initialized based on the consistency interconnection interface to obtain the memory interconnection parameters of the other devices; Establish a memory consistency interconnection communication link between the device and other devices according to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, and allocate corresponding cache space from the device; Cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement memory consistency interconnect transmission requests between the device and other devices.
2. The data transmission method according to claim 1, It is characterized in that According to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, the corresponding cache space is allocated from the device, including: The amount of cache space is determined according to the device type in the memory interconnection parameter, and the cache space corresponding to the memory of the device and the memory of other devices is allocated from the device.
3. The data transmission method according to claim 2, It is characterized in that Allocate cache space from the device that corresponds to the memory of the device and the memory of other devices, including: Determine the size of each cache space according to the device memory size in the memory interconnection parameter, so that the larger the device memory size, the larger the allocated cache space; Cache space from the device based on the size of the cache space.
4. The data transmission method according to claim 2, It is characterized in that Allocate cache space from the device that corresponds to the memory of the device and the memory of other devices, including: Determine the length of the access path from the device to the target device memory according to the memory interconnection parameter, and determine the size of each cache space according to the length of the access path, so that the longer the length of the access path, the larger the allocated cache space; Cache space from the device based on the size of the cache space.
5. The data transmission method according to claim 2, It is characterized in that Allocate cache space from the device that corresponds to the memory of the device and the memory of other devices, including: Determine the length of an access path from the device to the target device memory according to the memory interconnection parameters, and determine the size of each cache space according to the length of the access path and the device memory size in the memory interconnection parameters, so that the larger the device memory size, the larger the allocated cache space, and the longer the length of the access path, the larger the allocated cache space; Cache space from the device based on the size of the cache space.
6. The data transmission method according to claim 2, It is characterized in that Allocate cache space from the device that corresponds to the memory of the device and the memory of other devices, including: Determine, according to the memory interconnection parameters, a first query time for the device to access the target device memory and a second query time for the device to access the target cache space corresponding to the target device memory, and determine the size of each cache space according to the balance relationship between the first query time and the second query time when executing the memory coherent interconnection transmission request; Cache space from the device based on the size of the cache space.
7. The data transmission method according to claim 2, It is characterized in that Based on the memory consistency interconnect communication link and the cache space, cache consistency transaction processing is performed between the device and other devices to implement a memory consistency interconnect transmission request between the device and other devices, including: A target cache space corresponding to a target memory address corresponding to the memory coherent interconnect transmission request is queried, and a data transmission operation corresponding to the data transmission request is performed based on the target cache space.
8. The data transmission method according to claim 1, It is characterized in that Memory interconnect parameters include business type; The service type is that there are multiple processing units performing read and write operations on the device memory or there is only one processing unit performing read and write operations on the device memory.
9. The data transmission method according to claim 8, It is characterized in that If the memory consistency interconnect transmission request is a request issued by the device to other devices, cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement the memory consistency interconnect transmission request between the device and other devices, including: If the service type in the memory interconnection parameters of the requested target device is that there are multiple processing units performing read and write operations on the device memory, a non-cacheable data transfer request is initiated to the coherent interconnection interface of the target device to perform read and write operations on the memory of the target device without changing the cache state of the target device; If the business type in the memory interconnection parameters of the target device is that there is only one processing unit performing read and write operations on the device memory, a cache consistency read request is initiated to the consistency interconnection interface of the target device to perform read and write operations on the cache space of the target device and the memory of the target device.
10. The data transmission method according to claim 1, It is characterized in that Based on the memory consistency interconnect communication link and the cache space, cache consistency transaction processing is performed between the device and other devices to implement a memory consistency interconnect transmission request between the device and other devices, including: The memory consistency interconnect transmission request is converted into a read and write operation on the memory, so that when the local read and write misses the cache, the corresponding consistency interconnect interface is selected according to address arbitration to transmit the message of the memory consistency interconnect transmission request, and cache consistency processing of the corresponding cache space is performed after completing the processing of the response message.
11. The data transmission method according to claim 10, It is characterized in that The cache space corresponds to the device type; The memory coherent interconnect transmission request is converted into a read and write operation on the memory, so that when the local read and write misses the cache, the corresponding coherent interconnect interface is selected according to the address arbitration to transmit the message of the memory coherent interconnect transmission request, and after completing the processing of the response message, the cache coherence processing of the corresponding cache space is performed, including: Determine a local cache space corresponding to the target memory address according to the target memory address of the memory coherent interconnect transmission request, and trigger a corresponding cache controller to query the target data from the corresponding cache space; If the target data is not found in the corresponding cache space, the consistency interconnect interface corresponding to the target memory address is determined according to address arbitration to transmit the message of the memory consistency interconnect transmission request, and after completing the processing of the response message, the corresponding cache controller is triggered to perform cache consistency processing of the corresponding cache space.
12. The data transmission method according to claim 1, It is characterized in that According to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, a memory consistency interconnection communication link between the device and other devices is established, and corresponding cache space is allocated from the device, including: According to the memory interconnection parameters of the device and the memory interconnection parameters of other devices, a four-state cache coherence protocol is used to establish the memory coherence interconnection communication link between the device and the other devices, and corresponding cache space is allocated from the device; The four-state cache consistency protocol represents the cache state through four states: modification, exclusive, sharing, and invalidation.
13. The data transmission method according to claim 12, It is characterized in that Based on the memory consistency interconnect communication link and the cache space, cache consistency transaction processing is performed between the device and other devices to implement a memory consistency interconnect transmission request between the device and other devices, including: Convert the memory coherent interconnection transmission request into a coherent interconnection protocol message; Among them, the types of the consistency interconnection protocol messages include request transaction messages and response transaction messages; the content of the request transaction message includes a request message valid flag, a request transaction type, a physical address of the request transaction and a unique identifier of the request transaction; the content of the response transaction message includes a response message valid flag, a response transaction type, an identifier of the response transaction and response return data; the identifier of the response transaction corresponds to the identifier of the request transaction.
14. The data transmission method according to claim 13, It is characterized in that The length of the physical address of the request transaction is determined according to the scale of the devices in the heterogeneous system.
15. The data transmission method according to claim 1, It is characterized in that Enable the corresponding consistent interconnection interface from the device, including: The consistent interconnection interface is implemented using the Ethernet physical media access control interface of the device.
16. A coherent interconnect processing device, It is characterized in that include: Coherent interconnect interface, coherent interconnect controller, and dynamic address configuration engine; The coherent interconnect controller is used to enable the corresponding coherent interconnect interface from the device where the device is located according to the number of other devices in the heterogeneous system that need to establish memory coherent interconnection with the device where the device is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where the device is located and the other devices based on the coherent interconnection interface; establish a memory coherent interconnection communication link between the device where the device is located and the other devices according to the memory interconnection parameters of the device where the device is located and the memory interconnection parameters of the other devices, and call the dynamic address configuration engine to allocate the corresponding cache space from the device where the device is located; Cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement memory consistency interconnect transmission requests between the device and other devices.
17. A heterogeneous system, It is characterized in that It includes a plurality of heterogeneous devices, each of which is equipped with a consistent interconnection processing device; The coherent interconnect processing device is used to enable the corresponding coherent interconnect interface from the device where the device is located according to the number of other devices in the heterogeneous system that need to establish memory coherent interconnection with the device where the device is located, and obtain the memory interconnection parameters of other devices after initializing the physical communication link between the device where the device is located and the other devices based on the coherent interconnection interface; establish the memory coherent interconnection communication link between the device where the device is located and the other devices according to the memory interconnection parameters of the device where the device is located and the memory interconnection parameters of the other devices, and allocate the corresponding cache space from the device where the device is located; Cache consistency transaction processing of the device and other devices is performed based on the memory consistency interconnect communication link and cache space to implement memory consistency interconnect transmission requests between the device and other devices.
18. A data transmission device, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the data transmission method according to any one of claims 1 to 15 are implemented.
19. A non-volatile storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 15 are implemented.
20. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the data transmission method according to any one of claims 1 to 15 are implemented.
