Optical network interconnection heterogeneous GPU cluster distributed training pipeline arrangement method and system
By optimizing pipeline layout using a genetic algorithm based on optical path awareness, the dual constraints of geographically distributed optical networks and heterogeneous GPU clusters are solved, enabling efficient pipeline parallel training layout, reducing iteration time and bubble rate, and improving training efficiency.
Patent Information
- Application Number
- CN202611269833.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-27
AI Technical Summary
Existing pipeline parallel deployment optimization techniques cannot simultaneously adapt to the dual constraints of geographically distributed optical networks and heterogeneous GPU clusters, making it difficult to balance computation latency, cross-domain communication latency, and pipeline bubble rate.
A genetic algorithm with optical path awareness is adopted to jointly model the computing power differences of heterogeneous GPU clusters and the communication status of cross-data center optical network interconnection. Combined with PP scheduling task dependency graph and optical network simulation, the layout of each stage of the pipeline is optimized. The optical path penalty coefficient is constructed to guide the adjustment of the genetic algorithm and optimize the pipeline layout scheme.
It achieves globally optimal pipeline layout in heterogeneous GPU clusters and dynamic optical network environments, reducing iteration time and hardware idle bubbles, and improving training efficiency and versatility.
Smart Images

Figure CN123185476A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and distributed computing power scheduling technology, specifically, to a method and system for arranging distributed training pipelines on heterogeneous GPU clusters interconnected by optical networks. More particularly, it relates to a method for arranging the parallel stages of a pipeline for training geographically distributed large language models via optical networks on a heterogeneous GPU cluster. Background Technology
[0002] As the number of parameters in Large Language Models (LLMs) continues to increase, the GPU memory of a single server cannot handle the full model weights and gradients. Pipeline parallelism has become the mainstream solution for layered training of models. Due to differences in computing power deployment locations and hardware iterations, large-scale training computing power generally adopts a geographically distributed architecture where multiple data centers are interconnected via optical transmission networks (DC-OTN). Furthermore, the GPU models and computing power performance within each data center exhibit significant heterogeneity. In geographically distributed optical network training scenarios, allocating different computing power GPUs at each stage of the pipeline and occupying cross-data center optical paths directly alters computation time and cross-domain communication latency. The combined effect of these two factors generates numerous pipeline bubbles, significantly lengthening the training time for each iteration. Therefore, it is crucial to simultaneously consider the heterogeneous GPU computing power differences and the dynamic optical path status of the optical network, and to globally optimize the pipeline's layout at each stage to reduce the bubble rate and improve training throughput.
[0003] Current research on parallel scheduling of distributed large-scale model pipelines mainly falls into three technical categories: First, scheduling schemes for heterogeneous GPU clusters within a single data center do not consider cross-data center network communication, making them unsuitable for geographically distributed training scenarios. For example, the paper "Heterogeneity-aware cluster scheduling policies for deep learning workloads," published in the 2020 "14th USENIX Symposium on Operating Systems Design and Implementation (OSDI '20)," only addresses task load balancing for hybrid GPU resources within a local single data center, allocating computing tasks based on different GPU computing power. However, this scheme only covers computing power scheduling within a local area network and does not model constraints such as optical transmission links, optical path spectrum allocation, and communication latency between cross-regional data centers, making it completely unsuitable for geographically distributed cross-DC pipeline parallel deployment scenarios.
[0004] Secondly, optimization schemes for cross-datacenter pipeline parallel scheduling focus on homogeneous GPU clusters, neglecting GPU heterogeneity and dynamic routing states of optical networks. For example, the paper "CrossPipe: Towards optimal pipelineschedules for cross-datacenter training," published in July 2025 at the "2025 USENIX Annual Technical Conference (ATC '25)," optimizes pipeline parallel processes across multiple data centers by modeling cross-domain communication latency to generate a 1F1B pipeline scheduling sequence, reducing waiting overhead from micro-batch transmissions. However, this scheme presupposes that all data center GPU hardware is completely homogeneous, failing to consider the differences in computing speed between different GPU models. When heterogeneous computing power exists in the cluster, faster GPUs will continuously wait for slower GPUs to complete their stage calculations, generating numerous computing power bubbles and failing to achieve matching optimization for heterogeneous hardware.
[0005] Third, the pipelined parallel training scheme for interconnected data centers using optical networks is also limited to homogeneous GPU clusters, without addressing the joint optimization of heterogeneous GPU allocation and optical network status. For example, the paper "Execution-delay-balanced pipeline-parallelism-based distributed model training for artificial intelligence data centers interconnected by optical networks," published in the "IEEE Internet of Things Journal," introduces physical layer parameters such as optical network routing, spectrum fragmentation, and link occupancy to optimize cross-DC optical path resource allocation. However, this scheme also limits the cluster GPUs to homogeneous hardware, failing to establish a binding optimization logic between the pipeline stage and heterogeneous GPUs, and thus cannot simultaneously balance computational latency and optical path communication overhead.
[0006] In addition, existing intelligent optimization algorithms for pipeline layout (traditional genetic algorithms and greedy algorithms) generally lack the ability to perceive the underlying optical network: they only use iteration time as a single optimization index, do not quantify the optical path blocking rate and the degree of spectrum fragmentation to construct penalty feedback, and randomly select pipeline adjustment sites for crossover and mutation operations. The algorithms have slow convergence speed, are prone to generating suboptimal layout schemes that occupy highly congested optical paths, and are difficult to adapt to dynamic optical network environments.
[0007] In summary, current pipeline parallel deployment optimization techniques cannot simultaneously adapt to the dual constraints of geographically distributed optical networks and heterogeneous GPU clusters, making it difficult to balance the three core metrics of computation latency, cross-domain communication latency, and pipeline bubble rate.
[0008] Therefore, there is an urgent need in the market for a pipeline parallel layout optimization method that combines optical path sensing and heterogeneous computing power joint modeling. Through integrated layout coding and optical path penalty-guided genetic algorithms, the global optimal deployment of large model training pipelines can be achieved, reducing iteration time and hardware idle bubbles. Summary of the Invention
[0009] To address the shortcomings of existing technologies, the present invention aims to provide a method and system for distributed training pipeline deployment of heterogeneous GPU clusters in optical network interconnection. It seeks to solve the problems that existing PP scheduling optimization is limited to a single dimension, failing to simultaneously characterize the relationship between deployment strategies and heterogeneous computing power allocation strategies. Furthermore, existing pipeline deployment algorithms either lack awareness of the underlying optical network state on the training side, or can only partially perceive changes in network state as training completes, failing to fully characterize the impact of pipeline deployment changes on communication requirements in the optical network.
[0010] A method for arranging a distributed training pipeline for a heterogeneous GPU cluster interconnected by an optical network, provided by the present invention, includes: Step S1: Generate an initial pipeline stage layout candidate set based on the given initial input information, as the initial population; Step S2: Generate a PP scheduling task dependency graph for each candidate pipeline layout in the pipeline stage layout candidate set, distinguish between computation tasks and cross-datacenter communication tasks, and establish task execution dependencies; Step S3: Couple the LLM training simulation module and the optical network simulation module to carry out joint simulation, simulate the complete training iteration for each layout scheme, output the total duration of a single iteration, the pipeline bubble rate, and record the dynamic state information of all optical paths; Step S4: Calculate the penalty coefficient for each optical path based on the dynamic state information; Step S5: Calculate the fitness of each layout scheme by combining the total duration of a single iteration with the pipeline bubble rate, and save the current optimal layout scheme; Step S6: Construct a nonlinear exponential probability distribution based on the optical path penalty coefficient, guide the crossover and mutation operators of the genetic algorithm to preferentially adjust the pipeline stage positions corresponding to the high-penalty optical paths, and iteratively update the population; Repeat steps S2 to S6 until the convergence condition or the maximum number of iterations is met, and output the globally optimal pipeline layout scheme.
[0011] Preferably, the initial input information includes parameters of the large model to be trained, heterogeneous GPU cluster configuration, and optical network topology coding.
[0012] Preferably, the PP scheduling task dependency graph is generated using a forward-backward 1F1B scheduling logic.
[0013] Preferably, step S3 includes: When simulating the execution of a computational task, the simulation platform will adjust the resource allocation of the corresponding GPU and advance the time accordingly on the simulation timeline based on the type of GPU assigned to the task and the estimated computation time. When simulating the execution of a communication task, which represents an activation value or gradient transmission request across data centers, the optical network simulation serves the transmission request through routing and spectrum allocation strategies, calculates the time consumption of the communication task, advances the corresponding time on the simulation timeline, and updates the dynamic state information of the optical paths used.
[0014] Preferably, the routing and spectrum allocation strategy is implemented by combining the K-shortest path routing algorithm with the first-hit spectrum allocation mechanism; The time T consumed by the computational communication task comm The calculation is performed using a dynamic α-β communication model, as shown in the following formula: T comm = α + β
[0015]
[0016] In the formula, α represents the transmission delay, and β represents the bandwidth delay. The total length of the selected optical path. The speed at which light travels in an optical fiber. The time required for optical-to-electrical-to-optical conversion at all intermediate nodes along the transmission path; The total amount of data to be transmitted. It is the dynamically changing equivalent bandwidth.
[0017] Preferably, the penalty coefficient of the optical path is a fusion of network layer physical characteristics such as the average normalized communication overhead, spectrum fragmentation degree, and occupancy rate of each communication in a training round for each optical path, and the calculation formula is as follows:
[0018] in Indicates the optical path The corresponding penalty coefficient, This represents the normalized optical path cost, calculated from the communication model, which is proportional to the total transmission delay. This indicates the total traffic blocking rate of the optical path. This indicates the total spectrum occupancy rate of the optical path.
[0019] Preferably, the fitness calculation formula is as follows:
[0020] in For arrangement fitness For a single round of iterative training time, For single-round iteration PP bubble rate, This is the control factor.
[0021] Preferably, in step S6, the genetic algorithm uses a tournament selection mechanism to screen parent individuals; At the same time, a uniform random mutation threshold is set to perform uniform crossover mutation with a fixed low probability of deviating from the optical path penalty probability distribution, so as to maintain population diversity and avoid local optima.
[0022] A distributed training pipeline deployment system for heterogeneous GPU clusters interconnected by optical networks, provided by the present invention, includes: Module M1: Generates an initial set of candidate pipeline stage layout schemes based on the given initial input information, serving as the initial population; Module M2: Generates a PP scheduling task dependency graph for each candidate pipeline layout in the pipeline stage layout candidate set, distinguishes between computation tasks and cross-datacenter communication tasks, and establishes task execution dependencies; Module M3: Couples the LLM training simulation module and the optical network simulation module to perform joint simulation, simulates a complete training iteration for each layout scheme, outputs the total duration of a single iteration and the pipeline bubble rate, and records the dynamic state information of all optical paths; Module M4: Calculates the penalty coefficient for each optical path based on the dynamic state information; Module M5: Combines the total duration of a single iteration with the pipeline bubble rate to calculate the fitness of each layout scheme and saves the current optimal layout scheme; Module M6: Constructs a nonlinear exponential probability distribution based on the optical path penalty coefficient, guiding the crossover and mutation operators of the genetic algorithm to preferentially adjust the pipeline stage positions corresponding to high-penalty optical paths, and iteratively update the population; Repeatedly trigger modules M2 through M6 until the convergence condition or the maximum number of iterations is met, and output the globally optimal pipeline layout scheme.
[0023] Preferably, the initial input information includes parameters of the large model to be trained, heterogeneous GPU cluster configuration, and optical network topology coding; The PP scheduling task dependency graph is generated using a 1F1B scheduling logic with one forward and one reverse direction.
[0024] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention adopts a joint modeling approach to incorporate the computing power differences of heterogeneous GPU clusters and the communication status of cross-data center optical network interconnection into the same optimization objective. It also couples the data center layout location of each stage of PP (Pipeline Parallelism) with the GPU type allocated in that stage into a unified layout scheme for optimization. Combined with existing pipeline scheduling schemes, it can accurately characterize the overlapping relationship between communication latency between data centers and execution latency of heterogeneous GPUs, making the layout scheme highly consistent with the real scenario of geographically distributed heterogeneous training.
[0025] 2. This invention employs an optical path-aware genetic algorithm to construct an exponential probability distribution based on the optical path parameters recorded in each training simulation. This distribution guides the genetic algorithm to prioritize the PP sites corresponding to more congested optical paths for adjustment, thereby coupling the underlying optical network with the previous training task. This actively avoids highly congested and fragmented optical paths, improving the algorithm's convergence speed.
[0026] 3. This invention is adaptable to different parameter scale models, different optical network topologies, and different heterogeneous GPU configurations, and has strong versatility. Attached Figure Description
[0027] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the PP arrangement based on the optical interconnect of a heterogeneous GPU cluster provided in an embodiment of the present invention; Figure 2 A schematic diagram of the PP arrangement algorithm based on optical path perception provided in an embodiment of the present invention; Figure 3 This is a comparison chart of the test results of the present invention on different network topologies (NSFNET and USNET) and different models (LLaMA-7B, 13B and 34B). Detailed Implementation
[0028] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0029] This invention proposes a Lightpath-Aware Genetic Algorithm (LA-GA) to optimize the pipeline arrangement problem in distributed training pipeline parallelism (PP) of Large Language Models (LLMs) on heterogeneous graphics processing unit (GPU) clusters interconnected by optical networks. This method reduces pipeline bubbles and optimizes batch training time by jointly considering the GPU heterogeneity of each data center (DC), the heterogeneity of data center interconnect (DCI) links, and routing and wavelength allocation in the optical network.
[0030] It should be noted that the embodiments of the present invention aim to solve the problem of how to efficiently perform distributed training of large language models in geographically dispersed, interconnected heterogeneous computing clusters containing different types of graphics processing units. The core challenge lies in the fact that pipeline parallelism is a common method for splitting large models, but the placement of each stage in the pipeline on which type of graphics processing unit in which data center it is located will simultaneously affect both the computation time and the communication time between data centers. For example... Figure 1 As shown, Figure 1 (a) and (b) in the figure show an example of a 1F1B PP layout on a heterogeneous GPU cluster in a multi-data center from a computing and communication perspective, and the impact of different layouts on training time. Figure 1 Figure (c) shows examples of different PP layout schemes from the perspective of DCI. An unreasonable layout scheme will cause faster graphics processing units to wait for slower graphics processing units or for cross-regional data transmission to complete, resulting in a large number of pipeline bubbles, i.e., idle time of graphics processing units, which will seriously reduce training efficiency.
[0031] Example 1 The present invention provides a method for arranging a distributed training pipeline for a heterogeneous GPU cluster interconnected by an optical network, such as... Figure 2 As shown, it includes: Step S1: Initialize pipeline layout. Based on the given initial input information, an initial pipeline stage layout candidate set is generated. This candidate set is referred to as the initial population in the genetic algorithm. The initial input information includes the parameters of the large language model (LLM) to be trained, such as the model name, total number of parameters, and pipeline parallelism dimension (i.e., the number of pipeline stages the model needs to be divided into); the configuration information of the heterogeneous GPU cluster, including the geographical distribution of all data centers, the available graphics processing unit models and their quantities and computing power performance parameters in each data center; and the topology of the underlying optical network, including the connection relationships between nodes (data centers) and edges (fiber optic links), the physical length of each link, and the total available spectrum resources.
[0032] Each candidate scheme in the candidate set corresponds to an individual in the genetic algorithm, representing a complete and valid arrangement scheme. In a specific implementation of this invention, an arrangement scheme (individual) is encoded as an integer sequence or a more complex data structure. This encoding structure must uniquely define the mapping relationship between each stage of the pipeline and a specific data center and a specific type of GPU within that data center. For example, for an 8-stage pipeline and 3 data centers (each data center has 2 types of GPUs), an individual can be a sequence of length 8, where each element of the sequence is a tuple (DC). id GPU type_id This is used to characterize the deployment location and hardware type used in this phase. The initial population can be generated completely randomly, as long as each generated scheme is legal (e.g., the selected graphics processing unit actually exists). The population size is a configurable parameter, for example, it can be set to 20 individuals.
[0033] Step S2: Generate pipeline schedule. A PP scheduling task dependency graph is generated for each candidate pipeline layout in the pipeline stage layout candidate set to determine the computation order and computational load of each pipeline stage. The scheduling dependency graph is then remapped to the corresponding layout to derive the cross-DC communication requirements between adjacent stages.
[0034] As a preferred implementation, the scheduling task dependency graph is generated based on a One ForwardOne Backward (1F1B) scheduling logic. 1F1B is a pipeline scheduling strategy designed to reduce pipeline bubbles by overlapping forward computation, backward computation, and communication. Specifically, its generation process is as follows: First, a training iteration is divided into multiple micro-batches. For each micro-batch, a forward computation task and a backward computation task are generated at each stage of the pipeline. Subsequently, the dependencies between these tasks are established according to the rules of 1F1B: 1. For any micro-batch, during forward propagation, computation must be completed in stage i before computation can begin in stage i+1, thus establishing a series of dependency edges between forward computation tasks in adjacent stages. 2. For any micro-batch, its backward computation task in stage i must wait for the completion of its forward computation task in stage i before it can begin. 3. For any micro-batch, during backpropagation, computation must be completed in stage i+1 before computation can begin in stage i. This establishes another series of dependency edges between the backpropagation tasks of adjacent stages. 4. When two adjacent stages (e.g., stage i and stage i+1) are deployed in different data centers, the data transfer between them (activation values from forward propagation or gradients from backpropagation) is modeled as a communication task. This communication task is inserted between the corresponding GPU computation tasks, becoming a node in the dependency graph. For example, after the forward computation task of stage i is completed, it must pass through a communication task before its result can be used by the forward computation task of stage i+1.
[0035] Based on the above rules, a directed acyclic graph can be constructed for each layout scheme, which fully depicts the execution flow of all tasks. The attributes of the nodes in the graph also need to be determined. For computation task nodes, their execution time depends on the type of GPU allocated to that stage. This embodiment of the invention can utilize a pre-built computing power simulation model (e.g., through the AICB module in the open-source platform SimAI). This model can predict the time required to execute the computation task on the GPU based on parameters such as GPU model, model layer structure, and micro-batch size. For communication task nodes, their execution time is dynamic and depends on the real-time state of the underlying optical network. Therefore, only the dependency relationship is established in this step, and the specific execution time will be dynamically calculated in the next simulation step.
[0036] Step S3: LLM Training Simulation Evaluation. Step S3 evaluates the actual performance of each layout scheme in a highly simulated environment. This simulation platform couples the upper-level model training process simulation with the lower-level optical network dynamic simulation, enabling accurate simulation of complex interactions in the real world. Specifically, it consists of two coupled parts: LLM training simulation and optical network simulation. The main input parameters for the LLM training simulation are model name and parameter count, sequence length, data and model parallelism dimensions, and other parameters related to LLM distributed training. The main input parameters for the optical network simulation platform are network topology, transmission distance of each optical path, number of spectra, modulation method, polarization method, and other parameters.
[0037] For each individual arrangement scheme in the population, training is conducted on the simulation platform based on the PP scheduling task dependency graph generated in step S2 and the given cross-datacenter routing and spectrum allocation strategy. Specifically, when simulating the execution of a computation task, the simulation platform will allocate the corresponding GPU resources and advance the time according to the GPU type assigned to the task and the estimated computation time on the simulation time axis. When simulating the execution of a communication task, the task represents a cross-datacenter activation value or gradient transmission request. The optical network module in the simulation platform will handle this request. In a specific embodiment of the present invention, the routing and spectrum allocation strategy adopts the K-Shortest-Path (KSP) routing algorithm combined with the First-Fit (FF) spectrum allocation mechanism to serve the inter-level activation value or gradient transmission request. Specifically, when a data of size S needs to be transmitted from the source datacenter to the target datacenter, the system first uses the K-Shortest-Path algorithm to calculate K alternative physical optical paths, and then checks them one by one in order of shortest to longest path. For an optical path, the system uses a first-hit strategy to search for a continuous and sufficiently wide spectrum slot on that path to carry the data stream. Once the first optical path and spectrum resource that meet the conditions are found, they are immediately allocated to the communication request. If none of the K paths can satisfy the condition, the request is blocked.
[0038] Once the optical path and spectrum allocation are successful, the communication task time needs to be calculated. This embodiment of the invention uses a dynamic α-β communication model to calculate the communication time. Total communication time T comm It consists of two parts: T comm = α + β Here, α represents the transmission delay, which is mainly determined by the physical distance, and its calculation formula is:
[0039] in, The total length of the selected optical path. The speed at which light travels in an optical fiber. The time required for optical-electrical-optical conversion at all intermediate nodes along the transmission path.
[0040] The β term represents bandwidth delay, which is mainly determined by the amount of data transmitted and the available bandwidth. Its calculation formula is as follows:
[0041] in, The total amount of data to be transmitted. The equivalent bandwidth is dynamically changing and its value is not fixed. It depends on several dynamic factors, including but not limited to: the continuous spectrum resources available on the corresponding optical path, the actual number of allocated spectrum slots, the modulation and polarization methods, and the current actual link occupancy. It is understandable that higher-order modulation methods can accommodate more data within the same spectrum width, but require a higher signal-to-noise ratio; while a high link occupancy rate may lead to inter-channel interference, thereby reducing the equivalent bandwidth.
[0042] After calculating the communication time, the simulation platform advances the corresponding time on the timeline and updates the dynamic state information of the optical path used, such as increasing its spectral occupancy. The simulator platform processes all tasks in the dependency graph sequentially until a complete training iteration (forward and backward propagation of all micro-batches) is completed.
[0043] After the simulation, two key performance indicators can be obtained for the current layout scheme: total duration of a single iteration. (i.e., the total time required to complete all tasks) and pipeline bubble rate (That is, the proportion of the total idle waiting time of all graphics processing units to the total time). At the same time, throughout the simulation, detailed dynamic optical path status information, such as the number of times each optical path is used, the total communication overhead, the degree of spectrum fragmentation, and the service blocking rate due to insufficient resources, is also recorded for subsequent use.
[0044] Step S4: Calculate optical path feedback. Using the dynamic optical path state information extracted in step S3, construct and calculate the penalty coefficient for each optical path as feedback.
[0045] The penalty coefficient of the optical path Specifically, for each optical path, the average normalized communication overhead, spectrum fragmentation, and occupancy rate of each communication in a training round are mathematically integrated to construct a score that objectively reflects the cost carried by the optical path. The specific formula is:
[0046] in Indicates the optical path The corresponding penalty coefficient, This represents the normalized optical path cost, calculated from the communication model, which is proportional to the total transmission delay. This indicates the total traffic blocking rate of the optical path. This indicates the total spectrum occupancy rate of the optical path.
[0047] Step S5: Fitness Calculation and Optimal Layout Update. Combining the single-iteration training time and pipeline bubble rate obtained in Step S3, calculate the fitness of each pipeline stage layout scheme and record the scheme with the current optimal fitness.
[0048] The fitness of each individual layout scheme in each pipeline stage is calculated by jointly minimizing the single-round iteration time and bubble rate, as expressed by the formula:
[0049] in For arrangement fitness For a single round of iterative training time, For single-round iteration PP bubble rate, The fitness value is a control factor (e.g., 0.1 in this scheme) used to balance the importance of the two optimization objectives: iteration time and bubble rate. A smaller fitness value indicates more rational utilization of optical network resources under the current data center selection and GPU allocation, and less idle time for heterogeneous GPU computing power to wait for each other.
[0050] Step S6: Algorithm Iteration and Output. In each iteration of the algorithm, the algorithm will generate a new generation of potentially better arrangement schemes (offspring) through a series of genetic operators (selection, crossover, mutation).
[0051] First, individuals are selected as parents through a tournament mechanism. Specifically, this mechanism randomly selects several individuals (e.g., 2 or 4) from the current population to participate in a tournament. The individual with the lowest fitness value wins and is selected into the parent pool for subsequent breeding. This process is repeated until the size of the parent pool meets the requirements. This mechanism ensures that superior individuals have a higher probability of being selected, thereby passing on their superior genes to the next generation.
[0052] Subsequently, using the optical path penalty coefficients obtained in step S4, a probability distribution is constructed to guide the parent generation in crossover and mutation operations, thereby guiding the algorithm to select better optical paths and generate offspring. Specifically, the algorithm constructs a nonlinear exponential sampling distribution based on optical path penalty scores. For a layout scheme, each cross-data center communication involved corresponds to an optical path, i.e., a penalty coefficient. The algorithm maps these penalty coefficients through an exponential function, making the probability of selecting optical paths with high penalty coefficients much greater than that of optical paths with low penalty coefficients. When it is necessary to select a tangent point for a crossover operation or a site for a mutation operation, the algorithm will sample according to this non-uniform probability distribution. This means that pipeline stages (i.e., gene sites) associated with high-penalty (congestion) optical paths are more likely to be selected for adjustment. For example, if the optical path penalty coefficient traversed by communication from stage 3 to stage 4 in the layout scheme is extremely high, then during mutation, the deployment position (i.e., the corresponding gene) of stage 3 or stage 4 is very likely to be changed.
[0053] In this way, the search process of the genetic algorithm is no longer blind, but guided by the performance feedback of the underlying optical network, actively repairing the arrangement decisions that cause network congestion, thus enabling it to converge to a high-quality solution space more quickly. To maintain the diversity of the population and avoid getting trapped in local optima, the algorithm also sets a small probability threshold (e.g., 0.3), so that candidate individuals still have a small probability of undergoing crossover and mutation according to a uniform probability distribution.
[0054] New offspring are generated through crossover and mutation operations, and this process is repeated until the number of new offspring reaches a preset population size. Then, this new offspring replaces the old parent, completing one iteration. The entire process (steps S2 to S6) is repeated until a preset maximum number of iterations K (e.g., 30 generations) is reached, or the algorithm converges when the optimal fitness value no longer significantly improves over multiple generations. Finally, the algorithm outputs the best individual with the lowest fitness found throughout all iterations, which is the optimal pipeline parallel deployment scheme under the current input conditions.
[0055] Furthermore, simulation tests were conducted using this invention on different network topologies (NSFNET and USNET) and different models (LLaMA-7B, 13B, and 34B). The specific test process and parameters are as follows: Comparative experiments were conducted on three scale models—LLaMA-7B, LLaMA-13B, and LLaMA-34B—on two wide-area topologies: NSFNET (14 data center nodes) and USNET (24 data center nodes). The number of process steps (PPs) was set to 8 on NSFNET, with micro-batch sizes of 8 / 16 / 24; the number of PPs was set to 12 on USNET, with micro-batch sizes of 12 / 24 / 36, for a total of 18 configurations. The data parallelism (DP) was set to 8, the sequence length to 4096, and the cross-PP stage transmission volume was determined by the hidden layer dimension, the number of model layers, and the PP dimension. Each data center was configured with heterogeneous H100 / A100 GPUs. On the optical network side, each fiber was divided into 80 spectrum slots, with a single spectrum slot width of 12.5 GHz. Dual polarization multiplexing was used in the optical path. K in the KSP was set to 4.
[0056] Comparison strategies: (1) Random: Randomly generate a valid DC placement sequence, and perform multiple independent simulations for each group and take the average; (2) Greedy: Greedily select the next DC according to the current optical network state; (3) LA-GA (the method of this invention): Use a light-sensing genetic algorithm to search for placement sequences, with a population size of 20 and an iteration number of 30. The comparison results are as follows: Figure 3 As shown, in almost all parameter combinations, the LA-GA strategy 303 of this invention achieves the lowest single-round iteration time and the lowest pipelined parallel bubble rate, significantly outperforming the random strategy and the greedy strategy. This fully demonstrates the superiority and robustness of the method of this invention in improving the training efficiency of geographically distributed heterogeneous clusters.
[0057] In summary, the arrangement method of this invention can integrate the dynamic communication status of cross-data center optical network interconnection with the computing power differences of heterogeneous GPU clusters into the same optimization objective, coupling heterogeneous computing power and network into a unified PP arrangement scheme. It can construct optical path penalty coefficients based on the link utilization, spectrum fragmentation degree, and request blocking rate of the optical network, guiding the genetic algorithm to preferentially avoid low-quality optical paths. Furthermore, this invention is adaptable to different parameter scale models, different optical network topologies, and different heterogeneous GPU configurations, possessing strong versatility.
[0058] Example 2 This invention also provides a distributed training pipeline deployment system for optical network interconnected heterogeneous GPU clusters. The distributed training pipeline deployment system for optical network interconnected heterogeneous GPU clusters can be implemented by executing the process steps of the distributed training pipeline deployment method for optical network interconnected heterogeneous GPU clusters. That is, those skilled in the art can understand the distributed training pipeline deployment method for optical network interconnected heterogeneous GPU clusters as a preferred embodiment of the distributed training pipeline deployment system for optical network interconnected heterogeneous GPU clusters.
[0059] According to the present invention, a distributed training pipeline deployment system for heterogeneous GPU clusters interconnected by optical networks is provided. This system can be deployed on a management server in a data center or a dedicated computing power scheduling platform, and includes: Module M1: Generates an initial pipeline stage layout candidate set based on the given initial input information, serving as the initial population. The initial input information includes parameters of the large model to be trained, heterogeneous GPU cluster configuration, and optical network topology encoding.
[0060] Module M2: Generates a PP scheduling task dependency graph for each candidate pipeline layout in the pipeline stage layout candidate set, distinguishing between computation tasks and cross-datacenter communication tasks and establishing task execution dependencies. The PP scheduling task dependency graph is generated using a 1F1B scheduling logic with one forward and one reverse direction.
[0061] Module M3: Couples the LLM training simulation module and the optical network simulation module to perform joint simulations. It simulates a complete training iteration for each layout scheme, outputting the total duration of a single iteration, pipeline bubble rate, and recording the dynamic state information of all optical paths. Module M3 includes: When simulating computational tasks, the simulation platform advances the resource allocation of the corresponding GPU on the simulation timeline based on the GPU type assigned to the task and the estimated computation time. When simulating communication tasks, which represent activation value or gradient transmission requests across data centers, the optical network simulation serves these transmission requests through routing and spectrum allocation strategies, calculates the time consumption of the communication task, advances the corresponding time on the simulation timeline, and updates the dynamic state information of the used optical paths. The routing and spectrum allocation strategy is implemented using a K-shortest path routing algorithm combined with a first-hit spectrum allocation mechanism. The computation time T for the communication task is calculated. comm The calculation is performed using a dynamic α-β communication model, as shown in the following formula: T comm = α + β
[0062]
[0063] In the formula, α represents the transmission delay, and β represents the bandwidth delay. The total length of the selected optical path. The speed at which light travels in an optical fiber. The time required for optical-electrical-optical conversion at all intermediate nodes along the transmission path. The total amount of data to be transmitted. It is the dynamically changing equivalent bandwidth.
[0064] Module M4: Calculates the penalty coefficient for each optical path based on the dynamic state information. The penalty coefficient for each optical path is a fusion of network layer physical characteristics such as the average normalized communication overhead, spectrum fragmentation degree, and occupancy rate of each communication in a training round. The calculation formula is as follows:
[0065] in Indicates the optical path The corresponding penalty coefficient, This represents the normalized optical path cost, calculated from the communication model, which is proportional to the total transmission delay. This indicates the total traffic blocking rate of the optical path. This indicates the total spectrum occupancy rate of the optical path.
[0066] Module M5: Calculates the fitness of each layout scheme by combining the total duration of a single iteration with the pipeline bubble rate, and saves the current optimal layout scheme. The fitness calculation formula is as follows:
[0067] in For arrangement fitness For a single round of iterative training time, For single-round iteration PP bubble rate, This is the control factor.
[0068] Module M6: Based on the optical path penalty coefficient, a nonlinear exponential probability distribution is constructed to guide the crossover and mutation operators of the genetic algorithm to preferentially adjust the pipeline stage positions corresponding to high-penalty optical paths, iteratively updating the population. In step S6, the genetic algorithm uses a tournament selection mechanism to screen parent individuals. Simultaneously, a uniform random mutation threshold is set to perform uniform crossover and mutation with a fixed low probability of deviating from the optical path penalty probability distribution, maintaining population diversity and avoiding local optima.
[0069] Repeatedly trigger modules M2 through M6 until the convergence condition or the maximum number of iterations is met, and output the globally optimal pipeline layout scheme.
[0070] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0071] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features of the present invention can be arbitrarily combined with each other.
Claims
1. A method for arranging a distributed training pipeline for heterogeneous GPU clusters interconnected by an optical network, characterized in that, include: Step S1: Generate an initial pipeline stage layout candidate set based on the given initial input information, as the initial population; Step S2: Generate a PP scheduling task dependency graph for each candidate pipeline layout in the pipeline stage layout candidate set, distinguish between computation tasks and cross-datacenter communication tasks, and establish task execution dependencies; Step S3: Couple the LLM training simulation module and the optical network simulation module to carry out joint simulation, simulate the complete training iteration for each layout scheme, output the total duration of a single iteration, the pipeline bubble rate, and record the dynamic state information of all optical paths; Step S4: Calculate the penalty coefficient for each optical path based on the dynamic state information; Step S5: Calculate the fitness of each layout scheme by combining the total duration of a single iteration with the pipeline bubble rate, and save the current optimal layout scheme; Step S6: Construct a nonlinear exponential probability distribution based on the optical path penalty coefficient, guide the crossover and mutation operators of the genetic algorithm to preferentially adjust the pipeline stage positions corresponding to the high-penalty optical paths, and iteratively update the population; Repeat steps S2 to S6 until the convergence condition or the maximum number of iterations is met, and output the globally optimal pipeline layout scheme.
2. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, The initial input information includes parameters of the large model to be trained, heterogeneous GPU cluster configuration, and optical network topology coding.
3. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, The PP scheduling task dependency graph is generated using a 1F1B scheduling logic with one forward and one reverse direction.
4. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, Step S3 includes: When simulating the execution of a computational task, the simulation platform will adjust the resource allocation of the corresponding GPU and advance the time accordingly on the simulation timeline based on the type of GPU assigned to the task and the estimated computation time. When simulating the execution of a communication task, which represents an activation value or gradient transmission request across data centers, the optical network simulation serves the transmission request through routing and spectrum allocation strategies, calculates the time consumption of the communication task, advances the corresponding time on the simulation timeline, and updates the dynamic state information of the optical paths used.
5. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 4, characterized in that, The routing and spectrum allocation strategy is implemented by combining the K-shortest path routing algorithm with the first-hit spectrum allocation mechanism. The time T consumed by the computational communication task comm The calculation is performed using a dynamic α-β communication model, as shown in the following formula: T comm = α + β In the formula, α represents the transmission delay, and β represents the bandwidth delay. The total length of the selected optical path. The speed at which light travels in an optical fiber. The time required for optical-to-electrical-to-optical conversion at all intermediate nodes along the transmission path; The total amount of data to be transmitted. It is the dynamically changing equivalent bandwidth.
6. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, The penalty coefficient for the optical path is a fusion of network layer physical characteristics such as the average normalized communication overhead, spectrum fragmentation, and occupancy rate of each communication in a training round for each optical path. The calculation formula is as follows: in Indicates the optical path The corresponding penalty coefficient, This represents the normalized optical path cost, calculated from the communication model, which is proportional to the total transmission delay. This indicates the total traffic blocking rate of the optical path. This indicates the total spectrum occupancy rate of the optical path.
7. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, The fitness calculation formula is as follows: in For arrangement fitness For a single round of iterative training time, For single-round iteration PP bubble rate, This is the control factor.
8. The method for arranging distributed training pipelines of heterogeneous GPU clusters for optical network interconnection according to claim 1, characterized in that, In step S6, the genetic algorithm uses a tournament selection mechanism to screen parent individuals; At the same time, a uniform random mutation threshold is set to perform uniform crossover mutation with a fixed low probability of deviating from the optical path penalty probability distribution, so as to maintain population diversity and avoid local optima.
9. A distributed training pipeline deployment system for heterogeneous GPU clusters interconnected by optical networks, characterized in that, include: Module M1: Generates an initial set of candidate pipeline stage layout schemes based on the given initial input information, serving as the initial population; Module M2: Generates a PP scheduling task dependency graph for each candidate pipeline layout in the pipeline stage layout candidate set, distinguishes between computation tasks and cross-datacenter communication tasks, and establishes task execution dependencies; Module M3: Couples the LLM training simulation module and the optical network simulation module to perform joint simulation, simulates a complete training iteration for each layout scheme, outputs the total duration of a single iteration and the pipeline bubble rate, and records the dynamic state information of all optical paths; Module M4: Calculates the penalty coefficient for each optical path based on the dynamic state information; Module M5: Combines the total duration of a single iteration with the pipeline bubble rate to calculate the fitness of each layout scheme and saves the current optimal layout scheme; Module M6: Constructs a nonlinear exponential probability distribution based on the optical path penalty coefficient, guiding the crossover and mutation operators of the genetic algorithm to preferentially adjust the pipeline stage positions corresponding to high-penalty optical paths, and iteratively update the population; Repeatedly trigger modules M2 through M6 until the convergence condition or the maximum number of iterations is met, and output the globally optimal pipeline layout scheme.
10. The distributed training pipeline layout system for heterogeneous GPU clusters interconnected by optical networks according to claim 9, characterized in that, The initial input information includes parameters of the large model to be trained, heterogeneous GPU cluster configuration, and optical network topology coding; The PP scheduling task dependency graph is generated using a 1F1B scheduling logic with one forward and one reverse direction.
