Distributed calculation arrangement method and device of model, equipment and storage medium

By dividing the calculation graph into subgraphs and automatically orchestrating them, the problem of scheduling and orchestration complexity in pipeline parallelism is solved, efficient distributed computing is achieved, resource waste and communication delays are reduced, and orchestration efficiency and ease of use are improved.

CN118569358APending Publication Date: 2024-08-30BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202410805408.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In pipeline parallel distributed training, the existing scheduling and orchestration methods are complex and cannot flexibly adapt to different types of scheduling strategies. In addition, manual scheduling requires users to be familiar with the computing and communication modes of the model. The threshold for use is high, making it difficult to improve orchestration efficiency.

Method used

By dividing the complete calculation graph into different subgraphs and establishing the mapping relationship between tasks and subgraphs, the execution sequence of computing tasks is automatically arranged according to the target scheduling mode, decoupling the scheduling and calculation graph, and supporting multiple scheduling Plan to realize automatic scheduling and orchestration.

Benefits of technology

It improves the efficiency of model distributed computing, reduces resource waste and waiting time, reduces communication delay and bandwidth consumption, supports models of different sizes and complexity, and enhances the ease of use and flexibility of orchestration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569358A
    Figure CN118569358A
Patent Text Reader

Abstract

The invention provides a distributed calculation arrangement method and device of a model, equipment and a storage medium, and relates to the technical field of computers, in particular to the technical fields of deep learning, data processing, large models, intelligent arrangement and the like. According to the specific implementation scheme, in response to a received arrangement request of a model, a complete calculation graph of the model and multiple devices corresponding to the model are obtained based on the arrangement request; the calculation of the complete calculation graph of the model is segmented to obtain a first target number of first sub-graphs, and different first sub-graphs correspond to different types of first calculation tasks; establishing a first mapping relationship between different types of first calculation tasks and different first sub-graphs; arranging the execution sequence of the first calculation tasks according to the target scheduling mode to obtain a first arrangement result; and returning the first arrangement result and the first mapping relationship, so that the plurality of devices perform distributed calculation based on the first arrangement result and the first mapping relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to technical fields such as deep learning, data processing, large models, and intelligent orchestration. Background Art

[0002] Distributed training distributes the entire training task to multiple computing devices for parallel execution. Each device is only responsible for part of the computing task, thereby making full use of the storage and computing resources of each device to achieve efficient training of large models. Pipeline parallelism is a commonly used distributed training method. It divides the entire model into multiple parts (called stages). Each stage contains a part of the layers in the model and is distributed on different computing devices. During training, after each stage completes the calculation, the output is passed to the next stage. How to efficiently orchestrate the calculations of each device in pipeline parallelism is a complex problem. Summary of the invention

[0003] The present invention provides a distributed computing arrangement method, apparatus, device and storage medium for a model.

[0004] According to one aspect of the present disclosure, a distributed computing arrangement method for a model is provided, comprising:

[0005] In response to receiving an orchestration request for the model, obtaining a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request;

[0006] Divide the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, where different first subgraphs correspond to different types of first calculation tasks;

[0007] Establishing first mapping relationships between different types of first computing tasks and different first subgraphs;

[0008] Arrange the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result;

[0009] The first orchestration result and the first mapping relationship are returned, so that the multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

[0010] According to another aspect of the present disclosure, a distributed computing arrangement device for a model is provided, comprising:

[0011] An acquisition module, configured to, in response to receiving an orchestration request for a model, acquire a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request;

[0012] A first segmentation module is used to segment the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, wherein different first subgraphs correspond to different types of first calculation tasks;

[0013] A first establishing module, used to establish a first mapping relationship between different types of first computing tasks and different first subgraphs;

[0014] A first scheduling module, used to schedule the execution order of various first computing tasks according to the target scheduling mode to obtain a first scheduling result;

[0015] The first communication module is used to return a first orchestration result and a first mapping relationship, so that multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

[0016] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0020] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0021] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.

[0022] The technical solution disclosed in the present invention can improve the efficiency of distributed computing orchestration of the model.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0025] Figure 1 is a flow chart of a distributed computing arrangement method of a model according to an embodiment of the present disclosure;

[0026] Figure 2 is a schematic diagram of a complete computational graph of a model according to an embodiment of the present disclosure;

[0027] Figure 3 This is a schematic diagram of the segmentation according to the embodiment of the present disclosure. Figure 1 ;

[0028] Figure 4 This is a schematic diagram of the segmentation according to the embodiment of the present disclosure. Figure 2 ;

[0029] Figure 5 This is a schematic diagram of the segmentation according to the embodiment of the present disclosure. Figure 3 ;

[0030] Figure 6 is a schematic diagram of the mapping relationship between tasks and subgraphs according to an embodiment of the present disclosure;

[0031] Figure 7 is a schematic diagram of execution according to an arrangement result according to an embodiment of the present disclosure;

[0032] Figure 8 is a schematic diagram of task scheduling and arrangement according to an embodiment of the present disclosure;

[0033] Fig. 9 is a schematic diagram of the structure of a distributed computing arrangement device of a model according to an embodiment of the present disclosure;

[0034] Fig.10 is a scenario diagram of a distributed computing orchestration method of a model according to an embodiment of the present disclosure;

[0035] Fig.11 It is a schematic diagram of the structure of an electronic device used to implement the distributed computing orchestration method of the model of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0037] The terms "first", "second", and "third", etc. in the specification embodiments and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product, or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0038] Before introducing the technical solution of the present disclosure, the technical terms that may be used in the present disclosure are further explained:

[0039] Computational graph: A graph structure that describes the computational flow of a deep neural network.

[0040] Subgraph: A part of the complete computational graph, which contains part of the computational process of the model.

[0041] Distributed training: Split model training into multiple tasks and use multiple computing devices for parallel training.

[0042] Pipeline parallelism: A method in distributed training that splits the complete model into multiple parts, each of which contains several layers, and different parts are placed on different computing devices for training.

[0043] Stage: The pipeline parallelizes the model into multiple parts. Each part is called a stage, which contains a part of the layers in the model and is distributed on different computing devices.

[0044] With the rapid development of deep learning, the scale of neural networks has gradually expanded, and models with tens of billions or even trillions of parameters have emerged. These large models can learn complex features and patterns from massive amounts of data, significantly improving the accuracy of various tasks and demonstrating outstanding performance in various fields of artificial intelligence. However, due to the large size of large models, a single computing device cannot train large models due to memory and computing power limitations.

[0045] Distributed training is a necessary and efficient method for large model training. In pipeline parallelism, the arrangement of calculations at each stage has a great impact on training efficiency and storage usage. By rearranging the execution order of models on different devices during pipeline parallelism, intermediate variables in the calculation can be released in time to save storage, or some calculations without dependencies can be executed simultaneously to reduce idle time and improve training efficiency. However, how to improve the efficiency of arrangement has always been a difficult problem in the industry.

[0046] The existing scheduling and orchestration methods couple the three processes of model splitting, scheduling and execution together, which requires manual scheduling and orchestration of the calculations on each device. When the model structure changes or the scheduling scheme is changed, the scheduling of each computing task needs to be adjusted or re-scheduled, which is complicated to use and cannot flexibly adapt to different types of scheduling strategies. In addition, manual scheduling and orchestration requires users to be familiar with the model's computing and communication modes, and the threshold for use is high.

[0047] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, the present disclosure proposes a distributed computing orchestration method for a model, decouples the processes of graph cutting, scheduling orchestration, and execution in pipeline parallelism, and uses a unified expression that is independent of the model for the scheduling orchestration in pipeline parallelism, so that the unified expression of the scheduling orchestration of this scheme enables the entire process to be automatically executed, and the user only needs to select the scheduling scheme without other operations. This scheme analyzes the calculation graph and divides the complete calculation graph into different subgraphs according to the calculation type for subsequent execution. The calculation graph is a description of the model calculation process, and different models have corresponding calculation graphs, which makes this scheme independent of the specific model and applicable to different models. This scheme decouples scheduling orchestration and calculation graph, and scheduling orchestration is only performed for different types of tasks and is independent of specific calculation operations, so it can flexibly support multiple scheduling schemes.

[0048] The embodiment of the present disclosure provides a distributed computing arrangement method for a model. Figure 1 It is a flow chart of the distributed computing orchestration method of the model according to the embodiment of the present disclosure. The distributed computing orchestration method of the model can be applied to the distributed computing orchestration device of the model. The distributed computing orchestration device of the model is located in an electronic device. The electronic device includes but is not limited to fixed devices and / or mobile devices. For example, fixed devices include but are not limited to servers, and the server can be a cloud server or an ordinary server. For example, mobile devices include but are not limited to mobile phones, tablet computers, laptops, wearable devices, etc. In some possible implementations, the distributed computing orchestration method of the model can also be implemented by a processor calling computer-readable instructions stored in a memory. For example Figure 1 As shown in the figure, the distributed computing orchestration method of this model includes:

[0049] S101: In response to receiving an orchestration request for a model, obtaining a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request;

[0050] S102: dividing the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs; wherein different first subgraphs correspond to different types of first calculation tasks;

[0051] S103: establishing a first mapping relationship between different types of first computing tasks and different first subgraphs;

[0052] S104: Arranging the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result;

[0053] S105: Return the first orchestration result and the first mapping relationship, so that the multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

[0054] In some embodiments, the user may send the orchestration request through a unified interface provided by the system. Exemplarily, the system detects that the intelligent orchestration function is triggered and presents a user interface, through which the user inputs the model and the device information of multiple devices used to train the model, and then sends the orchestration request by triggering the intelligent orchestration button. After receiving the orchestration request, the system starts to execute the orchestration process. After the orchestration process is completed, the orchestration result and mapping relationship are returned based on the orchestration request, so that the terminal sends a distributed computing requirement to the multiple devices based on the first orchestration result and the first mapping relationship, and the multiple devices complete the distributed computing for the model based on the first orchestration result and the first mapping relationship.

[0055] In some implementations, the orchestration request includes at least a model and a plurality of devices corresponding to the model. The plurality of devices are used to perform distributed training or distributed computing on the model.

[0056] In the embodiments of the present disclosure, the multiple devices may be multiple devices for computing, and the present disclosure does not impose mandatory restrictions on the types of devices.

[0057] In some embodiments, the complete calculation graph describes all the calculation steps and the dependencies between them in the model calculation process. At the same time, the information of multiple devices to be used corresponding to the model is obtained. These devices can be different types of computing resources, such as central processing unit (CPU), graphics processing unit (GPU), etc. They may be located on the same machine or distributed in different machines or data centers.

[0058] Figure 2 A schematic diagram showing the complete computational graph of the model is shown in Figure 2 As shown in the figure, the complete calculation graph of the model includes at least three types of calculations: forward calculation, reverse calculation and parameter update.

