Communication method and related device

By calculating the phase deflection value of the target communication plane in the Mesh-class network and recalculating the communication object, the problem of deterioration of symmetrical set communication performance is solved, and a more balanced traffic distribution and higher bandwidth utilization is achieved.

WO2025025610A1PCT designated stage expired Publication Date: 2025-02-06HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/081302
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-31
Filing Date
2024-03-13
Publication Date
2025-02-06

AI Technical Summary

Technical Problem

In the Mesh-class networking scenario, the performance of symmetrical collective communication is severely degraded, resulting in increased communication time consumption, low bandwidth utilization, and prone to link congestion.

Method used

By calculating the phase deflection value of the target communication plane and recalculating the communication object of the network card based on this value, the traffic of different communication planes can produce phase differences, thereby equalizing the overall network traffic and reducing the bandwidth load of a single link.

Benefits of technology

It reduces the probability of link congestion between nodes, improves communication performance, reduces communication delay, and improves the bandwidth utilization of the entire network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081302_06022025_PF_FP_ABST
    Figure CN2024081302_06022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a communication method and a related device, applied to the field of communications. The method comprises: acquiring a first serial number of a first network card in a server and a second serial number of the first network card in a communication plane; calculating a phase deflection value of the communication plane on the basis of the first serial number; calculating a first communication partner serial number on the basis of the second serial number, the first communication partner serial number being the serial number of a communication object of the first network card in the Kth algorithm step in the communication plane, and the first communication partner serial number corresponding to a second network card; combining the first communication partner serial number and the phase deflection value to obtain a second communication partner serial number, the second communication partner serial number being the serial number of a third network card in the communication plane; and switching the communication object of the first network card in the Kth algorithm step from the second network card to the third network card. In the present application, by adding the process of creating phase deflection-based communication traffic, phase differences are generated between nodes of different communication planes, thereby balancing the whole network traffic, and improving communication performance.
Need to check novelty before this filing date? Find Prior Art

Description

A communication method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on July 31, 2023, with application number CN202310957997.9 and invention name “A communication method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a communication method and related equipment. Background Art

[0003] In AI scenarios, computing volume is increasing, and the demand for computing cluster networking is also increasing. The current mainstream computing networking model in the market is the fat-tree topology. However, when fat-tree is applied to ultra-large-scale networking solutions, the number of fat-tree layers increases, which means that a large number of switches for core layer communication are required, resulting in excessively high networking costs. In ultra-large-scale networking scenarios, mesh networking offers far superior scalability and networking costs than fat-tree, making it an effective alternative.

[0004] Mesh networking is a type of networking with a mesh-like topology, including full mesh and dragonfly networking. In practical applications, it has been found that when multiple network cards communicate in parallel, symmetric collective communication in mesh networking exhibits longer communication times than in fat-tree topologies. For example, in a Dragonfly network with 8 servers and 64 network cards (8 per server), actual tests compared it to a fat-tree topology of the same scale. It was found that the communication time of the All-Reduce operator in symmetric collective communication increased by more than 50%, and the communication time of the All-to-all operator increased by more than 100%.

[0005] It can be seen from this that the performance degradation of symmetric collective communications in Mesh networking scenarios is quite serious, and improvements and innovative solutions are urgently needed.

[0006] Summary of the Invention

[0007] The present application provides a communication method and related equipment, which can reduce the probability of link congestion between nodes and improve communication performance.

[0008] The first aspect of the present application provides a communication method that can be applied to communication equipment. The method includes: obtaining a first serial number, the first serial number is the serial number of the first network card in the target server, the target server includes N network cards, each of the N network cards corresponds to a communication plane, wherein the first network card corresponds to the target communication plane, the target communication plane includes M network cards, the M network cards belong to different servers, the serial numbers of the M network cards in their respective servers are the same as the first serial number, and the M network cards communicate through a target communication algorithm, and the target communication algorithm includes multiple algorithm steps; obtaining a second serial number, the second serial number is the serial number of the first network card in the target communication plane; based on the first The phase deflection value of the target communication plane is calculated based on the serial number, the number of network cards included in the target server, and the number of network cards included in the target communication plane; the first communication partner serial number is calculated based on the second serial number, the first communication partner serial number is the serial number of the communication object of the first network card in the K-th algorithm step in the target communication plane, and the first communication partner serial number corresponds to the second network card; the first communication partner serial number and the phase deflection value are combined to obtain the second communication partner serial number, the second communication partner serial number is the serial number of the third network card in the target communication plane; the communication object of the first network card in the K-th algorithm step is replaced by the third network card from the second network card.

[0009] The N network cards of the target server correspond to a communication plane respectively. Therefore, the number of network cards included in the target server is the number of communication planes. Multiple communication planes can communicate in parallel.

[0010] The first network card corresponds to the target communication plane. The sequence number of each network card in the target communication plane is the same as the first sequence number on each server. The first sequence number is the sequence number of the target communication plane. Network cards in the same communication plane can communicate with each other. There are multiple target communication algorithms used for communication, and different communication algorithms include different numbers of algorithm steps.

[0011] In the first aspect of the present application, the phase deflection value of the communication plane is first calculated based on the number of network cards in the communication plane, the total number of communication planes and the serial number of the communication plane, and then the communication object of the network card is recalculated based on the phase deflection value of the communication plane, so that the traffic of different communication planes between two nodes produces a phase difference, thereby balancing the traffic of the entire network, reducing the bandwidth load of a single link, improving the bandwidth utilization of the entire network, reducing the probability of congestion, and improving communication performance.

[0012] In a possible implementation manner of the first aspect, the target communication algorithm is a Having-Doubling algorithm, and the plurality of algorithm steps is log2M algorithm steps.

[0013] In this possible implementation, the target communication algorithm is limited to the Having-Doubling algorithm, which improves the practicability of the solution.

