Ensemble communication method and device, storage medium and program product

By handling the collection communication operations at the switching node, the overhead of the sending node is reduced, the system's computational efficiency is improved, the efficiency problem caused by the sending end processing is solved, and various collection communication operations are accelerated.

CN119299373APending Publication Date: 2025-01-10CHINA MOBILE COMM LTD RES INST +1

Patent Information

Application Number
CN202411274472.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In set communication based on one-to-many operators, the overhead of copying, fragmenting, and reassembling data packets at the sending end is high, which affects the system's computational efficiency.

Method used

The processing of aggregated communication operations is moved from the sending node to the switching node. The switching node performs corresponding forwarding processing based on the aggregated communication operation type of the data packet and the information of the receiving node, including copying, fragmentation, and encapsulation.

Benefits of technology

It reduces the overhead of the sending node, improves the system's computational efficiency, and supports the acceleration requirements of various collection communication operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299373A_ABST
    Figure CN119299373A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly provides a set communication method and device, a storage medium and a program product. The method comprises the following steps: receiving a data message from a sending node; under the condition that the data message is determined to be used for realizing the set communication operation, determining a target port used for carrying out communication group flow forwarding on a receiving node carried by the data message from the ports of the switching node; and forwarding the message to the receiving node through the target port based on the set communication operation type carried by the data message and the data message. And the switching node forwards the data message used for realizing the aggregate communication operation based on the aggregate communication operation type carried by the data message. Compared with processing related to the aggregate communication operation on the data message at the sending node in the related technology, the scheme of the invention has the advantages that the process of processing related to the aggregate communication operation on the data message is transplanted to the switching node for implementation, the overhead of the sending node can be reduced, and the computing efficiency of the system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a collective communication method, device, storage medium, and program product. Background Art

[0002] Collective communication is a necessary communication mode in the process of distributed intelligent computing (model training or reasoning). Collective communication mainly describes the data transmission mode between computing processes. Collective communication operators that implement collective communication mainly include three categories: one-to-many operators (such as broadcast, scatter), many-to-one operators (reduce, gather), and many-to-many operators (alltoall, allreduce, allgather).

[0003] When collective communication is implemented based on a one-to-many operator, the sender completes the replication, fragmentation, reassembly, and encapsulation of the data message related to the collective communication operation, resulting in a relatively large overhead on the sender side, affecting the computing efficiency of the system. Summary of the invention

[0004] The present disclosure is proposed in view of the above problems. The present disclosure provides a collective communication method, device, storage medium and program product.

[0005] According to a first aspect of the present disclosure, a collective communication method is provided, which is applied to a switching node, and the method includes:

[0006] Receive data messages from the sending node;

[0007] In the case where it is determined that the data message is used to implement a collective communication operation, determining, from the ports of the switching node, a target port for forwarding collective group traffic to a receiving node carried by the data message;

[0008] Based on the collective communication operation type carried by the data message and the data message, the message is forwarded to the receiving node through the target port.

[0009] In addition, according to the collective communication method of the first aspect of the present disclosure, determining that the data message is used to implement the collective communication operation includes:

[0010] In the case where the data message carries the collective group forwarding table identifier, it is determined that the data message is a message for implementing the collective communication operation.

[0011] In addition, according to the collective communication method of the first aspect of the present disclosure, determining, from the ports of the switching node, a target port for performing collective group traffic forwarding on the receiving node carried by the data message, includes:

[0012] Obtaining a collection group forwarding table corresponding to the collection group forwarding table identifier carried by the data message;

[0013] Selecting an occupied port from the ports based on an occupation status parameter of the port obtained from the set group forwarding table, the occupation status parameter of the occupied port representing that the port is used to forward set group traffic;

[0014] Selecting a node forwarding port from the occupied ports based on the next hop node parameters of each of the occupied ports obtained from the set group forwarding table, wherein the next hop node parameters of the node forwarding port are used to characterize that the port is connected to a node for implementing a set communication operation;

[0015] The port connected to the receiving node among the node forwarding ports is used as the target port.

[0016] In addition, according to the collective communication method of the first aspect of the present disclosure, based on the collective communication operation type carried by the data message and the data message, forwarding the message to the receiving node through the target port includes:

[0017] In a case where the collective communication operation type is a broadcast operator, replicating the data message based on the number of the receiving nodes, and distributing the replicated data message to the receiving nodes through the target port;

[0018] In the case where the collective communication operation type is a scatter operator, the data message is fragmented based on the fragmentation parameters of the receiving node carried by the data message to obtain a fragmented message of the receiving node; and the fragmented message is sent to the receiving node through the target port.

[0019] According to a second aspect of the present disclosure, there is provided a collective communication system, comprising:

[0020] Switching nodes, sending nodes, and receiving nodes;

[0021] The switching node is used to execute the collective communication method described in the first aspect;

[0022] The sending node is used to generate the data message based on the collective communication operation message, and send the data message to the switching node.

[0023] In addition, the collective communication method according to the second aspect of the present disclosure further includes:

[0024] Management control nodes;

[0025] The management control node is used to receive registration information from the sending node and the receiving node, wherein the registration information includes a node identifier and a memory size;

[0026] Creating a global logical address space whose size is equal to the memory size;

[0027] Based on the node identifier, the global logical address space is sent to the previous hop node and the receiving node.

[0028] In addition, according to the collective communication method of the second aspect of the present disclosure, the sending node is also used for:

[0029] Based on the global logical address space, determining a write logical address of the receiving node;

[0030] The write logical address is added to the data message.

[0031] In addition, according to the collective communication method of the second aspect of the present disclosure, the receiving node is further used for:

[0032] Extracting the logical address from the message forwarded by the switching node;

[0033] Determine, based on a mapping relationship between the global logical address space and the memory space of the receiving node, an actual write address corresponding to the write logical address in the memory space;

[0034] The message forwarded by the switching node is written into the actual write address.

[0035] In addition, according to the collective communication method of the second aspect of the present disclosure, the sending node is used to:

[0036] In the case that the size of the collective communication operation message is larger than the upper limit of the data message size, the collective communication operation message is split according to the upper limit of the data message size to obtain a plurality of the data messages.

[0037] According to a third aspect of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0038] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0039] According to a fifth aspect of the present disclosure, there is provided a computer program product, comprising a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.

[0040] The data message of the sending node received by the switching node carries the collective communication operation type, so that when the switching node forwards the message to the receiving node, it can perform collective communication operation-related processing on the data message based on the collective communication operation type. Compared with the related art in which the sending node performs collective communication operation-related processing on the data message, the present application scheme transplants the process of performing collective communication operation-related processing on the data message to the switching node, which can reduce the overhead of the sending node and improve the computing efficiency of the system. The disclosed scheme has strong scalability and can meet the acceleration requirements of various collective communication operations. At the same time, it can be applied to various implementation methods such as internal interconnection of hosts and networking interconnection between hosts.

[0041] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0043] Figure 1 is a flowchart illustrating application of a collective communication method according to an embodiment of the present disclosure.

[0044] Figure 2 FIG. 4 is a schematic diagram illustrating a format of a broadcast data message according to an embodiment of the present disclosure.

[0045] Figure 3 It is a schematic diagram illustrating the format of a broadcast data message according to an embodiment of the present disclosure.

[0046] Figure 4 is a schematic diagram illustrating the application of a set group forwarding table according to an embodiment of the present disclosure.

[0047] Figure 5 2 is a schematic diagram illustrating an application of a collective communication system according to an embodiment of the present disclosure.

[0048] Figure 6 It is a schematic diagram illustrating an address space mapping relationship of an application according to an embodiment of the present disclosure.

[0049] Figure 7 It is a schematic diagram illustrating an address space mapping relationship of an application according to an embodiment of the present disclosure.

[0050] Figure 8It is a schematic diagram illustrating an address space mapping relationship of an application according to an embodiment of the present disclosure.

[0051] Fig. 9 2 is a schematic diagram illustrating an application of a collective communication system according to an embodiment of the present disclosure.

[0052] Fig.10 2 is a schematic diagram illustrating an application of a collective communication device according to an embodiment of the present disclosure.

[0053] Fig.11 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure.

