Method for data communication in computing system, computing system, and first node

By parallelizing intra-node and inter-node communication in the computing system, and using the protocol conversion module to directly send data responses, the problem of low full-crossover communication efficiency and high storage cost in distributed computing is solved, achieving efficient communication and reducing storage costs. cost.

WO2024183435A1PCT designated stage expired Publication Date: 2024-09-12HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/070122
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-06
Filing Date
2024-01-02
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

In distributed computing scenarios, especially AI and HPC scenarios, the collective communication performance of the all-to-all category is low, resulting in high communication efficiency and storage costs. Existing methods cannot effectively utilize high-speed interconnection links within nodes, and There are data transfer dependencies and transit memory requirements, which increase time and storage costs.

Method used

By introducing communication modules and protocol conversion modules into the computing system, intra-node communication and inter-node communication are paralleled, communication address information is used to initiate data read requests, and protocol conversion is performed to directly send data read responses, avoiding memory transfer and improving transmission efficiency. and reduce storage costs.

Benefits of technology

It improves the efficiency of full-cross communication, reduces communication time costs, reduces storage costs, parallelizes intra-node and inter-node communication, avoids the use of transit memory, and improves communication performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024070122_12092024_PF_FP_ABST
    Figure CN2024070122_12092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a method for data communication in a computing system, a computing system, and a first node. The method comprises: a first communication module initiating a plurality of data read requests according to communication address information; a protocol conversion module converting the protocol of the plurality of data read requests according to a destination address in the plurality of data read requests, and forwarding each protocol-converted data read request to a corresponding acceleration device in a first node; the protocol conversion module receiving a plurality of data read responses, converting the protocol format of the plurality of data read responses, and forwarding the data read responses to the first communication module; and the first communication module sending the plurality of protocol-format-converted data read responses to a second acceleration device in a second node. The method for data communication in a computing system as provided by the embodiments of the present application allows for parallel intra-node communication and inter-node communication within the computing system, thereby reducing time costs required for communication and improving communication efficiency; at the same time, a transfer memory does not need to be added, thereby reducing storage costs.
Need to check novelty before this filing date? Find Prior Art

Description

Data communication method in computing system, computing system, and first node

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 6, 2023, with application number 202310245877.6 and application name “Method of data communication in a computing system, computing system, and first node”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communications, and in particular to a method for data communication in a computing system, a computing system, and a first node. Background Art

[0003] Currently, with the increasing scale of computational tasks in scenarios such as artificial intelligence (AI) and high-performance computing (HPC), distributed computing has become a mainstream trend. In distributed computing, collective communication between different accelerators (such as graphics processing units (GPUs), embedded neural network processing units (NPUs), and central processing units (CPUs)) has become a significant factor affecting distributed computing performance. In particular, all-to-all collective communication, such as recommendation systems in AI scenarios, sparsely-gated mixture-of-experts (MoE) model parallelism, and fast Fourier transform (FFT) in HPC scenarios, contributes significantly to overall end-to-end latency. For example, actual tests of MoE model parallelism in AI scenarios show that all-to-all collective communication can account for over 20% of the overall end-to-end latency. Overall, improving the performance of all-to-all collective communication has become a key challenge in current AI and HPC scenarios.

[0004] The all-toall category collective communication method of the related technology has low utilization rate of network communication bandwidth if the high-speed interconnection links within the nodes are not utilized, resulting in low communication efficiency. If the high-speed interconnection links within the nodes are utilized, there will be a dependency relationship in data transmission, resulting in a waste of time cost, and the need to increase the transit memory for storing data will increase the data storage cost. Therefore, there is still room for optimization.

[0005] Summary of the Invention

[0006] In view of this, a method for data communication in a computing system, a computing system, and a first node are proposed. According to the method for data communication in a computing system in an embodiment of the present application, intra-node communication and inter-node communication in the computing system can be carried out in parallel, thereby reducing the time cost required for communication and improving communication efficiency; at the same time, there is no need to increase transit memory, thereby reducing storage costs.

[0007] In a first aspect, an embodiment of the present application provides a method for data communication in a computing system, wherein the computing system includes a first node and a second node, the first node and the second node respectively including multiple acceleration devices, wherein the first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, and the method includes: the first communication module initiates multiple data read requests whose destination addresses are the multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node; the protocol conversion module performs protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after protocol conversion to the corresponding acceleration device in the first node; the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module; the first communication module sends the multiple data read responses after protocol format conversion to the second acceleration device in the second node.

[0008] According to the method for data communication in a computing system according to an embodiment of the present application, a first communication module initiates multiple data read requests with destination addresses of multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node, so that the data read request can be used to read data blocks on the multiple acceleration devices in the first node and the destination address of the second acceleration device in the second node. The protocol conversion module performs protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol conversion to the corresponding acceleration device in the first node, so that each data read request after the protocol conversion can be recognized by the acceleration device in the first node, and successfully reads the data block with the destination address of the second acceleration device in the second node. The protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module, and the first communication module sends the multiple data read responses after the protocol format conversion to the second acceleration device in the second node. The step that the read data must first be stored in the memory of the first acceleration device and then sent from the memory of the first acceleration device is omitted, and the data read response after the protocol format conversion can be directly sent, so that there is no need to set up a transit memory, thereby reducing the data storage cost of the first acceleration device. The method of data communication in the computing system of the embodiment of the present application can complete the inter-node communication part of the full cross-communication alltoall. Since the transmitted data is unrelated to the intra-node communication, the method of data communication in the computing system can be carried out in parallel with the method used for intra-node communication, and does not need to wait for the intra-node communication before execution, which can reduce the time cost of inter-node communication and improve the communication efficiency of the full cross-communication alltoall. In summary, according to the method of data communication in the computing system of the embodiment of the present application, it is possible to reduce the time cost required for communication, improve communication efficiency, and reduce storage costs.

[0009] According to the first aspect, in a first possible implementation of the method for data communication in the computing system, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the first data read request among the multiple data read requests is the first acceleration device, converts the protocol format of the first data read request into a memory bus protocol format, and forwards the first data read request to the first acceleration device through the memory bus.

[0010] In this way, the local memory bus can be used to complete the sending of the first data read request, thereby improving transmission efficiency.

[0011] According to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the method for data communication in the computing system, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, converts the format of the second data read request into the format of the intra-node high-speed interconnection protocol, and forwards the second data read request to the other acceleration devices through the intra-node high-speed interconnection link.

[0012] In this way, the high-speed interconnection link within the node can be used to complete the sending of the second data read request, thereby improving transmission efficiency.

[0013] According to the first aspect or any possible implementation of the first aspect, in a third possible implementation of the method for data communication in the computing system, the computing system also includes a master device, and the method further includes: the first communication module obtains a submission queue entry sent by the master device; the first communication module parses the submission queue entry to obtain the communication address information.

[0014] In this way, the conversion from the virtual address to the physical address can be completed, so that the first communication module can accurately determine the sending object of the data read request and the sending object of the data read response.

[0015] According to the first aspect or any possible implementation of the first aspect, in a fourth possible implementation of the method for data communication in the computing system, the protocol conversion module includes a cache space, the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module, including: the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, stores the multiple data read responses in the cache space, and forwards the data read responses in the cache space to the first communication module.

[0016] In this case, the data volume of each data read response sent can reach the maximum data volume allowed by the bandwidth. While ensuring the transmission of the data read response, the number of data transmissions can be reduced and the data transmission efficiency can be improved.

[0017] According to the first aspect or any possible implementation manner of the first aspect, in a fifth possible implementation manner of the method for data communication in the computing system, the multiple acceleration devices in the first node belong to a first address domain, and the multiple acceleration devices in the second node belong to a second address domain.

