Apparatus and method for data processing

By introducing a local proxy module into the collective communication system and using a non-bus interface for data computation and writing, the problems of latency and bandwidth consumption in MPI_reduce or MPI_allreduce computations are solved, achieving more efficient data processing.

CN116171429BActive Publication Date: 2026-01-16HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202080103887.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-24
Publication Date
2026-01-16
Estimated Expiration
2040-09-24

AI Technical Summary

Technical Problem

In high-performance computing and artificial intelligence applications, the computational part of collective communication algorithms suffers from significant latency and bandwidth consumption, especially in MPI_reduce or MPI_allreduce computations, where excessive read and write operations in existing solutions lead to frequent bus access.

Method used

A local agent module (HA module) is introduced to communicate with the RDMA module via the bus and perform data calculation and writing with the memory module using a non-bus interface, thereby avoiding the RDMA module reading and writing local data through the bus and reducing the number of bus accesses.

Benefits of technology

It reduces inter-node communication latency and bus bandwidth consumption, improves the execution efficiency of collective communication algorithms, and reduces computational latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116171429B_ABST
    Figure CN116171429B_ABST
Patent Text Reader

Abstract

A data processing device (100) and method. The data processing device (100) comprises a remote direct memory module access (RDMA) module (110), a home agent (HA) module (120) and a memory module (130), wherein the HA module (120) performs calculation on local data and an operand in an RDMA packet, and writes the obtained calculation result into the memory module (130) through a non-bus interface, which can help to avoid reading the local data from the memory module (130) through a bus and writing the calculation result into the memory module (130) through the bus, so that the processing device (100) can optimize the calculation part in the node performing collective communication, which helps to reduce the inter-node communication delay. At the same time, since the processing device (100) can reduce the bus access times, it can help to reduce the bandwidth consumption of the bus.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer, and more particularly, to an apparatus and method for data processing. BACKGROUND

[0002] With the rapid development of high performance computing (HPC) clusters and artificial intelligence (AI), the demand for data operation is increasing. In the application scenarios of HPC or AI, because there are many processes, a large amount of data processing needs multiple processes to participate in cooperative work. In the scenario of multiple processes cooperating, collective communication needs to be performed. As an example, in the collective communication, the proportion of the topology of the reduction calculation (MPI_reduce) or the reduction and broadcast calculation (MPI_allreduce) may be large, such as up to 40%. Therefore, it is necessary to optimize these algorithms. Calculation is an important part of MPI_reduce or MPI_allreduce, and the execution efficiency of the calculation part will greatly affect the execution efficiency of the collective calculation algorithm. Therefore, the optimization of the calculation part is particularly important.

[0003] In the outward expansion (scal out) scheme of HPC or AI, the data required by MPI_reduce or MPI_allreduce calculation generally comes from multiple nodes, and data transmission between nodes through the network is needed before calculation. Remote direct memory access (RDMA) technology can be used as a technical means to improve the communication bandwidth and reduce the communication delay between nodes in the HPC or AI scenario because of its high bandwidth and low latency characteristics.

[0004] In the current collective communication scheme, the calculation part involves more read and write operations, for example, the RDMA module of the server needs to perform at least one read operation and one write operation on the memory module through the bus, which will cause delay and bandwidth consumption. Therefore, how to optimize the calculation part to reduce the delay and bandwidth consumption is a problem to be solved. SUMMARY

[0005] The application provides a data processing device and method, which can optimize the calculation part of nodes in collective communication, reduce the communication delay between nodes, reduce the bus access times, and thus reduce the bandwidth consumption of the bus.

[0006] In a first aspect, a data processing device is provided, comprising a remote direct memory module access (RDMA) module, a home agent (HA) module and a memory module, wherein the RDMA module and the HA module communicate through a bus, and the HA module and the memory module communicate through a non-bus interface.

[0007] The RDMA module is configured to:

[0008] receive an RDMA packet, and obtain an operand in the RDMA packet;

[0009] send a first command and the operand to the HA module through the bus, wherein the first command is used to instruct the HA module to perform a calculation operation on the operand;

[0010] The HA module is configured to:

[0011] perform a calculation on the operand and local data according to the first command to obtain a calculation result;

[0012] write the calculation result to the memory module through the non-bus interface.

[0013] Therefore, in the embodiments of the application, the HA module performs a calculation on the local data and the operand in the RDMA packet, and writes the obtained calculation result to the memory module through the non-bus interface, which can help to avoid the RDMA module reading the local data from the memory module through the bus and writing the calculation result to the memory module through the bus, and thus the embodiments of the application can optimize the calculation part of nodes in collective communication, and help to reduce the communication delay between nodes. Further, since the embodiments of the application can reduce the bus access times, it can help to reduce the bandwidth consumption of the bus.

[0014] As an example, since the read operation and the write operation of the HA module on the memory module do not need to pass through the bus, the delay of the data processing process only contains one write operation on the bus, and thus it can help to reduce the delay of the collective communication algorithm operation.