[0054] Fig.12 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0057] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0058] Collective communication is a necessary communication mode in the process of distributed intelligent computing (model training or reasoning). Collective communication mainly describes the data transmission mode between computing processes. Collective communication operators that implement collective communication mainly include three categories: one-to-many operators (such as broadcast and scatter), many-to-one operators (such as reduce and gather), and many-to-many operators (such as Alltoall, allreduce, and allgather). Different collective communication operators have different functions.

[0059] For example, in one-to-many communication, the broadcast operator sends the same data slice to different receivers, while the scatter operator sends different data slices to different receivers. In many-to-one communication, the gather operator sends different data slices to the same receiver for data assembly and splicing, while the reduce operator sends different data slices to the same receiver for aggregate calculation. allgather and allreduce are combined operators. allgather allows all points to receive the full amount of data and assemble and splice, while allreduce first performs the reduce operation and then sends the aggregated calculation results to all receivers, which is equivalent to the combination of reduce + broadcast operations.

[0060] For the collective communication operator that implements one-to-many communication, the sender copies, fragments, reassembles, and encapsulates the data message, resulting in a relatively large overhead on the sender side, affecting the computing efficiency of the system. The following is an introduction to the broadcast operator and the scatter operator. When one-to-many communication is based on the broadcast operator, the sender copies the data message, encapsulates it one by one, and then sends the data message to each receiving end. The large number of end-side data copy operations and encapsulation operations on the sender will result in a relatively large overhead on the sender. When one-to-many communication is based on the scatter operator, the sender splits and encapsulates the scatter message, which also results in a relatively large overhead on the sender.

[0061] In order to alleviate the technical problems existing in the related art, the embodiments of the present disclosure provide a collective communication method, apparatus, device, storage medium and computer program product. The data message of the sending node received by the switching node carries the collective communication operation type, so that when the switching node forwards the message to the receiving node, it can perform collective communication operation-related processing on the data message based on the collective communication operation type. Compared with the related art in which the sending node performs collective communication operation-related processing on the data message, the present application scheme transplants the process of performing collective communication operation-related processing on the data message to the switching node, which can reduce the overhead of the sending node and improve the computing efficiency of the system.

[0062] To facilitate understanding of this embodiment, a collective communication method disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the collective communication method provided in the embodiment of the present disclosure is generally an electronic device with certain computing capabilities, and the electronic device includes, for example, a terminal device or a server or other processing device. In some possible implementations, the collective communication method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0063] See also Figure 1 FIG. 1 is a flowchart of a collective communication method provided by an embodiment of the present disclosure, wherein the method comprises the following steps:

[0064] Step 101: Receive a data message from a sending node.

[0065] In this embodiment, the sending node includes but is not limited to a computing node or a forwarding node, etc. The computing node is a node participating in distributed computing in the communication mode of collective communication, and the forwarding node is a node forwarding data to the node participating in distributed computing in the communication mode of collective communication.

[0066] In this embodiment, the data message of the sending node is used to implement the collective communication operation. In the application, the data message is a message expressing a scatter message or a broadcast message. When the size of the scatter message or the broadcast message does not reach the upper limit of the data message size of the data message, the scatter message or the broadcast message is the data message of step 101. When the size of the scatter message or the broadcast message reaches the upper limit of the data message size of the data message, the scatter message or the broadcast message can be split to obtain the data message in step 101.

[0067] Taking the spread message as an example, if the upper limit of the data message size of the data message is 100 and the size of the spread message is 250, then the spread message can be split into three data messages, the size of the first data message is 100, the size of the second data message is 100, and the size of the third data message is 50.

[0068] Step 102: When it is determined that the data message is used to implement a collective communication operation, a target port for forwarding the collective group traffic to the receiving node carried by the data message is determined from the ports of the switching node.

[0069] In this embodiment, the data message used to implement the collective communication operation carries a specific identifier, so by judging whether the data message carries the specific identifier, it can be determined whether the data message is used to implement the collective communication operation. In one or more embodiments, the specific identifier can be represented by a collective group forwarding identifier, so when it is determined that the data message carries the collective group forwarding identifier, it can be determined that the data message is a message for implementing the collective communication operation.

