Devices and methods for generating execution plans for a machine learning model

EP4747743A1Pending Publication Date: 2026-05-27HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-07-27
Publication Date
2026-05-27

AI Technical Summary

Technical Problem

Current methods for configuring parallel strategies for large-scale deep learning training are time-consuming and labor-intensive, and systematically finding the optimal hybrid parallel strategy is challenging due to the large search space and complexities involved.

Method used

An apparatus and method for generating an optimized hybrid execution plan for a machine learning model on a cluster of computing nodes by combining pipeline parallelism and operator parallelism candidate execution plans, using a bijective mapping and user constraints to select the most efficient plan.

Benefits of technology

This approach enables fast and efficient execution of machine learning models by systematically generating high-performance parallel execution plans, reducing processing time, and optimizing resource utilization on large clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023109533_30012025_PF_FP_ABST
    Figure CN2023109533_30012025_PF_FP_ABST
Patent Text Reader

Abstract

An apparatus (110) for determining an execution plan (150) for a plurality of computing nodes (130) is disclosed, wherein each computing node (130) comprises one or more processing devices (140) for a distributed implementation of a machine learning, ML, model. The apparatus (110) is configured to generate a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans, based on a network topology of the plurality of computing nodes (130) and a computational graph representation of the ML model. Moreover, the apparatus (110) is configured to determine the execution plan (150) based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans. Moreover, a method for determining an execution plan (150) for a plurality of computing nodes (130) is disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Devices and methods for generating execution plans for a machine learning modelTECHNICAL FIELD

[0001] The present disclosure relates to information processing technology. More specifically, the present disclosure relates to devices and methods for generating an execution plan for a machine learning, ML, model on a cluster of computing nodes.BACKGROUND

[0002] Machine Learning (ML) models, such as artificial neural networks, are being implemented in more and more fields for a variety of different purposes and are usually very demanding with respect to computational resources. For instance, current Deep Neural Networks (DNNs) , such as PanGu-α and GPT-4, may have up to billions of parameters. Training and operating such models require a very large number of computations. In this respect, there exist specialized hardware, such as Artificial Intelligence (AI) accelerators, demonstrating a high efficiency on large-size DNN execution. Hence, nowadays their use is wide within the research and industrial community. Nonetheless, designing more potent AI devices is ever rapidly facing the physical limitations of semiconductor technology. Currently, the pace of hardware performance improvement cannot keep up with the increase of the computational requirements of modern DNNs. Thus, parallel computing is a necessary and promising means to alleviate the consequences of these trends. Optimizing parallel computing on a cluster can maximize device efficiency, thus allowing improved training speed and facilitate the execution of large DNN models.

[0003] There are different parallelism strategies of distributed deep learning, namely data parallelism (DP) , operator-level model parallelism (MP) , and pipeline parallelism (PP) . Manually configuring a parallel strategy is time and labor consuming while systematically finding the optimal hybrid parallel strategy is challenging due to the large search space, the advantages and disadvantages of different strategies, and the large number of cluster devices. However, an optimal hybrid parallel strategy is the key point to success in large-scale deep learning training, that is why automatized parallel execution plan generation attracts a lot of interests from both academia and industry.SUMMARY

[0004] It is an objective to provide improved devices and methods for generating an execution plan for a machine learning, ML, model on a cluster of computing nodes.

[0005] The foregoing and other objectives are achieved by the subject matter of the independent claims. Further implementation forms are apparent from the dependent claims, the description, and the figures.

[0006] According to a first aspect, an apparatus for determining an execution plan for a plurality of computing nodes is provided, wherein each computing node comprises one or more processing devices for distributed implementation of a machine learning, ML, model. The plurality of computing nodes may be part of a cluster. The one or more processing devices may comprise one or more graphics processing units (GPUs) , neural processing units (NPUs) , tensor processing units (TPUs) , or other types of AI accelerators.

[0007] The apparatus according to the first aspect is configured to generate, based on a network topology of the plurality of computing nodes and a computational graph representation of the ML model, a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans for the plurality of computing nodes. Moreover, the apparatus according to the first aspect is configured to determine the execution plan based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans. Thus, the apparatus according to the first aspect may provide an optimized hybrid execution plan for synergistically optimizing pipeline parallelism and operator parallelism execution plans resulting in a fast and efficient execution of the ML model on the plurality of computing nodes.

[0008] In a further possible implementation form, the first plurality of pipeline parallelism candidate execution plans implement a pipeline parallelism for distributing a first plurality of ML model tasks of the ML model among the plurality of computing nodes and the second plurality of operator parallelism candidate execution plans implement an operator-level model parallelism for distributing a second plurality of ML model tasks of the ML model between the processing devices of a respective computing node of the plurality of computing nodes.

[0009] In a further possible implementation form, the second plurality of operator parallelism candidate execution plans further implement a data parallelism for distributing input data of the ML model between the plurality of computing nodes. In other words, in this  implementation form, the second plurality of operator parallelism candidate execution plans implement both an operator-level model parallelism for distributing the second plurality of ML model tasks of the ML model between the processing devices of a respective computing node of the plurality of computing nodes and a data parallelism for distributing input data of the ML model between the plurality of computing nodes.

[0010] In a further possible implementation form, for determining the execution plan based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans, the apparatus is configured to:

[0011] combine the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans into a plurality of candidate execution plans; and

[0012] select the execution plan from the plurality of candidate execution plans.

[0013] In a further possible implementation form, for combining the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans into the plurality of candidate execution plans, the apparatus is configured to:

[0014] fuse for each pipeline parallelism candidate execution plan of the first plurality of pipeline parallelism candidate execution plans one or more processing stages for each ML model task of the first plurality of ML model tasks for obtaining a modified first plurality of pipeline parallelism candidate execution plans by using a bijective mapping between the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans; and

[0015] combine the modified first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism execution plans into the plurality of candidate execution plans based on the bijective mapping.

[0016] In a further possible implementation form, the apparatus is further configured to generate the bijective mapping between the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans, wherein each pipeline parallelism candidate execution plan of the first plurality of pipeline parallelism candidate execution plans defines the one or more processing stages for each ML model task of the first plurality of ML model tasks.

[0017] In a further possible implementation form, the apparatus is configured to select the execution plan from the plurality of candidate execution plans such that the selected execution plan fulfills a user constraint.