[0014] In a possible implementation of the first aspect, before the step of obtaining the first sequence number, the method further includes: performing collective communication on the N network cards using a Reduce-Scatter operator. After the step of replacing the communication partner of the first network card in the Kth algorithm step with the third network card from the second network card, the method further includes: performing collective communication on the N network cards using an All-Gather operator.

[0015] When the target communication algorithm is the Having-Doubling algorithm, before inter-node communication, the Reduce-Scatter operator must be used to aggregate communication among the network cards in the target server. At the end of the communication process, the All-Gather operator must be used to aggregate communication among the network cards in the target server.

[0016] In a possible implementation of the first aspect, the above-mentioned step: calculating the first communication partner serial number based on the second serial number includes: calculating based on the following formula: first communication partner serial number = second serial number ^(1<<((K+first serial number)%log2M)), where ^ represents a bitwise exclusive OR operation, << represents a left shift operation, and % represents a remainder operation.

[0017] When the target communication algorithm is the Having-Doubling algorithm, the total number of algorithm steps is log2M, where M is the number of network adapters (NICs) in the target communication plane. The first communication partner's sequence number is then calculated based on the first NIC's first sequence number on the target server, its second sequence number within the target communication plane, the number of algorithm steps (K), and the total number of algorithm steps.

[0018] In this possible implementation, the method for calculating the first communication partner sequence number is limited, thereby improving the practicability of the solution.

[0019] In a possible implementation manner of the first aspect, the target communication algorithm is a Pairwise algorithm, and the multiple algorithm steps are M-1 algorithm steps.

[0020] In this possible implementation, the target communication algorithm is limited to the Pairwise algorithm, which expands the application scenarios of the solution and improves the practicability of the solution.

[0021] In a possible implementation of the first aspect, before the step of obtaining the first sequence number, the method further includes: performing collective communication on the N network cards using an All-to-all operator.

[0022] When the target communication algorithm is the Pairwise algorithm, before inter-node communication, you need to use the All-to-all operator to perform collective communication on the network cards in the target server.

[0023] In a possible implementation of the first aspect, the first communication partner serial number includes a third communication partner serial number and a fourth communication partner serial number, and the above step: calculating the first communication partner serial number based on the second serial number includes: calculating the third communication partner serial number and the fourth communication partner serial number based on the second serial number; the third communication partner serial number and the fourth communication partner serial number are calculated based on the following formula: third communication partner serial number = (second serial number + MK) % M, fourth communication partner serial number = (second serial number + K) % M, where % represents remainder.

[0024] When the target communication algorithm is the Pairwise algorithm, the total number of algorithm steps is M-1. In the Pairwise algorithm, the first NIC has two communication partners in each algorithm step and therefore has two communication partner numbers: the third and fourth. The third and fourth communication partner numbers are then calculated based on the first NIC's second sequence number in the target communication plane, the number of NICs in the target communication plane, and the number of algorithm steps, K.

[0025] In this possible implementation, the method for calculating the first communication partner sequence number is limited, thereby improving the practicability of the solution.

[0026] The second aspect of the present application provides a communication device, including an acquisition unit, a calculation unit, a combination unit, and a replacement unit. The acquisition unit is used to acquire a first serial number, the first serial number being the serial number of the first network card in the target server, the target server including N network cards, each of the N network cards corresponding to a communication plane, wherein the first network card corresponds to the target communication plane, the target communication plane including M network cards, the M network cards belonging to different servers, the serial numbers of the M network cards in their respective servers being the same as the first serial number, the M network cards communicating with each other through a target communication algorithm, the target communication algorithm including a plurality of algorithm steps; the acquisition unit is also used to acquire a second serial number, the second serial number being the serial number of the first network card in the target communication plane; the calculation unit is used to calculate the serial number based on the first serial number, The phase deflection value of the target communication plane is calculated based on the number of network cards included in the target server and the number of network cards included in the target communication plane; the calculation unit is further used to calculate the first communication partner sequence number based on the second sequence number, the first communication partner sequence number is the sequence number of the communication object of the first network card in the Kth algorithm step in the target communication plane, and the first communication partner sequence number corresponds to the second network card; the combination unit is used to combine the first communication partner sequence number and the phase deflection value to obtain the second communication partner sequence number, and the second communication partner sequence number is the sequence number of the third network card in the target communication plane; the replacement unit is used to replace the communication object of the first network card in the Kth algorithm step from the second network card to the third network card.

[0027] In a possible implementation manner of the second aspect, the target communication algorithm is a Having-Doubling algorithm, and the plurality of algorithm steps is log2M algorithm steps.

[0028] In a possible implementation of the second aspect, the communication device further includes a communication unit configured to perform collective communication on the N network cards using a Reduce-Scatter operator; the communication unit is further configured to perform collective communication on the N network cards using an All-Gather operator.

[0029] In a possible implementation of the second aspect, the calculation unit is specifically used to calculate the first communication partner serial number based on the following formula: first communication partner serial number = second serial number ^(1<<((K+first serial number)%log2M)), where ^ represents a bitwise exclusive OR operation, << represents a left shift operation, and % represents a remainder operation.

[0030] In a possible implementation manner of the second aspect, the target communication algorithm is a Pairwise algorithm, and the multiple algorithm steps are M-1 algorithm steps.

[0031] In a possible implementation manner of the second aspect, the communication unit is further configured to use an All-to-all operator to perform collective communication on the N network cards.

[0032] In a possible implementation of the second aspect, the first communication partner serial number includes a third communication partner serial number and a fourth communication partner serial number, and the calculation unit is specifically used to calculate the third communication partner serial number and the fourth communication partner serial number based on the second serial number; the third communication partner serial number and the fourth communication partner serial number are calculated based on the following formula: third communication partner serial number = (second serial number + MK)% M, fourth communication partner serial number = (second serial number + K)% M, where % represents remainder.

[0033] The communication device provided in the second aspect of the present application is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0034] A third aspect of the present application provides a communication device, comprising a processor and a memory, wherein the memory is configured to store instructions, and the processor is configured to retrieve the instructions stored in the memory to execute the method described in the first aspect or any possible implementation of the first aspect.