[0070] In this embodiment, the receiving node includes but is not limited to a computing node or a forwarding node. The data message has a field for representing the identification of the receiving node, so the receiving node to which the data message needs to be forwarded can be obtained from this field. As an example, the following are respectively given: Figure 2 The schematic diagram of the spread data message format shown in FIG. Figure 3 The schematic diagram of the broadcast data message format is shown in FIG.

[0071] Figure 2 The spread data packets in the datagram include three data packets, namely the first packet, the middle packet and the last packet. These three data packets belong to the same spread message. Since the size of the spread message exceeds the upper limit of the data packet size of the data packet, the spread message is split into three data packets, namely the first packet, the middle packet and the last packet. It should be understood that the number of receiving node identifiers (Endpoint IDs) carried in the three data packets is the same as the number of message fragments carried by the data packets, and each Endpoint ID corresponds to a unique message fragment. Since the receiving nodes receiving each message fragment are different in the collective communication operation based on the spread operator, the receiving nodes carried in the first packet, the middle packet and the last packet are completely different, and the receiving nodes in the same data packet are also completely different.

[0072] like Figure 2 As shown, the three data messages also contain three fields: the collective group forwarding identifier (CGT ID) field, the collective communication operation type (collective type) field, and the write address (write address) field. Among them, when the collective group forwarding identifier is carried in the CGTID, the data message is considered to be a message for implementing a collective communication operation. The collective communication operation types that can be set in collectivetype include a spread operator or a broadcast operation. The write address is used to represent the address to which the data message needs to be written at the receiving node.

[0073] In the application, when switching a broadcast message to multiple datagrams, if the broadcast message stipulates P recipients, a single datagram carries data fragments of a maximum of k recipients (k <= P), where the first packet and the middle packet carry data fragments of k recipients in turn. The tail packet carries P%k data fragments, and a completion field is added at the end of the datagram to mark the message as the last one.

[0074] The format of broadcast data messages is relatively simple, because the data content sent to all receiving nodes is the same. Figure 3 As shown, the broadcast data message format only includes CGT ID, collective type, write address, Endpoint ID (receiving node identifier) ​​and payload information.

[0075] In this embodiment, a set group forwarding table is pre-configured in the switching node, and each set group forwarding table corresponds to a unique set group forwarding identifier. The set group forwarding table stores the computing node or switching node to which each port in the switching node is connected, so by querying the set group forwarding table, the target port in the switching node for forwarding the set group traffic to the receiving node can be determined.

[0076] In a specific implementation, in an optional embodiment, step 102 may include the following steps:

[0077] Obtaining the aggregate group forwarding table corresponding to the aggregate group forwarding table identifier carried by the data message;

[0078] Selecting an occupied port from the ports based on an occupation state parameter of the port obtained from the aggregate group forwarding table, the occupation state parameter of the occupied port representing that the port is used to forward aggregate group traffic;

[0079] Selecting a node forwarding port from the occupied port based on the next hop node parameter of the occupied port obtained from the collective group forwarding table, the next hop node parameter of the node forwarding port being used to characterize that the port connection is useful for implementing a collective communication operation;

[0080] The port in the node forwarding port that is connected to the receiving node is used as the destination port.

[0081] As an example, whether a port is a port for forwarding aggregate group traffic can be determined based on whether the occupied state parameter (port_act) of the port in the aggregate group forwarding table is 1. Specifically, when the occupied state parameter of the port is 1, the port is determined to be a port for forwarding aggregate group traffic, and when the occupied state parameter of the port is 0, the port is determined not to be a port for forwarding aggregate group traffic.

[0082] In actual applications, as needed, the port of the switching node can be connected to a switching node or computing node for realizing collective communication, or it can be connected to a device that is not used to realize collective communication. In the collective group forwarding table, each port of the switching node corresponds to a next-hop node parameter (IsNextEndpoint field), and the next-hop node parameter can be used to determine whether the port of the switching node is connected to a node. For example, when the value of the IsNextEndpoint field corresponding to the port is 1, it is confirmed that the port is connected to a node for realizing collective communication. When the value of the IsNextEndpoint field corresponding to the port is 0, it is confirmed that the node connected to the port is not used to realize collective communication.