[0018] In this way, the communication method in the computing system of the embodiment of the present application can be applied to the unified addressing scenario within the node.

[0019] According to a fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the method for data communication in the computing system, the first node further includes multiple acceleration devices belonging to a third address domain, and the second node further includes multiple acceleration devices belonging to a fourth address domain. The method further includes: the third acceleration device belonging to the third address domain in the first node includes or is connected to a communication module and a protocol conversion module, which reads and forwards data from the multiple acceleration devices belonging to the third address domain; and the first communication module sends the multiple data read responses converted through the protocol format to a fourth acceleration device belonging to the fourth address domain in the second node.

[0020] In this way, the communication method in the computing system of the embodiment of the present application can be applied to the non-uniform addressing scenario within the node.

[0021] In the second aspect, an embodiment of the present application provides a computing system, which includes a first node and a second node, the first node and the second node respectively including multiple acceleration devices, wherein the first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, the first communication module is used to initiate multiple data read requests whose destination addresses are the multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node; the protocol conversion module is used to perform protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, convert the multiple data read responses into a protocol format, and then forward them to the first communication module; the first communication module is used to send the multiple data read responses after protocol format conversion to the second acceleration device in the second node.

[0022] According to the second aspect, in a first possible implementation of the computing system, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the first data read request among the multiple data read requests is the first acceleration device, converts the protocol format of the first data read request into a memory bus protocol format, and forwards the first data read request to the first acceleration device through the memory bus.

[0023] According to the second aspect or the first possible implementation of the second aspect, in the second possible implementation of the computing system, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, converts the format of the second data read request into the format of the intra-node high-speed interconnection protocol, and forwards the second data read request to the other acceleration devices through the intra-node high-speed interconnection link.

[0024] According to the second aspect or any possible implementation of the second aspect, in a third possible implementation of the computing system, the computing system also includes a master device, and the first communication module is further used to obtain a submission queue entry sent by the master device; and parse the submission queue entry to obtain the communication address information.

[0025] According to the second aspect or any possible implementation of the second aspect, in a fourth possible implementation of the computing system, the protocol conversion module includes a cache space, the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module, including: the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, stores the multiple data read responses in the cache space, and forwards the data read responses in the cache space to the first communication module.

[0026] According to the second aspect or any possible implementation manner of the second aspect, in a fifth possible implementation manner of the computing system, the multiple acceleration devices in the first node belong to a first address domain, and the multiple acceleration devices in the second node belong to a second address domain.

[0027] According to a fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the computing system, the first node further includes multiple acceleration devices belonging to a third address domain, the second node further includes multiple acceleration devices belonging to a fourth address domain, and the third acceleration device belonging to the third address domain in the first node includes or is connected to a communication module and a protocol conversion module for reading and forwarding data from the multiple acceleration devices belonging to the third address domain; the first communication module is further used to send multiple data read responses after protocol format conversion to a fourth acceleration device belonging to the fourth address domain in the second node.

[0028] In a third aspect, an embodiment of the present application provides a first node, which is located in a computing system, and the computing system also includes a second node, the first node and the second node respectively include multiple acceleration devices, wherein the first acceleration device in the first node includes a first communication module and a protocol conversion module; the first communication module is used to initiate multiple data read requests whose destination addresses are the multiple acceleration devices in the first node according to the communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node; the protocol conversion module is used to perform protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, convert the multiple data read responses into a protocol format, and then forward them to the first communication module; the first communication module is used to send the multiple data read responses after protocol format conversion to the second acceleration device in the second node.

[0029] According to a possible implementation of the third aspect, the first communication module and the protocol conversion module in the first node are respectively used to implement any one or more of the methods performed by the first communication module and the protocol conversion module in the aforementioned first aspect.

[0030] These and other aspects of the present application will become more readily apparent from the following description of the embodiment(s). BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the description, serve to explain the principles of the application.

[0032] FIG. 1 a is a schematic diagram showing the data status of each acceleration device in the first related art.

[0033] FIG. 1 b is a schematic diagram showing the data status of each acceleration device in the first related art.

[0034] FIG. 1 c is a schematic diagram showing the data status of each acceleration device in the first related art.

[0035] FIG. 1 d is a schematic diagram showing the data status of each acceleration device in the first related art.

[0036] FIG. 2 a is a schematic diagram showing the data status of each acceleration device in the second related art.

[0037] FIG. 2 b is a schematic diagram showing the data status of each acceleration device in the second related technology.

[0038] FIG. 2 c is a schematic diagram showing the data status of each acceleration device in the second related technology.

[0039] FIG2 d is a schematic diagram showing the data status of each acceleration device in the related art 2. FIG.

[0040] FIG. 2e is a schematic diagram showing the data status of each acceleration device in the second related technology.

[0041] FIG3 shows an exemplary architecture diagram of a computing system according to an embodiment of the present application.

[0042] FIG4 is a schematic diagram showing a method flow of data communication in a computing system according to an embodiment of the present application.

[0043] FIG5 is a schematic diagram showing a correspondence between a virtual address included in a submission queue entry and a physical address of resolved communication address information according to an embodiment of the present application.

[0044] FIG6 a shows a schematic diagram of a communication method in a computing system according to an embodiment of the present application applied to a unified addressing scenario within a node.

[0045] FIG6 b shows a schematic diagram of a communication method in a computing system according to an embodiment of the present application applied to a unified addressing scenario within a node.

[0046] FIG6 c shows a schematic diagram of a communication method in a computing system according to an embodiment of the present application applied to a unified addressing scenario within a node.

[0047] FIG7 a shows a schematic diagram of a communication method in a computing system according to an embodiment of the present application applied to a non-uniform addressing scenario within a node.

[0048] FIG7 b shows a schematic diagram of a communication method in a computing system according to an embodiment of the present application applied to a non-uniform addressing scenario within a node.

[0049] FIG7 c is a schematic diagram showing a communication method in a computing system according to an embodiment of the present application applied to a non-uniform addressing scenario within a node. DETAILED DESCRIPTION

[0050] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

[0051] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0052] In addition, numerous specific details are provided in the detailed description below to better illustrate the present application. Those skilled in the art will appreciate that the present application can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present application.

[0053] All-to-all communication is a type of collective communication that allows all participating processes to exchange data with each other. It is commonly used in AI scenarios, MoE model parallelization scenarios, and HPC scenarios. When using all-to-all communication, every process can send data to every other process, and every process can also receive data from every other process.

[0054] The following is an example of using all-to-all cross-communication in an AI scenario.

[0055] The scale of model parameters in the AI ​​field is growing, from hundreds of millions to tens of billions, hundreds of billions, and even trillions. Simultaneously, the scale of training data is also increasing, reaching billions or even tens of billions. With such a large volume of model parameters and training data, model training is simply impossible using a single computing device. Furthermore, longer training times mean higher costs, making it unaffordable. Therefore, multiple AI acceleration servers can be set up to share the computing load of the main device, using a distributed, parallel approach to enhance computing power, accelerate data processing, and accelerate model training.

[0056] Taking model training as an example, since the model will perform a large number of convolution and other calculations on the training data (such as pictures) during the training process, in order to achieve distributed parallelism, the picture can be divided into multiple slices, and the multiple slices can be transmitted to multiple acceleration devices respectively. For each acceleration device, some edge feature information may be stored on other acceleration devices. In this case, edge feature information can be exchanged between acceleration devices through full cross communication alltoall. For example, the model training on each acceleration device is regarded as a process, and the receiving buffer and sending buffer of each process are both arrays divided into several data blocks. Full cross communication alltoall causes the j-th data block in the sending buffer of process i to be sent to process j, and causes process j to place the data block received from process i in the i-th block position of its own receiving buffer. After obtaining the corresponding parameters through convolution calculation, they can be summarized together to update the model parameters, and then the next round of training can be started.