[0059] In the disclosed embodiment, the system divides the complete computing graph into a first target number of first subgraphs according to certain strategies (such as computing volume, communication volume, device capabilities, etc.). Each subgraph contains a set of interrelated computing tasks, and different subgraphs are connected by communication. Different first subgraphs correspond to different types of first computing tasks, which may have different computing characteristics or resource requirements.

[0060] In the embodiment of the present disclosure, the first target quantity can be set or adjusted according to demand.

[0061] In the disclosed embodiment, the first computing task is divided into at least: a forward computing task; a reverse computing task; and a parameter updating task.

[0062] In the embodiment of the present disclosure, the first target number of first subgraphs may include: a first subgraph for a forward computing task, a first subgraph for a reverse computing task, and a first subgraph for a parameter updating task.

[0063] In some implementations, a mapping relationship is established between each subgraph and its corresponding first computing task type, so that when a computing task needs to be executed, the system can quickly locate the corresponding subgraph.

[0064] In some implementations, the scheduling mode may be divided into at least an F-Then-B (Forward-Then-Backward) mode and a 1F1B mode.

[0065] Here, the F-Then-B mode is a pipeline parallel scheduling method, which divides the original mini-batch (batch after data parallel segmentation) into multiple micro-batches (batch after mini-batch segmentation). Each pipeline stage (that is, the pipeline parallel computing unit) first performs forward calculation (Forward) as a whole, and then performs backward calculation (Backward). By calculating different parts of the model at the same time, F-Then-B can significantly improve the utilization of device resources. In the F-Then-B mode, each pipeline stage first performs forward calculation on all micro-batches, and then all stages perform backward calculation. This reduces the idle time between devices and improves overall efficiency.

[0066] Here, the 1F1B (One Forward One Backward) mode is another pipeline parallel scheduling method. In this mode, after each pipeline stage completes the forward calculation of a micro-batch, it immediately performs the reverse calculation of the micro-batch, and then performs the forward calculation of the next micro-batch. The characteristic of the 1F1B mode is that the forward calculation and the reverse calculation are performed alternately, and each stage immediately enters the calculation of the next micro-batch after completing the calculation of a micro-batch. In order to further improve efficiency, the 1F1B mode can be combined with some optimization techniques, such as automatically finding the optimal scheduling plan, bypassing synchronization operations, etc. These optimizations can further reduce idle time (bubble) and improve equipment utilization.

[0067] In summary, both the F-Then-B mode and the 1F1B mode are scheduling strategies designed to improve device utilization in pipeline parallelism. They reduce the idle time between devices in different ways, thereby improving the overall training efficiency. In practical applications, you can choose a suitable scheduling strategy based on specific hardware resources, data / model scale, and performance requirements.

[0068] In some implementations, the system returns the orchestration results and mapping relationships to the requester or the relevant execution system, and the execution system distributes the computing tasks to the corresponding devices based on this information to perform distributed computing.

[0069] It should be noted that the model in the present disclosure may be a model to be trained, and the model is distributedly trained using the arrangement method of the present disclosure. The model in the present disclosure may also be a trained model, and the model is distributedly computed using the arrangement method of the present disclosure.

[0070] The technical solution of the disclosed embodiment divides the complete calculation graph into different subgraphs according to the calculation type. Through reasonable calculation graph segmentation and task scheduling, the computing power of different devices can be fully utilized, resource waste and waiting time in the calculation process can be reduced, and the overall computing efficiency can be improved. Since the communication overhead is considered in the scheduling process, communication-intensive tasks are arranged to be executed on the same or adjacent devices as much as possible, reducing cross-device communication, communication delay and bandwidth consumption. By supporting different target scheduling modes, the execution mode of computing tasks can be flexibly adjusted according to actual needs and scenarios. This method can be applied to models of different scales and complexities, and supports efficient computing in larger-scale distributed systems. By providing a unified scheduling interface and result feedback, users or upper-level systems can easily manage and monitor distributed computing processes, enhancing the ease of use of scheduling.

[0071] In some embodiments, the execution order of each type of first computing task is arranged according to a target scheduling mode to obtain a first orchestration result, including: when the first segmentation results corresponding to each of the multiple devices are obtained, combining the first segmentation results and the first mapping relationship, and arranging the execution order of each type of first computing task according to the target scheduling mode to obtain the first orchestration result.

[0072] In some implementations, the first segmentation result is a pipeline parallel segmentation result obtained by segmenting the model onto different devices. For example, the model includes M model layers, and the model is distributed onto N devices, each device corresponding to at least one computing task of the model layer, where M and N are both integers not less than 1.

[0073] In some implementations, the target scheduling mode may be various, for example, it may be based on different strategies such as priority, data dependency, load balancing, etc. According to this mode, the execution order of various first computing tasks needs to be arranged. For example, if the target scheduling mode is based on priority, then the tasks with high priority need to be executed first; if it is based on data dependency, then the tasks that do not depend on the results of other tasks need to be executed first, and then the other tasks are executed in sequence.

[0074] In the embodiment of the present disclosure, the first scheduling result may include: the execution order and time arrangement of various types of first computing tasks on multiple devices.

[0075] It should be noted that the specific implementation of the above process may vary depending on factors such as specific computing tasks, equipment conditions, network environment, etc. Therefore, in actual applications, flexible adjustments and optimizations can be made according to specific circumstances.