[0018] In a further possible implementation form, for selecting the execution plan from the plurality of candidate execution plans, the apparatus is configured to:

[0019] determine a computational performance for each of the plurality of candidate execution plans; and

[0020] select the candidate execution plan with the highest computational performance as the execution plan.

[0021] In a further possible implementation form, prior to selecting the execution plan from the plurality of execution plans, the apparatus is configured to remove those candidate execution plans resulting in a peak memory consumption by a processing device of the plurality of computing nodes that is larger than a peak memory consumption threshold value. This allows the apparatus according to the first aspect to operate in a memory efficient manner.

[0022] In a further possible implementation form, the apparatus is further configured, based on the selected execution plan, to partition the computational graph representation of the ML model into a plurality of subgraphs and to generate an executable code for each of the plurality of computing nodes and the respective plurality of processing devices of a computing node based on a respective subgraph of the plurality of subgraphs.

[0023] In a further possible implementation form, for generating the first plurality of pipeline parallelism candidate execution plans, the apparatus is configured to:

[0024] obtain, based on the network topology of the plurality of computing nodes and the computational graph representation of the ML model, a plurality of subgroups (also referred to as cells) of the computational graph representation of the ML model; and

[0025] determine one or more dependencies between the plurality of subgroups of the computational graph representation of the ML model.

[0026] In a further possible implementation form, for generating the first plurality of pipeline parallelism candidate execution plans, the apparatus is further configured to:

[0027] obtain a cost measure for each of the plurality of subgroups of the computational graph representation of the ML model and determine an average total cost measure for a plurality of processing stages of the ML model; and

[0028] assign, based on the one or more dependencies, each of the plurality of subgroups of the computational graph representation of the ML model to each of the plurality of processing stages of the ML model.

[0029] In a further possible implementation form, for determining the average total cost measure for the plurality of processing stages of the ML model, the apparatus is further configured to determine an initial number of processing stages of the ML model.

[0030] In a further possible implementation form, the apparatus is configured to assign, based on the one or more dependencies, each of the plurality of subgroups of the computational graph representation of the ML model to each of the plurality of processing stages of the ML model in such a way that each processing stage of the ML model is assigned with one or more subgroups of the plurality of subgroups of the computational graph representation of the ML model having a cost measure similar to the average total cost measure.

[0031] In a further possible implementation form, for generating the second plurality of operator parallelism candidate execution plans, the apparatus is configured to:

[0032] split the computational graph representation of the ML model into a plurality of n subgraphs for generating a first operator parallelism candidate execution plan of the second plurality of operator parallelism candidate execution plans, wherein n denotes the number of remaining computing nodes of the plurality of computing nodes for a maximum number of processing stages; and

[0033] split step-by-step the plurality of n subgraphs of the computational graph representation of the ML model into further subgraphs for generating the further operator parallelism candidate execution plans of the second plurality of operator parallelism candidate execution plans until the number of further subgraphs is equal to m, wherein m denotes the number of remaining computing nodes of the plurality of computing nodes for a minimum number of processing stages of the ML model.

[0034] In a further possible implementation form, the network topology defines a number of computing nodes, a number of the processing units per computing node, and / or memory capacities of the processing units.

[0035] According to a second aspect, a method for determining an execution plan for a plurality of computing nodes is provided, wherein each computing node comprises one or more processing devices for a distributed implementation of a machine learning, ML, model. As already described above, the one or more processing devices may comprise, for instance, one or more graphics processing units (GPUs) , neural processing units (NPUs) , tensor processing units (TPUs) , or other types of AI accelerators.

[0036] The method according to the second aspect comprises the following steps:

[0037] generating a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans, based on a network topology of the plurality of computing nodes and a computational graph representation of the ML model; and

[0038] determining the execution plan based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans.

[0039] The method according to the first aspect may provide an optimized hybrid execution plan for synergistically optimizing pipeline parallelism and operator parallelism execution plans resulting in a fast and efficient execution of the ML model on the plurality of computing nodes. The method according to the second aspect of the present disclosure can be performed by the apparatus according to the first aspect of the present disclosure. Thus, further features of the method according to the second aspect of the present disclosure result directly from the functionality of the apparatus according to the first aspect of the present disclosure as well as its different implementation forms described above and below.

[0040] According to a third aspect a computer program product is provided, comprising a computer-readable storage medium for storing program code which causes a computer or a processor to perform the method according to the second aspect when the program code is executed by the computer or the processor.

[0041] Details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims.BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In the following, embodiments of the present disclosure are described in more detail with reference to the attached figures and drawings, in which:

[0043] Fig. 1a is a schematic diagram showing an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes with an exemplary architecture;

[0044] Figs. 1b-d are diagrams showing an example for a ML model operator for illustrating different types of parallelisms implemented by an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes;

[0045] Fig. 2 is a diagram showing different processing stages implemented by an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes;

[0046] Fig. 3 is a diagram showing different processing stages implemented by an apparatus according to a further embodiment for generating an execution plan for a cluster of computing nodes;

[0047] Fig. 4 is a diagram showing an exemplary portion of a computational graph representation of a ML model used by an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes;

[0048] Fig. 5 is a diagram showing cells of an exemplary computational graph representation of a ML model used by an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes;

[0049] Fig. 6 is a diagram illustrating different processing stages implemented by an apparatus according to an embodiment for generating a plurality of pipeline parallelism execution plans for generating an execution plan for a cluster of computing nodes;

[0050] Fig. 7 shows a diagram illustrating different processing stages implemented by an apparatus according to an embodiment for generating a plurality of operator parallelism execution plans for generating an execution plan for a cluster of computing nodes;

[0051] Fig. 8 is a diagram illustrating a stage during the generation of a plurality of pipeline parallelism execution plans implemented by an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes;

[0052] Figs. 9a and 9b show graphs illustrating different performance metrics of an apparatus according to an embodiment for generating an execution plan for a cluster of computing nodes; and

[0053] Fig. 10 shows a flow diagram illustrating processing steps of a method for generating an execution plan for a cluster of computing nodes according to an embodiment.

[0054] In the following, identical reference signs refer to identical or at least functionally equivalent features.

[0055] DETAILED DESCRIPTION OF THE EMBODIMENTS