[0035] A fourth aspect of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0036] A fifth aspect of the present application provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the method described in the first aspect or any possible implementation of the first aspect.

[0037] In a sixth aspect, the present application provides a chip system, comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via lines, and the at least one processor is used to run computer programs or instructions to execute the method described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] FIG1a is a schematic diagram of an architecture of a communication system used in an embodiment of the present application;

[0039] FIG1b is another schematic diagram of the architecture of the communication system used in an embodiment of the present application;

[0040] FIG2 is a schematic diagram of an embodiment of a communication method provided in an embodiment of the present application;

[0041] FIG3 is a schematic diagram of another embodiment of a communication method provided in an embodiment of the present application;

[0042] FIG4a is a schematic diagram of communication traffic characteristics according to an embodiment of the present application;

[0043] FIG4 b is another schematic diagram of communication traffic characteristics according to an embodiment of the present application;

[0044] FIG5 is a schematic diagram of another embodiment of a communication method provided in an embodiment of the present application;

[0045] FIG6a is another schematic diagram of communication traffic characteristics according to an embodiment of the present application;

[0046] FIG6 b is another schematic diagram of communication traffic characteristics according to an embodiment of the present application;

[0047] FIG7 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0048] FIG8 is another schematic diagram of the structure of the communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present application, rather than all the embodiments. Those skilled in the art will appreciate that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0050] The terms "system" and "network" in the specification and claims of this application and the above-mentioned drawings can be used interchangeably. Unless otherwise specified, ordinal numbers such as "first" and "second" are used to distinguish multiple objects and are not used to limit the order, timing, priority or importance of multiple objects. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0051] To facilitate understanding, the following first introduces the relevant terms and concepts mainly involved in the embodiments of this application.

[0052] 1. Mesh networking

[0053] Mesh networking is a general term for networking types with a mesh-like topology. Mesh networking includes Full Mesh networking and Dragonfly networking.

[0054] 2. Collective communication

[0055] Collective Communications refers to global communication operations in which all processes in a process group participate.

[0056] 3. Symmetric collective communication

[0057] Symmetric collective communication is a type of collective communication characterized by the following characteristics: The communication purpose and behavior are equivalent for every process, and there is no master-slave relationship. Typical symmetric collective communications include All-Reduce, All-to-All, All-Gather, and Reduce-Scatter.

[0058] 4. In-phase superposition

[0059] When multiple identical communication flows are superimposed, the feature with larger flow in the time domain characteristics will generate a larger flow due to the amplitude superposition at the same time period, which is called the same-phase superposition phenomenon of multiple identical communication flows.

[0060] 5. Phase deflection

[0061] By adding a deflection factor to the communication algorithm, the time-domain features of the multiple communication flows generated by the communication algorithm undergo phase shifts. This means that the order and intervals of the communication flow features remain consistent, but their starting points differ. If the communication flow time-domain features are plotted with time as the horizontal axis and the communication flow as the vertical axis, each feature exhibits phase differences, similar to a waveform graph. This phenomenon is called phase shift of the time-domain features of multiple communication flows.

[0062] The present invention provides a communication method that can reduce the probability of congestion in inter-node communication links and reduce communication latency. The present invention also provides a corresponding apparatus, a computer-readable storage medium, and a computer program product. Each of these methods is described below.

[0063] Please refer to Figures 1a and 1b below, which are schematic diagrams of the architecture of the communication system used in the embodiments of the present application.

[0064] The present invention can be applied in the scenario of Mesh networking topology, where multiple network communication planes are in parallel to perform symmetric collective communication, and perform hierarchical communication between nodes. The specific description is as follows:

[0065] Figures 1a and 1b both illustrate mesh networking scenarios. Figure 1a illustrates a communication system using a Full Mesh architecture. As shown in Figure 1a, the system includes four servers, A0, A1, A2, and A3. Each server has four network cards, numbered 0 through 3. Figure 1b illustrates a communication system using a Dragonfly architecture. As shown in Figure 1b, the system includes eight servers, B0 through B7. B0 and B1 are connected to switch S0, B2 and B3 are connected to switch S1, B4 and B5 are connected to switch S2, and B6 and B7 are connected to switch S3. Each server has four network cards, numbered 0 through 3.

[0066] A server is a node, and multiple network cards within a server can communicate within the node using intra-node interconnections. For example, in server A0, the four network cards within A0 can communicate with each other. Network cards with the same number between servers can communicate with each other, and network cards with the same number form a communication plane. For example, in the communication system shown in Figure 1a, network card 1 in A0, network card 1 in A1, network card 1 in A2, and network card 1 in A3 form a communication plane, and network cards within the same communication plane can communicate with each other. In a Full Mesh network, network cards with the same number communicate directly with each other. In a Dragonfly network, network cards first communicate with the connected switch, and then communicate with the network cards with the same number through the switch. Multiple network cards in a server can form multiple communication planes. For example, in the communication system shown in Figure 1a, if each server has four network cards, four communication planes can be formed. Multiple network cards in a single server can communicate in parallel, meaning that multiple communication planes can communicate in parallel.

[0067] Currently, when conducting symmetric collective communications, although multiple communication planes can communicate in parallel, the traffic characteristics of multiple network cards included in the same server are almost identical in the time domain, causing the traffic of different communication planes between nodes to form a phase superposition, resulting in peak traffic concentrated on some links, easily causing network congestion, and thus leading to high communication time consumption and poor communication performance.

[0068] In view of this, an embodiment of the present application provides a communication method that can be applied to communication equipment. By adding a process for constructing phase-deflected communication traffic, phase differences are generated in the traffic between nodes in different parallel communication planes, thereby balancing the entire network traffic, reducing the bandwidth load of local links, reducing network congestion, and thereby reducing communication time, improving the bandwidth utilization of the entire network, and improving communication performance.

[0069] The communication method provided in the embodiment of the present application is mainly applied to symmetric collective communication scenarios in Mesh networking.

