Smart accelerator allocation and reclamation for deep learning jobs in a computing cluster

Embodiments for accelerator allocation and reclamation for deep learning jobs in a computing cluster. Metrics are recorded of each accelerator of a set of accelerators allocated to a deep learning job including computing a gain of computational power by an additional allocation of new accelerators and computing a cost of transferring data among the new accelerators and the set of allocated accelerators. Ones of the new accelerators are allocated to the deep learning job or ones of the set of allocated accelerators assigned to perform the deep learning job are reclaimed upon determining an optimal accelerator topology by comparing the gain of computation power and the cost of transferring data.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates in general to computing systems, and more particularly, to various embodiments for allocating and reclaiming accelerators for performing deep learning jobs in distributed computing environments.

Description of the Related Art

In today's interconnected and complex society, computers and computer-driven equipment are more commonplace. When performing compute-intensive workloads such as data analytics, an effective framework involves distributed parallel computing, which operates to disperse processing tasks across multiple processors operating on one or more computing devices such that parallel processing may be executed simultaneously. One example of parallel computing involves deep learning. Deep learning is a machine learning technique that employs a training process associated with a network of learner units (e.g., processing units) to determine previously unknown features, classifications and/or patterns associated with data provided to the network of learner units. Deep learning is often employed in technical fields such as, for example, speech recognition, image recognition, graphical modeling and bioinformatics.

SUMMARY OF THE INVENTION

Various embodiments for accelerator allocation and reclamation for deep learning jobs in a computing cluster are provided. In one embodiment, metrics are recorded of each accelerator of a set of accelerators allocated to a deep learning job including computing a gain of computational power by an additional allocation of new accelerators and computing a cost of transferring data among the new accelerators and the set of allocated accelerators. Subsequent to recording the metrics, ones of the new accelerators are allocated to the deep learning job or ones of the set of allocated accelerators assigned to perform the deep learning job are reclaimed upon determining an optimal accelerator topology by comparing the gain of computation power and the cost of transferring data.

DETAILED DESCRIPTION OF THE DRAWINGS

As aforementioned, when performing compute-intensive workloads such as data analytics and deep learning, an effective framework involves distributed parallel computing, which operates to disperse processing tasks across multiple processors (or preferably hardware accelerators) operating on one or more computing devices such that parallel processing may be executed simultaneously.

Deep learning is a machine learning technique that employs a training process associated with a network of learner units (e.g., processing units) to determine previously unknown features, classifications and/or patterns associated with data provided to the network of learner units. Deep learning is often employed in technical fields such as, for example, speech recognition, image recognition, graphical modeling and bioinformatics. Data provided to the network of learner units can include a training set (e.g., a set of data with known classifications that is employed for the training process) that is employed at a beginning of the training process. Utilizing the training set, the network of learner units can perform iterative processing stages in which data generated during a particular processing stage is determined from data generated during one or more previous processing stages. During a processing stage, learner units can independently generate data based on input data and/or previously learned data and such information can be gathered by a centralized entity or otherwise passed on to a global model for distribution to the other learners. However, a centralized approach for deep learning often suffers from communication delays, network bottlenecks and/or an imbalance in bandwidth and/or hardware utilization. Further, job scheduling in the cluster must be accurately performed to ensure that any one of the cluster nodes is underutilized or over-utilized at a given time, which can inherently lead to poor job efficiency. Moreover, when considering the scheduling and utilization of processors or accelerators when performing deep learning jobs, sometimes contrary to simple intuition, the additional allocation of processors or accelerators to the deep learning job may at some point actually reduce overall performance of the job. This is because the distribution cost of the data of the deep learning job among a larger set of processors or accelerators may at some point become greater than merely allowing a smaller set of processors or accelerators to process the deep learning job with a narrower data distribution, even though fewer processors or accelerators have been allocated to the job. To wit, sometimes a deep learning job may actually benefit performance-wise by reclaiming (removing) one or more allocated processors or accelerators which are executing the job, such that the cost of performing the job on fewer resources outweighs the cost of distributing the data thereof among a greater number of the resources which were previously allocated thereto.