[0076] In this way, through such arrangement, efficient execution of computing tasks on multiple devices can be ensured. On the one hand, the computing power of each device can be fully utilized to avoid resource waste; on the other hand, data dependencies between tasks can be ensured to avoid data inconsistency or calculation errors caused by incorrect execution order. In addition, different optimization goals can be achieved according to different target scheduling modes, such as improving system throughput and reducing task completion time.

[0077] In some embodiments, the execution order of each type of first computing task is arranged according to a target scheduling mode to obtain a first orchestration result, including: in the case where the first segmentation results corresponding to each of the multiple devices are not obtained, generating the second segmentation results corresponding to each of the multiple devices according to the first subgraph of the first target quantity; combining the second segmentation result and the first mapping relationship, and arranging the execution order of each type of first computing task according to the target scheduling mode to obtain the first orchestration result.

[0078] In some embodiments, when the first segmentation results corresponding to the multiple devices are not obtained, in order to still effectively arrange the execution order of various first computing tasks, the system will adopt the following strategy: the system will generate the second segmentation results corresponding to the multiple devices according to the first target number of first subgraphs (which may be a predefined subgraph template or a subgraph dynamically generated based on the complexity of the current computing task and the device capabilities). This segmentation process may involve decomposing a complex computing task into multiple subtasks and assigning these subtasks to different devices for processing.

[0079] In some implementations, after generating the second segmentation result, the system will combine the segmentation result with the existing first mapping relationship (this mapping relationship may describe the correspondence between devices and computing tasks, or the communication and data transmission relationship between devices). Through this combination, the system can clearly identify which subtasks (i.e., the first computing tasks) each device needs to process.

[0080] In some implementations, after the tasks of each device are identified, the system will schedule the execution order of various first computing tasks according to the target scheduling mode (which may be defined based on priority, load balancing, data dependency, etc.) This process ensures that the tasks are executed on multiple devices in the best way.

[0081] In some implementations, the first orchestration result describes in detail the execution order and timing of various types of first computing tasks on multiple devices.

[0082] In this way, efficient scheduling and execution of computing tasks can be achieved without pre-split results. It improves the flexibility and robustness of the system, enabling the system to cope with different situations and needs. By dynamically generating segmentation results and scheduling in combination with target scheduling modes, the system can ensure efficient execution of computing tasks on multiple devices while achieving optimization goals, such as improving system throughput and reducing task completion time.

[0083] In some embodiments, the distributed computing orchestration method of the model may further include:

[0084] Generate independent computation graphs for each model layer that is split across multiple devices;

[0085] Divide each independent computation graph into a second target number of second subgraphs, wherein different second subgraphs correspond to different types of second computation tasks;

[0086] Establishing a second mapping relationship between different types of second computing tasks and different second subgraphs;

[0087] Arrange the execution order of various types of second computing tasks according to the target scheduling mode to obtain a second arrangement result;

[0088] The second orchestration result is returned so that the multiple devices can perform distributed computing based on the first orchestration result, the first mapping relationship, the second orchestration result, and the second mapping relationship.

[0089] In the embodiment of the present disclosure, the second target quantity can be set or adjusted according to demand.

[0090] In the embodiment of the present disclosure, the second computing task can be divided into at least one of the following: a forward computing task; a reverse computing task; and a parameter updating task.

[0091] In the embodiment of the present disclosure, the second target number of second subgraphs may include: a second subgraph for a forward computing task, a second subgraph for a reverse computing task, and a second subgraph for a parameter updating task.

[0092] In some embodiments, in order to ensure that different layers of the model can effectively perform distributed computing between different devices, the distributed computing orchestration method of the model may further include: generating an independent computing graph for each model layer that is divided into multiple devices: when different layers of the model are assigned to different devices for computing, an independent computing graph is first generated for each model layer. This computing graph describes in detail the computing steps and data flows within the layer. Divide each independent computing graph into a second target number of second subgraphs: the system further divides each independent computing graph into multiple second subgraphs (i.e., the second target number). Each second subgraph contains a portion of the computing steps and data flows of the original computing graph, and different second subgraphs correspond to different types of second computing tasks. Such division helps to further distribute complex computing tasks to different devices. Establish a second mapping relationship between different types of second computing tasks and different second subgraphs: after completing the division, the system will establish a mapping relationship to clarify the correspondence between different types of second computing tasks and different second subgraphs. This mapping relationship provides a basis for subsequent task scheduling and execution. The execution order of each type of second computing task is arranged according to the target scheduling mode to obtain the second orchestration result: Similar to the generation process of the first orchestration result, the system will arrange the execution order of each type of second computing task based on the target scheduling mode (such as priority, load balancing, data dependency, etc.) to obtain the second orchestration result. This orchestration result describes in detail the execution order and time schedule of each type of second computing task on multiple devices. Return the second orchestration result so that multiple devices can perform distributed computing based on the first orchestration result, the first mapping relationship, the second orchestration result, and the second mapping relationship: Finally, the system will return the first orchestration result, the first mapping relationship, the second orchestration result, and the second mapping relationship to multiple devices. These devices will work together based on this information to complete the distributed computing of the model.

[0093] For example, suppose there is a deep learning model that needs to be distributed trained. The model contains multiple layers, and each layer contains a large number of calculation steps. The system will first generate an independent calculation graph for each model layer, and then divide these calculation graphs into multiple second subgraphs, each subgraph corresponding to one or more calculation steps. Next, the system will establish a mapping relationship to clarify the correspondence between different types of computing tasks (such as forward propagation, back propagation, weight update, etc.) and different subgraphs. Then, based on the target scheduling mode (such as load balancing), the system will arrange the execution order of various types of computing tasks to obtain the first arrangement result and the second arrangement result. Finally, multiple devices will work together based on these arrangement results and mapping relationships to complete the distributed training of the model.