[0070] Please refer to Figure 2 below, which is a schematic diagram of an embodiment of the communication method provided in the embodiment of the present application. As shown in Figure 2, this embodiment includes steps 201 to 206.

[0071] 201. Obtain a first serial number of a first network card.

[0072] The first network card is located on the target server. The communication device obtains a first serial number of the first network card by obtaining an environment variable or reading the network card configuration. The first serial number is the serial number of the first network card on the target server. The target server includes N network cards, and the serial numbers of the N network cards on the target server are numbered sequentially starting from 0. For example, if the target server includes four network cards, the serial numbers of the four network cards on the target server are 0, 1, 2, and 3, respectively.

[0073] The target server can communicate with the remaining servers in the communication system. Specifically, the network cards with the same serial number in each server form a communication plane, and the network cards in the same communication plane can communicate with each other. Each serial number in the server corresponds to a network card, so the network cards in a communication plane all come from different servers. For example, the communication system includes 4 servers, and each server includes 8 network cards. Then, the network card with serial number 0 in each server forms a communication plane, and the network card with serial number 1 forms another communication plane. And so on. Multiple communication planes can communicate in parallel, and each communication plane includes 4 network cards. The network cards included in a communication plane have the same serial number in each server, so the serial number of the network card in the server is also the serial number of the communication plane among the many parallel communication planes.

[0074] That is, the target server includes N network cards corresponding to N communication planes, with each network card corresponding to one communication plane. The communication plane corresponding to the first network card is the target communication plane. The target communication plane includes M network cards, each of which belongs to a different server. That is, the communication system includes at least M servers. The sequence numbers of the M network cards in each server are the same as the first sequence number, and the sequence number of the target communication plane is also the first sequence number. For example, if the first network card in the target server is sequence 2, then the sequence numbers of the remaining network cards in the target communication plane in their respective servers are also 2, and the sequence number of the target communication plane is also 2.

[0075] The M network cards in the target communication plane communicate through a target communication algorithm. The target communication algorithm may be a Having-Doubling algorithm or a Pairwise algorithm. The target communication algorithm includes multiple algorithm steps.

[0076] 202. Obtain the second serial number of the first network card.

[0077] The network cards are numbered in sequence in the communication plane to which they belong, starting from 0. For example, if the communication plane includes five network cards, the sequence numbers of the five network cards in the target communication plane are 0, 1, 2, 3, and 4, respectively.

[0078] The target communication plane includes M network cards, and the serial numbers of the M network cards in the target communication plane are 0 to M. The communication device obtains the second serial number of the first network card by reading the network card configuration, etc. The second serial number is the serial number of the first network card in the target communication plane.

[0079] 203. Calculate a phase deflection value of the target communication plane.

[0080] Since one network card corresponds to one communication plane, the communication device can obtain the number of communication planes based on the number of network cards included in the target server. The communication device then obtains the serial number of the target communication plane based on the first serial number of the first network card.

[0081] The communication device uses the sequence number of the target communication plane as a deflection factor, and then combines the number of communication planes N and the number of network cards M included in the target communication plane to calculate the phase deflection value θp of the target communication plane. Specifically, the communication device calculates the deflection value of the target communication plane according to the following formula: θp = M / N * first sequence number

[0082] Among them, θp is rounded up, and the value less than 1 is taken as 1.

[0083] Exemplarily, the number of network cards included in the target communication plane is 4, the number of network cards included in the target server is also 4, and the first serial number of the first network card is 2, then the phase deflection value θp of the target communication plane is 4 / 4*2=2.

[0084] 204. Calculate a first communication partner sequence number, where the first communication partner sequence number is the sequence number of the communication object of the first network card in the Kth algorithm step on the target communication plane, and the first communication partner sequence number corresponds to the second network card.

[0085] The first network card communicates with the remaining network cards in the target communication plane through the target communication algorithm. The communication device calculates the communication partner of the first network card at the Kth algorithm step based on the sequence number of the first network card in the target communication plane (i.e., the second sequence number). The Kth algorithm step is any one of the multiple algorithm steps included in the target communication algorithm. Specifically, the communication device calculates the first communication partner sequence number based on the second sequence number. The first communication partner sequence number is the sequence number of the communication partner of the first network card in the target communication plane at the Kth algorithm step. The first communication partner sequence number corresponds to the second network card and is the sequence number of the second network card in the target communication plane. In other words, at the Kth algorithm step, the first network card will communicate with the second network card.

[0086] 205. Obtain a second communication partner sequence number according to the phase deflection value and the first communication partner sequence number, where the second communication partner sequence number is the sequence number of the third network card in the target communication plane.

[0087] The first NIC's new communication partner at the Kth algorithm step is obtained by performing a phase shift on the first communication partner sequence number. Specifically, the target communication plane's phase shift value is combined with the first communication partner sequence number to obtain the second communication partner sequence number. The second communication partner sequence number is the sequence number of the first NIC's new communication partner at the Kth algorithm step in the target communication plane. The second communication partner sequence number corresponds to the third NIC and is the third NIC's signal in the target communication plane.

[0088] 206. Replace the communication partner of the first network card in the Kth algorithm step from the second network card to the third network card.

[0089] The communication device updates the communication object of the first network card at the Kth algorithm step to the third network card.

[0090] In this embodiment, the phase deflection value of the communication plane is first calculated based on the number of network cards in the communication plane, the total number of communication planes and the serial number of the communication plane, and then the communication object of the network card is recalculated based on the phase deflection value of the communication plane, so that the traffic of different communication planes between two nodes produces a phase difference, thereby balancing the traffic of the entire network, reducing the bandwidth load of a single communication link, improving the bandwidth utilization of the entire network, reducing the probability of congestion, and improving communication performance.

[0091] Furthermore, this embodiment is applied to Mesh networking scenarios, which can reduce networking costs.

[0092] In the embodiment of the present application, there are multiple target communication algorithms, such as the Having-Doubling algorithm or the Pairwise algorithm. Different target communication algorithms have different methods for calculating the first communication partner sequence number and the second communication partner sequence number, which are described below.