Accordingly, the present invention introduces novel techniques for increasing the efficiency of job scheduling and performance by the allocation and reclamation of accelerators (i.e., graphical processing units (GPUs) or field-programmable gate arrays (FPGAs), etc.) performing deep learning jobs in the clustered environment. These techniques include computing a gain of computational power which would be achieved by allocating additional available accelerators to the deep learning job, and comparing the gain of computational power to a cost of synchronizing the job data among the additional available accelerators which could be allocated. Further, this functionality provides efficient techniques for reclaiming accelerator(s) from a job when it is determined that reclaiming the accelerator(s) would likely increase performance when running the job. As will be discussed, following, when employing these mechanisms on each job running within the cluster, the overall utilization of accelerators in the cluster is improved while simultaneously improving the performance of each respective job execution.

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows:

In the context of the present invention, and as one of skill in the art will appreciate, various components depicted inFIG. 1may be located in a moving vehicle. For example, some of the processing and data storage capabilities associated with mechanisms of the illustrated embodiments may take place locally via local processing components, while the same components are connected via a network to remotely located, distributed computing data processing and storage components to accomplish various purposes of the present invention. Again, as will be appreciated by one of ordinary skill in the art, the present illustration is intended to convey only a subset of what may be an entire connected network of distributed computing components that accomplish various inventive aspects collectively.

Smart Accelerator Allocation and Reclamation

Embodiments described herein include techniques facilitating the allocation, reclamation, and synchronization of processing components (e.g., accelerators) for parallel deep learning in distributed systems. As mentioned and as a general overview, data provided to the network of learner units can include a training set (e.g., a set of data with known classifications that is employed for the training process) that is employed at a beginning of the training process. Utilizing the training set, the network of learner units can perform iterative processing stages in which data generated during a particular processing stage is determined from data generated during one or more previous processing stages. Processing components can utilize this training and can each receive a set of inputs to therefore collectively generate an output based on the set of inputs.

Generally, an output generated by a processing component can be provided to all other processing components in a designated group of processing components. In some implementations, the processing components in a particular group can change from time to time during the deep learning process and based on any number of different factors. Accordingly, collaborative groups of processing components can be dynamically synchronized for parallel learning. In an aspect, model weights for a deep learning system can be communicated amongst a subset of processing components (e.g., a set of parallel processing components). In some embodiments, communication between the one or more processing components can occur after the processing components in the subset complete a training process over a particular interval (e.g., over a defined mini-batch size, etc.).

Learning or “training” associated with the deep learning process can occur by selecting different subsets of processing components at different times during the deep learning process. ReferencingFIG. 4now, as illustrated in the distributed training architecture400for training learner nodes, local input partitions402A-n are used on nodes404A-n to compute a local model406. This local model406is then used to update a global model408, which is synchronized across all nodes404A-n. Each node404A-n repeats an iterative training algorithm wherein the respective node loads training data, calculates gradients based on the global model408, aggregates and updates the global model408from the local mode406, and synchronizes a last computed model among all the nodes404A-n. Of note, each node404A-n performs an identical learning task, training, and synchronization to update the model for all nodes404A-n. The cost (in terms of resources needed such as processing components, network components, etc.) for performing this synchronization is often significant and can affect performance.

The underlying issue with the training system as described, is that the training system experiences efficiency effects caused by GPU resource utilization (both at a local level and a cluster level) and the aforementioned synchronization cost. The synchronization cost is factored heavily on the topology of the cluster. For example, in a VGG model having a 128.3 M model (batch) size per GPU, four GPUs equates to 1026 M data for synchronization. Now considering that generally GPU communication topology has a GPU-GPU throughput of 200 G/s, an NVLink throughput of 80 G/s, an Infiniband throughput of 100 G/s, and an Ethernet throughput of 10 G/s, it is recognizable that a bottleneck is found in the most-limited link (the slowest transmission medium) between the nodes404A-n.