[0057] The following introduces two related technical solutions for achieving full cross-communication alltoall.

[0058] Related Art 1 proposes a solution for achieving all-to-all cross-communication without utilizing high-speed interconnect links within nodes. Assume that a computing system includes six accelerators, Rank-1 to Rank-6, each of which includes a send buffer S and a receive buffer R.

[0059] Figures 1a-1d illustrate the data status of each accelerator device in Related Art 1. As shown in Figure 1a, before communication begins, each accelerator device includes six data blocks stored in a send buffer S. The six data blocks on the same accelerator device have the same source address and different destination addresses, and the source address is the current accelerator device, and the destination addresses are the six accelerator devices in the computing system. For simplicity, Figures 1a-1d only show the identifier of the destination address of each data block. For example, the identifier "1" indicates that the destination address is the accelerator device Rank-1.

[0060] When communication begins, the data blocks whose source and destination addresses are the same accelerator device are first transmitted. This data block does not generate network traffic and is transferred directly from the local send buffer S to the local receive buffer R. As shown in Figure 1b, one data block is transferred from the send buffer S to the receive buffer R on each accelerator device.

[0061] After completing the transfer of a data block whose source and destination addresses are the same accelerator, multiple steps are used to transfer data blocks whose source and destination addresses are different, that is, data blocks transferred between different accelerators. In practice, this can be divided into (total number of accelerators - 1) steps, and each step cannot be performed in parallel.

[0062] Taking the total number of acceleration devices = 6 as an example, in the first step, the transmission of the data block with the source address of the acceleration device Rank-x and the destination address of the acceleration device Rank-x+1 can be completed (1≤x≤6 and is an integer, when x+1 is greater than 6, Rank-x+1=Rank-x+1-6). As shown in Figure 1c, the data block 2 on the acceleration device Rank-1 can be transmitted to the acceleration device Rank-2, and so on. Similarly, in the second step, the transmission of the data block with the source address of the acceleration device Rank-x and the destination address of the acceleration device Rank-x+2 can be completed; ...; in the fifth step, the transmission of the data block with the source address of the acceleration device Rank-x and the destination address of the acceleration device Rank-x+5 can be completed, and the communication ends. The data status of each acceleration device at the end of the communication is shown in Figure 1d. The sending buffer S on each acceleration device has been cleared, and the receiving buffer R stores 6 data blocks. The 6 data blocks on the same acceleration device have the same destination address and different source addresses, and the destination address is the current acceleration device, and the source addresses are the 6 acceleration devices in the computing system. For example, the destination addresses of the six data blocks on the acceleration device Rank-1 may be the acceleration device Rank-1, and the source addresses may be acceleration devices Rank-1 to Rank-6, respectively.

[0063] The disadvantages of related technology 1 are that, first, during the transmission process of data blocks whose source and destination addresses are not the same device, in each step, each accelerator device needs to synchronize with the accelerator device at the destination address of the data block before sending the data block to determine whether the receiving buffer of the accelerator device at the destination address has sufficient storage space. If the total number of accelerator devices in the distributed system increases, the number of steps will also increase accordingly, so the data processing cost caused by the synchronization of the accelerator devices is relatively large. Second, when the total amount of data is constant, the more accelerator devices there are, the smaller the amount of data transmitted in each step, resulting in reduced bandwidth utilization of network communication. The accelerator devices use a remote direct memory access (RDMA) network with a bandwidth of 200GB, and the amount of data communicated in a single communication must be greater than 1 megabyte to achieve 100% bandwidth utilization. Third, the high-speed interconnection links within the nodes are not utilized, so the overall data transmission efficiency is relatively low.

[0064] Communication performance is largely limited by the bandwidth of the communication link. To increase the communication efficiency between accelerator devices in a distributed system, high-speed interconnect links can be added to the nodes where accelerator devices are currently deployed (i.e., distributed computing nodes, such as AI acceleration servers deployed with 8 GPU cards). The communication bandwidth of the high-speed interconnect links within the nodes is much larger than the communication bandwidth of external networks (such as Ethernet and remote direct memory access (RDMA)). In this way, the accelerator devices within the node can accelerate collective communication operations through the high-speed interconnect links within the nodes.

[0065] Related technology 2 proposes a solution for achieving all-to-all cross-communication using high-speed interconnect links within nodes. The distributed system may include eight accelerators, Rank-1 through Rank-8, with accelerators Rank-1 through Rank-4 deployed on Node 1 (not shown) and accelerators Rank-5 through Rank-8 deployed on Node 2 (not shown).

[0066] Figures 2a-2e show schematic diagrams of the data status of each acceleration device in the related technology 2. As shown in Figure 2a, before the communication starts, each acceleration device includes 8 data blocks, and the 8 data blocks on the same acceleration device have the same source address and different destination addresses, and the source address is the current acceleration device, and the destination addresses are the 8 acceleration devices in the distributed system. For example, the source address of the 8 data blocks on the acceleration device Rank-1 can be the acceleration device Rank-1, and the destination addresses can be the acceleration devices Rank-1 to Rank-8 respectively. For the sake of simplicity, only the identification of the destination address of each data block is shown in Figures 2a-2e, for example, the identification "1" indicates that the destination address is the acceleration device Rank-1. Each acceleration device on the two nodes can correspond one to one, for example, the acceleration device Rank-1 can correspond to the acceleration device Rank-5, the acceleration device Rank-2 can correspond to the acceleration device Rank-6, the acceleration device Rank-3 can correspond to the acceleration device Rank-7, and the acceleration device Rank-4 can correspond to the acceleration device Rank-8.

[0067] The communication of Related Technology 2 can be divided into two phases. In the first phase, data blocks are transmitted within the node. The data blocks transmitted in this phase are divided into two categories: the first type of data blocks have a destination address and a source address that are the same or different accelerator devices within the same node. These data blocks are directly sent to the accelerator device at the destination address in the first phase. The second type of data blocks have a destination address and a source address that are accelerator devices within different nodes. These data blocks are not sent directly to the accelerator device at the destination address in the first phase, but are sent to the accelerator device within the node to which they belong that corresponds to the accelerator device at the destination address.

[0068] Taking the acceleration device Rank-1 of node 1 as an example, as shown in Figure 2b, the first type of data blocks may include data blocks identified as 1, 2, 3, and 4 thereon, and the second type of data blocks may include data blocks identified as 5, 6, 7, and 8 thereon. The first type of data blocks are directly sent to the acceleration device at the destination address, that is, the data blocks identified as 1, 2, 3, and 4 are transmitted from the sending buffer of the acceleration device Rank-1 to the receiving buffers of the acceleration device Rank-1, Rank-2, the acceleration device Rank-3, and the acceleration device Rank-4 respectively. The second type of data blocks are sent to the acceleration device in node 1 that corresponds to the acceleration device at the destination address, that is, the data blocks identified as 5, 6, 7, and 8 are transmitted from the sending buffer of the acceleration device Rank-1 to the acceleration device Rank-1, Rank-2, the acceleration device Rank-3, and the acceleration device Rank-4 respectively, and are stored in the corresponding transfer memory (not shown).

[0069] In this case, the first stage needs to be divided into (the number of acceleration devices on each node - 1) steps to be executed, and the steps cannot be executed in parallel. Taking the total number of acceleration devices = 8, the number of nodes = 2, and the number of acceleration devices on each node = 4 as an example, in the first step, the transmission of data blocks between the acceleration device Rank-x and the acceleration device Rank-x+1 can be completed (1≤x≤4 and is an integer, when x+1 is greater than 4, Rank-x+1=Rank-x+1-4). In the second step, the transmission of data blocks between the acceleration device Rank-x and the acceleration device Rank-x+2 can be completed. In the third step, the transmission of data blocks between the acceleration device Rank-x and the acceleration device Rank-x+3 can be completed. The first stage ends here. The data status of each acceleration device at the end of the first stage can be seen in Figure 2c.