[0093] Please refer to Figure 3, which is a schematic diagram of another embodiment of the communication method provided in an embodiment of the present application. In the embodiment shown in Figure 3, nodes communicate with each other through an All-Reduce operator, using the Having-Doubling algorithm. The embodiment shown in Figure 3 includes steps 301 to 309.

[0094] 301. Perform collective communication on N network cards in the target server.

[0095] Based on the node interconnection characteristics between network cards, the Reduce-Scatter operator is used to perform collective communication on N network cards.

[0096] 302. Obtain a first serial number and a second serial number of a first network card.

[0097] The communication device obtains the first serial number of the first network card in the target server and the second serial number of the first network card in the target communication plane by obtaining environment variables or reading the network card configuration.

[0098] 303. In the All-Reduce operator scenario, use the Having-Doubling algorithm to perform collective communication on the network cards in the target communication plane.

[0099] If the target communication plane includes M network cards, the Having-Doubling algorithm will generate log2M algorithm steps. For example, if the target communication plane includes 4 network cards, the communication process will generate log24=2 algorithm steps.

[0100] 304. Calculate a phase deflection value of the target communication plane.

[0101] Step 304 in this embodiment is similar to step 203 in the embodiment shown in FIG. 2 , and will not be described in detail here.

[0102] 305. Calculate the communication object of the first network card at the Kth algorithm step.

[0103] The communication device calculates the communication object of the first network card in the Kth algorithm step based on the second sequence number of the first network card and the number of algorithm steps. The sequence number of the communication object in the target communication plane is the first communication partner sequence number, and the first communication partner sequence number corresponds to the second network card.

[0104] Specifically, the communication partner of the first network card at the Kth algorithm step is calculated based on the following formula: First communication partner serial number = second serial number ^ (1 << ((K + first serial number) % log2M))

[0105] Among them, ^ represents the bitwise exclusive OR operation, << represents the left shift operation, and % represents the remainder operation. Both the bitwise exclusive OR operation and the left shift operation are binary operations.

[0106] Exemplarily, the target communication plane includes 4 network cards, the first serial number of the first network card is 2, the second serial number is 3, and the first serial number is the serial number of the target communication plane. The total number of algorithm steps is log24=2, and K is the first algorithm step. Then (K+first serial number)%log2M is (1+2)%2=1, that is, the number of bits to be shifted left is 1. The binary number of 1 shifted left by 1 bit is 10, which is equal to 2 when converted to decimal. Therefore, the serial number of the first communication partner is 3^2, the binary representation of 3 is 11, the binary representation of 2 is 10, and the binary number obtained by 3^2 is 01, which is equal to 1 when converted to decimal. That is, the serial number of the communication object of the first network card in the first algorithm step in the target communication plane is 1, and serial number 1 corresponds to the second network card.

[0107] 306. Calculate the second communication partner sequence number.

[0108] The communication device combines the phase deflection value of the target communication plane with the first communication partner sequence number to obtain the second communication partner sequence number. The second communication partner sequence number is the sequence number of the new communication object of the first network card in the target communication plane at the Kth algorithm step.

[0109] Specifically, the new communication partner of the first network card at the Kth algorithm step is calculated based on the following formula: Second communication partner serial number = (first communication partner serial number + θp) % M

[0110] Where θp is the phase deflection value of the target communication plane, M is the number of network cards in the target communication plane, and % is the modulo operation.

[0111] Taking step 305 as an example, the target communication plane includes four network cards, and the target server also includes four network cards. The first network card has a first sequence number of 2 and a second sequence number of 3, resulting in a calculated first communication partner sequence number of 1. Therefore, the phase shift value θp of the target communication plane is 4 / 4*2=2. Therefore, the second communication partner sequence number = (1+2)%4=3. That is, the sequence number of the new communication partner of the first network card in the Kth algorithm step within the target communication plane is 3.

[0112] 307. Update the communication object of the first network card in the Kth algorithm step.

[0113] The communication device searches the target communication plane for a network interface card (NIC) with a sequence number equal to the second communication partner's sequence number. The device determines that the second communication partner's sequence number corresponds to the third NIC, making the third NIC the first NIC's new communication partner in the Kth algorithm step. The communication device replaces the first NIC's communication partner in the Kth algorithm step with the third NIC, and then communicates between the first and third NICs in the Kth algorithm step.

[0114] 308. According to the method described in steps 305 to 307, the communication objects of the N network cards in the target server in each algorithm step are updated, and when executing the algorithm step, the N network cards communicate with the updated communication objects.

[0115] 309. Perform collective communication on the N network cards in the target server.

[0116] After N network cards have completed the communication process of all algorithm steps, the All-Gather operator is used to perform collective communication on the N network cards.

[0117] Figures 4a and 4b illustrate the theoretical communication traffic characteristics before and after updating the communication object in the embodiment shown in Figure 3. Figures 4a and 4b illustrate an example of a communication system consisting of four servers, each with four network cards. The Having-Doubling algorithm involves two algorithm steps, with the line segments representing the communication traffic between the network cards.

[0118] Please refer to Figure 4a, which shows the theoretical communication traffic characteristics before replacing the communication objects (before constructing the phase deflection process). As shown in Figure 4a, in the first algorithm step, the four network cards of server A all communicate with the four network cards of server B, and the four network cards of server C all communicate with the four network cards of server D. Inter-node traffic is concentrated on the communication links between servers A and B, and between servers C and D, while the remaining links are idle. In the second algorithm step, the four network cards of server A all communicate with the four network cards of server C, and the four network cards of server B all communicate with the four network cards of server D. Inter-node traffic is concentrated on the communication links between servers A and C, and between servers B and D, while the remaining links are idle. In this case, traffic is concentrated on a few links, making congestion more likely to occur.