[0083] As an example, given Figure 4 The schematic diagram of the set group forwarding table is shown in FIG. Figure 4 As shown, the collective group forwarding table includes a port number field (port ID) field, an occupied state parameter (port_act) field, a next hop node parameter (IsNextEndpoint) field, a collective communication operation type (collective type) field, a receiving node identifier (Endpoint ID) and a reservation (Reserved) field. Port ID is a serial number assigned to all ports of the switching node in sequence. If port_act is 1, it indicates that the port is a port for forwarding collective group traffic. If port_act is 0, it indicates that the port is not a port for forwarding collective group traffic. IsNextEndpoint is used to determine whether the node connected to the port is used to implement collective communication. If the IsNextEndpoint field is 0, it means that the connected node is not used to implement collective communication. If it is 1, it means that the connected node is used to implement collective communication.

[0084] The collective type field is the collective communication operation type, such as a broadcast operation or a scatter operator. If it is a broadcast operation, the data packet is directly forwarded to the connected end-side computing node through the port. If it is a scatter operator, the subsequent fields of the data packet collective type are copied to the switch node cache.

[0085] Step 103: forward the message to the receiving node through the target port based on the collective communication operation type and the data message carried by the data message.

[0086] The disclosed solution has strong scalability and can meet the acceleration requirements of various collective communication operations. It can also be applied to various implementation methods such as internal interconnection of hosts and network interconnection between hosts. In one or more embodiments, step 103 may include the following steps:

[0087] When the collective communication operation type is a broadcast operator, the data message is replicated based on the number of receiving nodes, and the replicated data message is distributed to the receiving nodes through the target port;

[0088] When the collective communication operation type is a scatter operator, the data message is fragmented based on the fragmentation parameter of the receiving node carried by the data message to obtain the fragmented message of the receiving node; and the fragmented message is sent to the receiving node through the target port.

[0089] When the collective communication operation type is the spreading operator, the switching node can copy the data message to the memory of the switching node, extract the Endpoint ID and fragmentation parameters such as payload_length and payload fields in the data message, where the payload_length field indicates the corresponding payload message length, and payload is the data fragmentation content sent to the computing node of the corresponding Endpoint ID, and the data message is fragmented based on the fragmentation parameters.

[0090] In the solution provided by this embodiment, the switching node is connected to the receiving node, and the switching node forwards the data message used to implement the collective communication operation based on the collective communication operation type carried by the data message. Compared with the related art in which the sending end forwards the message based on the collective communication operation, the terminal side overhead can be reduced and the computing efficiency of the system can be improved.

[0091] The present disclosure also provides a collective communication system, such as Figure 5 As shown, the system includes:

[0092] Switching node 51, sending node 52 and receiving node 53;

[0093] The switching node 51 is used to execute the collective communication method in the aforementioned embodiment;

[0094] The sending node 52 is used to generate a data message based on the collective communication operation message, and send the data message to the switching node 51 .

[0095] If the size of the collective communication operation message is less than or equal to the upper limit of the data message size, the collective communication operation message is directly used as the data message. If the size of the collective communication operation message is greater than the upper limit of the data message size, the collective communication operation message is split according to the upper limit of the data message size to obtain multiple data messages.

[0096] In one or more embodiments, the collective communication system may further include:

[0097] Management control nodes;

[0098] The management control node is used to receive registration information from the sending node and the receiving node, and the registration information includes the node identification and memory size;

[0099] Create a global logical address space with a space size equal to the memory size;

[0100] Based on the node identifier, the global logical address space is sent to the previous hop node and the receiving node.

[0101] In one or more embodiments, the sending node is further configured to:

[0102] Determine a write logical address of a receiving node based on a global logical address space;

[0103] Add the write logic address in the data message.

[0104] In one or more embodiments, the receiving node is further configured to:

[0105] Extracting logical addresses from messages forwarded by the switching node;

[0106] Based on the mapping relationship between the global logical address space and the memory space of the receiving node, determine the actual write address corresponding to the write logical address in the memory space;

[0107] The message forwarded by the switching node is written to the actual write address.

[0108] In this embodiment, before sending or receiving data messages, the previous hop node computing node and the next hop node will send registration information to the management control node, so that the management control node creates a global logical address space.