[0056] In the following description, reference is made to the accompanying figures, which form part of the disclosure, and which show, by way of illustration, specific aspects of embodiments of the present disclosure or specific aspects in which embodiments of the present disclosure may be used. It is understood that embodiments of the present disclosure may be used in other aspects and comprise structural or logical changes not depicted in the figures. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims.

[0057] For instance, it is to be understood that a disclosure in connection with a described method may also hold true for a corresponding device or system configured to perform the method and vice versa. For example, if one or a plurality of specific method steps are described, a corresponding device may include one or a plurality of units, e.g. functional units, to perform the described one or plurality of method steps (e.g. one unit performing the one or plurality of steps, or a plurality of units each performing one or more of the plurality of steps) , even if such one or more units are not explicitly described or illustrated in the figures. On the other hand, for example, if a specific apparatus is described based on one or a plurality of units, e.g. functional units, a corresponding method may include one step to perform the functionality of the one or plurality of units (e.g. one step performing the functionality of the one or plurality of units, or a plurality of steps each performing the functionality of one or more of the plurality of units) , even if such one or plurality of steps are not explicitly described or illustrated in the figures. Further, it is understood that the features of the various exemplary embodiments and / or aspects described herein may be combined with each other, unless specifically noted otherwise.

[0058] Figure 1a shows a schematic diagram illustrating an apparatus 110 for determining an execution plan 150 for a plurality of parallel computing nodes 130 of a parallel computer  cluster (or short cluster) 120. Each computing node 130 comprises one or more processing devices 140 for a distributed implementation of a machine learning, ML, model. The processing devices 140 of each computing node 130 may comprise, for instance, one or more graphics processing units (GPUs) , neural processing units (NPUs) , tensor processing units (TPUs) , or other types of AI accelerators 140.

[0059] As illustrated in figure 1a, the apparatus 110 may comprise a processing circuitry, e.g. one or more processors 111 for processing data. Moreover, the apparatus 110 may comprise a communication interface 113 for communicating with the cluster 120 and / or its computing nodes 130. The processing circuitry 111 may be implemented in hardware and / or software and may comprise digital circuitry, or both analog and digital circuitry. Digital circuitry may comprise components such as application-specific integrated circuits (ASICs) , field-programmable gate arrays (FPGAs) , digital signal processors (DSPs) , or general-purpose processors. The apparatus 110 may further comprise a memory 115 configured to store executable program code which, when executed by the processing circuitry 111, causes the apparatus 110 to perform the functions and methods described herein.

[0060] In an embodiment, the apparatus 110 may be part of ML model compiling chain, for instance, the MindSpore compiling chain. In an embodiment, the apparatus 110 may be implemented on a cluster 120 such that the apparatus 110 is implemented on the computing nodes and provides the same result on each computing node. In an embodiment, the computing nodes may interpret the output hybrid parallelism strategy described below with their different ID owned by the nodes to generate different programs to collaborate between them as a distributed computation.

[0061] In a common scenario, a DNN may be developed using MindSpore and Python, compiled using MindSpore, and deployed on a cluster, such as the cluster 120. As will be appreciated, MindSpore may translate the python DNN to a computational graph representation (MindIR) stored in the memory 115 of the apparatus 110. As will be described in more detail below, based on this computational graph representation of the DNN (as well as information about the network topology of the cluster 120) , the apparatus 110 is configured to determine the best hybrid parallelism strategy for the given DNN on the given cluster 120. MindSpore may take this optimal hybrid parallelism strategy and convert the computational graph into subgraphs and deploy subgraphs on the computing nodes 130 of the cluster 120 and then execute the subgraphs in parallel on the cluster 120 to execute the DNN. Instead of providing the ML model, in particular DNN in Python, the apparatus 110 may be configured to receive a translated (compiled) MindIR.

[0062] The execution of the parallelized ML model, in particular DNN could be either a training process or an inference process. The DNN may be executed for numerous different applications, such as recommender systems (movie recommendations, product recommendations, music recommendations, personalized advertisements) , voice assistants (speech recognition, natural language understanding, voice-controlled devices, virtual assistants) , E-commerce (product search, product classification, customer behavior analysis, fraud detection) , social media (content moderation, user profiling, sentiment analysis, recommendation systems) , financial services (fraud detection, risk assessment, credit scoring, portfolio management) and the like.

[0063] As will be described in more detail below, the apparatus 110 is configured to generate, based on a network topology of the plurality of computing nodes 130 of the cluster 120 and a computational graph representation of the ML model, a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans for the plurality of computing nodes 130. Moreover, the apparatus 110 is configured to determine a hybrid execution plan 150 based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans for parallel execution of the ML on the plurality of computing nodes 130 of the cluster 120.

[0064] In an embodiment, the first plurality of pipeline parallelism candidate execution plans implement a pipeline parallelism for distributing a first plurality of ML model tasks of the ML model among the plurality of computing nodes 130 and the second plurality of operator parallelism candidate execution plans implement an operator-level model parallelism for distributing a second plurality of ML model tasks of the ML model between the processing devices 140 of a respective computing node 130 of the plurality of computing nodes.

[0065] In a further embodiment, the second plurality of operator parallelism candidate execution plans further implement a data parallelism for distributing input data of the ML model between the plurality of computing nodes 130.

[0066] As used herein data parallelism (DP) , operator-level model parallelism (MP) and pipeline parallelism (PP) have the following meaning.

[0067] A data parallelism (DP) partitions input data and replicates DNN models on multiple devices and assigns each device with a partition of input data. In each training iteration,  the devices compute local gradients and synchronize the gradients with other devices using all-reduce communication.

[0068] An operator-level model parallelism (MP) partitions inside DNN operators and their related tensors, inserts and modifies operators to a parallel version and assigns their tensor partitions to multiple devices. These devices gather the results from parallel devices. The shape of a tensor is often multi-dimensional. Partitioning different dimensions results in different communication costs.

[0069] A pipeline parallelism (PP) groups consecutive DNN operators and partitions between the grouped operators into pipeline stages and deploys different stages on different devices. To have better performance, a training iteration is often partitioned into micro-batches. Each micro-batch is fed into the pipeline in order, thus overlapping the usage of devices. In each micro-batch, gradients may be averaged before being applied to the models. To use pipeline parallelism, parameters need to be set, including the number of pipeline stages, the assignment of operators to stages, and the micro-batch size.