[0119] Please refer to Figure 4b, which shows the theoretical communication traffic characteristics after replacing the communication object (after constructing the phase deflection process). As shown in Figure 4b, after updating the communication object, the server in both algorithm steps has multiple communication objects. This increases the number of simultaneously available links, making communication traffic more balanced between nodes and reducing congestion. In the all-reduce collective communication scenario, it is expected to reduce communication latency by 20%.

[0120] This embodiment describes the process of using the Having-Doubling algorithm for inter-node communication in the All-Reduce collective communication scenario, expands the application scenarios of the solution, and improves the feasibility of the solution.

[0121] Please refer to Figure 5 below, which is a schematic diagram of another embodiment of the communication method provided by the present application. In the embodiment shown in Figure 5, nodes communicate with each other via an All-to-All operator, using a Pairwise algorithm. The embodiment shown in Figure 5 includes steps 501 to 508.

[0122] 501. Perform collective communication on N network cards in the target server.

[0123] Based on the node interconnection characteristics between network cards, the All-to-all operator is first used to perform collective communication on N network cards.

[0124] 502. Obtain a first serial number and a second serial number of a first network card.

[0125] Step 502 in this embodiment is similar to step 302 in the embodiment shown in FIG. 3 , and will not be described in detail here.

[0126] 503. In the All-to-all operator scenario, use the Pairwise algorithm to perform collective communication on the network cards in the target communication plane.

[0127] If the target communication plane includes M network cards, the Pairwise algorithm will generate M-1 algorithm steps. For example, if the target communication plane includes 4 network cards, the communication process will generate 4-1=3 algorithm steps.

[0128] 504. Calculate a phase deflection value of the target communication plane.

[0129] Step 504 in this embodiment is similar to step 203 in the embodiment shown in FIG. 2 , and will not be described in detail here.

[0130] 505. Calculate the communication object of the first network card at the Kth algorithm step.

[0131] In each algorithm step of the Pairwise algorithm, the network card has two communication partners. The communication device calculates the communication partner of the first network card in the Kth algorithm step based on the second sequence number of the first network card. The sequence number of the communication partner on the target communication plane is the first communication partner sequence number. Since there are two communication partners, the first communication partner sequence number includes the third and fourth communication partner sequence numbers. The first communication partner sequence number corresponds to the second network card, and the first communication partner sequence number includes the third and fourth communication partner sequence numbers. Therefore, the second network card also includes two network cards: the fourth and fifth network cards. The third communication partner sequence number corresponds to the fourth network card, and the fourth communication partner sequence number corresponds to the fifth network card.

[0132] Specifically, the communication partner of the first network card at the Kth algorithm step is calculated based on the following formula: Third communication partner serial number = (second serial number + MK) % M Fourth communication partner serial number = (second serial number + K) % M

[0133] Among them, % represents the remainder operation.

[0134] For example, the target communication plane includes four network cards. The first network card has a first sequence number of 2 and a second sequence number of 3. The first sequence number corresponds to the sequence number of the target communication plane. The total number of algorithm steps is 4-1=3, with K being the first algorithm step. Therefore, the third communication partner's sequence number = (3+4-1)%4=2, and the fourth communication partner's sequence number = (3+1)%4=0. That is, the first network card's communication partner's sequence numbers on the target communication plane during the first algorithm step are 2 and 0. Sequence number 2 corresponds to the fourth network card, and sequence number 3 corresponds to the fifth network card.

[0135] 506. Calculate the second communication partner sequence number.

[0136] The communication device combines the phase deflection value of the target communication plane with the first communication partner sequence number to obtain the second communication partner sequence number. The second communication partner sequence number is the sequence number of the new communication partner within the target communication plane of the first network card at the Kth algorithm step. The first communication partner sequence number includes two sequence numbers, so the second communication partner sequence number obtained after adding the phase deflection value also includes two sequence numbers, namely the fifth communication partner sequence number and the sixth communication partner sequence number. The fifth communication partner sequence number is obtained by combining the third communication partner sequence number with the phase deflection value, and the fifth communication partner sequence number corresponds to the sixth network card. The sixth communication partner sequence number is obtained by combining the fourth communication partner sequence number with the phase deflection value, and the sixth communication partner sequence number corresponds to the seventh network card.

[0137] Specifically, the new communication partner of the first network card at the Kth algorithm step is calculated based on the following formula: Fifth communication partner serial number = (third communication partner serial number + θp) % M Sixth communication partner serial number = (fourth communication partner serial number + θp) % M

[0138] Among them, % represents the remainder operation.

[0139] Taking step 505 as an example, the target communication plane includes four network cards, and the target server also includes four network cards. The first network card has a first sequence number of 2 and a second sequence number of 3. In the first algorithm step of K, the calculated sequence number of the third communication partner is 2, and the sequence number of the fourth communication partner is 0. Therefore, the phase shift value θp of the target communication plane is 4 / 4*2=2. Therefore, the sequence number of the fifth communication partner is (3+2)%4=1, and the sequence number of the sixth communication partner is (0+2)%4=2. That is, in the Kth algorithm step, the sequence numbers of the new communication partners of the first network card in the target communication plane are 1 and 2, with sequence number 1 corresponding to the sixth network card and sequence number 2 corresponding to the seventh network card.

[0140] It is understandable that the fourth network card and the seventh network card may be the same network card, and the fifth network card and the sixth network card may be the same network card. For example, in the above example, the fourth network card and the seventh network card are the same network card. Alternatively, the fourth network card and the sixth network card may be the same network card, and the fifth network card and the seventh network card may be the same network card. For example, when the first sequence number is 0, the phase deflection value is 0, and the original communication object and the new communication object are the same network card.

[0141] 507. Update the communication object of the first network card in the Kth algorithm step.

[0142] The communication device replaces the communication object of the first network card in the Kth algorithm step from the fourth network card to the sixth network card, and replaces the fifth network card with the seventh network card, and communicates with the sixth network card and the seventh network card in the Kth algorithm step.

[0143] 508. According to the method described in steps 505 to 507, the communication objects of the N network cards in the target server in each algorithm step are updated, and when executing the algorithm step, the N network cards communicate with the updated communication objects.