[0109] In the application, when the sending node and the receiving node are used for intelligent computing training, the sending node and the receiving node are usually isomorphic nodes, and the memory size of the sending node is the same as the memory size of the receiving node. In this case, the space size of the global logical address space is the same as the memory size in the registration information. In this way, after sending the global logical address space to the sending node or the receiving node, the sending node and the receiving node can establish an address mapping relationship between the global logical address space and the memory space. At the same time, the sending node can determine the write logical address of the receiving node based on the logical address space, and the receiving node can determine the actual write address corresponding to the write logical address in the memory space based on the mapping relationship between the global logical address space and the memory space of the receiving node, and write the message forwarded by the switching node to the actual write address.

[0110] It should be understood that the global logical address space is not a real storage space, but a virtualized address space. The global logical address space can be used to associate the memory space of the sending node and the receiving node. In this way, the switching node does not need to perform address resolution based on the IP addressing method, thereby introducing unnecessary pipeline processing delays. Especially for vertically expanded interconnection scenarios, the extremely low latency requirements between computing nodes cannot be guaranteed.

[0111] As an example, given Figure 6 The address space mapping relationship is shown in Figure 1. Figure 6 In the figure, the address space on the left is the global logical address space established by the management and control node, and the address space on the right is the local memory space of the computing node (sending node or receiving node). The logical start address in the global logical address space corresponds to the memory start address in the local memory space of the computing node, and the logical end address in the global logical address space corresponds to the memory end address in the local memory space of the computing node.

[0112] For ease of understanding, the following specific example is given. The memory size of the receiving node and the sending node is 4, the memory space address of the sending node is 0 to 3, the memory space address of the receiving node is A to D, the size of the global logical address space created by the management control node is also 4, and the address of the global logical address space is 10 to 13. Then, after establishing the mapping relationship between the global logical address space and the memory space of the sending node and the memory space of the receiving node, the mapping relationship between the global logical address space and the memory space of the sending node can be seen in Figure 7 The mapping relationship between the global logical address space and the memory space of the receiving node can be found in Figure 8 .

[0113] The present disclosure also provides a collective communication system, such as Fig. 9 As shown, the system includes:

[0114] Computing node 0, computing node 1, computing node 2, computing node 3, switching node 0 and management control node 0;

[0115] Computing nodes 0-3 are mainly responsible for single-round calculation of model parameters, such as calculating gradient vectors. Computing nodes are usually GPUs or CPUs. Switching node 0 is mainly responsible for forwarding and routing data packets. Switching nodes can be switches, switching chips, etc. Management control node 0 mainly provides out-of-band control of nodes.

[0116] In this embodiment, all computing nodes participating in collective communication operations complete registration with management control node 0, which identifies the computing nodes and creates a collective group address mapping relationship for the collective communication group, and also establishes a collective group table (CGT) in the switching node. The computing node identifier is Endpoint ID.

[0117] The global logical address space and the local address space of the computing node are of the same size and are both continuous address spaces. In this way, the logical write address carried by the data message sent by the computing node as the sender will be converted to the local write address of the computing node after it reaches the computing node as the receiver. The content carried by the data message can be directly written into the local memory address space. The protocol parsing overhead based on IP data messages on the end side is eliminated.

[0118] The management control node 0 then configures the collective communication group address mapping relationship to all computing nodes, and sends the collective group forwarding table to the switching node.

[0119] The above process is the preparatory work for the control panel. Next, a one-to-many collective communication operation is officially executed. Computing node 0 sends the data message to switching node 0. The specific message processing process will be carried out inside switching node 0. Specifically, there can be the following process:

[0120] After the data message enters from the port connected to the computing node 0, it is first determined whether the data message contains the CGT ID field. If not, it is determined that the data packet does not perform a collection operation, that is, it is forwarded normally. If it contains the CGT ID, the corresponding CGT table is searched according to the CGT ID (different CGT tables can be stored in the same switching node to serve different collection operations). After entering the CGT table, the port status is searched in sequence according to the port number port ID, that is, it is determined whether the port_act field is 1. Here, the port ID is the serial number assigned to all the ports of the switching node in sequence. If port_act is 1, it indicates that the port belongs to the collection group traffic forwarding path. If port_act is 0, it indicates that the port does not belong to the exit of the collection group traffic forwarding. Therefore, it is only necessary to find the port whose port_act is 1. Which ports of the specific switching node belong to the collection group traffic forwarding path is determined by the management control node, such as establishing a tree-shaped traffic transmission structure, but it is not within the scope of the present technical solution.