[0094] In this way, by distributing different layers and computing tasks of the model to multiple devices for computing, the computing power of each device can be fully utilized to improve the overall computing efficiency. The scheduling strategy based on the target scheduling mode can ensure that tasks are executed on multiple devices in the best way, thereby optimizing resource utilization. This scheduling method supports dynamic adjustment of the allocation and execution order of computing tasks to adapt to different computing needs and device states, enhancing system flexibility.

[0095] In some embodiments, the first computing task is divided into at least: a forward computing task; a reverse computing task; and a parameter updating task.

[0096] In some embodiments, when performing distributed computing of a model, especially training of a deep learning model, the first computing task is typically subdivided into several main categories to facilitate more efficient task orchestration and distributed execution.

[0097] In some embodiments, during the model training process, the forward computation task involves performing forward propagation based on the input data and the current model parameters to calculate the output prediction value of the model. This typically includes a series of matrix multiplications and activation function operations. The forward computation task can be assigned to multiple devices for parallel execution, with each device processing a subset of the input data or a sublayer of the model.

[0098] In some embodiments, the reverse calculation task is to calculate the gradient of the loss function based on the output prediction value of the model and the true label. This involves the back propagation algorithm, which is used to calculate the gradient of the model parameters with respect to the loss function. The reverse calculation task can also be performed in parallel, usually corresponding to the forward calculation task, that is, each device calculates the gradient corresponding to the forward propagation result of its processing part.