[0015] It should be noted that the communication between the RDMA module and the HA module through the bus means that when the RDMA module and the HA module interact with each other, data needs to be transmitted through the bus. The communication between the HA module and the memory module through a non-bus interface means that the HA module and the memory module do not communicate through the bus, that is, when the HA module and the memory module interact with each other, data does not need to be transmitted through the bus. For example, data between the HA module and the memory module can be transmitted through a private interface (or a dedicated interface).

[0016] As an example, in a computer system, the HA module can be arranged at a position close to the memory module, so that the HA module can perform a read operation and / or a write operation on the memory module, so as to shorten the time delay when the HA module performs a read operation or a write operation on the memory module. In some optional embodiments, the HA module can directly perform a read operation or a write operation on the memory module without passing through a cache (for example, an L1 cache, an L2 cache, or an L3 cache, without limitation).

[0017] For example, the HA module can be a hardware module, for example, can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., without limitation.

[0018] For example, the memory module can be a dynamic random access memory (DRAM), or a synchronous dynamic random access memory (SDRAM), or a double data rate synchronous dynamic random access memory (DDR SDRAM), etc., without limitation.

[0019] In some possible implementations of the first aspect, the local agent module is further configured to read the local data from the memory module through the non-bus interface. In this way, after receiving the first command and the operand, the HA module can perform the calculation on the operand and the local data according to the first command. Therefore, the application can help to avoid the RDMA module reading the local data from the memory module through the bus, thereby optimizing the calculation part in the node performing the collective communication, and helping to reduce the inter-node communication delay. Further, since the application embodiment can reduce the bus access times, the bandwidth consumption of the bus can be reduced.

[0020] In some possible embodiments, the local agent module can also pre-store the local data (for example, before receiving the first command), which is not limited in the application embodiment.

[0021] In some possible implementations of the first aspect, the local agent module is further configured to send, to the RDMA module through the bus, a response message corresponding to the first command, where the response message is used to indicate that the calculation operation is completed. Here, the response message is a response of a bus write operation, and the delay of the response message is included in the bus write operation. Correspondingly, the RDMA module receives the response message, and can determine, according to the response message, that the calculation operation on the operand in the RDMA packet is completed.

[0022] In some possible implementations of the first aspect, the RDMA module is further configured to report an interrupt to a central processing unit (CPU), where the interrupt is used to indicate that the calculation operation is completed. Correspondingly, when the CPU receives the interrupt, it can determine that the calculation operation is completed.

[0023] In some possible implementations of the first aspect, the RDMA module is further configured to receive a poll of the CPU to return the completion of the calculation operation.

[0024] In some possible implementations of the first aspect, the RDMA module is specifically configured to determine, according to a first indication field in a packet header of the RDMA packet, that the data in the payload of the RDMA packet needs to be calculated by the collective communication; and determine the data in the payload as the operand. In this way, the RDMA module can determine, according to the obtained RDMA packet, that the collective communication calculation needs to be performed, and obtain the operand for the collective communication calculation.

[0025] Here, the first indication field can be used to indicate collective communication calculation on data in the payload of the RDMA message. By using the first indication field in the header of the RDMA message, the present application can flexibly indicate whether collective communication calculation is performed on data in the payload of each RDMA message.

[0026] In some possible implementation manners, the first indication field can be included in an opcode of a base transport header of the RDMA message, which is not limited in the present application.

[0027] In another possible implementation manner, the collective communication calculation on data in the payload of the RDMA message can also be specified by a queue pair context (QPC) and / or a memory region (MR).

[0028] With reference to the first aspect, in some implementation manners of the first aspect, the collective communication calculation includes collective communication protocol calculation, or collective communication protocol and broadcast calculation.

[0029] With reference to the first aspect, in some implementation manners of the first aspect, the RDMA module is further configured to determine, according to a second indication field in the header of the RDMA message, the calculation operation that needs to be performed on the operand; and generate the first command according to the calculation operation. In this way, the RDMA module can generate the first command for indicating the calculation operation according to the obtained RDMA message.

[0030] Here, the second indication field can be used to indicate the calculation operation on data in the payload of the RDMA message. By using the second indication field in the header of the RDMA message, the present application can flexibly indicate the type of the calculation operation on data in the payload of each RDMA message.

[0031] In some possible implementation manners, the second indication field can be implemented by using a rsv domain segment in a base transport header of the RDMA message, or by adding data encoding in an extended transport header or the payload, which is not limited in the present application.

[0032] In another possible implementation manner, the calculation operation on data in the payload of the RDMA message can also be specified by a QPC and / or a MR.

[0033] In some implementations of the first aspect, the computing operation includes at least one of an addition operation, a maximum operation, an AND operation, an OR operation, an XOR operation, and a minimum operation.

[0034] In some implementations of the first aspect, the RDMA module is an RDMA network interface controller.

[0035] A second aspect provides a method for data processing, the method comprising:

[0036] The local agent module receives, through a bus, a first command and an operand in an RDMA packet, the first command being used to instruct the local agent module to perform a computing operation on the operand;

[0037] The local agent module performs the computing operation on the operand and local data according to the first command to obtain a computing result;