[0144] The theoretical communication traffic characteristics before and after updating the communication object in the embodiment shown in Figure 5 are shown in Figures 6a and 6b. Figures 6a and 6b illustrate an example of a communication system consisting of four servers, each with four network cards. Using the Pairwise algorithm, the algorithm consists of three steps, with the line segments representing the communication traffic between the network cards.

[0145] Please refer to Figure 6a, which shows the theoretical communication traffic characteristics before replacing the communication object (before constructing the phase shift process). As shown in Figure 6a, in all three algorithm steps, the communication traffic is concentrated on some links, while some links are idle. This situation is prone to congestion, affecting communication performance.

[0146] Please refer to Figure 6b, which shows the theoretical communication traffic characteristics after replacing the communication object (after constructing the phase deflection process). As shown in Figure 6b, after updating the communication object, the communication traffic between nodes is more balanced than before the replacement, and the number of simultaneously available links increases, thereby reducing the probability of congestion and improving communication performance. In the all-to-all collective communication scenario, communication latency is expected to be reduced by 20%.

[0147] This embodiment describes the process of using the Pairwise algorithm for inter-node communication in an all-to-all collective communication scenario, expands the application scenarios of the solution, and improves the feasibility of the solution.

[0148] The above describes the embodiments of the present application from the perspective of the method. The following describes the relevant devices in the embodiments of the present application from the perspective of specific device implementation.

[0149] Please refer to FIG. 7 , which is a schematic diagram of a communication device 700 provided in an embodiment of the present application, wherein the communication device 700 includes an acquiring unit 701 , a calculating unit 702 , a combining unit 703 , and a replacing unit 704 .

[0150] An acquisition unit 701 is configured to acquire a first serial number, where the first serial number is the serial number of the first network card in the target server. The target server includes N network cards, each of the N network cards corresponds to a communication plane. The first network card corresponds to a target communication plane, and the target communication plane includes M network cards. The M network cards belong to different servers, and the serial numbers of the M network cards in their respective servers are the same as the first serial number. The M network cards communicate with each other through a target communication algorithm, and the target communication algorithm includes multiple algorithm steps.

[0151] The acquiring unit 701 is further configured to acquire a second sequence number, where the second sequence number is the sequence number of the first network card in the target communication plane.

[0152] The calculation unit 702 is configured to calculate a phase deflection value of the target communication plane based on the first sequence number, the number of network cards included in the target server, and the number of network cards included in the target communication plane.

[0153] The calculation unit 702 is further configured to calculate the first communication partner sequence number based on the second sequence number, the first communication partner sequence number being the sequence number of the communication object of the first network card in the Kth algorithm step in the target communication plane, and the first communication partner sequence number corresponds to the second network card.

[0154] The combining unit 703 is configured to combine the first communication partner sequence number and the phase deflection value to obtain a second communication partner sequence number, where the second communication partner sequence number is the sequence number of the third network card in the target communication plane.

[0155] The replacement unit 704 is configured to replace the communication partner of the first network card in the Kth algorithm step from the second network card to the third network card.

[0156] Optionally, the target communication algorithm is a Having-Doubling algorithm, and the number of algorithm steps is log2M algorithm steps.

[0157] Optionally, the communication device 700 further includes a communication unit 705, configured to perform collective communication on the N network cards using a Reduce-Scatter operator; the communication unit is further configured to perform collective communication on the N network cards using an All-Gather operator.

[0158] Optionally, the calculation unit 702 is specifically used to calculate the first communication partner serial number based on the following formula: first communication partner serial number = second serial number ^(1<<((K+first serial number)%log2M)), where ^ represents a bitwise exclusive OR operation, << represents a left shift operation, and % represents a remainder operation.

[0159] Optionally, the target communication algorithm is a Pairwise algorithm, and the plurality of algorithm steps is M-1 algorithm steps.

[0160] Optionally, the communication unit 705 is further configured to use an All-to-all operator to perform collective communication on N network cards.

[0161] Optionally, the first communication partner serial number includes a third communication partner serial number and a fourth communication partner serial number, and the calculation unit 702 is specifically used to calculate the third communication partner serial number and the fourth communication partner serial number based on the second serial number; the third communication partner serial number and the fourth communication partner serial number are calculated based on the following formula: third communication partner serial number = (second serial number + MK)% M, fourth communication partner serial number = (second serial number + K)% M, where % represents remainder.

[0162] Each unit in the communication device 700 performs the operations of the communication device in the embodiments shown in Figures 2, 3 and 5 above, and the details are not repeated here.

[0163] Please refer to Figure 8 below, which is a schematic diagram of a possible structure of a communication device 800 provided in an embodiment of the present application, including a processor 801, a communication interface 802, a memory 803, and a bus 804. The processor 801, the communication interface 802, and the memory 803 are interconnected via the bus 804. In the embodiment of the present application, the processor 801 is used to control and manage the operation of the communication device. For example, the processor 801 is used to execute the steps performed by the communication device in the method embodiment shown in Figure 2. The communication interface 802 is used to support the communication device in communication. The memory 803 is used to store program code and data of the communication device.

[0164] The processor 801 may be a central processing unit (CPU), a general-purpose processor (GPOR), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device (PLD), a transistor logic device (TLD), a hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. A processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The bus 804 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG8 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.

[0165] An embodiment of the present application further provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the methods in the embodiments shown in Figures 2, 3, and 5 above.

[0166] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods in the embodiments shown in FIG. 2 , FIG. 3 , and FIG. 5 .

[0167] An embodiment of the present application also provides a chip system, which includes at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to execute the methods in the embodiments shown in Figures 2, 3 and 5 above.