[0099] In some embodiments, after obtaining the gradient, the parameter update task involves updating the parameters of the model according to an optimization algorithm (such as stochastic gradient descent, adaptive moment estimation (Adaptive Moment Estimation, Adam), etc. The parameter update task is usually performed on a central device (such as a parameter server), which collects the gradients of all devices, performs parameter updates, and broadcasts the updated parameters to all devices.

[0100] Suppose there is a deep learning model for image classification tasks, which contains multiple convolutional layers and fully connected layers. During the distributed training process, the forward computing task and the reverse computing task can be assigned to multiple GPU devices for parallel execution. Specifically: Forward computing task: Each GPU device processes a subset of the input image, performs forward propagation calculations, and obtains the output prediction value of each subset. Reverse computing task: Corresponding to the forward computing task, each GPU device calculates the gradient based on its output prediction value and the true label. Parameter update task: A central device (such as a parameter server) collects the gradients of all GPU devices, updates the parameters, and broadcasts the updated parameters to all GPU devices for the next round of forward and reverse calculations.

[0101] In this way, the computing power of multiple GPU devices can be fully utilized to accelerate the training process of deep learning models.

[0102] In this way, by assigning forward and reverse computing tasks to multiple devices for parallel execution, computing efficiency can be significantly improved and model training can be accelerated. Assigning tasks according to the computing power of different devices can ensure that resources are fully utilized and avoid resource waste. Through parallel computing and parameter updates, the convergence process of the model can be accelerated and the training effect can be improved.

[0103] In some embodiments, the distributed computing orchestration method of the model may further include: when the orchestration request carries a specified scheduling mode, determining the specified scheduling mode as the target scheduling mode.

[0104] In some embodiments, the system receives a scheduling request including a specific scheduling mode. The system parses the scheduling request and extracts the scheduling mode information contained therein. Based on the extracted scheduling mode information, the system determines it as a target scheduling mode. This means that subsequent computing tasks will be scheduled and allocated according to this target scheduling mode.

[0105] In some implementations, after determining the target scheduling mode, the system will schedule and allocate computing tasks according to this mode, which may include selecting appropriate computing nodes, allocating computing resources, setting task priorities, etc.

[0106] For example, suppose there is a distributed training task for a deep learning model, and the user wants to use a load-balancing-based scheduling mode to allocate computing tasks. In this case, the user can send a scheduling request containing the "load-balancing" scheduling mode to the system. After receiving this request, the system will parse the "load-balancing" scheduling mode and determine it as the target scheduling mode. Then, the system will schedule and allocate computing tasks according to this mode. For example, the system may allocate tasks to nodes with lower loads based on the load conditions of each computing node to achieve load balancing. In this way, it can ensure that computing tasks can be evenly distributed on each node, avoid overloading or idleness of some nodes, and thus improve the execution efficiency of training tasks.

[0107] This allows users or automated processes to specify scheduling modes, increasing the flexibility and customizability of the system. By selecting the appropriate scheduling mode, the execution efficiency of computing tasks can be optimized, resource waste can be reduced, and the overall performance of the system can be improved. Knowing the target scheduling mode, the execution time and results of computing tasks can be better predicted, which helps to perform more effective resource management and task scheduling.

[0108] In some embodiments, the distributed computing orchestration method of the model may further include: when the orchestration request does not carry a specified scheduling mode, determining the target scheduling mode from the optional scheduling modes according to the size of the model and the number of devices corresponding to the multiple devices.

[0109] In the embodiments of the present disclosure, the optional scheduling mode is a scheduling mode supported by the system. The present disclosure does not impose a mandatory limit on the number of optional scheduling modes.

[0110] In some embodiments, the system first receives a scheduling request, which is used to trigger the distributed computing scheduling process of the model. The system checks whether the scheduling request contains a specified scheduling mode. If not, the system will enter the automatic scheduling mode. The system obtains the size information of the model to be scheduled, which usually includes the number of parameters of the model, the computational complexity, etc. At the same time, the system also obtains the number of multiple devices participating in the distributed computing and the computing power information of each device. According to the size of the model and the number of devices, the system selects a most suitable target scheduling mode from the optional scheduling modes.

[0111] In some implementations, after determining the target scheduling mode, the system will schedule and allocate computing tasks according to this mode, including selecting appropriate computing nodes, allocating computing resources, setting task priorities, etc.

[0112] For example, suppose there is a deep learning model that needs to be trained in a distributed manner, and the scheduling mode is not specified in the orchestration request. The system first obtains the size information of the model and finds that the model is large and complex. At the same time, the system also learns that there are 10 available GPU devices participating in the training. Based on this information, the system selects "1F1B" as the target scheduling mode from the optional scheduling modes. The system then assigns different layers or modules of the model to different GPU devices for processing according to the "1F1B" mode. In this way, each device only processes part of the model, which reduces the computing pressure on a single device and improves the efficiency of overall training.

[0113] In this way, when the scheduling request does not specify a scheduling mode, the system can automatically select the most suitable scheduling mode based on the model size and number of devices without manual intervention. The automatically selected scheduling mode can better match the model size and device capabilities, thereby maximizing the use of computing resources. The appropriate scheduling mode can reduce the overhead of data transmission, optimize task allocation and execution order, and thus improve computing efficiency.

[0114] In getting Figure 2 After the complete calculation graph of the model shown in the figure, the model is first split onto different devices, and the following is obtained based on the split results of the pipeline parallelization: Figure 3 The cutting diagram shown Figure 1 Then, it is divided on different devices, and the obtained division diagram is as follows Figure 5 shown.

[0115] In getting Figure 2 After completing the computational graph of the model shown in the figure, the complete computational graph is first segmented into three types of computational tasks: forward computation, reverse computation, and parameter update. Figure 4 The cutting diagram shown Figure 2 Then, it is divided on different devices, and the obtained division diagram is as follows Figure 5 shown.

[0116] Figure 5 Shows the segmentation diagram Figure 3 ,like Figure 5 As shown in the figure, after obtaining the complete calculation graph and the calculation graph corresponding to the model on each device, the complete calculation graph is analyzed, and the calculations of the forward, reverse, and parameter update parts are split into three sub-graphs, so that different devices correspond to different sub-graphs. Figure 5 Variables with the same name in the same file share storage without duplication. Since pipeline parallelism mainly improves computing and storage efficiency by scheduling and optimizing the forward, reverse, and parameter update calculations, the complete computational graph is first divided into these three parts. In a few scenarios, more fine-grained scheduling is required, which can be achieved by further splitting the subgraph according to user settings.

[0117] Figure 6 A schematic diagram showing the mapping relationship between tasks and subgraphs is shown, such as Figure 6 As shown, the smallest unit of scheduling is called a task ( Figure 6 A task contains a series of computing processes. After the computation graph is split, different types of tasks are created according to the scheduling scheme settings for subsequent scheduling. Then a mapping relationship is established between the created tasks and the subgraphs obtained by splitting for the final execution of training. Figure 6 As shown in the figure, the scheduling scheme involves the arrangement of three parts of calculation: forward, reverse, and parameter update. Therefore, three tasks (Job0, Job1, and Job2) are constructed to represent these three parts of calculation respectively, and a mapping relationship is established with the forward, reverse, and update subgraphs obtained by the division, indicating the specific calculations that need to be performed by each task.

[0118] Figure 7 A schematic diagram showing the execution according to the arrangement result is shown, Figure 7 As shown in , according to the scheduling scheme, the execution order of tasks is arranged to improve the parallel computing and storage efficiency of the pipeline. Figure 7 As shown in the figure, without any scheduling optimization, device 2 needs to wait for device 1 to complete all forward computing tasks before starting computing, resulting in a long idle time. By arranging and adjusting the execution order of each task, some tasks on different devices that have no dependencies can be executed simultaneously (F-Then-B mode), saving time; or further, forward computing and reverse computing can be executed alternately (1F1B mode), releasing intermediate variables in time, saving storage.

[0119] Figure 8 A schematic diagram of task scheduling is shown, Figure 8 As shown in Figure 1, after completing the above arrangement, the execution module will start model training based on the arrangement results and the subgraphs obtained by splitting. In each iteration of training, the execution module will execute the corresponding tasks according to the arrangement results and perform specific calculations based on the task-subgraph mapping.

[0120] The present disclosure decouples the processes of graph slicing, scheduling, and execution in pipeline parallelism, and uses a unified expression that is independent of the model for scheduling in pipeline parallelism, which makes the present disclosure have the following characteristics:

[0121] 1. Automatic scheduling and orchestration

[0122] The unified expression of scheduling arrangement enables the entire process to be executed automatically. Users only need to select the scheduling plan without any other operations.

[0123] 2. Adapt to different models

[0124] The present disclosure analyzes the computational graph and divides the complete computational graph into different subgraphs according to the computational type for subsequent execution. The computational graph is a description of the model computational process. Different models have corresponding computational graphs, which makes the present disclosure independent of the specific model and applicable to different models.

[0125] 3.Flexibly support multiple scheduling schemes

[0126] The present disclosure decouples scheduling and computational graphs. Scheduling is performed only for different types of tasks and is independent of specific computational operations. Therefore, it can flexibly support a variety of scheduling schemes.

[0127] The pipeline parallel scheduling and orchestration used in the present invention can be performed automatically without human intervention, which reduces the usage threshold. At the same time, due to the decoupling of processes such as cutting, orchestration, and execution, the present invention can adapt to different types of models without adjusting the orchestration plan when the model changes, and can also flexibly adapt to different types of scheduling strategies.

[0128] The usage scenarios of the disclosed solution include, but are not limited to, deep learning systems, distributed deep learning systems, machine learning platforms, and distributed training platforms.

[0129] It should be understood that Figures 2 to 8 The schematic diagram shown is only exemplary and not restrictive, and it is scalable, and those skilled in the art can Figures 2 to 8 Various obvious changes and / or substitutions can be made to the examples, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.

[0130] The present disclosure provides a distributed computing arrangement device for a model, such as Fig. 9 As shown, the distributed computing arrangement device of the model may include:

[0131] An acquisition module 901 is configured to, in response to receiving an orchestration request for a model, acquire a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request;

[0132] A first segmentation module 902 is used to segment the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, where different first subgraphs correspond to different types of first calculation tasks;

[0133] A first establishing module 903, used to establish a first mapping relationship between different types of first computing tasks and different first subgraphs;

[0134] A first scheduling module 904 is used to schedule the execution order of various first computing tasks according to the target scheduling mode to obtain a first scheduling result;

[0135] The first communication module 905 is used to return the first orchestration result and the first mapping relationship, so that multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

[0136] In some embodiments, the first segmentation module 902 is used to:

[0137] When the first segmentation results corresponding to the multiple devices are obtained, the execution order of the various first computing tasks is arranged according to the target scheduling mode in combination with the first segmentation results and the first mapping relationship to obtain the first arrangement result.

[0138] In some embodiments, the first segmentation module 902 is used to:

[0139] In the case where the first segmentation results corresponding to the multiple devices are not obtained, generating second segmentation results corresponding to the multiple devices according to the first target number of first subgraphs;

[0140] In combination with the second segmentation result and the first mapping relationship, the execution order of each type of first computing task is arranged according to the target scheduling mode to obtain a first arrangement result.

[0141] In some embodiments, the distributed computing arrangement device of the model further includes:

[0142] Generate Module( Fig. 9 ), used to generate an independent computational graph for each model layer that is partitioned to multiple devices;

[0143] The second segmentation module ( Fig. 9 (not shown), used to divide each independent computation graph into a second target number of second subgraphs, wherein different second subgraphs correspond to different types of second computation tasks;

[0144] The second building module ( Fig. 9 (not shown in the figure), used to establish a second mapping relationship between different types of second computing tasks and different second subgraphs;

[0145] The second arrangement module Fig. 9 (not shown), for arranging the execution order of various types of second computing tasks according to the target scheduling mode to obtain a second arrangement result;

[0146] The second communication module ( Fig. 9 ), and is used to return the second orchestration result, so that multiple devices can perform distributed computing based on the first orchestration result, the first mapping relationship, the second orchestration result, and the second mapping relationship.

[0147] In some embodiments, the first computing task is divided into at least:

[0148] Forward computation task;

[0149] Reverse calculation task;

[0150] Parameter update task.

[0151] In some embodiments, the distributed computing arrangement device of the model further includes: a determination module ( Fig. 9 (not shown) is used to determine the specified scheduling mode as the target scheduling mode when the scheduling request carries the specified scheduling mode.

[0152] In some embodiments, the determining module ( Fig. 9 ), and is also used to: when the orchestration request does not carry a specified scheduling mode, determine a target scheduling mode from optional scheduling modes according to the size of the model and the number of devices corresponding to the multiple devices.

[0153] Those skilled in the art should understand that the functions of each processing module in the distributed computing orchestration device of the model of the embodiment of the present disclosure can be understood with reference to the relevant description of the distributed computing orchestration method of the model mentioned above, and each processing module in the distributed computing orchestration device of the model of the embodiment of the present disclosure can be realized by a generation circuit that realizes the function of the embodiment of the present disclosure, and can also be realized by running software that executes the function of the embodiment of the present disclosure on an electronic device.

[0154] The distributed computing orchestration device of the model in the embodiment of the present disclosure can improve the efficiency of the distributed computing orchestration of the model. Multiple devices perform distributed computing based on the orchestration results, which can significantly improve the computing efficiency and speed up the model training or computing.

[0155] The embodiment of the present disclosure provides a schematic diagram of a distributed computing arrangement scenario of a model, such as Fig.10 shown.

[0156] As mentioned above, the distributed computing arrangement method of the model provided by the embodiment of the present disclosure is applied to electronic devices. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices.

[0157] Specifically, the electronic device can perform the following operations:

[0158] In response to receiving an orchestration request for a model, obtaining a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request;

[0159] Dividing the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, wherein different first subgraphs correspond to different types of first calculation tasks;

[0160] Establishing first mapping relationships between different types of first computing tasks and different first subgraphs;

[0161] Arrange the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result;

[0162] The first orchestration result and the first mapping relationship are returned, so that the multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

[0163] It should be understood that Fig.10 The scene diagram shown is only illustrative and not restrictive. Those skilled in the art can Fig.10 Various obvious changes and / or substitutions can be made to the examples, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.

[0164] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0165] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0166] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0167] like Fig.11As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0168] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0169] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as the distributed computing orchestration method of the model. For example, in some embodiments, the distributed computing orchestration method of the model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the distributed computing orchestration method of the model described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the distributed computing orchestration method of the model in any other appropriate manner (eg, by means of firmware).