[0070] A hybrid parallelism combines the different parallelisms mentioned above. A common practice is to use hybrid parallelism for training large scale models because of speed and memory constraints. To deploy hybrid parallelism on a computer cluster 120, the mathematical product (multiplication) of the number of devices of each chosen parallelism mode shall equal to the total number of devices of the cluster. For example, if a computer cluster has 24 devices, a valid hybrid parallelism execution plan could be: pipeline parallelism in 3 partitions (so-called stages) , and inside each stage data parallelism in 2 partitions and operator-level model parallelism in 4 partitions, therefore 2*4*3=24.

[0071] Figures 1b-d are diagrams showing an example for a ML model operator for illustrating different types of the parallelisms defined above, as implemented by the apparatus 110 according to an embodiment for generating the execution plan 150 for the cluster 120 of computing nodes 130 shown in figure 1a. As already described above, in an embodiment, an operator-level parallelism or parallel strategy defines the parallelization of an ML model operator by defining how its input tensors are partitioned on different processing devices 140 (more specifically how each dimension of its input tensors are partitioned) . In figure 1b, for example, the operator MatMul1 (representing, by way of example, a matrix multiplication operation) has two input matrices or tensors, namely the tensors “data” and “w1” which in this example have the dimensions (256, 512) and (512, 128) respectively. The strategy denoted as [1, 1] , [1, 1] applies for each dimension the same partitioning. In this case, it defines that each dimension of each input tensor should have only 1 partition  so that essentially there is no splitting for this strategy. If multiple processing devices 140 are running this operator, then each device 140 will perform the same computation with the same replicated input tensor.

[0072] In the computational graph representation of an ML model, in particular neural network, some tensors are usually associated with input data, while other tensors are associated with the neural network model itself (e.g. neural network parameters or weights) . Depending on which tensor is partitioned by the strategy selected for an operator, one can distinguish between different types of parallelisms, as defined in more detail above. Partitioning a tensor associated with the data will be herein referred to as “data parallelism” , while partitioning a tensor associated with the ML model will be herein referred to as “operator-level model-parallelism” , as will be further illustrated by the examples shown in figures 1c and 1d.

[0073] In the example shown in figure 1c the first dimension of the first input tensor “data” of the MatMul1 operator is partitioned into two halves. Because this tensor is associated with the input data, this kind of partitioning strategy, i.e. parallelism is herein referred to as “data parallelism” (or alternatively a data parallelism strategy) . In the example shown in figure 1c the second dimension of the second input tensor “w2” of the MatMul2 operator is partitioned into two halves. Because this tensor is associated with the ML model, in particular neural network, this kind of partitioning strategy, i.e. parallelism is herein referred to as “operator-level model-parallelism” (or alternatively an operator-level model-parallelism strategy) . As will be appreciated, as used herein a partitioning strategy for an operator may implement both “data parallelism” and “operator-level model-parallelism” , if both the input tensor (s) associated with data and the input tensor (s) associated with the neural network model (i.e. neural networks parameters) are partitioned.

[0074] As will be described in more detail in the following, embodiments disclosed herein allow systematically generating a very high-performance (good quality) parallel execution plan 150 that covers simultaneously data parallelism, operator-level model parallelism and pipeline parallelism. This may be achieved on a time scale of minutes (can be used on compile-time) without any expensive tuning or profiling for a plurality of ML model architectures, such as Deep Neural Network architectures, especially for very large DNNs and is usable for computer clusters 120 with a large number of computing nodes 130 and processing devices 140.

[0075] As illustrated in figure 2, the apparatus 110 takes as inputs (a) a computational graph representation of a ML model, in particular a DNN, and (b) a network topology, i.e. parallel  machine configuration of the plurality of computing nodes 130 of the cluster 120 with their processing devices 140. In an embodiment, the network topology, i.e. parallel machine configuration may define in particular the number of the plurality of computing nodes 130 of the cluster 120 and / or the numbers of processing devices 140 of each computing node 130. Moreover, the network topology may define the connection topology, computational capabilities, memory capacities and / or communication capabilities of the computing nodes 130 and / or processing devices 140. As will be described in more detail in the following, based on these inputs, the apparatus 110 is configured to generate an optimized execution plan 150 (also referred to as partitioning configuration or strategy) , which in an embodiment takes into account pipeline parallelism, data parallelism, and operator-level parallelism. In an embodiment, the generated execution plan 150 may then be used for transforming the computational graph representation into a parallel computing version by splitting the computational graph representation into local sub-graphs. Each local sub-graph may be compiled and executed on each computing node 130 of the parallel computer cluster 120.

[0076] For generating the hybrid execution plan 150 based on the computational graph representation and the cluster network topology the apparatus 110 according to an embodiment may implement two main processing phases 200 and 250, as illustrated in figure 2, namely a first phase 200 for the generation of a plurality of candidate execution plans and a second phase 250 for the selection of the desired, e.g. optimal execution plan 150 from the plurality of candidate execution plans, i.e. deciding on the actual execution strategy.

[0077] As illustrated in figure 2, for the candidate generation phase 200 the apparatus 110 according to an embodiment may implement three modules 210, 220, 230, namely a module 210 for pipeline parallelism candidate execution plan generation, a module 220 for operator parallelism (including data parallelism and operator-level model parallelism) candidate execution plan generation, and a module 230 for hybrid parallelism candidate execution plan generation.

[0078] In an embodiment, the pipeline parallelism (PP) candidate execution plan generation module 210 takes as inputs the computational graph representation of the ML model and the network topology of the cluster 120 and outputs a balanced assignment of computational graph operators to pipeline partitions, where the current number of pipeline partitions is the maximal possible pipeline partitions of the given parallel machine, and the balancing is based on the importance (in ratio) of operator amount in the computational graph.

[0079] In an embodiment, the operator parallelism candidate execution plan generation module 220 takes as inputs the computational graph representation of the ML model and the network topology of the cluster 120 and outputs a sequence or list of operator parallelism candidate execution plans, from the minimal possible operator parallelism partitions to the maximal possible operator parallelism partitions of the given cluster 120 (inversed order as output could be an alternative) with respect to the possible pipeline stage partitions.

[0080] In an embodiment, the hybrid parallelism candidate execution plan generation module 230, takes the outputs of the two modules 210, 220 described above as inputs, and outputs a sequence of hybrid parallelism candidate execution plans, where the length of the sequence is the same as for the previous module.