[0070] In the second phase, data blocks are transferred between nodes. Data blocks in each accelerator's transit memory, destined for its own accelerator on another node, are directly output to the corresponding accelerator. As shown in Figure 2d, four data blocks marked 5 on accelerator Rank-1 on Node 1 (indicating a destination address of accelerator Rank-5) are directly output to accelerator Rank-5 on Node 2.

[0071] The second phase can be completed in (number of nodes - 1) steps. In each step, two nodes communicate with each other. The node combinations used for communication vary from step to step. The data status of each accelerator at the end of the second phase can be seen in Figure 2e.

[0072] The shortcomings of Related Art 2 are: first, the transmission of the second-category data blocks is dependent on each other. That is, they must be transmitted to the transfer memory of a specific acceleration device in the first stage before they can be transmitted to the acceleration device at the destination address of the second-category data blocks in the second stage. Therefore, the intra-node communication steps in the first stage cannot be carried out in parallel with the inter-node communication in the second stage, resulting in wasted time and reduced communication efficiency. Second, for the second-category data blocks, the acceleration device to which they are transmitted in the first stage is not their final destination, so additional transfer memory is generally required for storage, which increases data storage costs.

[0073] In view of this, a method for data communication in a computing system, a computing system, and a first node are proposed. According to the method for data communication in a computing system in an embodiment of the present application, intra-node communication and inter-node communication in the computing system can be carried out in parallel, thereby reducing the time cost required for communication and improving communication efficiency; at the same time, there is no need to increase transit memory, thereby reducing storage costs.

[0074] FIG3 shows an exemplary architecture diagram of a computing system according to an embodiment of the present application.

[0075] As shown in Figure 3, the computing system may include a main device and multiple nodes (taking the first node and the second node as an example). The main device may be, for example, a host, including a central processing unit (CPU), which can run a collective communication library. The node may be a computing device such as a server. Each node includes multiple acceleration devices, for example, the first node includes a first acceleration device, and the second node includes a second acceleration device. The acceleration device may be a GPU, an NPU, or a data processing unit (DPU). Each acceleration device includes a memory and a scheduler. The memory is used to store data and instructions (such as data blocks and submission queue entries, etc.). The scheduler is used to notify the modules included or connected to the acceleration device to perform specific operations (for example, for a communication module included or connected to the acceleration device, it may be an operation to read and parse the submission queue entries in the acceleration device memory).

[0076] On each node, each acceleration device is also connected to a communication module and a protocol conversion module. Wherein the scheduler and memory of the acceleration device are both connected to the communication module, and the memory is also connected to the protocol conversion module. Those skilled in the art will appreciate that the acceleration device may also be configured to include a communication module and a protocol conversion module, and this application does not limit this. For clarity of description, the following uses the acceleration device connected to the communication module and the protocol conversion module as an example.

[0077] The communication module can be a remote direct memory access (RDMA) engine, and the protocol conversion module is used to complete protocol conversion and data caching. In the embodiment of the present application, it is mainly responsible for completing the conversion between the memory bus protocol and the remote direct memory access (RDMA) protocol, as well as the conversion between the intra-node high-speed interconnection protocol and the remote direct memory access (RDMA) protocol, and caching data from multiple acceleration devices within the node.

[0078] Among them, the main device can communicate with each acceleration device on each node, the memory of each acceleration device can communicate with the communication module and protocol conversion module connected to it, and the scheduler of each acceleration device can communicate with the communication module connected to it. The communication module and protocol conversion module connected to the same acceleration device can communicate with each other. The communication module on a certain node and the corresponding communication module on any other node can communicate with each other. For example, in Figure 3, when the first communication module on the first node corresponds to the second communication module on the second node, the two can communicate with each other. Any protocol conversion module on a certain node can communicate with the memory of each acceleration device on the node. In Figure 3, the dotted line indicates that the two communicating parties can be connected or not, and the solid line indicates that the two communicating parties are connected.

[0079] The following describes an exemplary method of all-to-all cross-communication in a computing system according to an embodiment of the present application in conjunction with FIG3 .

[0080] The method for implementing full cross-communication all-to-all in the computing system of an embodiment of the present application may include two parts: intra-node communication and inter-node communication. The intra-node communication part can be implemented based on relevant technologies, and the inter-node communication part can be implemented based on the method described below and in Figure 4.

[0081] Before executing the all-to-all method, the master device can pre-deliver submission queue entries (SQEs) to the memory of each accelerator device via the collective communication library. The submission queue entries delivered to each accelerator device can include two types: one related to intra-node communication and the other related to inter-node communication. The submission queue entries related to intra-node communication can be implemented based on related technologies and will not be further described here. The following describes the content of the submission queue entries related to inter-node communication.

[0082] The submission queue entries related to inter-node communication may include multiple virtual addresses. Among them, the same submission queue entries sent to different acceleration devices may have different virtual addresses. For example, the submission queue entries related to inter-node communication sent to the first acceleration device may include the virtual address of the second acceleration device, and include the virtual addresses of multiple acceleration devices in the first node. The virtual address of the second acceleration device indicates that the destination of the data transmission is the second acceleration device, and the virtual addresses of the multiple acceleration devices in the first node indicate that during the inter-node communication, the acquisition location of the data transmitted to the second acceleration device is the multiple acceleration devices in the first node. The submission queue entries related to inter-node communication sent to the second acceleration device may include the virtual address of the first acceleration device, and include the virtual addresses of the multiple acceleration devices in the second node. The virtual address of the first acceleration device indicates that the destination of the data transmission is the first acceleration device, and the virtual addresses of the multiple acceleration devices in the second node indicate that during the inter-node communication, the acquisition location of the data transmitted to the first acceleration device is the multiple acceleration devices in the second node.

[0083] An RDMA link is established for each two nodes so that corresponding communication modules on the two nodes can transmit information (such as data read response below) via the RDMA link. The specific establishment method can be implemented based on relevant technologies and will not be repeated here.

[0084] When an accelerator device executes an application (such as an AI model), and reaches the stage where all-to-all cross-communication is required, the scheduler of each accelerator device uses a doorbell to notify the corresponding communication module, and the corresponding communication module performs intra-node communication and inter-node communication at the same time.

[0085] During intra-node communication, the communication module can parse the submission queue entries related to the intra-node communication to obtain address information and generate data write requests based on the address information, such that each data write request includes a data block whose destination address is the accelerator device receiving the data write request. The data write request is then written to the accelerator device receiving the data write request based on data transmission methods in related art. For the sake of brevity, the specific methods for intra-node communication are not described here.

[0086] The following describes an exemplary method for implementing inter-node communication according to an embodiment of the present application in conjunction with Figure 4. Figure 4 is a schematic diagram showing a method flow for data communication in a computing system according to an embodiment of the present application.

[0087] As shown in Figure 4, the method of the embodiment of the present application can be executed by a group of communication modules and protocol conversion modules connected to the same acceleration device or set on the same acceleration device in a computing system, and used to implement the inter-node communication part in full cross communication alltoall.

[0088] The following describes an example of a data communication method in a computing system according to an embodiment of the present application, performing communication between a first accelerator device on a first node and a second accelerator device on a second node. In practical applications, for each two corresponding accelerator devices located on two different nodes, one can be considered the first accelerator device and the other can be considered the second accelerator device, thereby executing the data communication method in a computing system according to an embodiment of the present application.

[0089] In one possible implementation, a computing system includes a first node and a second node, each of the first node and the second node includes a plurality of acceleration devices, wherein a first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, and the method includes steps S41-S44:

[0090] Step S41: The first communication module initiates multiple data read requests whose destination addresses are multiple acceleration devices in the first node according to the communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node;

[0091] Step S42: The protocol conversion module performs protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after protocol conversion to the corresponding acceleration device in the first node;

[0092] Step S43: The protocol conversion module receives multiple data read responses, converts the multiple data read responses into protocol formats, and then forwards them to the first communication module;

[0093] In step S44 , the first communication module sends the multiple data read responses converted into the protocol format to the second acceleration device in the second node.

[0094] For example, each accelerator device's memory may store multiple data blocks, each of which is to be sent to multiple accelerator devices in the computing system. As shown in FIG4 , data blocks A1-B2 are stored in the memory of a first accelerator device and are to be sent to a second accelerator device in the computing system.

[0095] After receiving the notification from the scheduler, in step S41, the first communication module can initiate multiple data read requests whose destination addresses are multiple acceleration devices in the first node according to the communication address information, wherein the communication address information can be obtained by parsing the submission queue entry sent by the master device to the first acceleration device. When the first acceleration device corresponds to the second acceleration device on the second node, the communication address information may include the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node. Based on the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node, multiple data read requests can be obtained, wherein the destination address of each data read request is multiple acceleration devices in the first node, and each data read request is used to read a data block stored in the memory of the acceleration device at the destination address, and the destination address of the read data block is the second acceleration device. The data read request can be sent to a protocol conversion module connected to the first acceleration device.

[0096] The data read request is issued by the first communication module, and its protocol format is also consistent with the first communication module, such as the RDMA protocol format. The data to be read is stored in the memory of multiple acceleration devices, and the RDMA protocol format may not be recognized by the memory. Therefore, in step S42, the protocol conversion module can perform protocol conversion on multiple data read requests according to the destination addresses in the multiple data read requests, so that the protocol format of the converted data read requests can be recognized by the memory, and then forward each data read request after protocol conversion to the corresponding acceleration device in the first node. Among them, for the protocol conversion module connected to the first acceleration device, the protocol conversion method for the data read request with the destination address of the first acceleration device may be different from the protocol conversion method for the data read request with the destination address of other acceleration devices on the first node. The difference between the two can be seen in the further description of step S42 below.

[0097] After receiving the data read request after protocol conversion, multiple acceleration devices can return a data read response. The data read response includes the data block to be read indicated by the received data read request, that is, the data block stored in the memory of the multiple acceleration devices themselves and whose destination address is the second acceleration device. The data read response is returned to the protocol conversion module. The data read response is issued by the memory, and its protocol format may not be recognized by the first communication module. Therefore, in step S43, the protocol conversion module receives multiple data read responses, performs protocol format conversion on the multiple data read responses, so that the protocol format of the converted data read responses can be recognized by the first communication module, and then forwarded to the first communication module. Among them, for the protocol conversion module connected to the first acceleration device, the protocol conversion method of the data read response from the first acceleration device may be different from the protocol conversion method of the data read response from other acceleration devices on the first node. The difference between the two can be seen in the further description of step S43 below.

[0098] In step S44, the first communication module may send the multiple data read responses, after being converted to the protocol format, to the second accelerator device in the second node. For example, the multiple data read responses may be sent to the second communication module connected to the second accelerator device, which then initiates a data write request to write the data blocks included in the data read responses to the memory of the second accelerator device.

[0099] According to the method for data communication in a computing system according to an embodiment of the present application, a first communication module initiates multiple data read requests with destination addresses of multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node, so that the data read request can be used to read data blocks on the multiple acceleration devices in the first node and the destination address of the second acceleration device in the second node. The protocol conversion module performs protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol conversion to the corresponding acceleration device in the first node, so that each data read request after the protocol conversion can be recognized by the acceleration device in the first node, and successfully reads the data block with the destination address of the second acceleration device in the second node. The protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module, and the first communication module sends the multiple data read responses after the protocol format conversion to the second acceleration device in the second node. The step that the read data must first be stored in the memory of the first acceleration device and then sent from the memory of the first acceleration device is omitted, and the data read response after the protocol format conversion can be directly sent, so that there is no need to set up a transit memory, thereby reducing the data storage cost of the first acceleration device. The method of data communication in the computing system of the embodiment of the present application can complete the inter-node communication part of the full cross-communication alltoall. Since the transmitted data is unrelated to the intra-node communication, the method of data communication in the computing system can be carried out in parallel with the method used for intra-node communication, and does not need to wait for the intra-node communication before execution, which can reduce the time cost of inter-node communication and improve the communication efficiency of the full cross-communication alltoall. In summary, according to the method of data communication in the computing system of the embodiment of the present application, it is possible to reduce the time cost required for communication, improve communication efficiency, and reduce storage costs.

[0100] Compared to the second related technique, the present embodiment can completely mask intra-node communication latency. Assuming the intra-node bandwidth is H times the inter-node bandwidth, communication efficiency can be improved by 1 / (H+1). For example, if the intra-node bandwidth is 7 times the inter-node bandwidth, completely masking the intra-node communication latency can improve communication efficiency by 1 / 8.

[0101] The following describes an exemplary manner in which the protocol conversion module performs protocol format conversion on a data read request.

[0102] In a possible implementation, step S42 includes:

[0103] The protocol conversion module determines that the destination address in a first data read request among multiple data read requests is a first acceleration device, converts a protocol format of the first data read request into a memory bus protocol format, and forwards the first data read request to the first acceleration device via the memory bus.

[0104] For example, if the destination address of a data read request is a global physical address, the protocol conversion module can translate it to determine which accelerator device within the node the request is destined for. This address translation can be implemented using an address routing table within the protocol conversion module. An example of an address routing table is shown in Table 1.

[0105] Table 1

[0106] As shown in Table 1, the address routing table can record each accelerator device in the node and its global physical address range. Therefore, when the destination address of a data read request falls within the address range [X1, X2], it can be determined that the destination address of the data read request is the accelerator device numbered A1 in the node; when the destination address of a data read request falls within the address range [Y1, Y2], it can be determined that the destination address of the data read request is the accelerator device numbered A5 in the node.

[0107] For a first data read request whose destination address is the first acceleration device, it can be determined that the first data read request is used to obtain data from the memory of the first acceleration device. The protocol conversion module is also a module included in or connected to the first acceleration device. Therefore, the first data read request can be transmitted via the memory bus of the first acceleration device, resulting in a faster transmission speed. During protocol conversion, the protocol format of the first data read request can be converted to a memory bus protocol format, and the first data read request can be forwarded to the first acceleration device via the memory bus. In this case, the data read response corresponding to the first data read request will also be returned via the memory bus, also with a higher transmission speed.

[0108] In this way, the local memory bus can be used to complete the sending of the first data read request, thereby improving transmission efficiency.

[0109] In a possible implementation, step S42 includes:

[0110] The protocol conversion module confirms that the destination address in the second data read request among multiple data read requests is other acceleration devices in the first node, converts the format of the second data read request into the format of the high-speed interconnection protocol within the node, and forwards the second data read request to the other acceleration devices through the high-speed interconnection link within the node.

[0111] For example, for the second data read request whose destination address is other acceleration devices in the first node, it can be determined that the second data read request is used to obtain data in the memory of other acceleration devices in the first node. The protocol conversion module is a module included in or connected to the first acceleration device. Therefore, the protocol conversion module that initiates the second data read request and the memory that receives the second data read request are located on different acceleration devices. At this time, the second data read request can be transmitted through the high-speed interconnection link within the node to ensure the transmission speed. The high-speed interconnection link within the node may include a link between every two acceleration devices on the same node, which can be established based on relevant technologies and will not be repeated here. When performing protocol conversion, the protocol format of the second data read request can be converted into the format of the high-speed interconnection protocol within the node, and the second data read request can be forwarded to the first acceleration device through the high-speed interconnection link within the node. In this case, the data read response corresponding to the second data read request will also be returned through the high-speed interconnection link within the node, and also has a higher transmission speed.