Moreover, in a multiple application/tenant scenario, the GPU of a job may be scattered among several hosts which results in even lower efficiency. Therefore, the job scheduler must have awareness of both the workload of the jobs and the topology of the cluster to accurately schedule jobs to achieve a high resource utilization while providing a most efficient workload production environment as possible. Still further, as aforementioned, when considering the scheduling, synchronization, and utilization of accelerators when performing deep learning jobs, the additional allocation of accelerators to the deep learning job may at some point actually reduce overall performance of the job. For example, and as depicted in the graph diagram500ofFIG. 5, adding (allocating) a first accelerator of a host may bring little value to the deep learning job, and adding additional accelerators of an exiting host (having completed a former deep learning job) to the deep learning may bring more value over time, however, there's a point where adding additional accelerators to the job does not bring any additional value, and as aforementioned, may actually hinder performance. Indeed, in some cases, reclaiming accelerators from the deep learning job (i.e., removing the last accelerator of a host) may actually increase performance. Referencing diagram500, it can be seen that the additional allocation of accelerators to the job (x-axis) begins to waver and stagnate any performance over the overall job execution time (y-axis). Some prior art implementations exist which use a fixed number of GPUs and a fixed batch size, and attempt to schedule jobs based on a batch size configuration and resource policy, however, these implementations are heavily reliant on user expertise to adjust parameters of the system to achieve optimal results.

Accordingly, the mechanisms of the present invention, again, leverage training metrics and topology information to determine when and when not to accept accelerator allocations for performing a deep learning job by computing a gain of computational power which would be achieved by allocating additional available accelerators to the deep learning job, and comparing the gain of computational power to a cost of synchronizing the job data among the additional available accelerators which could be allocated. Further, this functionality provides efficient techniques for reclaiming accelerator(s) from a job when it is determined that reclaiming the accelerator(s) would likely increase performance when running the job.

Forming an overview of this functionality,FIG. 6is a flowchart diagram of an exemplary method600for accelerator allocation and reclamation for deep learning jobs in a computing cluster. Each of the steps of the method600may be performed by any suitable component of the operating environment. For example, in various embodiments, the method600may be partially or entirely performed by a processor, or some other device having one or more processors therein. The processor, e.g., processing circuit(s), chip(s), and/or module(s) implemented in hardware and/or software, and preferably having at least one hardware component may be utilized in any device to perform one or more steps of the method600. Illustrative processors include, but are not limited to, a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), etc., combinations thereof, or any other suitable computing device known in the art.

The method600begins (step602) by recording metrics of each accelerator of a set of accelerators allocated to a deep learning job including computing a gain of computational power by an additional allocation of new accelerators and computing a cost of transferring data among the new accelerators and the set of allocated accelerators (step604). Subsequent to recording the metrics, ones of the new accelerators are allocated to the deep learning job or ones of the set of allocated accelerators assigned to perform the deep learning job are reclaimed upon determining an optimal accelerator topology by comparing the gain of computation power and the cost of transferring data (step606). The method600ends (step608).

In some embodiments, the mechanisms of the present invention use the following three components to implement the various disclosed functionality: (a) A Metrics Collector to collect runtime information associated with each deep learning job; (b) A Cost Calculator to evaluate the performance impact of topology changes of the accelerators within the cluster; and (c) A Decision Maker to identify and implement an actual plan to allocate and/or reclaim accelerators from respective deep learning jobs to gain an optimal accelerator topology across the cluster. It should be noted that components within the disclosure may be implemented within a session scheduler which schedules resource allocations to each deep learning job, inside the deep learning job itself (i.e., within the scheduler client), or a combination thereof. For example, the computations as discussed herein may be performed within the deep learning job itself, which then may send hints to the session scheduler as to the pre-screening of resource scheduling for the instant and/or future jobs.

Metrics Collector

In various embodiments, metrics are recorded including the computation power of each accelerator in the cluster. This computation power (C) may be defined as C=T/B, where T is the duration of calculation of each accelerator in each job iteration and B is data (i.e., the number of batches) calculated on each accelerator during each iteration. In other words, the computation power is essentially a duration of time it takes a given accelerator to calculate a given number of data batches. It should be noted that, generally, all accelerators substantially share the same C metric.