[0081] As further illustrated in figure 2, for the strategy decision phase, i.e. the execution plan selection phase 250 the apparatus may implement a module 250, which takes the hybrid parallelism candidate execution plan sequence, the machine configuration, i.e. network topology and optionally one or more user constraints and / or objectives (such as “select the best performance execution plan with 30 GB memory on each device” ) and which outputs the final decision (i.e. the selected hybrid parallelism execution plan 150) . In an embodiment, if no user objective is defined, the apparatus 110 may be configured to select the fastest execution plan 150 from the sequence of hybrid parallelism candidate execution plans.

[0082] As will be appreciated, according to embodiments disclosed herein the apparatus 110 is configured to fuse data-parallelism and operator-level model parallelism into operator parallelism and combine with pipeline parallelism for making the final selection. Moreover, according to embodiments disclosed herein the apparatus 110 significantly reduces the complexity of each set of level parallelism candidates, so that in comparison to other approaches, such as Alpa or PTD-P, the processing time even for very large DNNs and / or for very big computer clusters may be significantly reduced.

[0083] Different to, for instance, the Alpa approach, which emulates all inter-op (pipeline) parallelism possibilities, uses a Dynamic Programming solver to find a good solution, and uses a 2D mesh to represent only two different levels of communication capacity of a parallel machine, according to embodiments disclosed herein the apparatus 110 only needs to prepare one balanced pipeline parallelism candidate execution plan (for a maximum number of stages) and may use a sequence for parallelism candidate execution plans with respect to the hierarchical (multi-level) communication capacities. This approach ensures to find good (low execution time of parallelized computational graph)  parallel execution plans without missing good execution plans due to the quality of the chosen Dynamic Programming solver or by the expressibility limitation of multi-level communication of a big computer cluster.

[0084] Furthermore, according to embodiments disclosed herein the apparatus 110 (different to, for instance, the Alpa approach requiring profiling the execution time to determine an optimal parallelism strategy) , may allow, for instance, a user to provide user constraints and / or objectives. For instance, in an embodiment the apparatus 110 may be configured to determine based on one or more user constraints and / or objectives to determine the optimal hybrid parallelism execution plan that consumes at maximum 15 GB memory space on 32 GB processing devices.

[0085] In the following more detailed embodiments of the apparatus 110 for generating an optimal execution plan 150 for the cluster 120 of computing nodes 130 will be described in more detail in the context of figure 2 and the additional figures.

[0086] In an embodiment, the pipeline parallelism candidate execution plan generation module 210 is configured to receive the maximum number of possible pipeline partitionings (which in an embodiment corresponds to the number of computing nodes 130 of the cluster 120) , gets the list of cells (acell is a subgroup of operators, normally corresponding to a block of the DNN with respect to user coding way) from the computational graph representation, and determines the dependency between cells according to the computational graph representation (see 211) . In an embodiment, the computational graph representation may be a MindSpore intermediate representation (MindIR) . The dependency could be represented by any data structure, such as a list, tree, graph, table, array, or the like. In the following some exemplary embodiments are described, where the dependency is represented as a list, which may be a bit less accurate than other more sophisticated data structures, but often sufficient enough.

[0087] In a further processing phase, the pipeline parallelism candidate execution plan generation module 210 implemented by the apparatus 110 according to an embodiment may obtain the pre-configured cost or weight of each cell (which may be provided in any measuring unit, because finally a ratio between cells is used) , and then compute the per-stage cost. In an embodiment, the apparatus 110 may be configured to compute the average, i.e. the per-stage cost as the sum of the costs of all cells divided by the number of stages. As will be appreciated, the order of these processing stages may be interchanged with the dependency determination stages described above.

[0088] Once the dependencies and the per-stage cost has been determined, for instance, in the way described above, the apparatus 110 may assign the cells (and their operators) to each stage. In an embodiment, this may be done by assigning a stage identifier to each stage. As will be appreciated, if, for instance, cell B depends on cell A, then B can only be in the same stage as A or in a later stage, but not in a previous stage. For each stage, the apparatus 110 is configured to fill the stage with cells so that the total cost of a respective stage is equal to or close to the computed per-stage cost.

[0089] In an embodiment, the operator parallelism candidate execution plan generation module 220 implemented by the apparatus 110 determines, based on the computational graph representation (such as a MindIR) of the ML model and the network topology, an optimal configuration (for instance, the configuration resulting in the fastest execution time) splitting the computation graph representation of the ML model into n subgraphs (also referred to as partitions) , where n denotes the remaining number of processing devices 140 per stage for the maximum number of stages so that the product of n and the maximum number of stages is equal to the total number of processing devices 140 of the cluster 120, i.e. n *max_stages = total number of processing devices 140. In an embodiment, the apparatus 110 is configured to perform the partition in such a way that the subgraphs of the computational graph representation of the ML model have a similar structure and costs in terms of computation and communication, but handle different data, in the situation of SPMD (Single Program Multiple Data, terminology in parallel computing) . For performing the partition in this way the apparatus 110 may implement a known solution, such as D-Rec (described in the paper Wang, H. et al. (2021) . Efficient and Systematic Partitioning of Large and Deep Neural Networks for Parallelization. In: Sousa, L., Roma, N., Tomás, P. (eds) Euro-Par 2021: Parallel Processing. Euro-Par 2021. Lecture Notes in Computer Science () , vol 12820. Springer, Cham. https:  / / doi. org / 10.1007 / 978-3-030-85665-6_13) , Tofu (described in the paper Minjie Wang, Chien-chin Huang, and Jinyang Li. 2019. Supporting Very Large Models using Automatic Dataflow Graph Partitioning. In Fourteenth EuroSys Conference 2019 (EuroSys’19) , March 25–28, 2019, Dresden, Germany. ACM, New York, NY, USA, 17 pages. https:  / / doi. org / 10.1145 / 3302424.3303953) or the like.

[0090] Thereafter, the apparatus 110 according to an embodiment is configured to continue repeatedly splitting subgraphs of the computational graph representation of the ML model into further subgraphs (i.e. sub-subgraphs) until the number of subgraphs is equal to m, wherein m denotes the remaining number of processing devices 140 per stage for the minimum number of stages so that the product of m and the minimum number of stages is  equal to the total number of processing devices 140 of the cluster 120, i.e. m *min_stages = total number of processing devices 140. Depending on the computational graph representation of the ML model the minimum number of stages may be often equal to 1, and in such case, m would be equal to the total number of processing devices 140. For repeatedly splitting the computational graph representation of the ML into further subgraphs the apparatus 110 may be configured to implement, for instance, the D-Rec algorithm.