[0121] For ports with port_act being 1, it is necessary to further determine whether the next hop is directly connected to the end-side computing node. That is, determine whether the IsNextEndpoint field is 1. If it is 0, it means that the next hop is still a switching node, and the data message is directly forwarded from the port to the receiving node.

[0122] If it is 1, the collective type field needs to be further identified, that is, the collective communication operation type, such as broadcast operation or spread operator. If it is a broadcast operation, the data message is directly forwarded to the connected end-side computing node through this port. If it is a spread operator, the subsequent fields of the data message collective type are copied to the switch node cache.

[0123] At this time, the corresponding Endpoint field in the data message is searched according to the receiving node Endpoint ID, and the data packet Endpoint ID and the subsequent payload_length and payload fields are extracted. The payload_length field indicates the corresponding payload message length, and the payload is the data fragment content sent to the computing node of the corresponding Endpoint ID.

[0124] Next, in the CGT table, the corresponding output port is entered according to the port number port ID corresponding to the Endpoint ID, and the extracted Endpoint ID, payload_length, payload field and CGT ID, write address field are reassembled into a message, forwarded from the port to the computing node and the data is written to the memory address.

[0125] The present disclosure also provides a collective communication device, which is applied to a switching node, such as Fig.10 As shown, the device comprises:

[0126] The receiving module 11 is used to receive the data message from the sending node;

[0127] A determination module 12, configured to determine, from the ports of the switching node, a target port for performing collective group traffic forwarding on a receiving node obtained based on the data message, when it is determined that the data message is used to implement a collective communication operation;

[0128] The forwarding module 13 is used to forward the message to the receiving node through the target port based on the collective communication operation type carried by the data message and the data message.

[0129] In one or more embodiments, the determination module 12 is configured to:

[0130] In the case where the data message carries the collective group forwarding table identifier, it is determined that the data message is a message for implementing the collective communication operation.

[0131] In one or more embodiments, the determination module 12 is configured to:

[0132] Obtaining a collection group forwarding table corresponding to the collection group forwarding table identifier carried by the data message;

[0133] Selecting an occupied port from the ports based on an occupation status parameter of the port obtained from the set group forwarding table, the occupation status parameter of the occupied port representing that the port is used to forward set group traffic;

[0134] Selecting a node forwarding port from the occupied port based on the next hop node parameter of the occupied port obtained from the set group forwarding table, wherein the next hop node parameter of the node forwarding port is used to characterize that the port is connected to a node for implementing a set communication operation;

[0135] The port connected to the receiving node among the node forwarding ports is used as the target port.

[0136] In one or more embodiments, the forwarding module 13 is used to:

[0137] In a case where the collective communication operation type is a broadcast operator, replicating the data message based on the number of the receiving nodes, and distributing the replicated data message to the receiving nodes through the target port;

[0138] In the case where the collective communication operation type is a scatter operator, the data message is fragmented based on the fragmentation parameters of the receiving node carried by the data message to obtain a fragmented message of the receiving node; and the fragmented message is sent to the receiving node through the target port.

[0139] The collective communication device provided in the embodiment of the present disclosure and the collective communication method provided in the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented therein.

[0140] The present disclosure also provides an electronic device to perform the above collective communication method. Fig.11 It shows a schematic diagram of an electronic device provided by some embodiments of the present disclosure. Fig.11As shown, the electronic device 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, wherein the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; the memory 801 stores a computer program that can be run on the processor 800, and when the processor 800 runs the computer program, it executes the collective communication method provided by any of the aforementioned embodiments of the present disclosure.

[0141] The memory 801 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0142] The bus 802 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs, and the processor 800 executes the programs after receiving execution instructions. The collective communication method disclosed in any implementation of the aforementioned embodiment of the present disclosure may be applied to the processor 800, or implemented by the processor 800.

[0143] The processor 800 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 800 or the instruction in the form of software. The above processor 800 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the above method in combination with its hardware.

[0144] The electronic device provided by the embodiment of the present disclosure and the collective communication method provided by the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by them.