[0168] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0169] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0170] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0171] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0172] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling 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: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A communication method, characterized in that: include: Obtain a first serial number, where the first serial number is a serial number of a first network card in a target server, where the target server includes N network cards, where each of the N network cards corresponds to a communication plane, where the first network card corresponds to a target communication plane, where the target communication plane includes M network cards, where the M network cards belong to different servers, where the serial numbers of the M network cards in their respective servers are the same as the first serial number, where the M network cards communicate with each other through a target communication algorithm, where the target communication algorithm includes a plurality of algorithm steps; Obtain a second serial number, where the second serial number is the serial number of the first network card in the target communication plane; Calculating a phase deflection value of the target communication plane based on the first sequence number, the number of network cards included in the target server, and the number of network cards included in the target communication plane; Calculate a first communication partner sequence number based on the second sequence number, the first communication partner sequence number being the sequence number of the communication object of the first network card in the Kth algorithm step in the target communication plane, and the first communication partner sequence number corresponds to the second network card; Combining the first communication partner sequence number and the phase deflection value to obtain a second communication partner sequence number, where the second communication partner sequence number is the sequence number of the third network card in the target communication plane; The communication object of the first network card in the Kth algorithm step is replaced by the third network card from the second network card.

2. The method according to claim 1, characterized in that: The target communication algorithm is a Having-Doubling algorithm, and the multiple algorithm steps are log2M algorithm steps.

3. The method according to claim 2, characterized in that Before obtaining the first sequence number, the method further includes: Use the Reduce-Scatter operator to perform collective communication on the N network cards; After the communication object of the first network card in the Kth algorithm step is replaced by the third network card from the second network card, the method further includes: The All-Gather operator is used to perform collective communication on the N network cards.

4. The method according to claim 2 or 3, characterized in that: The calculating the first communication partner sequence number based on the second sequence number comprises: The calculation is based on the following formula: The first communication partner serial number = the second serial number ^(1<<((K+first serial number)%log2M)), where ^ represents a bitwise exclusive OR operation, << represents a left shift operation, and % represents a modulo operation.

5. The method according to claim 1, characterized in that The target communication algorithm is a Pairwise algorithm, and the multiple algorithm steps are M-1 algorithm steps.

6. The method according to claim 5, characterized in that Before obtaining the first sequence number, the method further includes: The All-to-all operator is used to perform collective communication on the N network cards.

7. The method according to claim 5 or 6, characterized in that: The first communication partner sequence number includes a third communication partner sequence number and a fourth communication partner sequence number, and the calculating the first communication partner sequence number based on the second sequence number includes: Calculate a third communication partner sequence number and a fourth communication partner sequence number based on the second sequence number; The third communication partner serial number and the fourth communication partner serial number are calculated based on the following formula: The third communication partner serial number = (the second serial number + MK) % M, the fourth communication partner serial number = (the second serial number + K) % M, wherein % represents the remainder.

8. A communication device, characterized in that: include: an acquiring unit, configured to acquire a first serial number, wherein the first serial number is a serial number of a first network card in a target server, wherein the target server includes N network cards, each of the N network cards corresponds to a communication plane, wherein the first network card corresponds to a target communication plane. The target communication plane includes M network cards, the M network cards belong to different servers respectively, the sequence numbers of the M network cards in their respective servers are the same as the first sequence number, the M network cards communicate with each other through a target communication algorithm, and the target communication algorithm includes a plurality of algorithm steps; The acquiring unit is further used to acquire a second serial number, where the second serial number is a serial number of the first network card in the target communication plane; a calculation unit, configured to calculate a phase deflection value of the target communication plane based on the first sequence number, the number of network cards included in the target server, and the number of network cards included in the target communication plane; The calculation unit is further used to calculate a first communication partner sequence number based on the second sequence number, the first communication partner sequence number being a sequence number of a communication object of the first network card in the Kth algorithm step in the target communication plane, and the first communication partner sequence number corresponds to the second network card; a combining unit, configured to combine the first communication partner sequence number and the phase deflection value to obtain a second communication partner sequence number, where the second communication partner sequence number is a sequence number of the third network card in the target communication plane; A replacement unit is used to replace the communication object of the first network card in the Kth algorithm step from the second network card to the third network card.

9. The communication device according to claim 8, characterized in that The target communication algorithm is a Having-Doubling algorithm, and the multiple algorithm steps are log2M algorithm steps.

10. The communication device according to claim 9, characterized in that The communication device further comprises: A communication unit, used for performing collective communication on the N network cards using a Reduce-Scatter operator; The communication unit is also used for: The All-Gather operator is used to perform collective communication on the N network cards.

11. The communication device according to claim 9 or 10, characterized in that: The computing unit is specifically used for: The first communication partner sequence number is calculated based on the following formula: The first communication partner serial number = the second serial number ^(1<<((K+first serial number)%log2M)), where ^ represents a bitwise exclusive OR operation, << represents a left shift operation, and % represents a modulo operation.

12. The communication device according to claim 8, characterized in that The target communication algorithm is a Pairwise algorithm, and the multiple algorithm steps are M-1 algorithm steps.

13. The communication device according to claim 12, characterized in that The communication unit is also used for: The All-to-all operator is used to perform collective communication on the N network cards.

14. The communication device according to claim 12 or 13, characterized in that: The first communication partner sequence number includes a third communication partner sequence number and a fourth communication partner sequence number, and the calculation unit is specifically used for: Calculate a third communication partner sequence number and a fourth communication partner sequence number based on the second sequence number; The third communication partner serial number and the fourth communication partner serial number are calculated based on the following formula: The third communication partner serial number = (the second serial number + MK) % M, the fourth communication partner serial number = (the second serial number + K) % M, wherein % represents the remainder.

15. A communication device, characterized in that: include: Processor and memory; The memory is used to store instructions; The processor is configured to execute instructions stored in the memory to implement the method according to any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by one or more processors, the method according to any one of claims 1 to 7 is implemented.

17. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Communication method and related equipment

    CN119450447A

  • Computing cluster system, scheduling method and device and storage medium

    CN113553190A

  • Resource management method and device and resource management platform

    CN116360972A

  • Efficient and more advanced implementation of ring-allreduce algorithm for distributed parallel deep learning

    US20210240543A1

Cited By

  • Global reduction method and device, equipment and storage medium

    CN122601665A