[0112] In this way, the high-speed interconnection link within the node can be used to complete the sending of the second data read request, thereby improving transmission efficiency.

[0113] Furthermore, because the maximum length of a data read request allowed by different protocol formats may be different, when performing protocol conversion, if necessary, the data read request can be split so that the length of the converted data read request meets the protocol format requirements.

[0114] The communication address information mentioned above is obtained by parsing the submission queue entries. An exemplary parsing method is described below.

[0115] In a possible implementation, the computing system further includes a master device, and the method further includes:

[0116] The first communication module obtains the submission queue entry sent by the master device;

[0117] The first communication module parses the submission queue entry to obtain communication address information.

[0118] For example, a submission queue entry includes a virtual address, while the destination address of a data read request is a physical address. Therefore, the submission queue entry can be parsed first to convert the virtual address into a physical address to obtain communication address information. For a first accelerator device, if the first accelerator device corresponds to a second accelerator device in a second node, the communication address information may include the physical address information of multiple accelerator devices in the first node and the physical address information of the second accelerator device in the second node.

[0119] FIG5 is a schematic diagram showing a correspondence between a virtual address included in a submission queue entry and a physical address of resolved communication address information according to an embodiment of the present application.

[0120] As shown in Figure 5, the virtual addresses included in submission queue entries can be divided into four blocks: VB1, VB2, VB3, and VB4. The physical address obtained after VB1 parsing can be the physical address of accelerator device 1, the physical address obtained after VB2 parsing can be the physical address of accelerator device 2, the physical address obtained after VB3 parsing can be the physical address of accelerator device 3, and the physical address obtained after VB4 parsing can be the physical address of accelerator device 4. Accelerator devices 1-4 are accelerator devices on the same node.

[0121] Those skilled in the art should understand that submission queue entry parsing may also be performed by other devices or modules in the first acceleration device, and this application does not limit the specific object of the operation of performing submission queue entry parsing.

[0122] In this way, the conversion from the virtual address to the physical address can be completed, so that the first communication module can accurately determine the sending object of the data read request and the sending object of the data read response.

[0123] In a possible implementation, the protocol conversion module includes a cache space, and step S43 includes:

[0124] The protocol conversion module receives multiple data read responses, converts the multiple data read responses into protocol formats, stores the multiple data read responses into a cache space, and forwards the data read responses in the cache space to the first communication module.

[0125] For example, the data read response is transmitted to the protocol conversion module through the memory bus and the high-speed interconnection link within the node. After the protocol conversion is performed by the protocol conversion module, it is sent through the RDMA link between the nodes. The bandwidth of the high-speed interconnection link within the node is much larger than the bandwidth of the RDMA link between the nodes, so the data read response after the protocol conversion may not be sent immediately. In this regard, the embodiment of the present application proposes that the protocol conversion module include a cache space for storing multiple received data read responses in the cache space, and then sending data read responses of the same size or smaller according to the bandwidth of the RDMA link between the nodes. Accordingly, based on the relevant technology, the function of managing the sending records and quantity of data read responses can be added to the protocol conversion module to ensure that the cache space does not overflow.

[0126] As mentioned above, the data read request may be segmented during protocol conversion, so the protocol conversion module may also be used to merge the data read responses of the segmented data read requests into a whole before performing protocol conversion.

[0127] In this case, the data volume of each data read response sent can reach the maximum data volume allowed by the bandwidth. While ensuring the transmission of the data read response, the number of data transmissions can be reduced and the data transmission efficiency can be improved.

[0128] In a possible implementation, multiple acceleration devices in the first node belong to a first address domain, and multiple acceleration devices in the second node belong to a second address domain.

[0129] For example, a computing system can implement node-wide unified addressing, meaning that multiple accelerators on each node share the same address domain. Multiple accelerators on a first node belong to a first address domain, while multiple accelerators on a second node belong to a second address domain. In this case, for every accelerator on the first node, there is a unique accelerator on the second node that corresponds to it.

[0130] Assume that each node of the computing system includes m acceleration devices, and the computing system includes a total of n acceleration devices (n, m, n / m are all integers greater than 1), and the total amount of data of the full cross communication alltoall on each acceleration device is D. Then all the acceleration devices in the computing system respectively act as the first acceleration device to execute the communication method in the computing system of the embodiment of the present application, and finally complete the inter-node communication part in the full cross communication alltoall, which requires n / m-1 steps. In the i-th step (1≤i ≤n / m-1, i is an integer), each acceleration device acts as the first acceleration device to execute the communication method in the computing system of the embodiment of the present application, and sends a data read response to the corresponding acceleration device of the node numbered (this node number + i-1), and the total amount of data sent is (D / n)*m.

[0131] 6a-6c are schematic diagrams showing a communication method in a computing system according to an embodiment of the present application applied to a unified addressing scenario within a node.

[0132] Before all-to-all communication begins, the distribution of data blocks across multiple accelerators is shown in Figure 6a. Assume n = 8 and m = 4, where NPU0-NPU7 are the eight accelerators in the computing system, NPU0-NPU3 belong to node 0, and NPU4-NPU7 belong to node 1. The number preceding each data block indicates the accelerator at the source address, and the number following it indicates the accelerator at the destination address. Therefore, data block 0-1 indicates that the data block is to be sent by NPU0 to NPU1.

[0133] Based on relevant technologies, the intra-node communication portion of the all-to-all cross-communication can be completed first. After the intra-node communication portion is completed, the distribution of data blocks across multiple acceleration devices is shown in Figure 6b.

[0134] Each acceleration device acts as a first acceleration device, executes the communication method in the computing system of the embodiment of the present application, and can complete the inter-node communication part of the full cross-communication alltoall. For example, when node 0 is used as the first node and NPU0 is used as the first acceleration device, node 1 can be used as the second node, and NPU4 can be used as the second acceleration device. When NPU0 executes the communication method in the computing system of the embodiment of the present application, it sends a data read request to NPU0-NPU3 and receives a data read response from NPU0-NPU3, wherein the data read response from NPU0 includes data blocks 0-4, the data read response from NPU1 includes data blocks 1-4, the data read response from NPU2 includes data blocks 2-4, and the data read response from NPU3 includes data blocks 3-4; and sends the data read response to NPU4.

[0135] After each accelerator functions as the first accelerator and completes inter-node communication, the distribution of data blocks across multiple accelerators is shown in Figure 6c. For clarity, Figure 6c only illustrates the transmission of data read responses during inter-node communication when NPU0 functions as the first accelerator and NPU4 functions as the second accelerator.

[0136] In this way, the communication method in the computing system of the embodiment of the present application can be applied to the unified addressing scenario within the node.

[0137] In a possible implementation, the first node further includes multiple acceleration devices belonging to a third address domain, the second node further includes multiple acceleration devices belonging to a fourth address domain, and the method further includes:

[0138] The third acceleration device belonging to the third address domain in the first node includes or is connected to a communication module and a protocol conversion module that reads and forwards data from multiple acceleration devices belonging to the third address domain;

[0139] The first communication module sends the multiple data read responses converted into a protocol format to a fourth acceleration device belonging to a fourth address domain in the second node.

[0140] For example, a computing system may have non-uniform addressing within a node, meaning that the multiple accelerators on each node have different address domains. The first node includes multiple accelerators belonging to the first address domain and multiple accelerators belonging to the third address domain, while the second node includes multiple accelerators belonging to the second address domain and multiple accelerators belonging to the fourth address domain. In this case, for any accelerator on the first node, there is a unique accelerator corresponding to it in each address domain of the second node. For example, for the first accelerator on the first node, there is a second accelerator in the second address domain of the second node, and a fourth accelerator in the fourth address domain of the second node.