Further recorded is a synchronization cost of data among each of the accelerators (i.e., the cost of synchronizing batch data across each accelerator performing the deep learning job). The synchronization cost may be defined as a duration of time of synchronization of each accelerator to each other accelerator in each iteration. The synchronization cost may include an in-host cost (i.e., accelerators within the same cluster host—which generally share the same performance), a cross-hosts cost (i.e., accelerators within differing hosts—which generally share the same inter-host synchronization cost), and a cross-group cost (i.e., accelerators in differing hosts within a certain table or group). Moreover, the recorded metrics also identify and keep a record of a job-active host list, where all active hosts pertaining to a certain deep learning job are listed. It should be further noted that, proceeding with the disclosed functionality, the host information in an all-host list is continued to be kept even if an accelerator belonging to a host on the job-active host list is reclaimed.

Cost Calculator

In various embodiments, a job cost is calculated for a remaining time period of the deep learning job. This may comprise a computation cost of the job with n accelerators (which may be expressed as N/(C*n)) and the synchronization cost across the n accelerators. When considering the synchronization cost, it is important to note that the accelerator topology (i.e., how the accelerators are distributed throughout the hosts/cluster, as discussed previously) is essential to determining the cost. For example, if 8 GPUs are scattered among 2 hosts, the synchronization cost may be calculated as: 6*in-host cost+1*cross-host cost. In another example, if 8 GPUs are scattered among 4 hosts, the synchronization cost may be calculated as: 4*in-host cost+3*cross-host cost.

At step1(block702), i-th GPU sends its i-th part of the gradient array. At step2(block704), each i-th GPU sends its part (i−2) mod 4+1 of the gradient array (such that a 1st part is distributed to GPU 4; 2nd part is distributed to GPU 1; 3rd part is distributed to GPU 2; and 4th part is distributed to GPU 3). At step3(block706), each i-th GPU sends its part (i−3) mod 4+1 of the gradient array (such that a 1st part is distributed to GPU 3; 2nd part distributed to GPU 4; 3rd part distributed to GPU 1; and 4th part is distributed to GPU 2). It is noted that after N−1 steps, all gradients are computed and distributed among N GPUs (as in the final gradient distribution in block708), and a total time of gradient distribution is computed comprising the synchronization cost.

In some embodiments, a predicted job cost may be determined for a certain accelerator profile. While the computation cost is straightforward using the formula discussed previously, the synchronization cost wholly depends on the location of the new accelerator (an available accelerator which could be allocated to the job). For example, the synchronization cost for the new accelerator may differ widely based upon whether the accelerator is within an existing host, in a new host in an existing host group, or a new host group.

With the foregoing in mind, the goal is to attempt to locate a “ceiling” or “optimized” topology of a respective cluster host for each case (with regard to the respective deep learning job and the location of the accelerator(s)). The optimized topology for the respective host comprises the topology which produces the least job cost. That is, the optimized topology comprises the topology (the distribution of accelerators among hosts in relation to the deep learning job) which results in a gain of new computational power achieved by the addition of new (available for allocation) accelerator(s) being less than the cost of synchronizing this accelerator to the existing accelerators performing the job.

FIG. 8illustrates a flowchart diagram of an exemplary method800for computing the optimal accelerator topology for each respective cluster host using the aforementioned comparison between the gain of computational power and the synchronization cost of the deep learning job. The method700references a single host, however this process may be performed for each host in the cluster with regard to a respective deep learning job. Beginning (step802), the job cost is computed according to the prescribed formula when all accelerators on the host are removed, and this job cost may be expressed as “cost0” (step804). Next, the job cost is similarly computed when one new accelerator on the host is added (allocated), and this job cost may be expressed as “cost1” (step806). The job cost is then computed when half of all accelerators (half of the number of all accelerators) are added, and this job cost may be expressed as “cost2” (step808). Finally, the job cost is computed when all accelerators on the host are added, and this job cost may be expressed as “cost3” (step810). Subsequently to performing the previous three computations, the topology providing the lowest overall job cost (computation cost when compared with synchronization cost) is selected as the optimized topology (step812). The method800ends (step814).