[0038] The local agent module writes the computing result to a memory module through a non-bus interface.

[0039] The method can further comprise: the RDMA module receiving an RDMA packet and obtaining an operand in the RDMA packet;

[0040] The RDMA module sends the first command and the operand to the local agent module through a bus.

[0041] The method can be applied to an apparatus comprising a remote direct memory access (RDMA) module, a local agent module, and a memory module, such as the apparatus in the first aspect or any of the implementations of the first aspect. The RDMA module and the local agent module communicate with each other through a bus, and the local agent module and the memory module communicate with each other through a non-bus interface.

[0042] In some implementations of the second aspect, the method further comprises:

[0043] The local agent module reads the local data from the memory module through the non-bus interface.

[0044] In some implementations of the second aspect, the method further comprises:

[0045] The local agent module sends, to the RDMA module through the bus, a response message corresponding to the first command, the response message being used to indicate that the computing operation is completed.

[0046] In some implementations of the second aspect, the method further comprises:

[0047] The RDMA module reports an interrupt to a central processing unit (CPU) after receiving the response message, and the interrupt is used to indicate completion of the computing operation.

[0048] With reference to the second aspect, in some implementations of the second aspect, further comprising:

[0049] The RDMA module receives a poll of the CPU to return completion of the computing operation.

[0050] With reference to the second aspect, in some implementations of the second aspect, further comprising:

[0051] The RDMA module determines, according to a first indication field in a packet header of the RDMA packet, that collective communication computing needs to be performed on data in a payload of the RDMA packet.

[0052] The RDMA module determines the data in the payload as the operand.

[0053] With reference to the second aspect, in some implementations of the second aspect, the collective communication computing includes collective communication protocol computing, or collective communication protocol and broadcast computing.

[0054] With reference to the second aspect, in some implementations of the second aspect, further comprising:

[0055] The RDMA module determines, according to a second indication field in a packet header of the RDMA packet, the computing operation that needs to be performed on the operand.

[0056] The RDMA module generates the first command according to the computing operation.

[0057] With reference to the second aspect, in some implementations of the second aspect, the computing operation includes at least one of addition operation, maximum value taking operation, and operation, or operation, exclusive or operation, and minimum value taking operation.

[0058] With reference to the second aspect, in some implementations of the second aspect, the RDMA module is an RDMA network interface controller.

[0059] It should be understood that the second aspect of the present application and the corresponding implementations achieve the beneficial effects that can be referred to the beneficial effects achieved by the first aspect of the present application and the corresponding implementations, which will not be described again. BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 is a schematic diagram of a system architecture corresponding to an existing collective communication scheme;

[0061] Figure 2 is a schematic diagram of a system architecture corresponding to another existing collective communication scheme;

[0062] Figure 3 is a schematic block diagram of a system architecture provided by an embodiment of the present application;

[0063] Figure 4 is an example of a format of an RDMA message;

[0064] Figure 5 is a schematic diagram of an HA module and a normal processing core;

[0065] Figure 6 is a schematic block diagram of a data processing apparatus provided by an embodiment of the present application;

[0066] Figure 7 is a schematic flowchart of a data processing method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0067] The technical solutions in the present application will be described below with reference to the accompanying drawings.

[0068] Figure 1 shows a schematic diagram of a system architecture corresponding to an existing collective communication solution. In the collective communication computing algorithm, the computing part is executed by a CPU in the system. As shown in Figure 1 , the system architecture includes an RDMA module, a memory module and a CPU. After the RDMA module receives an RDMA message in the network, the RDMA module can write the payload (containing data A2) in the RDMA message to the memory module through a bus, and the write operation can correspond to the data transmission process corresponding to the arrow in Figure 1 .

[0069] After the RDMA module writes the payload in the RDMA message to the memory module, the RDMA module can report an interrupt to the CPU, and the reporting of the interrupt operation can correspond to the data transmission process corresponding to the arrow in Figure 1 (2). Correspondingly, the CPU can determine that the data A2 in the RDMA message has been written to the memory according to the interrupt. In another possible implementation, the RDMA module can not report an interrupt to the CPU, but the CPU can determine that the data A2 has been written to the memory through polling.

[0070] After the CPU determines that the data in the RDMA message has been written to the memory, the CPU can initiate a bus read operation to read the data A2 written to the memory module to the CPU, and the read operation can correspond to the data transmission process corresponding to the arrow in Figure 1 (3). At the same time, the CPU can read the local data A3 saved in the memory module to the CPU, and the read operation can correspond to the data transmission process corresponding to the arrow in Figure 1The data transmission process corresponding to the arrow in (4) is shown.

[0071] Next, the CPU completes the calculations for data A2 and A3. After obtaining the calculation results, the CPU writes the results to the memory module via the bus. This write operation can correspond to... Figure 1 The data transmission process corresponding to the arrow in (5) is shown.