[0141] At this point, the communication method between the first accelerator and the second accelerator can be described above and in steps S41-S44, with the first node replaced by the first address domain. The first accelerator also communicates with the fourth accelerator, using the same method described above and in steps S41-S44, with the first node replaced by the first address domain and the second accelerator replaced by the fourth accelerator.

[0142] During this process, the first communication module sends multiple data read responses, after being converted into a protocol format, to the fourth accelerator device in the fourth address domain of the second node. The multiple data read responses sent here include data blocks from the accelerator device in the first address domain, and their destination address is also the fourth accelerator device.

[0143] Similarly, the third accelerator device can also communicate with the second accelerator device. The method used can be referred to the above description and the relevant description of steps S41-S44, replacing the first node with the third address domain and the first accelerator device with the third accelerator device. The third accelerator device can also communicate with the fourth accelerator device. The method used can be referred to the above description and the relevant description of steps S41-S44, replacing the first node with the third address domain, replacing the first accelerator device with the third accelerator device, and replacing the second accelerator device with the fourth accelerator device.

[0144] During this process, the third accelerator device in the first node, which belongs to the third address domain, includes or is connected to a communication module and a protocol conversion module that reads and forwards data from multiple accelerator devices in the third address domain. The data blocks read and forwarded here originate from accelerator devices in the same address domain, and the destination address is the same as the forwarded data. That is, when communicating with the second accelerator device, the data blocks read and forwarded originate from accelerator devices in the third address domain, and the destination address is the second accelerator device; when communicating with the fourth accelerator device, the data blocks read and forwarded originate from accelerator devices in the third address domain, and the destination address is the fourth accelerator device.

[0145] Assume that there are k address domains in each node in the computing system, each address domain includes r acceleration devices, each node includes m acceleration devices in total, and the computing system includes n acceleration devices in total (n, k, r, m, n / m are all integers greater than 1), and the total amount of data of the full cross-communication alltoall on each acceleration device is D. Then all the acceleration devices in the computing system act as the first acceleration device to execute the communication method in the computing system of the embodiment of the present application, and finally complete the inter-node communication part in the full cross-communication alltoall, which requires n / m-1 steps. In the i-th step (1≤i≤n / m-1, i is an integer), each acceleration device acts as the first acceleration device to execute the communication method in the computing system of the embodiment of the present application, and sends a data read response to the corresponding acceleration device in each address domain of the node numbered (this node number + i-1), and the total amount of data sent is (D / n)*r.

[0146] 7a-7c are schematic diagrams showing a communication method in a computing system according to an embodiment of the present application applied to a non-uniform addressing scenario within a node.

[0147] Before all-to-all communication begins, the distribution of data blocks across multiple accelerators is shown in Figure 7a. Assume n = 8, m = 4, k = 2, and r = 2, where Node 0 and Node 1 are two nodes in the computing system. NPU0-NPU3 are the four accelerators on Node 0, and NPU4-NPU7 are the four accelerators on Node 1. Accelerators within the same dashed box have the same address domain, while accelerators within different dashed boxes have different address domains. The number preceding each data block indicates the accelerator at the source address, and the number following it indicates the accelerator at the destination address. Therefore, data block 0-1 indicates that the data block is to be sent by NPU0 to NPU1.

[0148] Based on relevant technologies, the intra-node communication portion of the all-to-all cross-communication can be completed first. After the intra-node communication portion is completed, the distribution of data blocks across multiple acceleration devices is shown in Figure 7b.

[0149] Each acceleration device acts as a first acceleration device, executes the communication method in the computing system of the embodiment of the present application, and can complete the inter-node communication part of the full cross-communication alltoall. For example, with node 0 as the first node, the address domain where NPU0 and NPU1 are located as the first address domain, and NPU0 as the first acceleration device, the address domain where NPU2 and NPU3 are located can be used as the third address domain, and NPU2 can be used as the third acceleration device. Node 1 can be used as the second node, the address domain where NPU4 and NPU5 are located can be used as the second address domain, and NPU4 can be used as the second acceleration device. The address domain where NPU6 and NPU7 are located can be used as the fourth address domain, and NPU6 can be used as the fourth acceleration device.

[0150] When executing the communication method in the computing system according to the embodiment of the present application, NPU0 sends a data read request to NPU0 and NPU1, and receives data read responses from NPU0 and NPU1. The data read response from NPU0 includes data blocks 0-4 and data blocks 0-6, and the data read response from NPU1 includes data blocks 1-4 and data blocks 1-6. NPU0 sends the data read response including data blocks 0-4 and data blocks 1-4 to NPU4, and sends the data read response including data blocks 0-6 and data blocks 1-6 to NPU6.

[0151] NPU2 sends a data read request to NPU2 and NPU3, and receives data read responses from NPU2 and NPU3. The data read response from NPU2 includes data blocks 2-4 and 2-6, and the data read response from NPU3 includes data blocks 3-4 and 3-6. NPU2 sends the data read response including data blocks 2-4 and 3-4 to NPU4, and sends the data read response including data blocks 2-6 and 3-6 to NPU6.

[0152] After each accelerator functions as the first or third accelerator and completes inter-node communication, the distribution of data blocks across multiple accelerators is shown in Figure 7c. For clarity, Figure 7c only illustrates the transmission of data read responses during inter-node communication when NPU0 functions as the first accelerator, NPU4 functions as the second accelerator, NPU2 functions as the third accelerator, and NPU6 functions as the fourth accelerator.

[0153] In this way, the communication method in the computing system of the embodiment of the present application can be applied to the non-uniform addressing scenario within the node.

[0154] An embodiment of the present application provides a computing system, an exemplary architecture diagram of which can be seen in FIG3 .

[0155] In one possible implementation, the computing system includes a first node and a second node, the first node and the second node respectively including multiple acceleration devices, wherein the first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, the first communication module is used to initiate multiple data read requests whose destination addresses are the multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node; the protocol conversion module is used to perform protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, convert the multiple data read responses into a protocol format, and then forward them to the first communication module; the first communication module is used to send the multiple data read responses after protocol format conversion to the second acceleration device in the second node.

[0156] In one possible implementation, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the first data read request among the multiple data read requests is the first acceleration device, converts the protocol format of the first data read request into a memory bus protocol format, and forwards the first data read request to the first acceleration device through the memory bus.

[0157] In one possible implementation, the protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after protocol format conversion to the corresponding acceleration device in the first node, including: the protocol conversion module determines that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, converts the format of the second data read request into the format of the high-speed interconnection protocol within the node, and forwards the second data read request to the other acceleration devices through the high-speed interconnection link within the node.

[0158] In a possible implementation, the computing system further includes a master device, and the first communication module is further configured to obtain a submission queue entry sent by the master device; and parse the submission queue entry to obtain the communication address information.

[0159] In one possible implementation, the protocol conversion module includes a cache space, the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, and then forwards them to the first communication module, including: the protocol conversion module receives multiple data read responses, converts the multiple data read responses into a protocol format, stores the multiple data read responses in the cache space, and forwards the data read responses in the cache space to the first communication module.

[0160] In a possible implementation, the multiple acceleration devices in the first node belong to a first address domain, and the multiple acceleration devices in the second node belong to a second address domain.

[0161] In one possible implementation, the first node further includes multiple acceleration devices belonging to a third address domain, and the second node further includes multiple acceleration devices belonging to a fourth address domain. The third acceleration device belonging to the third address domain in the first node includes or is connected to a communication module and a protocol conversion module for reading and forwarding data from the multiple acceleration devices belonging to the third address domain; the first communication module is further used to send multiple data read responses after protocol format conversion to a fourth acceleration device belonging to the fourth address domain in the second node.