[0091] For instance, for a cluster 120 of 8 computing nodes 130 with 4 processing devices 140 each, the apparatus 110 would set max PP = 8 and min PP = 1 and determine first the best operator parallelism for 4 subgraphs (corresponding to 4 processing devices 140 per stage with 8 stages) , then for 8 subgraphs (corresponding to 8 processing devices 140 per stage with 4 stages) , then for 16 subgraphs (corresponding to 16 processing devices 140 per stage with 2 stages) and finally for 32 subgraphs (with only 1 stage, i.e. with no pipeline parallelism) . The operator parallelism candidate execution plan generation module 220 implemented by the apparatus 110 is further configured to record these intermediate results as a sequence (see 223 in figure 2) and to output this sequence to the hybrid parallelism candidate execution plan generation module 230.

[0092] Thus, the hybrid parallelism candidate execution plan generation module 230 implemented by the apparatus 110 according to an embodiment receives as input the previously described max-stages balanced pipeline parallelism strategy from the pipeline parallelism candidate generation module 210 and the sequence of operator parallelism candidate execution plans from the operator parallelism candidate generation module 220. In accordance with this sequence the apparatus 110 may fuse stages into fewer stages by modifying a cell identifier (ID) and an operator stage identifier (ID) and combine the operator parallelism candidate execution plan and its corresponding pipeline parallelism candidate execution plan into the output sequence of hybrid parallelism candidate execution plans (see 233 in figure 2) . In an embodiment, the apparatus 110 is configured to respect the cost balancing among stages during the fusion of stages. For instance, the apparatus 110 may be configured to recompute the cost per stage according to the new number of stages. As will be appreciated, for many fusions recomputing the per-stage cost may be omitted, because the remaining cost balancing may be known.

[0093] As already described above, the execution plan selection, i.e. strategy decision module 250 implemented by the apparatus 110 according to an embodiment may receive as inputs the balanced hybrid parallelism candidate execution plan sequence as well as the one or more user constraints and / or objectives, if available. Based on this input the  execution plan selection module 250 implemented by the apparatus 110 may, for instance, first estimate the per-device peak memory consumption for each candidate of the hybrid parallelism sequence and eliminate those candidate execution plans that consume too much memory (see 251 in figure 2) . Subsequently, the execution plan selection module 250 may estimate the performance of the remaining candidate execution plans and pick the most performant execution plan as the output (see 253 in figure 2) . The apparatus 110 may use either precise values for the comparison, or compute a trend of value to do a related analysis (there is a tolerance for the accuracy of the precision since the parallelisms are discrete numbers) .

[0094] In an alternative embodiment illustrated in figure 3, the apparatus 110 may be configured to implement the functionality of the operator parallelism candidate execution plan generation module 220 described above into the hybrid parallelism candidate execution plan generation module 230. In this embodiment, the hybrid parallelism candidate execution plan generation module 230 implemented by the apparatus 110 first may prepare a bijective mapping between the operator parallelism and the pipeline parallelism (see 231) and decides how the parallelism candidate sequence looks like. Subsequently, the operator parallelism candidate execution plan generation module 230 according to this variant repeatedly splits subgraphs into sub-subgraphs according to the decided sequence and then combines the pipeline parallelism strategies into the sequence (see 332a, b in figure 3) .

[0095] In the following some further embodiments of the apparatus 110 as well as an illustrative example will be described in more detail. As already described above, the apparatus 110 is configured to generate a hybrid execution plan 150 for the exemplary cluster 120 in figure 1a based on (a) a computational graph representation of a ML model, in particular a DNN and (b) a network topology, i.e. parallel machine configuration of the plurality of computing nodes 130 of the cluster 120 with their processing devices 140. As will be appreciated, a computational graph representation of a ML model, in particular neural network contains operators describing the operations that need to be performed in order to run the neural network (e.g. for training) . Each operator has information that will later help determine its distribution strategy, for example, the shape of its inputs, as well as information about the operators that are linked to its input and output. The topology of the computational graph describes the dependencies of the operators. For instance, the operator Add1 of the portion of the exemplary computational graph shown in figure 4 is dependent on the operator MatMul1, while the operator MatMul2 is dependent on both the operator Add1 (directly) and the operator MatMul1 (via Add1) .

[0096] As already described above, the apparatus 110 according to an embodiment may be configured to regroup operators into subgroups of operators (herein also referred to as cells of operators) . For instance, the portion of the exemplary computational graph shown in figure 4 by way of example includes two cells, namely a cell denoted “Block 2” and a cell denoted “Top query layer” . The cell denoted “Block 2” may be, for instance, a block in a transformer network that includes two operators, namely one matrix multiplication operator (MatMul1) and one addition operator (Add1) . The cell called “Top query layer” includes just one matrix multiplication operator (MatMul2) . As will be appreciated, the output of Add1 is the input of MatMul2 meaning that the output of the “Block 2” cell is the input of the “Top query layer” cell. The complete computational graph may include complex dependencies between the cells and the operator (s) they contain, with multiple inputs or outputs per operator or per cell. A computational graph may also be represented as a cell graph, where its operators are omitted so that this graph only contains cells. Figure 5 shows an example for a cell graph.

[0097] As already described above, the apparatus 110 is configured to generate two different kinds of candidate sets, namely the pipeline partitioning candidate execution plans and the operator-level candidate execution plans. The pipeline partitioning candidate execution plans define different ways to group cells into pipeline stages from a given number of stages. The operator-level candidate execution defines different ways to parallelize each operator by assigning them a strategy that cuts its inputs.

[0098] For generating the pipeline partitioning candidate execution plans, as already described above, a first candidate execution plan is generated by the apparatus 110 according to an embodiment for a given maximum possible number of stages. A cost is associated to each cell, and an average cost per stage is determined from the total cell costs and the given number of stages. In an embodiment, the apparatus 110 is configured to generate the initial partition so that each stage is balanced. This means that in an embodiment the cost of cells within stages should be as close as possible. The partition should respect the dependencies of the computational graph so that the stage of any cell should be at a lower or equal stage compared to the stage of its outputs.