[0072] Figure 1 In the data processing process, for the RDMA module, a total of two write operations to the memory module are required via the bus (i.e., Figure 1 The data transmission process corresponding to the arrows in (1) and (5) and the two read operations (i.e. Figure 1 The data transfer process corresponds to the arrows in (3) and (4). For the CPU, this requires one interrupt or polling operation and one write operation to the memory module (i.e., ...). Figure 1 The data transmission process corresponding to the arrow in (5) and the two read operations (i.e. Figure 1 The data transmission process corresponding to the arrows in (3) and (4) is shown. Figure 1 For the entire system, the latency of this data processing process includes Figure 1 The arrows in (1) to (5) correspond to the data transmission process and the CPU's computational delay. Each data transmission process in (1) to (5) requires a read or write operation on the bus.

[0073] Figure 2 A schematic diagram of the system architecture corresponding to another existing collective communication scheme is shown, in which the computation part of the collective communication calculation algorithm is executed by the RDMA module. Figure 2 As shown, the system architecture includes an RDMA module, a memory module, and a CPU. Before the RDMA module receives an RDMA message, it can read data A4 from the memory module via the bus and wait to participate in the calculation. This read operation can correspond to... Figure 2 The data transmission process corresponding to the arrow in (1).

[0074] The RDAM module receives RDMA messages from the network and determines, based on the information in the message header, whether collective communication computation (e.g., MPI_reduce or MPI_allreduce computation) is required, and the corresponding computation operation type. At this point, the RDMA module can write the computation result to the memory module via the bus. This write operation can correspond to... Figure 2 The data transmission process corresponding to the arrow in (2) is shown.

[0075] Then, the RDMA module can report an interrupt to the CPU, and this interrupt reporting operation can correspond to... Figure 2The arrow in (3) corresponds to the data transmission process. In another possible implementation, the CPU can determine whether the calculation operation is completed through polling, and in this case, the RDMA module can not report an interrupt to the CPU.

[0076] Figure 2 The data processing process in (1) and (2) requires the RDMA module to perform one read operation (i.e. Figure 2 The arrow in (1) corresponds to the data transmission process) and one write operation (i.e. Figure 2 The arrow in (2) corresponds to the data transmission process) to the memory module through the bus. For the CPU, one interrupt or polling operation is required. Figure 2 For the entire system in (3), the delay of the data processing process includes the data transmission processes corresponding to the arrows in (1) and (2) and the calculation delay of the RDMA module. The data transmission processes corresponding to the arrows in (1) and (2) both require read or write operations to the bus. Figure 2

[0077] In the collective communication scheme of Figure 1 or Figure 2 , the calculation part involves more read and write operations. For example, in Figure 1 , the RDMA module needs to perform two read operations and two write operations to the memory module through the bus, and in Figure 2 , the RDMA module needs to perform one read operation and one write operation to the memory module through the bus, which results in time delay and bandwidth consumption.

[0078] Therefore, embodiments of the present application provide a data processing scheme, in which a home agent (HA) module is added to the system architecture of collective communication. The HA module can perform calculation on local data and operands in RDMA packets and write the calculation result to the memory module through a non-bus interface. This can help to avoid the RDMA module reading local data from the memory module through the bus and writing the calculation result to the memory module through the bus, thereby optimizing the calculation part and reducing the time delay and bandwidth consumption of collective communication.

[0079] Figure 3 ​A schematic block diagram of a system architecture 100 provided by an embodiment of the present application is shown. The system architecture 100 may, for example, be an HPC server, or an AI training center server, etc. For example, in an HPC or AI application scenario, a plurality of system architectures 100 may be included, each of which may be referred to as a node. In collective communication of the plurality of nodes, data transmission between the nodes is performed through RDMA technology, and then the data is calculated to implement MPI reduce or MPI allreduce calculation.

[0080] It should be noted that, in the plurality of nodes performing collective communication, after data transmission between the nodes through the RDMA technology, some nodes need to calculate the obtained data, and some nodes do not need to calculate the obtained data, but can directly transmit the data to the next node. Optionally, after the nodes calculate the data, the calculation results can also be transmitted to the next node.

[0081] Next, in combination with the system architecture shown in Figure 3 , the data processing process of one of the nodes performing collective communication is described, wherein the node needs to calculate the obtained data. It can be understood that the data processing process of other nodes performing collective communication that need to calculate data is the same as or similar to the data processing process of the node, and can be referred to the data processing process of the node described below, which will not be described in detail.

[0082] As shown in Figure 3 , the system architecture 100 includes an RDMA module 110, a home agent (HA) module 120, a memory module 130, and a central processing unit (CPU) 140.

[0083] The RDMA module 110 can support the RDMA protocol, so that the node in Figure 3 may perform data transmission with other nodes through the RDMA technology, for example, can receive RDMA packets, send RDMA packets, etc. For example, the RDMA module 110 may specifically be an RDMA engine, or an RDMA network interface controller (NIC), which may also be referred to as an RDMA network card, and the present application does not limit this.

[0084] As an example, the RDMA module 110 can receive RDMA packets from other nodes performing collective communication through the Internet.

[0085] Here, the opcode type of the RDMA packet can be, for example, send, send with invalidate, send with immediate, RDMA write, RDMA write with immediate, or RDMA read, and the like, and embodiments of the present application do not limit the same. That is, for the node shown in FIG. 21, other nodes can send the RDMA packet requiring MPI_reduce or MPI_allreduce calculation to the node through the operations of send, send with invalidate, send with immediate, RDMA write, RDMA write with immediate, or RDMA read, and the like. Figure 3

[0086] After receiving the RDMA packet, the RDMA module 110 can obtain the operand in the RDMA packet, i.e., the operand requiring MPI_reduce or MPI_allreduce calculation. For example, the data type of the operand can include 8 / 16 / 32 / 64-bit integer type (int), 8 / 16 / 32 / 64-bit unsigned integer (unsigned INT, UINT), or double-precision floating-point type, and embodiments of the present application do not limit the same.

[0087] In some possible implementation manners, the RDMA module 110 can determine, according to a first indication field in the packet header of the RDMA packet, that collective communication calculation, for example, MPI_reduce or MPI_allreduce calculation, needs to be performed on the data in the payload of the RDMA packet. The first indication field can be used to indicate that collective communication calculation is performed on the data in the payload of the RDMA packet. At this time, the RDMA module 110 can determine the data in the payload of the RDMA packet as the above-mentioned operand. Therefore, by using the first indication field in the packet header of the RDMA packet, it can be flexibly indicated whether collective communication calculation is performed on the data in the payload of each RDMA packet.

[0088] ​In some possible implementation, the RDMA module 110 can determine the calculation operation, such as the MPI reduce or MPI allreduce calculation, on the data in the payload of the RDMA message according to a second indication field in the message header of the RDMA message. The second indication field can be used to indicate the calculation operation on the data in the payload of the RDMA message. Therefore, by using the second indication field in the message header of the RDMA message, the type of the calculation operation on the data in the payload of each RDMA message can be flexibly indicated.

[0089] In some possible implementation, the RDMA module 110 can determine the calculation operation, such as the MPI reduce or MPI allreduce calculation, on the data in the payload of the RDMA message according to a second indication field in the message header of the RDMA message. The second indication field can be used to indicate the calculation operation on the data in the payload of the RDMA message. Therefore, by using the second indication field in the message header of the RDMA message, the type of the calculation operation on the data in the payload of each RDMA message can be flexibly indicated.

[0090] In some possible implementation, the RDMA module 110 can determine the calculation operation, such as the MPI reduce or MPI allreduce calculation, on the data in the payload of the RDMA message according to a second indication field in the message header of the RDMA message. The second indication field can be used to indicate the calculation operation on the data in the payload of the RDMA message. Therefore, by using the second indication field in the message header of the RDMA message, the type of the calculation operation on the data in the payload of each RDMA message can be flexibly indicated.

[0091] Exemplarily, the computing operation on the data in the payload of the RDMA packet can include at least one of an add operation, a max operation, an and operation, an or operation, an xor operation, and a min operation.

[0092] Figure 4 An example of the format of the RDMA packet is shown. As shown, the RDMA packet can include a local router header, a global transport header, a base transport header, an extended transport header, a payload, an invariant CRC, and a variant CRC. In some possible implementations, the first indication field can be included in the opcode of the base transport header, the second indication field can be implemented by a rsv field segment in the base transport header, or by adding data encoding in the extended transport header or the payload, and the application is not limited thereto. Figure 4

[0093] The RDMA module 110 can communicate with the HA module 120 through the bus. Exemplarily, the RDMA module 110 can send an operation command and an operand in an RDMA packet to the HA module 120 through the bus, where the operation command is used to instruct the HA module 120 to perform a computing operation on the operand. Continuing to refer to Figure 3 , the RDMA module 110 sending the operation command and the operand to the HA module 120 can correspond to the data transmission process corresponding to the arrow in (1) of Figure 3 , i.e., one bus write operation.

[0094] The HA module 120 can communicate with the RDMA module 110 through the bus, and communicate with the memory module 130 through a non-bus interface. For example, the HA module 120 can receive the operand and the operation command from the RDMA module 110 through the bus. The HA module 120 can also read local data, such as A1, from the memory module 130 through the non-bus interface. Continuing to refer to Figure 3 , the HA module 120 reading the local data from the memory module 130 can correspond to the data transmission process corresponding to the arrow in (2) of Figure 3 .

[0095] ​In some possible implementation manners, the HA module 120 can also pre-store local data (for example, before receiving the operation command), and the embodiments of the present application do not make any limitation in this aspect.

[0096] The HA module 120 can also perform a computing operation, for example, can perform a computing operation on the obtained operation number of the RDMA module 110 and the local data of the memory module 130 according to the obtained operation command of the RDMA module 110, to obtain a computing result. After obtaining the computing result, the HA module 120 can write the computing result into the memory module 130 through the non-bus interface. It is continued to refer to Figure 3 , the HA module 120 writes the computing result into the memory module 130 can correspond to Figure 3 the data transmission process corresponding to the arrow pair in (3).

[0097] Exemplarily, the HA module 120 can be implemented by a circuit module having the functions of reading data from the memory module 130, writing data into the memory module 130, and performing a computing operation on the data. The HA module 120 can be a hardware module, for example, can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., and the present application does not make any limitation in this aspect.

[0098] Exemplarily, the memory module 130 can be a dynamic random access memory (DRAM), or a synchronous DRAM (SDRAM), or a double data rate SDRAM (DDR SDRAM), etc., and the present application does not make any limitation in this aspect.

[0099] It should be noted that the communication between the RDMA module 110 and the HA module 120 through the bus means that when the RDMA module 110 and the HA module 120 interact with data, the data needs to be transmitted through the bus. The communication between the HA module 120 and the memory module 130 through the non-bus interface means that the HA module 120 and the memory module 130 do not communicate through the bus, that is, when the HA module 120 and the memory module 130 interact with data, the data does not need to be transmitted through the bus. For example, the data between the HA module 120 and the memory module 130 can be transmitted through a private interface (or a dedicated interface).

[0100] Continuing to refer to Figure 3 For example, in the system architecture 100, since the HA module 120 is arranged at a position close to the memory module 130, the time delay of the read operation or the write operation of the HA module 120 to the memory module 130 can be shortened.

[0101] Figure 5 An example of the HA module and the general processing core is shown. For example, the memory module is DRAM and non-volatile memory (NVM), and the processing core is CPU. As shown in Figure 5 The processing core 1 to the processing core n 301 respectively perform read or write operation on the DRAM 305 through the respective layer 1 (L1) cache, layer 2 (L2) cache and common layer 3 (L3) cache, and the DRAM 305 can further perform data transmission with the NVM 306. The processing core 302 performs read or write operation on the DRAM 307 through the cache, and the DRAM 307 can further perform data transmission with the NVM 308. At the same time, the HA module 303 can directly perform read operation or write operation on the DRAM 307 without the cache. In addition, the HA module 304 can perform read operation or write operation on the NVM 308 without the cache.

[0102] Among them, the processing core 1 to the processing core n 301 and the processing core 302 as a general computing system can be taken as the center of the computing processing core. Due to the large difference in frequency and communication / processing speed between the memory module and the computing processing core, the computing processing core and the memory module generally do not communicate directly, but need to communicate through the cache module and the bus. The HA module 303 and the HA module 304 as a special computing computing module can be directly connected with the memory module in the form of a private interface, and the frequency and communication / processing speed are matched, so that the read operation or the write operation on the memory module can be realized without the cache or the bus.

[0103] Therefore, in the embodiments of the present application, the HA module can help to avoid the RDMA module reading the local data from the memory module through the bus and writing the calculation result into the memory module through the bus by calculating the operands in the local data and the RDMA packet and writing the obtained calculation result into the memory module through the non-bus interface. Therefore, the embodiments of the present application can optimize the calculation part in the node performing the collective communication algorithm, and help to reduce the communication delay between nodes. Further, since the embodiments of the present application can reduce the number of bus access times, the bandwidth consumption of the bus can be reduced.

[0104] For example, Figure 3 The delay of the data processing process of the system architecture 100 in the collective communication algorithm operation includes Figure 3 The data transmission process corresponding to the arrows in (1) to (3) in the above and the calculation delay of the HA module. Since the read operation and the write operation of the HA module 120 to the memory module 130 do not need to pass through the bus, the delay only includes one write operation to the bus, thereby helping to reduce the delay of the collective communication algorithm operation.

[0105] In some optional embodiments, the HA module 120 can send a response message corresponding to the operation command (i.e. Figure 3 The response message corresponding to the process in (1) in the above is used to indicate the completion of the calculation operation corresponding to the operation command. Here, the response is the response of one bus write operation, and the delay is included in one bus write operation. Correspondingly, the RDMA module 110 receives the response message, and according to the response message, it can be determined that the calculation operation on the operands in the RDMA packet is completed.

[0106] After the RDMA module 110 receives the response message, the RDMA module 110 can notify the CPU 140 of the completion of the calculation operation through interruption or polling. As an example, the RDMA module 110 can send an interruption to the CPU 140 through the bus, and when the CPU 140 receives the interruption, it can be determined that the calculation operation is completed. As another example, the CPU 140 can periodically poll to determine whether the calculation process is completed, and at this time, the RDMA module 110 does not need to report an interruption.

[0107] The data processing scheme of the embodiments of the present application is relative Figure 1Compared with the data processing scheme in the prior art, the delay of the data processing process when performing the collective communication algorithm operation only includes one write operation to the bus, so that the delay of the collective communication algorithm operation is greatly reduced, and the system performance is improved.

[0108] In addition, in the data processing scheme of the embodiment of the present application, the CPU only needs one interruption or polling operation, and does not need to perform read operation or write operation on the memory module, so that the embodiment of the present application can improve the processing efficiency of the CPU compared with the scheme shown in the prior art. Figure 1

[0109] Compared with the data processing scheme in the prior art, the delay of the data processing process when performing the collective communication algorithm operation only includes one write operation to the bus, so that the delay of the collective communication algorithm operation is greatly reduced, and the system performance is improved. Figure 2

[0110] Figure 6 A schematic block diagram of a data processing apparatus 600 provided by the embodiment of the present application is shown. As shown in the figure, the apparatus 600 includes a remote direct memory module access (RDMA) module 610, a local proxy module 620 and a memory module 630. The RDMA module 610 and the local proxy module 620 communicate through a bus, and the local proxy module 620 and the memory module 630 communicate through a non-bus interface. Figure 6

[0111] The RDMA module 610 is configured to:

[0112] receive an RDMA packet, and obtain an operand in the RDMA packet;

[0113] send a first command and the operand to the local proxy module through the bus, the first command being used to instruct the local proxy module to perform a calculation operation on the operand.

[0114] The local proxy module 620 is configured to:

[0115] perform calculation on the operand and local data according to the first command to obtain a calculation result;

[0116] write the calculation result to the memory module through the non-bus interface.

[0117] In some optional embodiments, the local proxy module 620 is further configured to read the local data from the memory module through the non-bus interface.

[0118] ​​​In some optional embodiments, the local agent module 620 is further configured to send, through the bus, a response message corresponding to the first command to the RDMA module, the response message being configured to indicate completion of the computing operation.

[0119] In some optional embodiments, the apparatus 600 can further comprise a central processing unit CPU. The RDMA module 610 is further configured to report an interrupt to the central processing unit CPU, the interrupt being configured to indicate completion of the computing operation.

[0120] In some optional embodiments, the apparatus 600 can further comprise a central processing unit CPU. The RDMA module 610 is further configured to receive a poll of the CPU to return completion of the computing operation.

[0121] In some optional embodiments, the RDMA module 610 is specifically configured to determine, according to a first indication field in a packet header of the RDMA packet, that a collective communication computing is required on data in a payload of the RDMA packet, and determine the data in the payload as the operand.

[0122] In some optional embodiments, the collective communication computing comprises a collective communication protocol computing, or a collective communication protocol and broadcast computing.

[0123] In some optional embodiments, the RDMA module 610 is further configured to determine, according to a second indication field in a packet header of the RDMA packet, the computing operation required on the operand; and generate the first command according to the computing operation.

[0124] In some optional embodiments, the computing operation comprises at least one of an addition operation, a maximum value taking operation, an AND operation, an OR operation, an XOR operation, and a minimum value taking operation.

[0125] In some optional embodiments, the RDMA module is an RDMA network interface controller.

[0126] The functions and actions of the modules or units in the apparatus 600 are only exemplary, and the modules or units in the apparatus 600 can refer to the descriptions of the modules or units in the system 100, which will not be repeated here.

[0127] Figure 7 A schematic flowchart of a data processing method 700 is shown. The method 700 can be applied to an apparatus comprising an RDMA module, a local agent module, and a memory module, such as the apparatus 600 or the system architecture 100 described above. The method 700 comprises the following steps 710-730.

[0128] 710, the local agent module receives the first command and the operand in the RDMA message from the RDMA module through the bus, the first command being used to instruct the local agent module to perform a computing operation on the operand.

[0129] 720, the local agent module performs a computing operation on the operand and the local data according to the first command to obtain a computing result.

[0130] 730, the local agent module writes the computing result to the memory module through a non-bus interface.

[0131] In some optional embodiments, the method 700 can further include that the RDMA module receives an RDMA message and obtains the operand in the RDMA message.

[0132] The RDMA module sends the first command and the operand to the local agent module through the bus.

[0133] In some optional embodiments, the method 700 can further include that the local agent module reads the local data from the memory module through the non-bus interface.

[0134] In some optional embodiments, the method 700 further includes that the local agent module sends a response message corresponding to the first command to the RDMA module through the bus, the response message being used to indicate that the computing operation is completed.

[0135] In some optional embodiments, the method 700 further includes that the RDMA module reports an interrupt to the CPU after receiving the response message, the interrupt being used to indicate the completion of the computing operation.

[0136] In some optional embodiments, the method 700 further includes that the RDMA module receives a polling of the CPU to return the completion of the computing operation.

[0137] In some optional embodiments, the method 700 further includes that the RDMA module determines that a collective communication computing on data in a payload of the RDMA message is needed according to a first indication field in a message header of the RDMA message, and the RDMA module determines the data in the payload as the operand.

[0138] In some optional embodiments, the collective communication computing includes a collective communication protocol computing, or a collective communication protocol and broadcast computing.

[0139] In some alternative embodiments, the method 700 further includes: determining, by the RDMA module, the computing operation required to be performed on the operand according to a second indication field in a packet header of the RDMA packet; and generating, by the RDMA module, the first command according to the computing operation.

[0140] In some alternative embodiments, the computing operation includes at least one of an addition operation, a maximum operation, an AND operation, an OR operation, an XOR operation, and a minimum operation.

[0141] In some alternative embodiments, the RDMA module is an RDMA network interface controller.

[0142] The steps or processes included in the above method 700 are only exemplary, and the method 700 can refer to the descriptions of the modules or units in the above system 100, which will not be repeated here.

[0143] It should be understood that the sequence of the above processes is not intended to mean the execution order, and the execution order of the processes should be determined according to their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0144] It should also be understood that the first, second, and various numerical designations in the embodiments of the present application are only for the convenience of differentiation, and do not limit the scope of the embodiments of the present application.

[0145] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solutions. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0146] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, and the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0148] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0149] The functions, if realized in the form of software functional units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An apparatus for data processing, characterized by The device comprises a remote direct memory access (RDMA) module, a local agent module, a central processing unit (CPU) and a memory module, wherein the RDMA module and the local agent module communicate through a bus, the local agent module and the memory module communicate through a non-bus interface, the CPU is connected with the RDMA module, and the CPU and the memory module communicate through a cache module and a bus; The RDMA module is configured to: receive an RDMA packet and obtain an operand in the RDMA packet; generate a first command according to the RDMA packet, and send the first command and the operand to the local agent module through the bus, wherein the first command is used to instruct the local agent module to perform a calculation operation on the operand; The local agent module is configured to: perform a calculation on the operand and local data according to the first command to obtain a calculation result; and write the calculation result to the memory module through the non-bus interface.