[0162] An embodiment of the present application provides a first node, which is located in a computing system. The computing system also includes a second node, and the first node and the second node respectively include multiple acceleration devices, wherein the first acceleration device in the first node includes a first communication module and a protocol conversion module; the first communication module is used to initiate multiple data read requests whose destination addresses are the multiple acceleration devices in the first node according to communication address information, wherein the communication address information includes the address information of the multiple acceleration devices in the first node and the address information of the second acceleration device in the second node; the protocol conversion module is used to perform protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, convert the multiple data read responses into a protocol format, and then forward them to the first communication module; the first communication module is used to send the multiple data read responses after protocol format conversion to the second acceleration device in the second node.

[0163] In one possible implementation, the protocol conversion module is specifically used to: determine that the destination address in the first data read request among the multiple data read requests is the first acceleration device, convert the protocol format of the first data read request into a memory bus protocol format, and forward the first data read request to the first acceleration device through the memory bus.

[0164] In one possible implementation, the protocol conversion module is specifically used to: determine that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, convert the format of the second data read request into the format of the high-speed interconnection protocol within the node, and forward the second data read request to the other acceleration devices through the high-speed interconnection link within the node.

[0165] In a possible implementation, the computing system further includes a master device, and the first communication module is further configured to: obtain a submission queue entry sent by the master device; and parse the submission queue entry to obtain the communication address information.

[0166] In one possible implementation, the protocol conversion module is specifically used to: receive multiple data read responses, convert the multiple data read responses into a protocol format, store the multiple data read responses in the cache space, and forward the data read responses in the cache space to the first communication module.

[0167] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and the part for the module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be performed substantially in parallel, and they can sometimes also be performed in the opposite order, depending on the function involved.

[0168] It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by hardware (such as a circuit or ASIC (Application Specific Integrated Circuit)) that performs the corresponding function or action, or can be implemented by a combination of hardware and software, such as firmware.

[0169] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0170] The embodiments of the present application have been described above. The above description is illustrative and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for data communication in a computing system, characterized in that: The computing system includes a first node and a second node, the first node and the second node respectively include a plurality of acceleration devices, wherein the first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, and the method includes: The first communication module initiates multiple data read requests whose destination addresses are multiple acceleration devices in the first node according to the communication address information, wherein the communication address information includes address information of the multiple acceleration devices in the first node and address information of the second acceleration device in the second node; The protocol conversion module performs protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol conversion to the corresponding acceleration device in the first node; The protocol conversion module receives a plurality of data read responses, converts the plurality of data read responses into protocol formats, and then forwards the converted data to the first communication module; The first communication module sends the multiple data read responses converted into a protocol format to the second acceleration device in the second node.

2. The method according to claim 1, characterized in that: The protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: The protocol conversion module determines that the destination address in the first data read request among the multiple data read requests is the first acceleration device, converts the protocol format of the first data read request into a memory bus protocol format, and forwards the first data read request to the first acceleration device via the memory bus.

3. The method according to claim 1 or 2, characterized in that: The protocol conversion module performs protocol format conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forwards each data read request after the protocol format conversion to the corresponding acceleration device in the first node, including: The protocol conversion module determines that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, converts the format of the second data read request into the format of the intra-node high-speed interconnection protocol, and forwards the second data read request to the other acceleration devices through the intra-node high-speed interconnection link.

4. The method according to any one of claims 1 to 3, characterized in that: The computing system further includes a host device, and the method further includes: The first communication module obtains a submission queue entry sent by the master device; The first communication module parses the submission queue entry to obtain the communication address information.

5. The method according to any one of claims 1 to 4, characterized in that: The protocol conversion module includes a cache space, and the protocol conversion module receives a plurality of data read responses, converts the plurality of data read responses into a protocol format, and then forwards the converted data to the first communication module, including: The protocol conversion module receives multiple data read responses, converts the multiple data read responses into protocol formats, stores the multiple data read responses into the cache space, and forwards the data read responses in the cache space to the first communication module.

6. The method according to any one of claims 1 to 5, characterized in that: The multiple acceleration devices in the first node belong to a first address domain, and the multiple acceleration devices in the second node belong to a second address domain.

7. The method according to claim 6, characterized in that The first node further includes a plurality of acceleration devices belonging to a third address domain, the second node further includes a plurality of acceleration devices belonging to a fourth address domain, and the method further includes: The communication module and the protocol conversion module included in or connected to the third acceleration device belonging to the third address domain in the first node read and forward the data of the multiple acceleration devices belonging to the third address domain; The first communication module sends the multiple data read responses converted in the protocol format to the fourth acceleration device belonging to the fourth address domain in the second node.

8. A computing system, characterized in that: The computing system includes a first node and a second node, wherein the first node and the second node respectively include a plurality of acceleration devices, wherein the first acceleration device in the first node includes or is connected to a first communication module and a protocol conversion module, The first communication module is used to initiate multiple data read requests whose destination addresses are multiple acceleration devices in the first node according to the communication address information, wherein the communication address information includes address information of the multiple acceleration devices in the first node and address information of the second acceleration device in the second node; The protocol conversion module is used to perform protocol conversion on the multiple data read requests according to the destination addresses in the multiple data read requests, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, perform protocol format conversion on the multiple data read responses, and then forward them to the first communication module; The first communication module is used to send multiple data read responses converted into a protocol format to a second acceleration device in the second node.

9. A first node, characterized in that: The first node is located in a computing system, the computing system further includes a second node, the first node and the second node respectively include a plurality of acceleration devices, wherein the first acceleration device in the first node includes a first communication module and a protocol conversion module; The first communication module is used to initiate multiple data read requests whose destination addresses are multiple acceleration devices in the first node according to the communication address information, wherein the communication address information includes address information of the multiple acceleration devices in the first node and address information of the second acceleration device in the second node; The protocol conversion module is used to convert the multiple data read requests according to the destination addresses in the multiple data read requests. Perform protocol conversion, and forward each data read request after protocol conversion to the corresponding acceleration device in the first node; receive multiple data read responses, and forward the multiple data read responses to the first communication module after performing protocol format conversion; The first communication module is used to send multiple data read responses converted into a protocol format to a second acceleration device in the second node.

10. The first node according to claim 9, characterized in that: The protocol conversion module is specifically used for: Determine that the destination address in the first data read request among the multiple data read requests is the first acceleration device, convert the protocol format of the first data read request into a memory bus protocol format, and forward the first data read request to the first acceleration device through the memory bus.

11. The first node according to claim 9 or 10, characterized in that: The protocol conversion module is specifically used for: Determine that the destination address in the second data read request among the multiple data read requests is other acceleration devices in the first node, convert the format of the second data read request into the format of the intra-node high-speed interconnection protocol, and forward the second data read request to the other acceleration devices through the intra-node high-speed interconnection link.

12. The first node according to any one of claims 9 to 11, characterized in that: The computing system further includes a main device, and the first communication module is further used for: Obtaining a submission queue entry sent by the master device; The submission queue entry is parsed to obtain the communication address information.

13. The first node according to any one of claims 9 to 12, characterized in that: The protocol conversion module is specifically used for: A plurality of data read responses are received, and after performing protocol format conversion on the plurality of data read responses, the plurality of data read responses are stored in the cache space, and the data read responses in the cache space are forwarded to the first communication module.

Citation Information

Patent Citations

  • File reading and writing method and device

    CN112199338A

  • Data transmission method, data processing method and related products

    CN115269174A

  • Integrated circuit system

    KR1020170100416A

  • Scheduling of Concurrent Block Based Data Processing Tasks on a Hardware Thread Scheduler

    US20180189105A1