Decision Maker

Subsequent to recording the computational power and synchronization metrics, and computing the overall job and synchronization costs, the decision maker may then determine which accelerators to accept (allocate) and which accelerators to remove (reclaim) from a given host and/or deep learning job. In some embodiments, when receiving a new accelerator offering from the session scheduler, the following procedure is performed pursuant to allocating the accelerators to the given cluster host/deep learning job, as illustrated in method900ofFIG. 9.

The method900begins (step902) by preparing to accept the accelerator offering from the scheduler (step904). This preparation includes calculating the job cost of the current topology (cost0), grouping new accelerators offered by hosts, and grouping new accelerator hosts by (known) host groups. In this step, unknown hosts are treated as a new host group. It should be noted that a user may contribute or define rules within the system as to which hosts are comprised within a given host group.

Subsequent to the computation of the current topology and the grouping of accelerators and hosts by host groups, in a first step, an (offered) available accelerator(s) is/are accepted on those hosts currently in the job-active host list (step906). This is performed by, beginning with accelerator(s) whose host has the highest number of accelerators existing in the current job-active host list, calculating the optimized (or “ceiling”) topology of new hosts, and accepting the offered accelerator(s) according to the outcome of the topology calculation. Cost0 is then updated with the new (optimized) topology, and the method900returns to calculating the optimized topology on the host having the next-highest number of accelerators existing in the current job-active host list, until all hosts with new accelerators have been checked.

In a second step, the optimized topology for host groups currently in the job-active host list is then checked (step908) by starting with the host having the highest number of neighboring hosts in the same host group, calculating the optimized (ceiling) topology of the host and accepting those accelerators based on the outcome of the topology calculation. Again, cost0 is updated according to the new (optimized) topology, and the topology is then continued to be identified for the host having the next-highest number of neighbors in the same host group, until all hosts have been tried.

Finally, in a third step, unknown host groups are then checked (step910). Starting with the host group having the most accelerators and starting with the host with the most accelerators in that host group, the optimized (ceiling) topology is computed of the host, and those accelerators are then accepted according to the outcome of the topology calculation. Cost0 is then updated with the new topology and the host having the next-highest number of accelerators is then determined and the topology thereof calculated until all hosts in the particular host group have been checked. Once all hosts in the particular host group have been identified and checked, a next host group having a next-highest number of accelerators is then identified and the topology thereof computed, and the method900continues in this manner until all hosts and host groups have been checked. The method900may end, as in block912.

As previously mentioned, in some cases, when computing the optimized topology, it may be identified that the deep learning job/host may actually perform more efficiently were accelerators to be reclaimed (removed) from this deep learning job/host.FIG. 10illustrates a method1000for performing this reclamation as follows.

The method1000begins (step1002) by preparing to reclaim accelerators by grouping current accelerators according to hosts and host groups. Next, in a first step, the cross-group synchronization cost is calculated of each host group (step1004), where the sum of the cross-group synchronization cost includes all members within the given host group. In a second step, beginning with the host group having the highest cross-group synchronization cost and a total number of accelerators which is less than the reclamation target (host), this identified entire host group is removed, the reclamation target is updated, and the cross-group synchronization cost of each host group (except for the removed host group) is once again computed (step1006).

In a third step, beginning with the host having the least number of accelerators and a total number of accelerators which is less than the reclamation target, all accelerators are removed (reclaimed), the reclamation target is updated, and the method returns to the beginning of the third step by removing all accelerators in the host identified as having the next-least number of accelerators and total number of accelerators less than the reclamation target (step1008).

Finally, in a fourth step, beginning with the host having the least number of accelerators, the reclamation target is removed from this identified host, and the optimized (ceiling) topology is computed with the reduced accelerator number (step1010). The method1000ends (step1012).