2. The apparatus of claim 1, wherein, The local agent module is further configured to read the local data from the memory module through the non-bus interface.

3. The device of claim 1 or 2, wherein: The local agent module is further configured to send a response message corresponding to the first command to the RDMA module through the bus, wherein the response message is used to indicate that the calculation operation is completed.

4. The device of claim 3, wherein: The RDMA module is further configured to report an interrupt to the CPU after receiving the response message, wherein the interrupt is used to indicate that the calculation operation is completed.

5. The device of claim 3, wherein: The RDMA module is further configured to receive a poll of the CPU to return the completion of the calculation operation.

6. The apparatus of any of claims 1-2, 4-5, wherein, The RDMA module is specifically configured to: determine, according to a first indication field in a packet header of the RDMA packet, that a collective communication calculation needs to be performed on data in a payload of the RDMA packet; and determine the data in the payload as the operand.

7. The apparatus of claim 6, wherein, The collective communication calculation comprises a collective communication protocol calculation or a collective communication protocol and broadcast calculation.

8. The apparatus of any of claims 1-2, 4-5, 7, wherein, The RDMA module is further configured to: determine, according to a second indication field in the packet header of the RDMA packet, the calculation operation that needs to be performed on the operand; and generate the first command according to the calculation operation.

9. The apparatus of any of claims 1-2, 4-5, 7, wherein, The calculation operation comprises at least one of an addition operation, a maximum value taking operation, an and operation, an or operation, an exclusive or operation and a minimum value taking operation.