[0099] Figure 6 shows an example how the initial pipeline partitioning candidate execution plan may be generated by the apparatus 110 according to an embodiment based on a computational graph representation of an ML model. In a first step the apparatus 110 chooses an initial number of stages. In the example shown in figure 6 the maximum possible stage number is chosen, which by way of example is 4. In the second step of figure 6 the apparatus 110 retrieve the cells in the computational graph. In the third step of  figure 6 the apparatus 110 extracts the dependencies between the cells. As already described above, in an embodiment, the apparatus 110 may be configured to determine these dependencies in the form of an ordered list so that each cell in the list can be assigned to the same stage or to the next stage compared to its predecessor in the list. In the fourth step of figure 6 the apparatus 110 is configured to assign a cost to each cell.For example, this cost can represent the computational time requirement to execute the operators within this cell. In the fifth step of figure 6 the apparatus 110 determines information that helps balancing the stages. In the example shown in figure 6, the average cost per stage is computed by the apparatus 110 by adding the costs of all cells (in this example 8.8) and dividing the total costs by the number of stages (in this example 4) resulting in an average cost per stage of 2.2 for this example. In the sixth step of figure 6 the apparatus110 is configured to balance the 4 stages so that the total cost of the cells of each stage is about equal to the average cost per stage. As can be taken from the left-hand side of figure 6, in this example the partitioning is generated so that stage 0 comprises Embedding and Block0 cells with a cost of 2.5, stage 1 comprises Block0 with a cost of 2, stage 2 comprises Block2 with a cost of 2, and stage 3 comprises Top query embedding, Top query layer, LayerNorm and Head with a cost of 2.3.

[0100] As already described above, the operator-level execution plan candidates are generated in successive steps for possible number of the processing devices 140. In each step the apparatus 110 is configured to compute an operator-level execution plan candidate. For each execution plan candidate, a strategy is computed for each operator in the computational graph. Figure 7 shows an example with three operators and their associated strategy. The notation [2, 1] , [1, 1] for the operator MatMul1 in Step1 means that its first input has its first dimension cut into two parts, and its second input is replicated. This means that the inputs of the operator MatMul1 will have, for instance, dimensions of (128, 512) , (512, 128) on each device in this configuration for two processing devices 140.

[0101] As already described above, the initial pipeline partition candidate defines the cell partitioning for a given numbers of stages. Based on this initial candidate the apparatus 110 is configured to generate further candidates for other possible numbers of stages, for instance, by fusing stages, i.e. by grouping the cells of different stages into the same stage. In an embodiment, the apparatus 110 is configured to generate a new pipeline partition so that stages are approximately balanced. These candidates are also generated in successive steps. Each step generates a pipeline partition candidate for a number of processing devices 140. Figure 8 shows an example where the initial partition candidate for 4 stages is used to generate the partition candidate for 2 stages. In this example, stage  0 and stage 1 are fused into stage 0, and stage 2 and stage 3 are fused into stage 1. These two stages form the partition candidate for 2 stages.

[0102] As already described above, the operator-level strategy candidates and the pipeline partition candidates are each associated with a number of processing devices 140. These two kinds of candidates can now be associated with each other so that the product of their number of devices equals the total number of available processing devices 140. For example, with 4 processing devices 140 available, the pipeline partition candidate for 4 processing devices 140 is associated with the operator-level strategy candidate for 1 processing device 140, the pipeline partition candidate for 2 processing devices 140 is associated with the operator-level strategy for 2 processing devices 140, and the pipeline partition for 1 processing device 140 is associated with the operator-level strategy candidate for 4 processing devices 140. These candidates form the plurality of hybrid execution plan candidates.

[0103] As already described above, for selecting a best or optimized execution plan from the plurality of hybrid execution plan candidates, in an embodiment, the apparatus 110 may estimate the memory usage of each execution plan candidate and exclude all the candidates that exceed a certain threshold. This threshold can be determined by the hardware characteristics of the computing nodes 130 and / or processing devices 140. For example, a hybrid candidate 1 pipeline stage may be removed because it requires 42 GB of memory per device, but the devices 140 only support 32 GB of memory. As a consequence, only two remaining candidates may be available. For such a case, a performance estimation by the apparatus 110 may show that the candidate with 2 pipeline stages would have a better performance than the candidate with 4 pipeline stages, so it is selected because it has the best performance of all remaining hybrid strategy candidates.

[0104] Figures 9a and 9b show graphs illustrating different performance metrics of the apparatus 110 according to an embodiment for generating the execution plan 150 for the cluster 120 of computing nodes 130. Figure 9a illustrates that embodiments of the apparatus 110 may generate hybrid parallelism execution plans in minutes or even seconds even for a very large DNN on a very big cluster 120. For example, it takes only less than 20 seconds to find out the best hybrid parallelism execution plan for a 200 billion parameters giant DNN (eg. GPT-3, or Pangu) for deploying on a 1024 NPU cluster 120. Thus, embodiments disclosed herein may be integrated in the online compiling chain with ignorable impact (a compiling chain for such DNN will take 30 min –1 hour to prepare an execution) . Moreover, embodiments disclosed herein do not require a heavy profiling step as some conventional approaches, which may consume the whole cluster 120 for hours or even  days. In figure 9b, the line with triangles illustrates the quality of the execution plan 150 generated by embodiments of the apparatus 110, while the line with crosses shows the performance of PTD-P (also known as Megatron-LMv2) .

[0105] Figure 10 is a flow diagram showing processing steps of a method 1000 for generating an execution plan for the cluster 110 of computing nodes 120 according to an embodiment. The method 1000 comprises generating 1001 a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans, based on a network topology of the plurality of computing nodes 130 and a computational graph representation of a ML model. Moreover, the method 1000 comprises determining 1003 the execution plan based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans.

[0106] The method 1000 may be performed by the apparatus 110 described above. Thus, further features of the method 1000 result directly from the functionality of the apparatus 110 as well as its different embodiments described above and below.

[0107] The person skilled in the art will understand that the "blocks" ( "units" ) of the various figures (method and apparatus) represent or describe functionalities of embodiments of the present disclosure (rather than necessarily individual "units" in hardware or software) and thus describe equally functions or features of apparatus embodiments as well as method embodiments (unit = step) .

[0108] In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. The described embodiment of an apparatus is merely exemplary. For example, the unit division is merely logical function division and may be another division in an actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

