Data transmission path management method and device
By using heterogeneous switches of optical switches and electrical switches in the CLOS networking architecture, communication traffic is distributed according to the communication mode in the task attributes, the problem of congestion of electrical switches in the CLOS networking architecture is solved, computing efficiency is improved and cost is reduced .
Patent Information
- Application Number
- CN202410065972.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-14
- Filing Date
- 2024-01-16
- Publication Date
- 2025-02-21
AI Technical Summary
When CLOS networking architecture schedules communication traffic, it only depends on the idleness of the power switch, resulting in congestion of the power switch and affects the computing efficiency.
Heterogeneous switches that use optical switches and electrical switches, determine which upper-layer switch to distribute communication traffic through the communication mode in task attributes to avoid data congestion.
It effectively avoids data congestion, improves computing efficiency, and reduces networking costs.
Smart Images

Figure CN119496740A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on August 14, 2023, with application number 202311020511.5 and application name “Scheduling Method, Distributed System and Computing Device”, all contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a method and device for managing a data transmission path. Background Art
[0003] Model training refers to the repeated iterative optimization of the model to improve the performance and accuracy of the trained model. As the number of model parameters continues to increase, it is difficult for a single training device to complete the training of the model. When training the aforementioned model, multiple training devices are used to perform distributed training on the model, and data communication is required between the multiple training devices. Therefore, communication connections are required between the multiple training devices. Usually, a CLOS (circuit / loop / orbit / slot) networking architecture based on an electrical switch is established between multiple devices to establish a communication connection between multiple training devices. However, when the CLOS networking architecture schedules communication traffic, it only schedules it based on the idleness of the electrical switch. When the CLOS networking architecture is used to distribute parallel communication traffic, it will cause congestion in the electrical switch. Summary of the invention
[0004] The present application provides a method and device for managing a data transmission path to solve the problem that when a CLOS networking architecture schedules communication traffic, it only schedules it based on the idleness of an electrical switch. When the CLOS networking architecture is used to distribute parallel communication traffic, it will cause congestion in the electrical switch, affecting computing efficiency.
[0005] In a first aspect, the present application provides a method for managing a data transmission path. The method is applied to a management platform, which is used to manage an infrastructure, wherein a first computing cluster and a second computing cluster are provided in the infrastructure, wherein the first computing cluster is connected to a first bottom layer switch, and the second computing cluster is connected to a second bottom layer switch. The first bottom layer switch and the second bottom layer switch are connected through a first upper layer switch or a second upper layer switch, wherein the first upper layer switch and the second upper layer switch are upper layer switches of different types. The above method can be executed by a processing device deployed with a management platform. The above method includes: the processing device obtains a computing task including at least one subtask, and then parses the computing task to obtain a task attribute of the computing task. And, the processing device determines, according to the task attribute, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask. Among them, the task attribute includes a communication mode of each subtask, and the communication mode is used to indicate the characteristics of the communication when the first computing cluster and the second computing cluster execute the computing task. The first upper layer switch and the second upper layer switch are used to process one or more types of communication modes.
[0006] In the present application, the processing device determines the communication traffic when the first computing cluster and the second computing cluster execute the above-mentioned subtasks by distributing the communication mode of the subtask in the task attributes by the first upper-layer switch or the second upper-layer switch, which is conducive to realizing that when there is concurrency in the communication traffic between the first computing cluster and the second computing cluster, the communication traffic corresponding to the communication modes of different subtasks can be processed by different upper-layer switches (the first upper-layer switch and the second upper-layer switch), thereby avoiding data congestion problems and improving computing efficiency.
[0007] Exemplarily, when the first computing cluster and the second computing cluster execute a first subtask of at least one subtask, the first upper layer switch is connected to the first underlying switch and the second underlying switch, and then, when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper layer switch.
[0008] When the first computing cluster and the second computing cluster execute a second subtask in at least one subtask, the second upper layer switch is connected to the first underlying switch and the second underlying switch, and further, when executing the second subtask, the first computing cluster and the second computing cluster communicate through the second upper layer switch.
[0009] In a possible scenario, the first upper-layer switch is an electrical switch, and the second upper-layer switch is an optical switch.
[0010] Compared with the existing CLOS networking architecture in which all switches are electrical switches, the present application uses a heterogeneous switch that combines an optical switch and an electrical switch. Since the assembly cost of the optical switch is lower than the component cost of the electrical switch, the assembly cost of the CLOS networking architecture can be effectively reduced.
[0011] In a possible implementation, the communication mode includes a predictable communication mode (such as all reduce) and / or a variable communication mode (such as all to all). The predictable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable, and the variable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is variable. The first upper layer switch is used to process the variable communication mode, and the second upper layer switch is used to process the predictable communication mode.
[0012] In one possible implementation, the task attributes also include a communication traffic process, and the execution process of the communication traffic includes serial execution or parallel execution. The serial execution is used to indicate that a first subtask and a second subtask in at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed in parallel.
[0013] In one possible scenario, when the first subtask and the second subtask are performed in parallel, the communication traffic generated by executing the first subtask and the second subtask will also be parallel. The communication traffic is in different communication modes, and different upper-layer switches (first upper-layer switch and second upper-layer switch) will be used to distribute the parallel communication traffic to avoid data congestion, which is beneficial to improving the processing efficiency of computing tasks.
[0014] In a possible implementation, the communication mode further includes a point-to-point communication mode, and the point-to-point communication mode is used to indicate that the first computing cluster and the second computing cluster communicate directly.
[0015] In one possible implementation, when the communication traffic process is executed in parallel, the first subtask is a variable communication mode and the second subtask is a predictable communication mode, the processing device determines, based on task attributes, that the first computing cluster and the second computing cluster communicate through the first upper-layer switch or the second upper-layer switch when executing each subtask, including: the processing device determines that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch, and determines that when executing the second task, the first computing cluster and the second computing cluster communicate through the second upper-layer switch.
[0016] In the present application, the processing device determines that different upper-layer switches are used for communication between the first computing cluster and the second computing cluster according to different communication modes (variable communication modes and predictable communication modes), which is conducive to isolating the communication traffic generated when executing the first subtask and the second subtask respectively, avoiding data congestion problems, and thus improving the efficiency of executing computing tasks.
[0017] In a possible implementation, when the communication traffic process is executed in parallel, the first subtask is a predictable communication mode and the second subtask is a point-to-point communication mode, the processing device determines, based on task attributes, that the first computing cluster and the second computing cluster communicate through the first upper-layer switch or the second upper-layer switch when executing each subtask, including: the processing device determines that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the second upper-layer switch, and determines that when executing the second task, the first computing cluster and the second computing cluster communicate through the first upper-layer switch.
[0018] In the present application, the processing device determines that different upper-layer switches are used for communication between the first computing cluster and the second computing cluster according to different communication modes (point-to-point communication mode and predictable communication mode), which is conducive to isolating the communication traffic generated when executing the first subtask and the second subtask respectively, avoiding data congestion problems, and thus improving the efficiency of executing computing tasks.
[0019] In a possible implementation, the infrastructure is further provided with a third upper-layer switch, the third upper-layer switch is of the same type as the first upper-layer switch, the first bottom-layer switch and the second bottom-layer switch are also connected through the third upper-layer switch, and when the communication mode of the first subtask in the computing task is a variable communication mode, the processing device determines, according to the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper-layer switch or the second upper-layer switch when executing each subtask, including: the processing device determines that the first computing cluster and the second computing cluster communicate through the first upper-layer switch and the third upper-layer switch when executing each subtask.
[0020] In the present application, the processing device determines multiple upper-layer switches of the same type to distribute the communication traffic generated by the first computing cluster and the second computing cluster when executing subtasks, which can improve the communication bandwidth between the first computing cluster and the second computing cluster. And, if multiple upper-layer switches of the same type distribute the communication traffic in parallel, the transmission delay of the communication traffic between the first computing cluster and the second computing cluster can be reduced.
[0021] In a possible implementation, the task attributes further include communication traffic of the first subtask, and the method further includes: the processing device determines, based on the communication traffic of the first subtask, a target upper-layer switch for executing the first subtask among the first upper-layer switch and the third upper-layer switch, wherein a sum of maximum distributable traffic of the target upper-layer switches is greater than or equal to the communication traffic of the first subtask.
[0022] In the present application, since the sum of the maximum distributable flows of the target upper-layer switch is greater than or equal to the communication flow corresponding to the communication mode, that is, the target upper-layer switch can well handle the communication flow generated when the computing cluster executes computing tasks, avoiding traffic crowding / congestion, and improving the efficiency of processing computing tasks.
[0023] In one possible implementation, a computing task includes a specification document, and a processing device parses the computing task to obtain task attributes of the computing task, including: the processing device parses the specification document to obtain task attributes of the computing task, and the specification document includes one or more of the type of model to be trained, the number of processing devices required to perform the task, the communication traffic process, and the algorithm adopted by the communication mode.
[0024] In the present application, the processing device obtains the task attributes of the computing task by directly parsing the specification document in the computing task, thereby improving the efficiency of obtaining the task attributes of the computing task, thereby accelerating the communication between the first computing cluster and the second computing cluster through the first upper-layer switch and / or the second upper-layer switch when determining the execution of the computing task, and improving the efficiency of calculating the computing task.
[0025] In a possible scenario, the processing device sends a blank standard document to the front end, and the user fills in information according to the blank standard document. The processing device receives the standard document carrying the above information, and then parses the standard document carrying the above information.
[0026] In a possible implementation, the task attributes also include a communication algorithm adopted by the communication mode. Before the processing device loads the communication mode, the method also includes: the processing device configures the second upper layer switch to pre-communicate with the first bottom layer switch and the second bottom layer switch respectively according to the communication algorithm.
[0027] In the present application, since the communication algorithm adopted in the communication mode accurately shows the flow form of communication traffic between the first computing cluster and the second computing cluster, the processing device configures the second upper-layer switch to pre-communicate with the first underlying switch and the second underlying switch respectively according to the communication algorithm, the computing efficiency when executing subsequent computing tasks can be improved.
[0028] In a possible implementation, the task attributes also include the number of required computing devices, that is, the number of computing devices (training devices) required to perform the computing task. The processing device can determine the computing devices in the infrastructure that perform the computing task based on the number of required computing devices. Furthermore, the processing device can determine the computing cluster and the underlying switch that perform the computing task.
[0029] Exemplarily, an underlying switch is connected to a computing cluster, and a computing cluster includes a set number of computing devices.
[0030] In the present application, the processing device can accurately and quickly allocate the target number of underlying switches and computing clusters for the computing task through the number of required computing devices in the task attributes, thereby improving the configuration efficiency of the transmission path between the underlying switch and the upper switch, and thereby improving the processing efficiency of the computing task.
[0031] In a second aspect, the present application provides a management platform. The management platform is used to manage an infrastructure, in which a first computing cluster and a second computing cluster are provided. The first computing cluster is connected to a first bottom-layer switch, the second computing cluster is connected to a second bottom-layer switch, the first bottom-layer switch and the second bottom-layer switch are connected via a first upper-layer switch or a second upper-layer switch, wherein the first upper-layer switch and the second upper-layer switch are upper-layer switches of different types. The management platform includes:
[0032] The acquisition module is used to acquire a computing task; the computing task includes at least one subtask.
[0033] The parsing module is used to parse the computing task and obtain the task attributes of the computing task; the task attributes include the communication mode of each subtask, and the communication mode is used to indicate the communication characteristics when the first computing cluster and the second computing cluster execute the corresponding subtask.
[0034] The first determination module is used to determine, based on the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask, wherein the first upper layer switch and the second upper layer switch are used to process one or more types of communication modes.
[0035] In a possible implementation, the first upper-layer switch is an electrical switch, and the second upper-layer switch is an optical switch.
[0036] In a possible implementation, the communication mode includes a predictable communication mode and / or a variable communication mode, the predictable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable, and the variable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is variable. The first upper layer switch is used to process the variable communication mode, and the second upper layer switch is used to process the predictable communication mode.
[0037] In one possible implementation, the task attributes also include a communication traffic process, and the execution process of the communication traffic includes serial execution or parallel execution. The serial execution is used to indicate that a first subtask and a second subtask in at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed in parallel.
[0038] In a possible implementation, the communication mode further includes a point-to-point communication mode (such as P2P), and the point-to-point communication mode is used to indicate that the first computing cluster and the second computing cluster communicate directly.
[0039] In one possible implementation, when the communication traffic process is executed in parallel, the first subtask is a variable communication mode and the second subtask is a predictable communication mode, the first determination module is specifically used to determine that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch; and, determine that when executing the second subtask, the first computing cluster and the second computing cluster communicate through the second upper-layer switch.
[0040] In one possible implementation, when the communication traffic process is executed in parallel, the first subtask is a predictable communication mode and the second subtask is a point-to-point communication mode, the first determination module is specifically used to determine that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the second upper-layer switch; and, determine that when executing the second subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch.
[0041] In a possible implementation, a third upper-layer switch is further provided in the infrastructure, and the third upper-layer switch is of the same type as the first upper-layer switch. The first bottom-layer switch and the second bottom-layer switch are also connected through the third upper-layer switch. When the communication mode of the first subtask in the computing task is a changing communication mode, the first determination module is specifically used to determine that when executing each subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch and the third upper-layer switch.
[0042] In a possible implementation, the task attribute further includes the communication flow of the first subtask, and the management platform further includes: a second determination module. The second determination module is used to determine, according to the communication flow of the first subtask, a target upper-layer switch for executing the first subtask among the first upper-layer switch and the third upper-layer switch, wherein the sum of the maximum distributable flows of the target upper-layer switches is greater than or equal to the communication flow of the first subtask.
[0043] In one possible implementation, the computing task includes a specification document and a parsing module, which is specifically used to parse the specification document to obtain task attributes of the computing task, and the specification document includes one or more of the model type required to be trained, the number of processing devices required to perform the task, the communication traffic process, and the communication algorithm adopted by the communication mode.
[0044] In a third aspect, the present application provides a hybrid network management system. The system includes: a first computing cluster, the first computing cluster is connected to a first bottom switch. A second computing cluster, the second computing cluster is connected to a second bottom switch. A first upper switch, the first upper switch is connected to the first bottom switch and the second bottom switch respectively. A second upper switch, the second upper switch is connected to the first bottom switch and the second bottom switch respectively. A management platform, the management platform is used to obtain a computing task, and parse the computing task to obtain a task attribute of the computing task, and determine, according to the task attribute, whether the first computing cluster and the second computing cluster communicate through the first upper switch or the second upper switch when executing each task in at least one subtask included in the computing task. Among them, the task attribute includes a communication mode for each subtask, and the communication mode is used to indicate the characteristics of the communication when the first computing cluster and the second computing cluster execute the corresponding subtask, and the first upper switch and the second upper switch are used to process one or more types of communication modes.
[0045] In a possible implementation, the first upper-layer switch is an electrical switch, and the second upper-layer switch is an optical switch.
[0046] In a possible implementation, the communication mode includes a predictable communication mode and / or a variable communication mode, the predictable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable, and the variable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is variable. The first upper layer switch is used to process the variable communication mode, and the second upper layer switch is used to process the predictable communication mode.
[0047] In one possible implementation, the task attributes also include a communication traffic process, and the execution process of the communication traffic includes serial execution or parallel execution. The serial execution is used to indicate that a first subtask and a second subtask in at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed in parallel.
[0048] In a possible implementation, the communication mode further includes a point-to-point communication mode (such as P2P), and the point-to-point communication mode is used to indicate that the first computing cluster and the second computing cluster communicate directly.
[0049] In one possible implementation, when the communication traffic process is executed in parallel, the first subtask is a variable communication mode and the second subtask is a predictable communication mode, the first computing cluster and the second computing cluster communicate through the first upper layer switch when executing the first subtask, and the first computing cluster and the second computing cluster communicate through the second upper layer switch when executing the second subtask.
[0050] In one possible implementation, when the communication traffic process is executed in parallel, the first subtask is a predictable communication mode and the second subtask is a point-to-point communication mode, the first computing cluster and the second computing cluster communicate through the second upper-layer switch when executing the first subtask, and the first computing cluster and the second computing cluster communicate through the first upper-layer switch when executing the second subtask.
[0051] In a possible implementation, a third upper-layer switch is further provided in the infrastructure, and the third upper-layer switch is of the same type as the first upper-layer switch. The first underlying switch and the second underlying switch are also connected through the third upper-layer switch. When the communication mode of the first subtask in the computing task is a changing communication mode, the first computing cluster and the second computing cluster communicate through the first upper-layer switch and the third upper-layer switch when executing each subtask.
[0052] In a possible implementation, the task attributes also include the communication traffic of the first subtask, and the management platform is specifically used to determine, based on the communication traffic of the first subtask, a target upper-layer switch for executing the first subtask among the first upper-layer switch and the third upper-layer switch, wherein the sum of the maximum distributable traffic of the target upper-layer switches is greater than or equal to the communication traffic of the first subtask.
[0053] In one possible implementation, the computing task includes a specification document and a management platform, which is specifically used to parse the specification document to obtain the task attributes of the computing task. The specification document includes one or more of the model type to be trained, the number of processing devices required to perform the task, the communication traffic process, and the communication algorithm adopted by the communication mode.
[0054] In a fourth aspect, the present application provides a chip, which includes: a processor and a power supply circuit; the power supply circuit is used to supply power to the processor, and the processor is used to execute the method in the first aspect or any possible implementation of the first aspect.
[0055] In a fifth aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device, each computing device includes a memory and a processor, the memory is used to store computer instructions; when the processor executes the computer instructions, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0056] In a sixth aspect, the present application provides a computer-readable storage medium. The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a processing device, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0057] In a seventh aspect, the present application provides a computer program product. The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processing device, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0058] The beneficial effects of the second to seventh aspects above can refer to the description of the first aspect or any possible implementation of the first aspect, and will not be repeated here. Based on the implementations provided by the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of the two-layer CLOS networking architecture;
[0060] Figure 2a An application scenario diagram of a computer system provided for this application;
[0061] Figure 2b A schematic diagram of a hybrid network management system provided in an embodiment of the present application;
[0062] Figure 3 A flowchart of a method for managing a data transmission path provided by the present application;
[0063] Figure 4 Schematic diagram of the communication flow process of the dense model provided for this application;
[0064] Figure 5 Schematic diagram of the connection between the target upper switch and the target lower switch provided for this application Figure 1 ;
[0065] Figure 6 A schematic diagram of the distribution path between the target upper switch and the target lower switch provided by this application;
[0066] Figure 7 Schematic diagram of the communication flow process of the MoE model provided for this application;
[0067] Figure 8 Schematic diagram 2 of the connection between the target upper switch and the target lower switch provided for this application;
[0068] Fig. 9 Schematic diagram of the connection between the target upper switch and the target lower switch provided for this application Figure 3 ;
[0069] Fig.10a A schematic diagram of the structure of a management platform provided for this application Figure 1 ;
[0070] Fig.10b A structural diagram 2 of a management platform provided for this application;
[0071] Fig.11 A schematic diagram of the structure of a computing device provided for this application;
[0072] Fig.12 A schematic diagram of the structure of a computing device cluster provided for this application;
[0073] Fig.13 A schematic diagram of the connection between computing devices provided for this application. DETAILED DESCRIPTION
[0074] To facilitate understanding, the technical terms involved in this application are first introduced.
[0075] Artificial intelligence (AI) is a branch of computer science that aims to enable computers to simulate and perform tasks and functions similar to human intelligence. AI involves the development and implementation of algorithms and systems that aim to simulate human thinking and behavior. For example, various neural network models. In order for a neural network model to simulate human thinking and behavior, it is often necessary to train the neural network model.
[0076] Model training refers to the process of training a neural network model using a large amount of training data so that the trained neural network can perform tasks such as prediction, classification or regression on new input data. During the model training process, the model will learn and optimize the parameters and weights in the model according to the input data to improve prediction accuracy and generalization ability. Commonly, the model will be trained on one or more training devices. If the model is trained on multiple training devices, the multiple training devices will communicate with each other, and thus there will be a communication load. For example, the communication load includes all to all, all reduce, p2p, etc. In one possible scenario, the communication load can also be called a communication mode.
[0077] All to all means full exchange operation, that is, changing the communication mode. Through all to all, a training device obtains the values of N training devices among multiple other training devices. The value can be a model parameter or weight, etc. For example, when experts are in parallel in model distributed training, the communication load of all to all will be adopted. For a training device, the value of N is not fixed during the training process and can be an integer greater than or equal to 0.
[0078] All reduce means a full reduction operation, which is a predictable communication mode. Multiple training devices send the model parameters or weights obtained by their training to a designated training device. In other words, a designated training device receives the model parameters or weights sent by multiple training devices, which is predictable. For example, tensor parallelism or data parallelism in model distributed training uses the communication load of all reduce.
[0079] p2p means point-to-point operation, that is, point-to-point communication mode, that is, a training device sends the model parameters, weights or tensors obtained by its training to a specified training device. For example, pipeline parallelism in distributed model training uses p2p communication load.
[0080] Among them, the above-mentioned expert parallelism means that only a part of the network in each layer of the model is used to process data for each training, that is, the part of the network selected each time is uncertain. Tensor parallelism means splitting a single mathematical operation (such as matrix multiplication) to different training devices for operation, and finally merging the parameters or weights obtained by the training devices. Data parallelism means running different subsets of the same batch of data on different training devices to train the model, and finally merging the parameters or weights of the model obtained by each training device. Pipeline parallelism means running different layers of the model on different training devices. Since the relationship between the layers of the model is fixed, the one-to-one communication relationship between the training devices is fixed.
[0081] The top of rack (ToR) switch, also known as the bottom switch, refers to the switching device placed on each server cabinet and is directly connected to the training equipment.
[0082] Optical switch: A switching device that uses optical fiber to transmit data. It uses optical signals to achieve data exchange and routing. Optical switches usually use optical modules to convert electrical signals into optical signals for transmission, so they have higher transmission rates and lower transmission delays. Optical switches are suitable for application scenarios that require high bandwidth and long-distance transmission, such as data centers, optical fiber communication networks, etc.
[0083] An optical cross-connect (OXC) is an optical transmission device that can exchange optical signals between different optical paths. The above optical switch includes an OXC.
[0084] Ethernet switch: A switching device that uses electrical signals to transmit data. It uses the Ethernet protocol for data exchange and forwarding. Ethernet switches usually use cables to connect computers, servers, and other network devices, and use the media access control (MAC) address table to determine the data forwarding path. Ethernet switches are widely used in local area networks to achieve fast and reliable data exchange and support different transmission rates and protocols.
[0085] Forward propagation refers to calculating the output of the neural network layer by layer from the input layer to the output layer of the model. During the calculation process, each neuron will perform a weighted summation on the output of the previous layer, and then perform a nonlinear transformation through the activation function, and use the result as the input of the next layer. Ultimately, forward propagation will obtain the output value of the neural network, also known as the predicted value.
[0086] Back propagation refers to the use of the back propagation (BP) algorithm to correct the size of the model parameters during the training process, so that the reconstruction error loss of the model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the error loss information is back-propagated (from the output layer to the input layer) to update the parameters in the model, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal model parameters, such as the weight matrix.
[0087] When the memory capacity of a single training device can no longer meet the storage requirements of large AI models (such as GPT-3 (generative pre-trained transformer 3) and palm (pre-training with auxiliary learning on misaligned data), a distributed training solution is often used to train large AI models. For example, each training device stores part of the model's data (such as part of the network layer), and the training of a large AI model is completed through data communication between multiple training devices.
[0088] In order to achieve distributed training of models, the CLOS networking architecture is often used as the architecture for training AI models. Figure 1 As shown, Figure 1 The figure is a schematic diagram of the two-layer CLOS networking architecture. Figure 1In the two-layer CLOS networking architecture shown, the cabinet top switch 111 among the cabinet top switch 111, the cabinet top switch 112, the cabinet top switch 113, and the cabinet top switch 114 is used as an example for explanation. The cabinet top switch 111 is connected to 4 training servers, and one training server is provided with 8 training devices (such as a graphics processing unit (GPU) or a neural network processing unit (NPU), etc.), and the 8 training devices are connected through a high-speed cable (such as a peripheral component interconnect express (PCIe) bus). The cabinet top switch 111 is interconnected with the cabinet top switch 112, the cabinet top switch 113, and the cabinet top switch 114 through the second layer of switches, such as through the switch 121, the switch 122, the switch 123, or the switch 124.
[0089] In other implementations, a three-layer CLOS networking architecture can also be used to train AI models.
[0090] Since switch 121, switch 122, switch 123, and switch 124 use the same type of switches in the CLOS networking architecture, the CLOS networking architecture only schedules communication traffic based on the idleness of the electrical switches. When the CLOS networking architecture is used to distribute parallel communication traffic, congestion of the electrical switches will occur.
[0091] Based on this, the present application provides a method for managing a data transmission path. The method is applied to a management platform, which is used to manage an infrastructure. A first computing cluster and a second computing cluster are provided in the infrastructure. The first computing cluster is connected to a first bottom-layer switch, and the second computing cluster is connected to a second bottom-layer switch. The first bottom-layer switch and the second bottom-layer switch are connected through a first upper-layer switch or a second upper-layer switch, wherein the first upper-layer switch and the second upper-layer switch are upper-layer switches of different types. The above method can be executed by a processing device in the management platform. The above method includes: the processing device obtains a computing task including at least one subtask, and then parses the computing task to obtain a task attribute of the computing task. And, the processing device determines, according to the task attribute, that the first computing cluster and the second computing cluster communicate through the first upper-layer switch or the second upper-layer switch when executing each subtask. Among them, the task attribute includes a communication mode of each subtask, and the communication mode is used to indicate the characteristics of the communication when the first computing cluster and the second computing cluster execute the subtask. The first upper-layer switch and the second upper-layer switch are used to process one or more types of communication modes.
[0092] In the present application, the processing device determines the communication traffic when the first computing cluster and the second computing cluster execute the above-mentioned subtasks by distributing the communication mode of the subtask in the task attributes by the first upper-layer switch or the second upper-layer switch, which is conducive to realizing that when there is concurrency in the communication traffic between the first computing cluster and the second computing cluster, the communication traffic corresponding to the communication modes of different subtasks can be processed by different upper-layer switches (the first upper-layer switch and the second upper-layer switch), thereby avoiding data congestion problems and improving computing efficiency.
[0093] The data transmission path management method provided in this application can be applied to Figure 2a The computer system shown in FIG. Figure 2a As shown, Figure 2a An application scenario diagram of a computer system provided for this application.
[0094] The computer system includes a computing device cluster 210, a bottom layer switch 220, and a heterogeneous switch. The heterogeneous switch includes multiple types of switches, such as a first upper layer switch 230 and a second upper layer switch 240. The computing device cluster 210 and the bottom layer switch 220 (such as the top-of-cabinet switch 111, the top-of-cabinet switch 112, the top-of-cabinet switch 113, and the top-of-cabinet switch 114), and the bottom layer switch 220 and the first upper layer switch 230 and the second upper layer switch 240 can communicate in a wired manner or in a wireless manner.
[0095] It is worth noting that the above-mentioned computing device cluster 210 is only one of the multiple computing device clusters included in the computer system, and the cabinet top switch 111 connected to the computing device cluster 210 is one of the multiple cabinet top switches (cabinet top switch 111, cabinet top switch 112, cabinet top switch 113, cabinet top switch 114). In other words, the computer system includes a combination of multiple computing device clusters and cabinet top switches.
[0096] The computing device cluster 210 includes multiple groups of training servers, and a group of training servers may include multiple training devices, which may communicate via wired means, such as a PCIe bus. One bottom layer switch may be connected to multiple groups of training servers, such as one bottom layer switch connected to four groups of training servers. One bottom layer switch may be connected to multiple first upper layer switches and multiple second upper layer switches.
[0097] The wired communication may be: Ethernet, optical fiber, and various PCIe buses provided inside the computer system for connecting the computing device cluster 210 and the underlying switch 220, as well as the underlying switch 220, the first upper switch 230, and the second upper switch 240.
[0098] The wireless communication may be: Internet, wireless fidelity (WIFI) and ultra wide band (UWB) technology.
[0099] In a possible example, the computer system may further include a management device 250 , which is used to determine that when different groups of training servers execute subtasks, the different groups of training servers communicate with each other through the first upper layer switch 230 or the second upper layer switch 240 .
[0100] In a possible example, the computer system may also include a terminal.
[0101] The terminal can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch), a smart home device (such as a TV), a car computer, a game console, and an augmented reality (AR) / virtual reality (VR) device, etc. This application does not impose any special restrictions on the specific device form of the terminal.
[0102] Exemplarily, the terminal can upload the computing task to the management device 250. The management device 250 determines the training device required to complete the computing task based on the computing task, and determines that when different groups of training servers execute subtasks, the different groups of training servers communicate with each other through the first upper layer switch 230 or the second upper layer switch 240, and then the management device 250 sends the computing task to the training device.
[0103] It should be noted that Figure 2a The illustrated computer system architecture is only an example, and the device type or number within the system can be configured according to actual needs, and the present application embodiment does not limit this. For example, the computer system may also include more training devices or underlying switches.
[0104] In an optional embodiment, the first upper switch 230 may be an electrical switch, and the second upper switch 240 may be an optical switch. Therefore, when the first upper switch 230 is an electrical switch, the bottom switch is connected to the first upper switch 230 via a cable. When the second upper switch 240 is an optical switch, the bottom switch is connected to the second upper switch 240 via an optical fiber.
[0105] Compared with the CLOS networking architecture that only uses electrical switches for distribution, the present application uses a heterogeneous switch that combines an electrical switch and an optical switch to distribute traffic. Since the assembly cost of the optical switch is lower than the assembly cost of the electrical switch, the networking cost of the heterogeneous switch of the present application is lower.
[0106] In other embodiments of the present application, the first upper-layer switch 230 may be an optical switch or other types of switches, and the second upper-layer switch 240 may be an electrical switch or other types of switches, which is not limited in the present application.
[0107] exist Figure 2a Based on the computer system shown in FIG. 1 , the embodiment of the present application also provides a hybrid network management system. Figure 2b As shown, Figure 2b A schematic diagram of a hybrid network management system provided by an embodiment of the present application. The hybrid network management system includes a first computing cluster 310 , a second computing cluster 320 , a first upper layer switch 330 , a second upper layer switch 340 , and a management device 350 .
[0108] The first computing cluster 310 may include multiple computing devices, which are used to perform computing tasks. The second computing cluster 320 may include multiple computing devices, which are used to perform computing tasks. The computing devices may also be called training devices.
[0109] Exemplarily, the first computing cluster 310 is connected to the bottom layer switch 311 in the hybrid network management system, and the second computing cluster 320 is connected to the bottom layer switch 312 in the hybrid network management system.
[0110] The first upper switch 330 is connected to the bottom switch 311 and the bottom switch 312 respectively. The second upper switch 340 is connected to the bottom switch 311 and the bottom switch 312 respectively.
[0111] For a more detailed description of the bottom layer switch 311 and the bottom layer switch 312, please refer to the above Figure 2a The contents of the cabinet top switch shown in FIG. 3 are not described in detail here. For a more detailed description of the first upper layer switch 330 and the second upper layer switch 340, refer to the above Figure 2a The contents of the first upper-layer switch 230 and the second upper-layer switch 240 shown in FIG. 2 are not described in detail here.
[0112] A management platform is deployed in the management device 350, and the management platform is used to manage infrastructure, such as the first computing cluster 310, the second computing cluster 320, the first upper switch 330, and the second upper switch 340. The management platform is used to obtain a computing task including at least one subtask, and parse the computing task to obtain the task attribute of the computing task, and determine, according to the task attribute, whether the first computing cluster and the second computing cluster communicate through the first upper switch or the second upper switch when executing each subtask.
[0113] In other embodiments of the present application, the management platform may be deployed on one or more nodes in the first computing cluster 310 or the second computing cluster 320 .
[0114] For a detailed description of the management device 350, please refer to the management device 250 and the following Figure 3-Figure 9 The functions implemented by the processing device 300 are not described in detail here.
[0115] The implementation of the data transmission path management method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0116] Here, the data transmission path management method of the embodiment of the present application is executed by the processing device 300 as an example for description. Figure 3 A flow chart of a data transmission path management method provided in this application. The method provided in this embodiment can be applied to Figure 2b or Figure 3 In the system shown in FIG. 1 , the method provided in this embodiment is applied to Figure 3 The processing device 300 is used to implement Figure 2b The first upper layer switch 330 and the second upper layer switch 340 can respectively process one or more types of communication modes.
[0117] In a first possible scenario, the processing device 300 receives a computing task including at least one subtask input by a user, and then determines, based on the computing task, that the first computing cluster and the second computing cluster communicate through the first upper switch 330 or the second upper switch 340 when executing each subtask. The computing task may be a model training code.
[0118] In a second possible scenario, the processing device 300 obtains a computing task including at least one subtask in the memory, and then determines, according to the computing task, that the first computing cluster and the second computing cluster communicate through the first upper switch 330 or the second upper switch 340 when executing each subtask. The memory may be an internal memory of the processing device 300, or an external memory accessible to the processing device 300. The computing task may be a model training code.
[0119] The above two possible application scenarios are only examples provided by this embodiment and should not be understood as limiting the present application. In other application scenarios of the present application, the processing device 300 receives the configuration instruction of the user, obtains the computing task from the memory according to the storage address indicated by the configuration instruction, and then determines, according to the computing task, whether the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask.
[0120] Please continue to see Figure 3 The data transmission path management method provided in this embodiment includes the following steps S310 to S330.
[0121] S310: The processing device 300 obtains a computing task.
[0122] The computing task includes at least one subtask.
[0123] In a possible embodiment, the processing device 300 obtains a computing task input by a user.
[0124] In a possible implementation, the processing device 300 receives a trigger operation of a user on a control component on a user interface, and acquires a computing task input by the user in response to the trigger operation of the user on the control component.
[0125] In a possible example, the processing device 300 may display a user interface on the front end, where the front end may refer to a display connected to the processing device 300, or a display screen provided by the processing device 300, etc., which is not limited in this application. Then, the processing device 300 receives a trigger operation of a control component on the user interface through various input devices (keyboard, mouse, touch screen, etc.).
[0126] Regarding the specific implementation of the trigger operation, three possible examples are provided below.
[0127] Example 1: The trigger operation may be a user confirming the control component through a keyboard, such as the trigger operation being a user confirming a storage address of a computing task on the control component.
[0128] Example 2: The trigger operation may be a user clicking the control component with a mouse, such as the trigger operation is the user placing a computing task into the control component with a mouse.
[0129] Example 3: The trigger operation may be a user clicking or sliding a control component on a touch screen.
[0130] The above examples are only optional implementations provided in this embodiment and should not be understood as limiting the present application. In other embodiments of the present application, the trigger operation may also be airborne operation or voice control.
[0131] In one possible scenario, if a computing task is used to indicate training of a model, a subtask in the computing task represents training of a network layer in the model, or a subtask represents training of a submodel, or a subtask represents training of a model using part of the training data in the complete training data, or a subtask represents a computing step in multiple computing steps, etc.
[0132] Among them, the above-mentioned sub-model is one of multiple sub-models divided into a complete model, and a sub-model has a partial network structure, parameters or weights of each network layer in a complete model.
[0133] In a possible embodiment, the above-mentioned computing task is used to indicate the parameters of the model to be trained, in other words, the model training code. The model training code can be in languages such as python and C++, and the corresponding model training code format is .py or .c format. In other cases of the present application, the model training code can also be in java language, and the corresponding model training code format is .java format.
[0134] S320: The processing device 300 parses the computing task to obtain task attributes of the computing task.
[0135] The task attributes include: one or more combinations of: a communication mode of each subtask, a communication flow of each subtask, a communication flow process, a number of required computing devices, and a communication algorithm adopted by the communication mode.
[0136] The communication mode is used to indicate the characteristics of the communication between the first computing cluster and the second computing cluster when performing the corresponding subtask. For example, the communication mode may include all reduce, all to all, or p2p. The all to all is used to indicate that the communication between the first computing cluster and the second computing cluster is variable. The all reduce is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable. The p2p is used to indicate that the first computing cluster and the second computing cluster communicate directly.
[0137] For example, when the computing task is model training, each processing layer in the model (such as convolution layer, pooling layer) can be placed in different computing clusters or computing devices for processing. When the communication mode between multiple computing clusters or computing devices is allreduce, the transmission of communication traffic between the multiple computing clusters or computing devices is fixed. For example, the data generated by a computing device will only be distributed to one or more other fixed computing devices, so the communication traffic between computing devices is predictable.
[0138] When the communication mode between multiple computing clusters or computing devices is all to all, the transmission of communication traffic between the multiple computing clusters or computing devices is not fixed. For example, during the first round of training, the data generated by computing device a will be distributed to computing device b. During the second round of training, the data generated by computing device a will be distributed to computing device c. Therefore, the communication traffic between computing devices varies.
[0139] When the communication mode between multiple computing clusters or computing devices is p2p, the transmission of communication traffic between the multiple computing clusters or computing devices is fixed and one-to-one. For example, data generated by the first computing cluster will be distributed to the second computing cluster, and data generated by the second computing cluster will be distributed to the first computing cluster, or data generated by computing device a will be distributed to computing device b, and data generated by computing device b will be distributed to computing device a, computing device a is located in the first computing cluster, and computing device b is located in the second computing cluster.
[0140] The communication flow of each subtask may represent the communication flow size corresponding to each communication mode. For example, the communication mode of the first subtask is all to all, and the communication flow size corresponding to all to all is 1MB / S. This value is only an example and should not be understood as a limitation of the present application.
[0141] The communication flow process is used to indicate the execution process of the communication flow generated when executing the computing task. The communication flow process may include serial execution or parallel execution. The serial execution is used to indicate that the first subtask and the second subtask in at least one subtask are executed in sequence, and the parallel execution is used to indicate that the first subtask and the second subtask are performed at the same time. For example, the communication mode of the first subtask is all reduce, and the communication mode of the second subtask is p2p, and the communication flow corresponding to all reduce and the communication flow corresponding to p2p are executed in parallel or in series.
[0142] The number of required computing devices is used to indicate the number of computing devices required to perform a computing task.
[0143] The communication algorithm adopted by the communication mode is used to indicate the specific connection mode between the first upper switch or the second upper switch and the bottom switch.
[0144] Exemplarily, the communication algorithm used in the communication mode indicates how the parameters or gradients generated during the model training process are transmitted between multiple computing devices. For example, when the communication mode of the subtask is all to all, the corresponding implementation algorithm may be pairwise or bruck. When the communication mode of the subtask is all reduce, the corresponding implementation algorithm may be ring-all reduce or halving-doubling all reduce. When the communication mode is p2p, the corresponding implementation algorithm may be send or receive.
[0145] For example, when the communication algorithm corresponding to all reduce is ring-all reduce, the second upper switch and multiple bottom switches are connected in a circular manner. The specific description is as follows: Figure 6 The contents shown will not be repeated here.
[0146] In a possible implementation, the computing task includes a specification document, and the processing device 300 parses the computing task to obtain task attributes of the computing task, including:
[0147] The processing device 300 parses the specification document in the computing task to obtain the task attributes of the computing task. The specification document includes one or more of the model type to be trained, the number of computing devices required to perform the computing task, the communication flow process, and the communication algorithm adopted by the communication mode.
[0148] Among them, the model types that need to be trained may include dense models, mixture of experts models (mixture of experts, MoE, also known as MoE models), dual-tower models, capsule networks, etc.
[0149] For the number of computing devices required to execute the computing task, the communication traffic process, and the communication algorithm adopted by the communication mode, please refer to the description of the communication traffic process, the number of computing devices required, and the communication algorithm adopted by the communication mode under the above S320, which will not be repeated here.
[0150] In a possible example, the processing device 300 parses the model type required for training in the computing task and obtains the communication mode of the corresponding subtask.
[0151] The processing device 300 determines the communication mode corresponding to the model type required to be trained in the computing task from the correspondence between the model type required to be trained and the communication mode.
[0152] For example, after the processing device 300 determines that the model type to be trained is a dense model, it can determine from the above correspondence that the dense model corresponds to all reduce and p2p. Among them, the communication mode corresponding to the first subtask is all reduce, and the communication mode corresponding to the second subtask is p2p.
[0153] After the processing device determines that the model type to be trained is the MoE model, it can determine from the above correspondence that the dense model corresponds to all reduce and all to all. Among them, the communication mode corresponding to the first subtask is all to all, and the communication mode corresponding to the second subtask is all reduce.
[0154] In a possible example, the computing task is a model training code input by a user, and the processing device 300 parses the model training code to obtain task attributes of the computing task.
[0155] A designated area in the model training code carries a specification document. The processing device 300 can obtain the specification document of the model training code by reading the content of the designated area. The designated area is the area where the specification document is located.
[0156] In one possible scenario, the processing device 300 provides a blank specification document to the user through the management platform, and the processing device 300 receives data input by the user based on the blank specification document, obtains a specification document carrying information, and then parses the specification document carrying information to obtain task attributes.
[0157] Exemplarily, the processing device 300 displays a user display interface corresponding to the management platform on the front end, and the user display interface shows a control component corresponding to a blank specification document, and the user can click or input on the control component to input data in the blank specification document. The processing device 300 receives the user's click or input operation on the control component, and obtains a specification document carrying one or more of the model type required for training, the number of processing devices required to perform the task, the communication flow process, and the communication algorithm adopted by the communication mode.
[0158] The above content is only an example provided by the present application and should not be understood as a limitation of the present application. In other embodiments of the present application, the computing task acquired by the processing device 300 includes one or more of the model type required for training, the number of processing devices required to perform the task, the communication flow process, and the communication algorithm adopted by the communication mode. The model type required for training, the number of processing devices required to perform the task, the communication flow process, and the communication algorithm adopted by the communication mode do not have a fixed format. In other words, the processing device 300 needs to parse the entire computing task in order to obtain one or more of the above-mentioned model type required for training, the number of processing devices required to perform the task, the communication flow process, and the communication algorithm adopted by the communication mode.
[0159] S330: The processing device 300 determines, according to the task attribute, that the first computing cluster and the second computing cluster communicate through the first upper layer switch 330 or the second upper layer switch 340 when executing each subtask.
[0160] The first upper-layer switch 330 and the second upper-layer switch 340 are used to process one or more types of communication modes.
[0161] In a possible implementation, the processing device 300 determines, according to the task attribute, that the first computing cluster and the second computing cluster communicate through the first upper layer switch 330 or the second upper layer switch 340 when executing each subtask, including:
[0162] The processing device 300 determines, according to the communication mode of the subtask in the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch 330 or the second upper layer switch 340 when executing the computing task.
[0163] Exemplarily, the processing device 300 determines the upper switch corresponding to the communication mode from the mapping relationship, and then determines that when executing the subtask, the first computing cluster and the second computing cluster communicate through the first upper switch 330 or the second upper switch 340. The mapping relationship is the correspondence between the communication mode and the upper switch.
[0164] For example, the processing device 300 determines that the computing task includes a first subtask and a second subtask. When the processing device 300 determines that the communication mode of the first subtask is all to all, it is determined that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper layer switch 330.
[0165] When the processing device 300 determines that the communication mode of the second subtask is all reduce, it is determined that the first computing cluster and the second computing cluster communicate through the second upper layer switch 340 when executing the second subtask.
[0166] In the present application, the processing device 300 can quickly determine the target upper switch through the correspondence between the communication mode and the upper switch, speed up the establishment of the distribution path between the target upper switch and the underlying switch, and thus improve the processing efficiency of the computing task.
[0167] With respect to the mapping relationship between the above communication modes and the types of switches, a possible example is provided, as shown in Table 1 below.
[0168] Table 1
[0169] Communication Mode Types of switches all to all The first upper switch all reduce Second upper switch p2p The first upper switch
[0170] It is worth noting that the above Table 1 is only an example and should not be understood as a limitation of the present application. In other examples of the present application, p2p may also correspond to a second upper layer switch, etc.
[0171] In the present application, the processing device determines that different upper-layer switches are used for communication between the first computing cluster and the second computing cluster according to the different communication modes of the subtasks, which is conducive to isolating the communication traffic generated when executing the first subtask and the second subtask respectively, avoiding data congestion problems, and thus improving the efficiency of executing computing tasks.
[0172] In a possible scenario, the task attributes further include: a communication flow process. The execution process of the communication flow includes serial execution or parallel execution, wherein the serial execution is used to indicate that the first subtask and the second subtask in the at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed in parallel.
[0173] Exemplarily, in the above serial execution process, the communication traffic of the communication mode corresponding to the first subtask and the communication traffic of the communication mode corresponding to the second subtask are generally not congested. To avoid excessive communication traffic that cannot be handled by one type of upper switch, the communication traffic corresponding to the first subtask is distributed using the first upper switch 330, and the communication traffic corresponding to the second subtask is distributed using the second upper switch 340.
[0174] In the above parallel execution process, in order to avoid the problem that when the first subtask and the second subtask are executed in parallel, the communication traffic corresponding to the first subtask and the second subtask occupy the same type of switch, resulting in data congestion and low efficiency in executing the computing task, the communication traffic corresponding to the first subtask is distributed using the first upper layer switch 330, and the communication traffic corresponding to the second subtask is distributed using the second upper layer switch 340, which is conducive to improving the processing efficiency of the computing task.
[0175] With respect to the above-mentioned situation, two possible examples are provided below.
[0176] In a first possible example, the computing task includes a first subtask and a second subtask. When the communication flow process is executed in parallel, the communication mode of the first subtask is all to all and the communication mode of the second subtask is allreduce, the processing device 300 determines, according to the content shown in Table 1 above, that the first computing cluster and the second computing cluster communicate through the first upper layer switch 330 when executing the first subtask; and determines that the first computing cluster and the second computing cluster communicate through the second upper layer switch 340 when executing the second subtask.
[0177] In a second possible example, the computing task includes only the first subtask and the second subtask. When the communication flow process is executed in parallel, the communication mode of the first subtask is all reduce and the communication mode of the second subtask is p2p, the processing device 300 determines, according to the contents shown in Table 1 above, that the first computing cluster and the second computing cluster communicate through the second upper layer switch 340 when executing the first subtask; and determines that the first computing cluster and the second computing cluster communicate through the first upper layer switch 330 when executing the second subtask.
[0178] The above contents are only possible examples in the present application and should not be understood as limiting the present application. In other examples of the present application, a third upper layer switch is also provided in the infrastructure, and the third upper layer switch is of the same type as the first upper layer switch, and the first bottom layer switch and the second bottom layer switch are also connected through a third upper layer interactive machine. When the communication mode of the first subtask in the computing task is all to all, the processing device 300 determines that when executing each subtask, the first computing cluster and the second computing cluster communicate through the first upper layer switch and the third upper layer switch.
[0179] For example, since the communication traffic corresponding to all-to-all is usually large, the bandwidth of one switch cannot meet the timely distribution of the communication traffic between the first computing cluster and the second computing cluster, which leads to problems such as processing delay. To avoid the aforementioned processing delay and other problems, the processing device 300 determines multiple upper switches of the same type (the first upper switch and the third upper switch) to distribute the communication traffic between the first computing cluster and the second computing cluster, thereby reducing the processing delay and improving the computing efficiency.
[0180] In another possible example of the present application, when the communication mode of the first subtask in the computing task is p2p, the processing device 300 determines that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper switch and the third upper switch.
[0181] For the content of this example, please refer to the above description that the communication mode of the first subtask is all to all, which will not be elaborated here.
[0182] For details of this situation, please refer to the following Figure 4-Figure 9 The contents shown will not be repeated here.
[0183] In a possible implementation, the task attributes further include the communication traffic corresponding to the subtask, that is, the communication traffic corresponding to the communication mode. The processing device 300 determines, based on the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing the subtask, including:
[0184] The processing device 300 determines from the infrastructure a target upper-layer switch for distributing the communication traffic corresponding to the first subtask, wherein the sum of the maximum distributable traffic of the target upper-layer switch is greater than or equal to the communication traffic corresponding to the first subtask, and the target upper-layer switch is the first upper-layer switch or the third upper-layer switch.
[0185] In a possible scenario, the processing device 300 determines a target upper-layer switch for executing the first subtask among the first upper-layer switch and the third upper-layer switch according to the communication traffic of the first subtask.
[0186] Exemplarily, the processing device 300 determines the number a of the first upper-layer interactive machines and the number b of the second upper-layer switches according to the communication flow corresponding to the first subtask and the maximum distributable flow of a first upper-layer interactive machine and a third upper-layer switch. Further, the processing device 300 determines a number of first upper-layer switches and b number of third upper-layer switches from the infrastructure as target upper-layer switches. Wherein, a is greater than or equal to 0, b is greater than or equal to 0, and a plus b is greater than or equal to 1. The sum of the maximum distributable flows of a first upper-layer switches and b third upper-layer switches is greater than or equal to the communication flow of the first subtask.
[0187] Alternatively, the processing device 300 determines the number c of second upper layer interactive machines according to the communication flow corresponding to the first subtask and the maximum distributable flow of a second upper layer interactive machine. Further, the processing device 300 determines c second upper layer switches from the infrastructure as target upper layer switches.
[0188] In view of the above, three possible examples are provided below.
[0189] Example 1: The processing device 300 determines that the all-to-all communication traffic is X1MB / s, and the processing device 300 determines X1 / Y1 first upper switches from the infrastructure as target upper switches. Then, the all-to-all communication traffic between the first computing cluster and the second computing cluster is distributed through the X1 / Y1 first upper switches, that is, the first computing cluster and the second computing cluster communicate through the aforementioned X1 / Y1 first upper switches. Among them, Y1 represents the maximum communication traffic that can be distributed by a first upper switch.
[0190] Example 2: The processing device 300 determines that the communication traffic of all reduce is X2 MB / s, and the processing device 300 determines X2 / Y2 second upper switches from the infrastructure as the target upper switches. Then, the all-to-all communication traffic between the first computing cluster and the second computing cluster is distributed through the X2 / Y2 second upper switches, that is, the first computing cluster and the second computing cluster communicate through the aforementioned X2 / Y2 second upper switches.
[0191] In Example 3, the processing device determines that the communication flow of all to all is X1 MB / s, and the communication flow of all reduce is X2 MB / s. Therefore, the content of this Example 3 can refer to the description of the above Examples 1 and 2, and will not be repeated here.
[0192] In the present application, since the sum of the maximum distributable flows of the target upper-layer switch is greater than or equal to the communication flow corresponding to the communication mode, that is, the target upper-layer switch can well handle the communication flow generated when the computing cluster executes computing tasks, avoiding traffic crowding / congestion, and improving the processing efficiency of computing tasks.
[0193] In one possible scenario, the task attributes include the number of required computing devices. The processing device 300 may determine the computing devices in the infrastructure that perform the computing task based on the number of required computing devices. Furthermore, the processing device 300 may determine the computing cluster and the underlying switch that perform the computing task.
[0194] Exemplarily, a bottom layer switch is connected to a computing cluster, which includes a set number of computing devices, such as M. The processing device 300 divides the number of required computing devices by M to obtain the number of computing clusters, that is, the number of bottom layer switches. Further, the processing device 300 determines the number of required computing devices divided by M computing clusters and corresponding bottom layer switches from the infrastructure. The aforementioned computing cluster includes a first computing cluster and a second computing cluster, and the aforementioned bottom layer switches include a first bottom layer switch and a second bottom layer switch.
[0195] The computing cluster determined above may be referred to as a target computing cluster for executing computing tasks, and the underlying switch determined above may be referred to as a target underlying switch.
[0196] In the present application, the processing device 300 can accurately and quickly allocate a target number of underlying switches and computing clusters for computing tasks through the number of required computing devices in the task attributes, thereby improving the configuration efficiency of the transmission path between the underlying switches and the upper switches, and thereby improving the processing efficiency of the computing tasks.
[0197] In one possible scenario, the task attributes include the communication algorithm used in the communication mode. After the target upper switch, the target bottom switch, and the target computing cluster are determined, the processing device 300 can configure the pre-communication between the target upper switch and the target bottom switch according to the communication algorithm used in the communication mode. In other words, the processing device 300 establishes a connection between the target upper switch and the target bottom switch in advance according to the connection mode indicated by the communication algorithm. The target upper switch may include a second upper switch, and the target bottom switch may include a first bottom switch and a second bottom switch.
[0198] For a more detailed description of this situation, please refer to the following Figure 6 The contents shown will not be repeated here.
[0199] In this embodiment, the processing device 300 pre-configures the transmission path between the target upper switch and the target bottom switch according to the communication algorithm, thereby avoiding the disadvantage that the optical switch in the target upper switch cannot switch the connection mode in real time, and better offloading the communication traffic of all reduce.
[0200] For more information about S330, please refer to the following Figure 4-Figure 9 The description is not repeated here.
[0201] In the case where the computing task is a model training code, different model training codes will have different corresponding task attributes, and three possible embodiments are shown below. In the case where the types of models to be trained corresponding to the model training code are dense models, MoE models, and dense models and MoE model training, the processing device 300 determines that when executing each subtask, the first computing cluster and the second computing cluster communicate through the first upper switch 330 or the second upper switch 340.
[0202] In a first possible embodiment, the combination Figure 4-Figure 6 The case where the model to be trained corresponding to the model training code is a dense model is described. In this embodiment, the computing device included in the computing cluster can be called a training device.
[0203] First, the processing device 300 obtains the model training code input by the user, and parses the model training code to obtain the task attributes of the dense model, and then generates a node communication configuration file according to the task attributes.
[0204] The node communication profile includes: the type of model to be trained is a 3D hybrid parallel dense model, the cluster size (the number of required computing devices) is 4,000, the communication traffic process during the training phase, and the algorithm of the communication mode (ring all reduce).
[0205] The processing device 300 determines that the communication mode corresponding to the dense model is all reduce and p2p according to the corresponding relationship between the model type to be trained and the communication mode. The dense model mainly adopts a 3D hybrid parallel strategy of tensor parallelism, pipeline parallelism and data parallelism. In this mode, the communication mode is mainly all reduce and p2p. Thus, the processing device 300 obtains the communication mode of each training subtask in the training dense model. In this embodiment, a training subtask is one of multiple network layers in the dense model. The communication modes of the multiple network layers only include all reduce and p2p.
[0206] like Figure 4 As shown, Figure 4 Schematic diagram of the communication flow process of the dense model provided for this application. In the forward propagation process of the model training phase, all reduce and p2p are serial. In the reverse propagation process of the model training phase, all reduce and p2p are parallel. Among them, the communication flow corresponding to all reduce can be called all reduce flow, and the communication flow corresponding to p2p can be called p2p flow. Therefore, in order to avoid traffic conflicts of different communication modes causing congestion at the switch level, the two types of traffic communications need to be isolated.
[0207] Secondly, the processing device 300 determines to distribute all reduce traffic to the optical switch (such as OXC) for processing and distribute p2p traffic to the electrical switch for processing according to the mapping relationship between the communication mode and the switch.
[0208] In one possible scenario, the processing device 300 determines that the computing clusters that execute the computing task are computing cluster 1, computing cluster 2, computing cluster 3, and computing cluster 4 based on the above cluster scale, and correspondingly determines the underlying switch 1 connected to computing cluster 1, the underlying switch 2 connected to computing cluster 2, the underlying switch 3 connected to computing cluster 3, and the underlying switch 4 connected to computing cluster 4.
[0209] like Figure 5 As shown, Figure 5Schematic diagram of the connection between the target upper switch and the target lower switch provided for this application Figure 1 The processing device 300 determines to distribute all reduce traffic to the OXC for processing and to distribute p2p traffic to the electrical switch for processing. For example, the processing device 300 determines to distribute all reduce traffic between the underlying switch 1, the underlying switch 2, the underlying switch 3, or the underlying switch 4 through the OXC. The processing device 300 determines to distribute p2p traffic between the underlying switch 1, the underlying switch 2, the underlying switch 3, or the underlying switch 4 through the electrical switch.
[0210] Finally, the processing device 300 determines the specific communication mode between the underlying switch, the electrical switch and the OXC according to the communication algorithm of the communication mode, so that multiple computing clusters connected by multiple underlying switches can communicate through the electrical switch and the OXC.
[0211] Take the all reduce traffic algorithm ring-all reduce as an example. Figure 6 As shown, Figure 6 Schematic diagram of the distribution path between the target upper switch and the target bottom switch provided by this application. Since ring-allreduce uses parameters or weights between multiple training devices to send in a loop, such as training device A→training device B→training device C, the next step is training device B→training device C→training device A. Therefore, it is necessary to establish a cyclic distribution path between the training devices, that is, to establish a cyclic distribution path between the target bottom switches. Figure 6 The distribution path shown.
[0212] Exemplarily, when a computing cluster connected to an underlying switch includes 32 training devices, the number of the above-mentioned target underlying switches is 4000 / 32=125 underlying switches. Correspondingly, one upper-layer switch can be connected to 5 underlying switches, so the target upper-layer switches require at least 25 switches. This example takes the target upper-layer switches as 30 as an example, that is, 30 electrical switches are required, and 30 OXCs are also required. After the management device 300 determines 30 OXCs and 30 electrical switches, it establishes distribution paths between the 30 OXCs and 30 electrical switches and the 125 underlying switches according to the communication algorithm of the communication mode.
[0213] It is worth noting that the number of the above-mentioned electrical switches and OXCs is calculated based on the communication traffic of the communication mode in the task attributes and the maximum distributable traffic of an electrical switch or an OXC. The sum of the maximum distributable traffic of the electrical switch is greater than or equal to the communication traffic corresponding to p2p, and the sum of the maximum distributable traffic of the OXC is greater than or equal to the communication traffic corresponding to all reduce. The above-mentioned training device A, training device B, and training device C can belong to different computing clusters respectively.
[0214] It is worth noting that the above content is only an example and should not be understood as a limitation of the present application. In other examples of the present application, a bottom layer switch can be connected to 16 or 64 training devices, and a top layer switch can be connected to 10 or 16 bottom layer switches, which is not limited by the present application.
[0215] In this embodiment, the processing device 300 pre-configures the distribution path between the OXC and the target underlying switch according to the communication algorithm ring-all reduce, thereby avoiding the disadvantage that the OXC cannot switch the connection mode in real time and better offloading the communication traffic of allreduce.
[0216] In a second possible embodiment, the Figure 7 and Figure 8 The case where the model to be trained corresponding to the model training code is a MoE model is described.
[0217] First, the processing device 300 obtains the model training code input by the user, and parses the code to obtain the task attributes of the MoE model, and then generates a node communication configuration file according to the task attributes.
[0218] The node communication profile includes: the type of the model to be trained is the MoE model, the cluster size is 4,000, the communication traffic process in the training phase, and the algorithm of the communication mode (such as ring-all reduce).
[0219] The processing device 300 determines that the communication mode corresponding to the MoE model is all reduce and all to all according to the correspondence between the model type to be trained and the communication mode. The MoE model mainly adopts a strategy of hybrid expert parallelism and data parallelism. In this mode, the communication modes are mainly all to all and all reduce. Thus, the processing device 300 obtains the communication mode of each training subtask in the MoE model. In this embodiment, a training subtask is one of multiple submodels in the MoE model. The communication modes of the multiple submodels only include all reduce and all to all. A submodel includes part of the network structure, parameters, and weights of each network layer in the MOE model.
[0220] like Figure 7 As shown, Figure 7 Schematic diagram of the communication flow process of the MoE model provided for this application. In the forward propagation process of the model training phase, there is only all to all. In the reverse propagation process of the model training phase, it includes all reduce and all to all. The communication flow corresponding to all to all can be called all to all flow. In the reverse propagation process, all reduce flow and all to all flow are parallel.
[0221] Secondly, the processing device 300 determines to distribute all to all traffic to the electrical switch and distribute all reduce traffic to the OXC according to the mapping relationship between the communication mode and the switch.
[0222] In one possible scenario, the processing device 300 determines that the computing clusters that execute the computing task are computing cluster 1, computing cluster 2, computing cluster 3, and computing cluster 4 based on the above cluster scale, and correspondingly determines the underlying switch 1 connected to computing cluster 1, the underlying switch 2 connected to computing cluster 2, the underlying switch 3 connected to computing cluster 3, and the underlying switch 4 connected to computing cluster 4.
[0223] For example, Figure 8 As shown, Figure 8 Schematic diagram 2 of the connection between the target upper switch and the target bottom switch provided in the present application. The processing device 300 determines to distribute all reduce traffic to the OXC for processing and distribute all to all traffic to the electrical switch for processing. For example, the processing device 300 determines to distribute all reduce traffic between the bottom switch 1, the bottom switch 2, the bottom switch 3, or the bottom switch 4 through the OXC. The processing device 300 determines to distribute all to all traffic between the bottom switch 1, the bottom switch 2, the bottom switch 3, or the bottom switch 4 through the electrical switch.
[0224] Finally, the processing device 300 determines the specific communication mode between the underlying switch, the electrical switch and the OXC according to the algorithm of the communication mode, so that multiple computing clusters connected by multiple underlying switches can communicate through the electrical switch and the OXC.
[0225] Regarding the processing device 300 establishing a distribution path between the target upper switch and the target lower switch according to the algorithm of the communication mode, reference may be made to the content of the first possible embodiment described above, which will not be described in detail here.
[0226] In a third possible embodiment, the Fig. 9The examples in which the models to be trained corresponding to the model training code are dense models and MoE models are used for explanation, that is, this embodiment is for establishing a distribution path in a multi-task (dense model and MoE model) parallel scenario.
[0227] First, the processing device 300 obtains the model training code input by the user, and parses the model training code to obtain the task attributes of the dense model and the MoE model, and then generates a node communication configuration file according to the task attributes.
[0228] The node configuration file includes: the types of models to be trained are 3D hybrid parallel dense model and MoE model, the cluster sizes are 2,000 and 2,000 respectively, the communication traffic process in the training phase and the algorithm of the communication mode.
[0229] For the communication flow process and communication mode algorithm in the training phase, please refer to the above Figure 4 and Figure 7 The contents shown will not be repeated here.
[0230] Secondly, the processing device 300 determines to allocate allreduce traffic in the dense model to OXC and p2p traffic in the dense model to the electrical switch according to the mapping relationship between the communication mode and the switch; determines to allocate allreduce traffic in the MoE model to OXC and all to all traffic in the MoE model to the electrical switch.
[0231] like Fig. 9 As shown, Fig. 9 Schematic diagram of the connection between the target upper switch and the target lower switch provided for this application Figure 3 . The processing device 300 determines to distribute the all reduce traffic of the dense model to OXC1 for processing, and distributes the p2p traffic of the dense model to the electrical switch 1 for processing. The OXC1 represents a group of OXCs, and the number of the OXCs in the group can be determined according to the size of the communication traffic, which is not repeated here. Similarly, the electrical switch 1 represents a group of electrical switches, and the number of the electrical switches in the group can be determined according to the size of the communication traffic, which is not repeated here. For example, the all reduce traffic between the underlying switch 1 and the underlying switch 2 is distributed through OXC1, and the p2p traffic between the underlying switch 1 and the underlying switch 2 is distributed through the electrical switch 1.
[0232] Furthermore, the processing device 300 distributes the all reduce traffic of the MoE model to OXC2 for processing, and distributes the all to all traffic of the MoE model to the electrical switch 2 for processing, wherein the OXC2 and OXC1 include different OXCs, and the electrical switch 2 and the electrical switch 1 include different electrical switches. For the description of OXC2 and the electrical switch 2, reference can be made to the contents of the above OXC1 and the electrical switch 1, which will not be described in detail here. For example, the all reduce traffic between the bottom layer switch 2 and the bottom layer switch 4 is distributed through OXC2, and the all to all traffic between the bottom layer switch 2 and the bottom layer switch 4 is distributed through the electrical switch 2.
[0233] In the present application, the processing device 300 distributes the communication modes of different models during the training process by using different switches, thereby isolating the communication traffic of the communication mode of each model from each other, avoiding data distribution errors or congestion problems that may occur when the same switch processes the communication traffic of the communication modes of different models, which is beneficial to improving the accuracy and efficiency of model training.
[0234] Finally, the processing device 300 determines the specific communication mode between the bottom layer switch, the electrical switch and the OXC according to the algorithm of the communication mode.
[0235] For the processing device 300 to determine the specific communication mode between the bottom switch, the electrical switch and the OXC according to the algorithm of the communication mode, reference may be made to the content of the first possible embodiment, which will not be described in detail here.
[0236] In a possible scenario, the processing device 300 may determine the number of switches required to process the communication traffic corresponding to the communication mode according to the size of the communication traffic.
[0237] For p2p traffic in the dense model and all-to-all traffic in the MoE model, although the traffic of both communication modes is allocated to the electrical switches for processing, since p2p traffic is generally small, more electrical switches can be used to process all-to-all traffic.
[0238] In one possible implementation, the processing device 300 may first determine the number of electrical switches for all-to-all traffic in the MoE model, and then determine the number of electrical switches for p2p traffic in the dense model.
[0239] In another possible implementation, the processing device 300 may determine the number of electrical switches required for all-to-all traffic in the MoE model and the number of electrical switches required for p2p traffic in the dense model in real time according to the size of the communication traffic during the training process.
[0240] In a possible example, the processing device 300 may determine the number of electrical switches required for the communication traffic corresponding to the communication mode according to the ratio of the communication traffic size to the maximum traffic size that can be distributed by an electrical switch. In other words, the aforementioned ratio is the number of electrical switches required.
[0241] The above embodiments should not be understood as limitations of the present application. In other embodiments of the present application, the recommendation model (deep learning recommendation model, DLRM) can also be trained. The communication traffic corresponding to the communication mode of the DLRM is mainly concentrated in the query of the embedding table, mainly all to all. Therefore, for the content of this embodiment, reference can be made to the contents of the above-mentioned second possible embodiment and the third possible embodiment, which will not be repeated here.
[0242] It is understandable that, in order to implement the functions in the above-mentioned embodiments, the processing device 300 includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0243] Combined with the above Figures 2a to 9 , describes in detail the management method of the data transmission path provided by the present application, and will be combined with Fig.10a , Fig.10a This is a schematic diagram of the structure of a management platform provided by the present application, describing the management platform provided by the present application. The management platform 1000 can be used to implement the functions of the processing device 300 in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment.
[0244] like Fig.10a As shown, the management platform 1000 includes an acquisition module 1010, a parsing module 1020 and a first determination module 1030. The management platform is used to manage infrastructure, in which a first computing cluster and a second computing cluster are provided, the first computing cluster is connected to a first bottom-layer switch, the second computing cluster is connected to a second bottom-layer switch, the first bottom-layer switch and the second bottom-layer switch are connected via a first upper-layer switch or a second upper-layer switch, wherein the first upper-layer switch and the second upper-layer switch are upper-layer switches of different types. The management platform 1000 is used to implement the above Figures 2a to 9The corresponding method embodiment processes the function of the device 300. In a possible example, the specific process of the management platform 1000 for implementing the above-mentioned data transmission path management method includes the following process:
[0245] The acquisition module 1010 is used to acquire a computing task, where the computing task includes at least one subtask.
[0246] The parsing module 1020 is used to parse the computing task and obtain the task attributes of the computing task. The task attributes include the communication mode of each subtask, and the communication mode is used to indicate the communication characteristics when the first computing cluster and the second computing cluster execute the corresponding subtask.
[0247] The first determination module 1030 is used to determine, according to the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask, wherein the first upper layer switch and the second upper layer switch are used to process one or more types of communication modes.
[0248] To further achieve the above Figures 2a to 9 The present application also provides a management platform, wherein the infrastructure managed by the management platform is also provided with a third upper layer switch, the third upper layer switch is of the same type as the first upper layer switch, and the first bottom layer switch and the second bottom layer switch are also connected via the third upper layer switch. Fig.10b As shown, Fig.10b This is a second structural diagram of a management platform provided in the present application. The management platform 1000 also includes: a second determination module 1040.
[0249] Among them, when the communication mode of the first subtask in the computing task is a changing communication mode, the second determination module 1040 is used to determine the target upper-layer switch for executing the first subtask in the first upper-layer switch and the third upper-layer switch according to the communication flow of the first subtask, wherein the sum of the maximum distributable flows of the target upper-layer switches is greater than or equal to the communication flow of the first subtask.
[0250] Among them, the acquisition module 1010, the analysis module 1020, the first determination module 1030, and the second determination module 1040 can all be implemented by software, or can be implemented by hardware. Exemplarily, the implementation of the acquisition module 1010 is described below by taking the acquisition module 1010 as an example. Similarly, the implementation of the analysis module 1020, the first determination module 1030, and the second determination module 1040 can refer to the implementation of the acquisition module 1010.
[0251] As an example of a software functional unit, the acquisition module 1010 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 1010 may include code running on multiple hosts / virtual machines / containers.
[0252] It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Generally, a region can include multiple AZs.
[0253] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0254] As an example of a hardware functional unit, the acquisition module 1010 may include at least one computing device, such as a server, etc. Alternatively, the acquisition module 1010 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0255] The multiple computing devices included in the acquisition module 1010 can be distributed in the same region or in different regions. The multiple computing devices included in the acquisition module 1010 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the acquisition module 1010 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0256] It should be noted that, in other embodiments, the acquisition module 1010 can be used to execute any step in the method for managing a data transmission path, the parsing module 1020 can be used to execute any step in the method for managing a data transmission path, and the first determination module 1030 can be used to execute any step in the method for managing a data transmission path. The steps that the acquisition module 1010, the parsing module 1020, and the first determination module 1030 are responsible for implementing can be specified as needed, and the acquisition module 1010, the parsing module 1020, and the first determination module 1030 respectively implement different steps in the method for managing a data transmission path to realize all functions of the management platform 1000.
[0257] It is worth noting that the processing device 300 of the aforementioned embodiment may correspond to the management platform 1000, and may correspond to executing the method according to the embodiment of the present application. Figures 2a to 9 The corresponding corresponding subjects, and the operations and / or functions of each module in the management platform 1000 are respectively to achieve Figures 2a to 9 For the sake of brevity, the corresponding processes of each method in the corresponding embodiments are not repeated here.
[0258] in addition, Fig.10a or Fig.10b The management platform 1000 shown may also be implemented through a communication device, where the communication device may refer to the processing device 300 in the aforementioned embodiment, or, when the communication device is a chip or a chip system applied to a processing device, the management platform 1000 may also be implemented through the chip or the chip system.
[0259] An embodiment of the present application also provides a chip system, which includes a control circuit and an interface circuit. The interface circuit is used to obtain a construction instruction, and the control circuit is used to implement the function of the processing device in the above method according to the construction instruction.
[0260] In a possible design, the chip system further includes a memory for storing program instructions and / or data. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0261] The present application also provides a computing device. Fig.11 As shown, Fig.11 The present application provides a schematic diagram of a computing device structure, wherein the computing device 1100 includes: a bus 1102, a processor 1104, a memory 1106, and a communication interface 1108. The processor 1104, the memory 1106, and the communication interface 1108 communicate with each other through the bus 1102. The computing device 1100 may be a server or a terminal device, and the computing device 1100 may be the above-mentioned processing device 300. It is worth noting that the present application does not limit the number of processors and memories in the computing device 1100.
[0262] The bus 1102 may be, but is not limited to: a PCIe bus, a universal serial bus (USB), or an inter-integrated circuit bus (I2C), an EISA bus, an UB, a CXL, a CCIX, etc. The bus 1102 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 The bus 1102 may include a path for transmitting information between various components of the computing device 1100 (eg, the memory 1106, the processor 1104, and the communication interface 1108).
[0263] The processor 1104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0264] The memory 1106 may include a volatile memory, such as a random access memory (RAM). The memory 1106 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0265] The memory 1106 stores executable codes, and the processor 1104 executes the executable codes to respectively implement the functions of the aforementioned acquisition module 1010, the parsing module 1020, and the first determination module 1030, thereby implementing the data transmission path management method. That is, the memory 1106 stores instructions for executing the data transmission path management method.
[0266] The communication interface 1108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1100 and other devices or a communication network.
[0267] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device, which can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0268] like Fig.12 As shown, Fig.12 The schematic diagram of the structure of a computing device cluster provided by the present application includes at least one computing device 1100. The memory 1106 in one or more computing devices 1100 in the computing device cluster may store the same instructions for executing the method for managing a data transmission path.
[0269] In some possible implementations, the memory 1106 of one or more computing devices 1100 in the computing device cluster may also store partial instructions for executing the method for managing the data transmission path. In other words, the combination of one or more computing devices 1100 may jointly execute instructions for executing the method for managing the data transmission path.
[0270] It should be noted that the memory 1106 in different computing devices 1100 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the management platform. That is, the instructions stored in the memory 1106 in different computing devices 1100 can implement the functions of one or more modules in the acquisition module 1010, the analysis module 1020 and the first determination module 1030.
[0271] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.13 A possible implementation is shown. Fig.13 As shown, Fig.13A schematic diagram of a connection between computing devices provided in the present application, wherein two computing devices 1100A and 1100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1106 in the computing device 1100A stores instructions for executing the functions of the acquisition module 1010. At the same time, the memory 1106 in the computing device 1100B stores instructions for executing the functions of the parsing module 1020 and the first determination module 1030.
[0272] Fig.13 The connection method between the computing device clusters shown can be that considering that the data transmission path management method provided in this application requires model training code, it is considered that the functions implemented by the parsing module 1020 and the first determination module 1030 are handed over to the computing device 1100B for execution.
[0273] It should be understood that Fig.13 The functions of the computing device 1100A shown in FIG. 1100A may also be completed by multiple computing devices 1100. Similarly, the functions of the computing device 1100B may also be completed by multiple computing devices 1100.
[0274] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes a method for managing a data transmission path.
[0275] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute a method for managing a data transmission path.
[0276] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0277] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for managing a data transmission path, characterized in that: The method is applied to a management platform, the management platform is used to manage infrastructure, the infrastructure is provided with a first computing cluster and a second computing cluster, the first computing cluster is connected to a first bottom layer switch, the second computing cluster is connected to a second bottom layer switch, the first bottom layer switch and the second bottom layer switch are connected via a first upper layer switch or a second upper layer switch, wherein the first upper layer switch and the second upper layer switch are of different types, the method comprising: Acquire a computing task, wherein the computing task includes at least one subtask; Parsing the computing task to obtain task attributes of the computing task, wherein the task attributes include a communication mode for each subtask, and the communication mode is used to indicate characteristics of communication between the first computing cluster and the second computing cluster when executing the corresponding subtask; According to the task attributes, it is determined that when executing each subtask, the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch, wherein the first upper layer switch and the second upper layer switch are used to process one or more types of communication modes.
2. The method according to claim 1, characterized in that: The first upper layer switch is an electrical switch, and the second upper layer switch is an optical switch.
3. The method according to claim 1 or 2, characterized in that: The communication mode includes a predictable communication mode and / or a variable communication mode, the predictable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable when executing a subtask, and the variable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is variable when executing a subtask, wherein the first upper-layer switch is used to process the variable communication mode, and the second upper-layer switch is used to process the predictable communication mode.
4. The method according to claim 3, characterized in that: The task attributes also include a communication traffic process, which includes serial execution or parallel execution. The serial execution is used to indicate that the first subtask and the second subtask in the at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed simultaneously.
5. The method according to claim 4, characterized in that The communication mode also includes a point-to-point communication mode, and the point-to-point communication mode is used to indicate that the first computing cluster and the second computing cluster communicate directly.
6. The method according to claim 5, characterized in that When the communication traffic process is executed in parallel, the first subtask is the variable communication mode and the second subtask is the predictable communication mode, determining, according to the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask, includes: Determine that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the first upper layer switch; Determine that when executing the second subtask, the first computing cluster and the second computing cluster communicate through the second upper layer switch.
7. The method according to claim 5, characterized in that When the communication traffic process is executed in parallel, the first subtask is the predictable communication mode and the second subtask is the point-to-point communication mode, determining, according to the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask, includes: Determine that when executing the first subtask, the first computing cluster and the second computing cluster communicate through the second upper layer switch; Determine that when executing the second subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch.
8. The method according to any one of claims 3 to 7, characterized in that: The infrastructure is further provided with a third upper switch, the third upper switch is of the same type as the first upper switch, the first bottom switch and the second bottom switch are further connected through the third upper switch, and when the communication mode of the first subtask in the computing task is the changed communication mode, determining, according to the task attribute, that the first computing cluster and the second computing cluster communicate through the first upper switch or the second upper switch when executing each subtask, includes: It is determined that when executing each of the subtasks, the first computing cluster and the second computing cluster communicate with each other through the first upper layer switch and the third upper layer switch.
9. The method according to claim 8, characterized in that The task attributes further include the communication traffic of the first subtask, and the method further includes: According to the communication flow of the first subtask, a target upper-layer switch for executing the first subtask in the first upper-layer switch and the third upper-layer switch is determined, wherein a sum of maximum distributable flows of the target upper-layer switches is greater than or equal to the communication flow of the first subtask.
10. The method according to any one of claims 1 to 9, characterized in that The computing task includes a specification document, and the parsing of the computing task to obtain the task attributes of the computing task includes: The specification document is parsed to obtain the task attributes of the computing task, wherein the specification document includes one or more of the model type required to be trained, the number of processing devices required to perform the task, the communication flow process, and the communication algorithm adopted by the communication mode.
11. A management platform, characterized in that: The management platform is used to manage infrastructure, wherein a first computing cluster and a second computing cluster are provided in the infrastructure, wherein the first computing cluster is connected to a first bottom layer switch, and the second computing cluster is connected to a second bottom layer switch, and the first bottom layer switch and the second bottom layer switch are connected via a first upper layer switch or a second upper layer switch, wherein the first upper layer switch and the second upper layer switch are of different types, and the management platform includes: An acquisition module, used for acquiring a computing task, wherein the computing task includes at least one subtask; A parsing module, used to parse the computing task to obtain task attributes of the computing task, wherein the task attributes include a communication mode of each subtask, and the communication mode is used to indicate the characteristics of communication between the first computing cluster and the second computing cluster when executing the corresponding subtask; A first determination module is used to determine, based on the task attributes, that the first computing cluster and the second computing cluster communicate through the first upper layer switch or the second upper layer switch when executing each subtask, wherein the first upper layer switch and the second upper layer switch are used to process one or more types of communication modes.
12. The management platform according to claim 11, characterized in that: The first upper layer switch is an electrical switch, and the second upper layer switch is an optical switch.
13. The management platform according to claim 11 or 12, characterized in that: The communication mode includes a predictable communication mode and / or a variable communication mode, the predictable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is predictable when executing a subtask, and the variable communication mode is used to indicate that the communication between the first computing cluster and the second computing cluster is variable when executing a subtask, wherein the first upper-layer switch is used to process the variable communication mode, and the second upper-layer switch is used to process the predictable communication mode.
14. The management platform according to claim 13, characterized in that: The task attributes also include a communication traffic process, which includes serial execution or parallel execution. The serial execution is used to indicate that the first subtask and the second subtask in the at least one subtask are performed sequentially, and the parallel execution is used to indicate that the first subtask and the second subtask are performed simultaneously.
15. The management platform according to claim 14, characterized in that: The communication mode also includes a point-to-point communication mode, and the point-to-point communication mode is used to indicate that the first computing cluster and the second computing cluster communicate directly.
16. The management platform according to claim 15, characterized in that: When the communication traffic process is executed in parallel, the first subtask is the changing communication mode and the second subtask is the predictable communication mode, the first determination module is specifically used to determine that when the first subtask is executed, the first computing cluster and the second computing cluster communicate through the first upper-layer switch; and determine that when the second subtask is executed, the first computing cluster and the second computing cluster communicate through the second upper-layer switch.
17. The management platform according to claim 15, characterized in that: When the communication traffic process is executed in parallel, the first subtask is the predictable communication mode and the second subtask is the point-to-point communication mode, the first determination module is specifically used to determine that when the first subtask is executed, the first computing cluster and the second computing cluster communicate through the second upper-layer switch; and determine that when the second subtask is executed, the first computing cluster and the second computing cluster communicate through the first upper-layer switch.
18. The management platform according to any one of claims 13 to 17, characterized in that: A third upper-layer switch is also provided in the infrastructure, and the third upper-layer switch is of the same type as the first upper-layer switch. The first underlying switch and the second underlying switch are also connected through the third upper-layer switch. When the communication mode of the first subtask in the computing task is the changed communication mode, the first determination module is specifically used to determine that when executing each subtask, the first computing cluster and the second computing cluster communicate through the first upper-layer switch and the third upper-layer switch.
19. The management platform according to claim 18, characterized in that: The task attributes also include the communication traffic of the first subtask, and the management platform further includes: a second determination module; The second determining module is used to determine, according to the communication flow of the first subtask, a target upper-layer switch for executing the first subtask among the first upper-layer switch and the third upper-layer switch, wherein the sum of the maximum distributable flows of the target upper-layer switches is greater than or equal to the communication flow of the first subtask.
20. The management platform according to any one of claims 11 to 19, characterized in that: The computing task includes a specification document, and the parsing module is specifically used to parse the specification document to obtain the task attributes of the computing task. The specification document includes one or more of the model type required to be trained, the number of processing devices required to perform the task, the communication traffic process, and the communication algorithm adopted by the communication mode.
21. A hybrid network management system, characterized in that: The system comprises: A first computing cluster, wherein the first computing cluster is connected to a first underlying switch; a second computing cluster, the second computing cluster being connected to a second underlying switch; a first upper layer switch, wherein the first upper layer switch is connected to the first bottom layer switch and the second bottom layer switch respectively; a second upper layer switch, the second upper layer switch being connected to the first bottom layer switch and the second bottom layer switch respectively; A management platform, the management platform is used to obtain a computing task, parse the computing task to obtain a task attribute of the computing task, and determine, based on the task attribute, whether the first computing cluster and the second computing cluster communicate through the first upper-layer switch or the second upper-layer switch when executing each subtask of at least one subtask included in the computing task; wherein the task attribute includes a communication mode for each subtask, the communication mode is used to indicate a feature of communication between the first computing cluster and the second computing cluster when executing a corresponding subtask, and the first upper-layer switch and the second upper-layer switch are used to process one or more types of communication modes.
22. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 10.
23. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 10.
24. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 10.