10. The apparatus of any of claims 1-2, 4-5, 7, wherein, The RDMA module is an RDMA network interface controller.

11. A method of data processing, characterized by, The device comprises: a local agent module that receives a first command and an operand in an RDMA packet sent by an RDMA module through a bus, wherein the first command is used to instruct the local agent module to perform a calculation operation on the operand, a central processing unit (CPU) that is connected with the RDMA module, the first command is generated by the RDMA module, and the CPU and a memory module communicate through a cache module and a bus; The local agent module performs calculation on the operand and local data according to the first command to obtain a calculation result; The local agent module writes the calculation result to a memory module through a non-bus interface.

12. The method of claim 11, wherein, Further comprising: The local agent module reads the local data from the memory module through the non-bus interface.

13. The method according to claim 11 or 12, characterized in that, Further comprising: The local agent module sends a response message corresponding to the first command to the RDMA module through the bus, and the response message is used to indicate completion of the calculation operation.

14. The method of claim 13, wherein, Further comprising: The RDMA module reports an interrupt to the CPU after receiving the response message, and the interrupt is used to indicate completion of the calculation operation.

15. The method of claim 13, wherein, Further comprising: The RDMA module receives a poll of the CPU to return completion of the calculation operation.

16. The method of any one of claims 11-12, 14-15, wherein, Further comprising: The RDMA module determines, according to a first indication field in a message header of the RDMA message, that collective communication calculation needs to be performed on data in a payload of the RDMA message; The RDMA module determines the data in the payload as the operand.

17. The method of claim 16, wherein, The collective communication calculation includes collective communication protocol calculation or collective communication protocol and broadcast calculation.

18. The method according to any of claims 11-12, 14-15, 17, characterized by, Further comprising: The RDMA module determines, according to a second indication field in a message header of the RDMA message, the calculation operation that needs to be performed on the operand; The RDMA module generates the first command according to the calculation operation.

19. The method according to any of claims 11-12, 14-15, 17, characterized by, The calculation operation includes at least one of addition operation, maximum value taking operation, AND operation, OR operation, exclusive OR operation and minimum value taking operation.

20. The method of any one of claims 11-12, 14-15, 17, wherein, The RDMA module is an RDMA network interface controller.

Citation Information

Patent Citations

  • Data storage devices and data calculation methods

    CN102279728A

  • System and method for high performance message passing

    US20050091334A1

  • Multicast apparatuses and methods for distributing data to multiple receivers in high-performance computing and cloud-based networks

    US20180067893A1