[0170] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0171] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0172] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories (EPROM), flash memories, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0173] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0174] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

[0175] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on the respective computers and having a client and server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0176] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0177] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A distributed computing arrangement method for a model, comprising: In response to receiving an orchestration request for a model, obtaining a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request; Dividing the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, wherein different first subgraphs correspond to different types of first calculation tasks; Establishing first mapping relationships between different types of first computing tasks and different first subgraphs; Arrange the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result; The first orchestration result and the first mapping relationship are returned, so that the multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

2. The method according to claim 1, wherein: The step of arranging the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result includes: When the first segmentation results corresponding to each of the multiple devices are obtained, the execution order of each type of first computing task is arranged according to the target scheduling mode in combination with the first segmentation result and the first mapping relationship to obtain the first arrangement result.

3. The method according to claim 1, wherein: The step of arranging the execution order of various first computing tasks according to the target scheduling mode to obtain a first arrangement result includes: In a case where the first segmentation results corresponding to the plurality of devices are not obtained, generating second segmentation results corresponding to the plurality of devices according to the first subgraphs of the first target number; In combination with the second segmentation result and the first mapping relationship, the execution order of each type of first computing task is arranged according to the target scheduling mode to obtain the first arrangement result.

4. The method according to claim 2 or 3, further comprising: Generate an independent computation graph for each model layer that is partitioned to the multiple devices; Dividing each of the independent computation graphs into a second target number of second subgraphs, wherein different second subgraphs correspond to different types of second computation tasks; Establishing a second mapping relationship between different types of second computing tasks and different second subgraphs; Arrange the execution order of various types of second computing tasks according to the target scheduling mode to obtain a second arrangement result; The second orchestration result is returned so that the multiple devices can perform distributed computing based on the first orchestration result, the first mapping relationship, the second orchestration result, and the second mapping relationship.