[0145] The present disclosure also provides a computer-readable storage medium corresponding to the collective communication method provided in the above embodiment. Fig.12 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the collective communication method provided by any of the aforementioned embodiments will be executed.

[0146] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0147] The computer-readable storage medium provided by the above-mentioned embodiments of the present disclosure and the collective communication method provided by the embodiments of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0148] It should be noted that:

[0149] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.

[0150] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present disclosure, the various features of the present disclosure are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed disclosure requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present disclosure.

[0151] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of this disclosure and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0152] The above is only a preferred specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A collective communication method, characterized in that: Applied to a switching node, the method comprises: Receive data messages from the sending node; In the case where it is determined that the data message is used to implement a collective communication operation, determining, from the ports of the switching node, a target port for forwarding collective group traffic to a receiving node carried by the data message; Based on the collective communication operation type carried by the data message and the data message, the message is forwarded to the receiving node through the target port.

2. The method according to claim 1, characterized in that Determining that the data message is used to implement a collective communication operation includes: In the case where the data message carries the collective group forwarding table identifier, it is determined that the data message is a message for implementing the collective communication operation.

3. The method according to claim 1, characterized in that Determining, from the ports of the switching node, a target port for performing group traffic forwarding on a receiving node carried by the data message, comprises: Obtaining a collection group forwarding table corresponding to the collection group forwarding table identifier carried by the data message; Selecting an occupied port from the ports based on an occupation status parameter of the port obtained from the set group forwarding table, the occupation status parameter of the occupied port representing that the port is used to forward set group traffic; Selecting a node forwarding port from the occupied port based on the next hop node parameter of the occupied port obtained from the set group forwarding table, wherein the next hop node parameter of the node forwarding port is used to characterize that the port is connected to a node for implementing a set communication operation; The port connected to the receiving node among the node forwarding ports is used as the target port.

4. The method according to claim 1, characterized in that: Based on the collective communication operation type carried by the data message and the data message, forwarding the message to the receiving node through the target port includes: In a case where the collective communication operation type is a broadcast operator, replicating the data message based on the number of the receiving nodes, and distributing the replicated data message to the receiving nodes through the target port; In the case where the collective communication operation type is a scatter operator, the data message is fragmented based on the fragmentation parameters of the receiving node carried by the data message to obtain a fragmented message of the receiving node; and the fragmented message is sent to the receiving node through the target port.

5. A collective communication system, characterized in that: include: Switching nodes, sending nodes, and receiving nodes; The switching node is used to execute the collective communication method according to any one of claims 1 to 4; The sending node is used to generate the data message based on the collective communication operation message, and send the data message to the switching node.

6. The collective communication system according to claim 5, characterized in that: Also includes: Management control nodes; The management control node is used to receive registration information from the sending node and the receiving node, wherein the registration information includes a node identifier and a memory size; Creating a global logical address space whose size is equal to the memory size; Based on the node identifier, the global logical address space is sent to the previous hop node and the receiving node.

7. The collective communication system according to claim 6, characterized in that: The sending node is also used for: Based on the global logical address space, determining a write logical address of the receiving node; The write logical address is added to the data message.

8. The collective communication system according to claim 7, characterized in that: The receiving node is further configured to: Extracting the write logical address from the message forwarded by the switching node; Determine, based on a mapping relationship between the global logical address space and the memory space of the receiving node, an actual write address corresponding to the write logical address in the memory space; The message forwarded by the switching node is written into the actual write address.

9. The collective communication system according to claim 5, characterized in that: The sending node is used for: In the case that the size of the collective communication operation message is larger than the upper limit of the data message size, the collective communication operation message is split according to the upper limit of the data message size to obtain a plurality of the data messages.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.

11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Service node capability processing method and device, service classifier and service controller

    CN105323234A

  • Artificial intelligence chip and operation method thereof

    CN113297111A

  • Control message processing method, device, equipment and system in integrated communication system

    CN113835873A

  • Data transmission method, computing device and computing system

    CN116170435A

  • Transmission link detection method and device, equipment and storage medium

    CN116708246A

Cited By

  • Data processing method and device applied to heterogeneous cluster

    CN120086039A

  • A data processing method and apparatus applied to a heterogeneous cluster

    CN120086039B