[0109] The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or  may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

[0110] In addition, functional units in the embodiments disclosed herein may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

Claims

1.An apparatus (110) for determining an execution plan (150) for a plurality of computing nodes (130) , each computing node (130) comprising one or more processing devices (140) for distributed implementation of a machine learning, ML, model, wherein the apparatus (110) is configured to:generate a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans, based on a network topology of the plurality of computing nodes (130) and a computational graph representation of the ML model;determine the execution plan (150) based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans.2.The apparatus (110) of claim 1, wherein the first plurality of pipeline parallelism candidate execution plans implement a pipeline parallelism for distributing a first plurality of ML model tasks of the ML model among the plurality of computing nodes (130) and wherein the second plurality of operator parallelism candidate execution plans implement an operator-level model parallelism for distributing a second plurality of ML model tasks of the ML model between the processing devices (140) of a respective computing node of the plurality of computing nodes (130) .3.The apparatus (110) of claim 2, wherein the second plurality of operator parallelism candidate execution plans further implement a data parallelism for distributing input data of the ML model between the plurality of computing nodes (130) .4.The apparatus (110) of any one of the preceding claims, wherein for determining the execution plan (150) based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans the apparatus (110) is configured to:combine the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans into a plurality of candidate execution plans; andselect the execution plan (150) from the plurality of candidate execution plans.5.The apparatus (110) of claim 4, wherein for combining the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans into the plurality of candidate execution plans the apparatus (110) is configured to:fuse for each pipeline parallelism candidate execution plan of the first plurality of pipeline parallelism candidate execution plans one or more processing stages for each ML model task of the first plurality of ML model tasks for obtaining a modified first plurality of pipeline parallelism candidate execution plans by using a bijective mapping between the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans; andcombine the modified first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism execution plans into the plurality of candidate execution plans based on the bijective mapping.6.The apparatus (110) of claim 5, wherein the apparatus (110) is further configured to generate the bijective mapping between the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans, wherein each pipeline parallelism candidate execution plan of the first plurality of pipeline parallelism candidate execution plans defines the one or more processing stages for each ML model task of the first plurality of ML model tasks.7.The apparatus (110) of any one of claims 4 to 6, wherein the apparatus (110) is configured to select the execution plan (150) from the plurality of candidate execution plans such that the selected execution plan (150) fulfills a user constraint.8.The apparatus (110) of any one of claims 4 to 7, wherein for selecting the execution plan (150) from the plurality of candidate execution plans the apparatus (110) is configured to:determine a computational performance for each of the plurality of candidate execution plans; andselect the candidate execution plan with the highest computational performance as the execution plan (150) .9.The apparatus (110) of claim 8, wherein prior to selecting the execution plan (150) from the plurality of execution plans the apparatus (110) is configured to remove those candidate execution plans resulting in a peak memory consumption by a processing  device (140) of the plurality of computing nodes (130) that is larger than a peak memory consumption threshold value.10.The apparatus (110) of any one of the preceding claims, wherein the apparatus (110) is further configured, based on the execution plan (150) , to partition the computational graph representation of the ML model into a plurality of subgraphs and to generate an executable code for each of the plurality of computing nodes (130) based on a respective subgraph of the plurality of subgraphs.11.The apparatus (110) of any one of the preceding claims, wherein for generating the first plurality of pipeline parallelism candidate execution plans the apparatus (110) is configured to:obtain, based on the network topology of the plurality of computing nodes (130) and the computational graph representation of the ML model, a plurality of subgroups of the computational graph representation of the ML model; anddetermine one or more dependencies between the plurality of subgroups of the computational graph representation of the ML model.12.The apparatus (110) of claim 11, wherein for generating the first plurality of pipeline parallelism candidate execution plans the apparatus (110) is further configured to: obtain a cost measure for each of the plurality of subgroups of the computational graph representation of the ML model and determine an average total cost measure for a plurality of processing stages of the ML model; andassign, based on the one or more dependencies, each of the plurality of subgroups of the computational graph representation of the ML model to each of the plurality of processing stages of the ML model.13.The apparatus (110) of claim 12, wherein for determining the average total cost measure for the plurality of processing stages of the ML model the apparatus (110) is further configured to determine an initial number of processing stages of the ML model.14.The apparatus (110) of claim 12 or 13, wherein the apparatus (110) is configured to assign, based on the one or more dependencies, each of the plurality of subgroups of the computational graph representation of the ML model to each of the plurality of processing stages of the ML model in such a way that each processing stage of the ML model is assigned with one or more subgroups of the plurality of subgroups of the  computational graph representation of the ML model having a cost measure similar to the average total cost measure.15.The apparatus (110) of any one of the preceding claims, wherein for generating the second plurality of operator parallelism candidate execution plans the apparatus (110) is configured to:split the computational graph representation of the ML model into a plurality of n subgraphs for generating a first operator parallelism candidate execution plan of the second plurality of operator parallelism candidate execution plans, wherein n denotes the number of remaining computing nodes of the plurality of computing nodes (130) for a maximum number of processing stages; andsplit step-by-step the plurality of n subgraphs of the computational graph representation of the ML model into further subgraphs for generating the further operator parallelism candidate execution plans of the second plurality of operator parallelism candidate execution plans until the number of further subgraphs is equal to m, wherein m denotes the number of remaining computing nodes of the plurality of computing nodes (130) for a minimum number of processing stages of the ML model.16.The apparatus (110) of any one of the preceding claims, wherein the network topology defines a number of computing nodes (130) , a number of the processing devices (140) per computing node (130) , and / or memory capacities of the processing devices (140) .17.A method (1000) for determining an execution plan (150) for a plurality of computing nodes (130) , each computing node (130) comprising one or more processing devices (140) for a distributed implementation of a machine learning, ML, model, wherein the method (1000) comprises:generating (1001) a first plurality of pipeline parallelism candidate execution plans and a second plurality of operator parallelism candidate execution plans based on a network topology of the plurality of computing nodes (130) and a computational graph representation of the ML model; anddetermining (1003) the execution plan (150) based on the first plurality of pipeline parallelism candidate execution plans and the second plurality of operator parallelism candidate execution plans.18.A computer program product comprising a computer-readable storage medium for storing program code which causes a computer or a processor to perform the method (1000) of claim 17, when the program code is executed by the computer or the processor.