5. The method according to claim 1, wherein: The first computing task is at least divided into: Forward computation task; Reverse calculation task; Parameter update task.

6. The method according to claim 1, further comprising: In a case where the scheduling request carries a specified scheduling mode, the specified scheduling mode is determined as the target scheduling mode.

7. The method according to claim 6, further comprising: In a case where the orchestration request does not carry a specified scheduling mode, the target scheduling mode is determined from optional scheduling modes according to the size of the model and the number of devices corresponding to the multiple devices.

8. A distributed computing arrangement device for a model, comprising: An acquisition module, configured to, in response to receiving an orchestration request for a model, acquire a complete computational graph of the model and a plurality of devices corresponding to the model based on the orchestration request; A first segmentation module is used to segment the calculation of the complete calculation graph of the model to obtain a first target number of first subgraphs, wherein different first subgraphs correspond to different types of first calculation tasks; A first establishing module, used to establish a first mapping relationship between different types of first computing tasks and different first subgraphs; A first scheduling module, used to schedule the execution order of various first computing tasks according to the target scheduling mode to obtain a first scheduling result; The first communication module is configured to return the first orchestration result and the first mapping relationship, so that the multiple devices can perform distributed computing based on the first orchestration result and the first mapping relationship.

9. The device according to claim 8, wherein: The first segmentation module is used to: When the first segmentation results corresponding to each of the multiple devices are obtained, the execution order of each type of first computing task is arranged according to the target scheduling mode in combination with the first segmentation result and the first mapping relationship to obtain the first arrangement result.

10. The device according to claim 8, wherein: The first segmentation module is used to: In a case where the first segmentation results corresponding to the plurality of devices are not obtained, generating second segmentation results corresponding to the plurality of devices according to the first subgraphs of the first target number; In combination with the second segmentation result and the first mapping relationship, the execution order of each type of first computing task is arranged according to the target scheduling mode to obtain the first arrangement result.

11. The device according to claim 9 or 10, further comprising: A generation module, used to generate an independent calculation graph for each model layer divided into the multiple devices; A second segmentation module, used for segmenting each of the independent computation graphs into a second target number of second subgraphs, wherein different second subgraphs correspond to different types of second computation tasks; A second establishing module, used to establish a second mapping relationship between different types of second computing tasks and different second subgraphs; A second scheduling module, used to schedule the execution order of various types of second computing tasks according to the target scheduling mode to obtain a second scheduling result; The second communication module is used to return the second orchestration result, so that the multiple devices can perform distributed computing based on the first orchestration result, the first mapping relationship, the second orchestration result and the second mapping relationship.

12. The device according to claim 8, wherein: The first computing task is at least divided into: Forward computation task; Reverse calculation task; Parameter update task.

13. The apparatus according to claim 8, further comprising: The determination module is configured to determine, when the scheduling request carries a specified scheduling mode, the specified scheduling mode as the target scheduling mode.

14. The device according to claim 13, wherein: The determining module is further used for: In a case where the orchestration request does not carry a specified scheduling mode, the target scheduling mode is determined from optional scheduling modes according to the size of the model and the number of devices corresponding to the multiple devices.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

17. A computer program product comprising a computer program stored on a storage medium, the computer program implementing the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN114091686A

  • Task scheduling method and device, electronic equipment and storage

    CN114840322A

  • Information processing method, device and system, electronic equipment and storage medium

    CN114915629A

  • Edge end collaborative deep neural network training method based on hybrid pipeline parallelism

    CN116680070A

  • Parallel computing scheduling method and device for deep learning model, equipment and medium

    CN118095382A

Cited By

  • Task scheduling method and device, electronic equipment, storage medium and program product

    CN119718583A