Resource scheduling method and device, electronic equipment and medium
By prioritizing the scheduling of idle computing units with the best performance based on the performance level of the computing unit and the requirements of the subtask, the problem of low scheduling efficiency of computing units in the prior art is solved, and the efficient utilization of high-performance computing resources is achieved.
Patent Information
- Application Number
- CN202211107128.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-09-09
AI Technical Summary
In existing technologies, the scheduling strategies of computing units cannot effectively utilize high-performance computing units, resulting in low task execution efficiency. In particular, in GPU clusters, high-priority tasks cannot be executed in a timely manner or low-performance computing units are wasted.
By determining the performance level of the computing unit and the minimum performance level of each subtask, the best-performing idle computing unit is scheduled to execute the task, and low-priority or low-performance tasks are interrupted first, ensuring the effective utilization of high-performance computing units.
It improves the overall execution efficiency of the target task, avoids the waste of high-performance computing unit resources, and enhances the task processing capability.
Smart Images

Figure CN115658284B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of artificial intelligence, in particular to the fields of deep learning, computer vision and natural language processing, and more particularly to a resource scheduling method and device, electronic equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] Artificial intelligence is a discipline that studies enabling computers to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), which has both hardware and software technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc.
[0003] BERT, ERNIE, GPT and other large-scale pre-training models have developed rapidly, and have made great breakthroughs in NLP, multi-modal and biomedical fields. The parameter size of the super-large pre-training model has expanded from ten billion, one hundred billion to one thousand billion, and one million billion. Currently, model training and model inference in the field of artificial intelligence often use GPU (Graphics Processing Unit, Graphics Processing Unit) clusters, and involve multi-machine multi-card scheduling strategies for GPUs.
[0004] The methods described in this section are not necessarily the methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any of the methods described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, issues mentioned in this section should not be interpreted as an admission that any of the issues are numerically art. SUMMARY
[0005] The present disclosure provides a resource scheduling method and device, electronic equipment, computer readable storage medium and computer program product.
[0006] According to an aspect of the present disclosure, a resource scheduling method is provided, including: for each computing unit of a plurality of computing units used to execute a target task, determining a performance level of the computing unit based on at least one performance parameter of the computing unit, wherein the target task has a plurality of subtasks; determining a minimum performance level that should be met by a computing unit capable of executing each subtask of the plurality of subtasks based on a data processing amount corresponding to the subtask; and in response to receiving a first subtask of the plurality of subtasks, performing a scheduling operation, the scheduling operation including: obtaining a first computing unit, wherein the first computing unit is an idle computing unit with the highest performance level among at least one first candidate computing unit, and the performance level of each first candidate computing unit of the at least one first candidate computing unit is not lower than the minimum performance level corresponding to the first subtask; and scheduling the first computing unit to execute the first subtask.
[0007] According to another aspect of the present disclosure, a resource scheduling apparatus is provided, including: a first determining unit configured to, for each computing unit of a plurality of computing units used to execute a target task, determine a performance level of the computing unit based on at least one performance parameter of the computing unit, wherein the target task has a plurality of subtasks; a second determining unit configured to determine a minimum performance level that should be met by a computing unit capable of executing each subtask of the plurality of subtasks based on a data processing amount corresponding to the subtask; and a first executing unit configured to, in response to receiving a first subtask of the plurality of subtasks, perform a scheduling operation, the first executing unit including: a first obtaining subunit configured to obtain a first computing unit, wherein the first computing unit is an idle computing unit with the highest performance level among at least one first candidate computing unit, and the performance level of each first candidate computing unit of the at least one first candidate computing unit is not lower than the minimum performance level corresponding to the first subtask; and a scheduling subunit configured to schedule the first computing unit to execute the first subtask.
[0008] According to another aspect of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned resource scheduling method.
[0009] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to perform the above-mentioned resource scheduling method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the above-mentioned resource scheduling method.
[0011] According to one or more embodiments of the present disclosure, the computing capability of the high-performance computing unit can be efficiently utilized, and the overall execution efficiency of the target task is improved.
[0012] It should be understood that the contents described in this part are not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain exemplary implementations of the application. The illustrated embodiments are merely examples and do not limit the scope of the claims. In all the drawings, like reference numerals refer to like parts throughout the various figures. The drawings are in simplified form and are not to precise scale. Not all details of the embodiments are shown, giving attention to the pertinent, illustrative and
[0014] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein can be implemented according to embodiments of the present disclosure is shown;
[0015] Figure 2 A flowchart of a resource scheduling method according to embodiments of the present disclosure is shown;
[0016] Figure 3 A schematic diagram of a resource scheduling method according to exemplary embodiments of the present disclosure is shown;
[0017] Figure 4 A structural schematic diagram of a resource scheduling system according to exemplary embodiments of the present disclosure is shown;
[0018] Figure 5 A structural block diagram of a resource scheduling apparatus according to embodiments of the present disclosure is shown;
[0019] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, and should be considered as merely exemplary. Thus, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.
[0021] In the present disclosure, the terms "first", "second", etc. used in the description of various described examples are not intended to limit the positional relationship, the time sequence relationship or the importance relationship of the elements, and such terms are only used to distinguish one element from another. In some examples, the first element and the second element can refer to the same instance of the element, and in some cases, based on the context of the description, they can also refer to different instances.
[0022] The terms used in the description of various described examples in the present disclosure are only for the purpose of describing the specific examples, and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in the present disclosure encompasses any one of the listed items and all possible combinations.
[0023] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 A schematic diagram of an example system 100 in which various methods and apparatus described herein can be implemented according to embodiments of the present disclosure is shown. Referring to Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more application programs.
[0025] In embodiments of the present disclosure, the server 120 can run one or more services or software applications that enable the execution of the resource scheduling method.
[0026] In certain embodiments, the server 120 can also provide other services or software applications, which can include non-virtual environments and virtual environments. In certain embodiments, these services can be provided as web-based services or cloud services, for example, to users of the client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0027] In Figure 1In the illustrated configuration, server 120 can include one or more components that implement functionality performed by server 120. These components can include software components that are executable by one or more processors, hardware components, or combinations thereof. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can in turn utilize one or more client applications to interact with server 120 to utilize services provided by these components. It should be understood that a wide variety of different system configurations are possible, which can vary from system 100. Thus, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0028] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to upload input data, send task instructions, etc. The client devices can provide interfaces that enable users of the client devices to interact with the client devices. The client devices can also output information to users via the interfaces. Although Figure 1 Only six client devices are depicted, but one of skill in the art will appreciate that the present disclosure can support any number of client devices.
[0029] Client devices 101, 102, 103, 104, 105, and / or 106 can include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service kiosk devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices can run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices can include cellular telephones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices can include head-mounted displays (such as smart glasses) and other devices. Gaming systems can include various handheld gaming devices, Internet-enabled gaming devices, etc. The client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0030] Network 110 can be any type of network familiar to those skilled in the art, which can support data communications using any of a variety of available protocols, including without limitation TCP / IP, SNA, IPX, etc. As examples, one or more of networks 110 can be a LAN, an Ethernet network, a Token Ring network, a WAN, the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a local area network (LAN), a wide area network (WAN), a wireless network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., a Bluetooth network, a WIFI network), and / or any combination of these and / or other networks.
[0031] Server 120 can include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers, large mainframe computers), server clusters, or any other appropriate arrangement and / or combination. Server 120 can include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 can run one or more services or software applications that provide the functionality described below.
[0032] Computing units in server 120 can run one or more operating systems, including any of the operating systems described above, as well as any commercially available server operating systems. Server 120 can also run any of a variety of additional server applications and / or mid-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0033] In some embodiments, server 120 can include one or more applications to analyze and consolidate data feeds and / or event updates from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 can also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0034] In some embodiments, server 120 can be a server of a distributed system, or a server in combination with a blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server (VPS, Virtual Private Server) service.
[0035] The system 100 can also include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as audio files and video files. The databases 130 can reside in various locations. For example, databases used by the server 120 can be local to the server 120 or can be remote from the server 120 and can communicate with the server 120 via a network- based or dedicated connection. The databases 130 can be of different types. In certain embodiments, databases used by the server 120 can be, for example, relational databases. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.
[0036] In certain embodiments, one or more of the databases 130 can also be used by applications to store application data. Databases used by applications can be different types of databases, such as key-value stores, object stores, or regular stores supported by file systems.
[0037] Figure 1 The system 100 can be configured and operated in various ways to enable the various methods and apparatuses described in accordance with the present disclosure to be applied.
[0038] In the related art, the scheduling strategy for a computing unit (such as a GPU) mainly includes two kinds. One is a first-in-first-out strategy, that is, the computing unit executes each task in turn according to the order of the task queue, and only when the current task is executed, the next task is started. Another strategy is a priority strategy, for example, the computing unit is executing a low-priority task, when the computing unit receives a task with a higher priority, the current task is interrupted and the task with a higher priority is executed first, and when the task is executed, the interrupted task is continued.
[0039] The disadvantage of the first-in-first-out strategy is that a high-priority task cannot be executed in time, but can only be executed after a low-priority task is finished. The disadvantage of the priority strategy is that when the GPU models of the cluster are more, the low-level task cannot be executed on a high-performance machine first, and the value of the multi-GPU cluster resources cannot be fully utilized.
[0040] Embodiments of the present disclosure provide a resource scheduling method, by determining the performance level of the computing unit and the minimum performance level corresponding to each subtask, and when a to-be-executed subtask is obtained, the idle computing unit with the optimal performance capable of executing the subtask is scheduled first based on the above information to execute the subtask, so that the computing capacity of the high-performance computing unit can be efficiently utilized, and the overall execution efficiency of the target task is improved.
[0041] According to some embodiments, as shown in Figure 2 According to some embodiments, as shown in
[0042] Accordingly, by determining the performance levels of the computing units and the minimum performance levels corresponding to each subtask, and when a subtask to be executed is obtained, the idle computing unit with the highest performance level that can execute the subtask is first scheduled to execute the subtask based on the above information, so that the computing capacity of the high-performance computing unit can be efficiently utilized, and the overall execution efficiency of the target task is improved.
[0043] In some embodiments, the computing unit can be, for example, a CPU. In some embodiments, the computing unit can also be a graphics card (GPU).
[0044] In some cases, the plurality of computing units can be deployed on the same computing device. In some cases, the plurality of computing units can also be respectively deployed on different computing devices, and one or more computing units can be deployed on each computing device.
[0045] In some embodiments, the target task can be any computing task executed by a computer, including but not limited to, for example, a model training task, a model inference task, etc. Since the current model training, model inference, etc. tasks are usually completed based on a plurality of computing units (such as a GPU cluster), it is necessary to reasonably and efficiently schedule the plurality of computing units, so as to improve the execution efficiency of the target task.
[0046] The target task can include multiple sub-tasks, and the data processing amount of each sub-task is different, so the processing complexity of each sub-task is also different. At the same time, the performance of each computing unit and the amount of data that can be processed are also different, which leads to different computing units of different performance being able to process different sub-tasks. Therefore, it is necessary to divide the multiple computing units according to their performance parameters to divide their performance levels, and according to the difference in the data processing amount of each sub-task, determine the minimum performance level that the computing unit capable of executing the sub-task should meet, so as to avoid assigning sub-tasks to computing units that cannot execute the sub-tasks during task allocation.
[0047] Taking a GPU as an example, the performance parameters used to divide the performance levels of the GPU can include but are not limited to the number of GPU processing units, the size of the display memory, the size of the memory, the display memory bandwidth, the number of tensor cores, the tensor calculation performance, the single-precision calculation performance, etc.
[0048] According to some embodiments, the target task includes a model training task or a model inference task, and wherein based on the data processing amount of each sub-task in the multiple sub-tasks, determining the minimum performance level that the computing unit capable of executing the sub-task should meet can include: based on at least one of the model architecture and the model parameter amount of the sub-task corresponding model, determining the minimum performance level that the computing unit capable of executing the sub-task should meet.
[0049] When the target task is a model training task or a model inference task, each sub-task of the corresponding target task can be a computing task of processing input data based on a corresponding sub-model in the model. At this time, the data processing amount of each sub-task can be determined by the model parameter amount of the sub-task corresponding model.
[0050] In some embodiments, part of the model has certain requirements on the performance of the GPU due to the particularity of its model architecture. Therefore, when determining the minimum performance level that the GPU capable of executing each sub-task should meet, the model parameter amount and the model architecture of the model should be considered.
[0051] Therefore, when the target task is a model training or model inference task, the minimum performance level of the computing unit corresponding to the corresponding sub-task is determined by considering the model parameter amount and the model architecture, so that the minimum performance level of the computing unit corresponding to each sub-task can be more accurately determined, and the allocation of computing resources is further optimized.
[0052] After determining the performance level of each computing unit and the minimum performance level of the computing unit corresponding to each sub-task in the target task, the computing resources can be scheduled according to the above information.
[0053] In some embodiments, the plurality of computing units can be scheduled by a scheduling module deployed on a computing device.
[0054] According to embodiments of the present disclosure, when the scheduling module receives a subtask (e.g., a first subtask), the scheduling module can first acquire the minimum performance level information corresponding to the first subtask, and determine at least one first candidate computing unit whose performance level is not lower than the minimum performance level based on the information. Meanwhile, the scheduling module can acquire the state information of the current computing unit, and determine whether there is an idle computing unit in the at least one first candidate computing unit. Then, a first computing unit can be determined in the idle first candidate computing unit, and the related information (e.g., input data storage address, model architecture information, model parameter storage address, etc.) of the first subtask can be transmitted to the first computing unit, so as to schedule the first computing unit to execute the first subtask.
[0055] In this way, by determining the performance level of the computing unit and the minimum performance level corresponding to each subtask, and based on the above information, the idle computing unit with the optimal performance that can execute a to-be-executed subtask is first scheduled to execute the subtask when the to-be-executed subtask is acquired, so as to efficiently utilize the computing capacity of the high-performance computing unit and improve the overall execution efficiency of the target task.
[0056] According to some embodiments, the scheduling operation can further include: in response to not acquiring the first computing unit, acquiring at least one second candidate computing unit in the plurality of computing units, wherein the at least one second candidate computing unit includes a computing unit in the at least one first candidate computing unit that is executing a second subtask, and the minimum performance level corresponding to the second subtask is lower than the minimum performance level corresponding to the first subtask; and selecting a computing unit in the at least one second candidate computing unit as a second computing unit, so as to interrupt the second subtask being executed in the second computing unit and make the second computing unit execute the first subtask.
[0057] In this way, when no idle computing unit is acquired, it is detected whether there is a computing unit that is executing a subtask whose minimum performance level is lower than the minimum performance level of the to-be-executed subtask in the occupied computing units. If so, the subtask that meets the above condition is interrupted, and the corresponding computing unit is made to execute the to-be-executed subtask preferentially. Thus, the situation that the computing resource is wasted due to the high-performance computing unit executing a low-difficulty task is avoided, and the overall task execution efficiency is further improved.
[0058] If none of the first candidate computing units is in the idle state, the first computing unit cannot be obtained by the above method. In this case, the lowest performance level corresponding to the subtask executed in each of the at least one first candidate computing unit can be obtained, and a subtask (i.e., a second subtask) whose lowest performance level is lower than the lowest performance level corresponding to the first subtask is determined. At this time, the computing unit executing the second subtask is the second candidate computing unit.
[0059] After the at least one second candidate computing unit is obtained, any one of the second candidate computing units can be selected as the computing unit for executing the first subtask (i.e., a second computing unit), and the scheduling module controls the computing unit to interrupt the subtask currently being executed and starts to execute the first subtask.
[0060] Figure 3 A schematic diagram of a resource scheduling method according to an example embodiment of the present disclosure is shown.
[0061] In Figure 3 In the example given, the plurality of computing units includes two GPUs corresponding to different performance levels, where the GPU of model K40 has a lower performance level, and the GPU of model P40 has a higher performance level. The target tasks include task 1, task 2, and task 3, where task 1 and task 3 have lower requirements on the performance of the GPU, and both the GPUs of models K40 and P40 can execute the tasks, while task 2 has higher requirements on the performance of the GPU, and only the GPU of model P40 can be used to execute the task.
[0062] After starting the target tasks, the scheduling module first receives task 1 and detects that both the GPUs of models K40 and P40 capable of executing task 1 are in the idle state, so the GPU of model P40 is preferentially scheduled to execute task 1. During the execution of task 1, the scheduling module receives task 2, and at this time, there is no idle GPU of model P40 to execute the task. However, since the GPU of model P40 is currently executing task 1 which has lower requirements on the performance of the GPU, the GPU of model P40 can be controlled to interrupt task 1 and execute task 2 which has higher requirements on the performance of the GPU. At the same time, since the GPU of model K40 is still in the idle state, the GPU can be scheduled to continue executing task 1. In this way, the higher performance GPUs in the distributed GPU cluster can fully exert their computing capabilities, thereby improving the overall execution efficiency of the target tasks.
[0063] According to some embodiments, selecting one computing unit from the at least one second candidate computing unit as the second computing unit can include: selecting, from the at least one second candidate computing unit, the computing unit with the highest performance level as the second computing unit.
[0064] In some cases, the at least one second candidate computing unit obtained by the above method can correspond to multiple performance levels, and the computing unit with the highest performance level among the second candidate computing units can be selected as the second computing unit to execute the subtask.
[0065] Thus, by selecting the computing unit with the optimal performance from the second candidate computing units meeting the above conditions to execute the to-be-executed task, the allocation of computing resources can be further optimized, i.e., the subtask with a higher execution difficulty is executed by the currently schedulable computing unit with the optimal performance, and the overall execution efficiency of the target task is further improved.
[0066] According to some embodiments, the scheduling operation can further include: in response to not obtaining the at least one second candidate computing unit, obtaining at least one third candidate computing unit from the plurality of computing units, wherein the at least one third candidate computing unit includes a computing unit from the at least one first candidate computing unit that is executing a third subtask, the third subtask corresponds to the same minimum performance level as the first subtask, and the third subtask has a lower task priority than the first subtask; and selecting one computing unit from the at least one third candidate computing unit as a third computing unit to interrupt the third subtask being executed in the third computing unit and cause the third computing unit to execute the first subtask.
[0067] If each of the first candidate computing units is currently executing a task, and the minimum performance level corresponding to the subtask being executed by each computing unit is not lower than the minimum performance level corresponding to the first subtask. In this case, the minimum performance level corresponding to the subtask being executed by each first candidate computing unit and the priority of each subtask can be obtained, and the subtask with the same minimum performance level as the first subtask is determined, the task priority of each subtask meeting the above condition is obtained, and is compared with the task priority of the first subtask respectively, and the computing unit corresponding to the subtask (i.e., the third subtask) with a lower task priority than the first subtask is determined as the third candidate computing unit.
[0068] After obtaining the at least one third candidate computing unit, any one of the third candidate computing units can be selected as the computing unit (i.e., the third computing unit) for executing the above first subtask, and the computing unit is controlled by the scheduling module to interrupt the subtask currently being executed and start executing the above first subtask.
[0069] Thus, when the second candidate computing unit that can be occupied is not acquired, whether there is a subtask with the same minimum performance level but lower priority in the subtask being executed can be further detected, and if there is, the subtask meeting the above conditions can be interrupted, and the corresponding computing unit can execute the to-be-executed subtask preferentially. Thus, the disadvantage that the task with higher priority cannot be executed in time is avoided.
[0070] According to some embodiments, selecting one computing unit as the third computing unit from the at least one third candidate computing unit can include: in response to determining that the at least one third subtask corresponding to the at least one third candidate computing unit has the same task priority, selecting, from the at least one third candidate computing unit, a computing unit with the highest performance level as the third computing unit.
[0071] In some cases, the at least one third candidate computing unit acquired by the above method can correspond to the same task priority, and thus a computing unit with the highest performance level in the third candidate computing unit can be selected as the third computing unit to execute the first subtask.
[0072] Thus, when the subtasks being executed in the third candidate computing unit all have the same priority, by selecting a computing unit with the best performance in the corresponding computing unit to execute the to-be-executed task, the allocation of computing resources can be further optimized, and the overall execution efficiency of the target task is improved.
[0073] According to some embodiments, the number of the at least one third candidate computing unit is multiple, and selecting one computing unit as the third computing unit from the at least one third candidate computing unit can include: in response to determining that the at least one third candidate computing unit includes computing units executing subtasks with different task priorities, selecting, from the at least one third candidate computing unit, a computing unit with the highest performance level in at least one fourth candidate computing unit as the third computing unit, wherein the at least one fourth candidate computing unit includes at least one computing unit with the lowest task priority of the subtasks being executed in the at least one third candidate computing unit.
[0074] In some cases, the multiple third candidate computing units acquired by the above method can correspond to different task priorities, and thus a computing unit with the lowest priority of the subtasks being executed can be acquired first, and a computing unit with the best performance in the computing unit can be selected as the third computing unit to execute the first subtask.
[0075] Thus, when the subtask priority of the third candidate computing unit being executed is different, the computing unit with the lowest task priority and the best performance is selected to execute the to-be-executed task, so that the allocation of computing resources can be optimized while considering the task priority of each task; meanwhile, the time and computing resources consumed by the re-allocation of the computing unit for the higher priority task after the interruption of the higher priority task are avoided.
[0076] In some embodiments, when the lowest performance level of each subtask being executed by each first candidate computing unit is higher than that of the first subtask, the lowest performance level of each subtask can also be ignored, and only the task priority of each subtask is considered, and one of the subtasks being executed with a lower task priority than the first subtask is selected to be interrupted, and the corresponding computing unit is occupied to execute the first subtask. Thus, the disadvantage that the task with a higher priority cannot be executed in time is further avoided.
[0077] In some embodiments, when the first subtask cannot be executed by a computing unit through the above scheduling method, the first subtask is controlled to enter a waiting execution state until a computing unit that can execute the task is obtained based on the above scheduling method, and then the subtask is executed.
[0078] According to some embodiments, the resource scheduling method of the present disclosure can further include: obtaining task information of the interrupted subtask, the task information including task execution state data of the interrupted subtask at the interruption moment and the lowest performance level corresponding to the interrupted subtask; and based on the task information, performing a scheduling operation on the interrupted subtask to re-determine a computing unit for executing the interrupted subtask and execute the interrupted subtask based on the re-determined computing unit.
[0079] In some embodiments, after the computing unit is occupied in the above manner, for the interrupted subtask, a computing unit can be re-allocated based on a similar method as above, so as to avoid the waste of computing resources caused by the interruption of the task into a waiting state.
[0080] In this case, when the corresponding computing unit is controlled to interrupt the subtask being executed, the task execution state data of the subtask at the interruption moment can be recorded at the same time, wherein the task execution state data can include recorded information of the task execution progress. In some embodiments, when the target task is model training or model inference, the task execution state data can include, for example, calculation progress information based on the current model to calculate the input data, and the intermediate result (or the storage address of the intermediate result) of the calculation.
[0081] The scheduling module can obtain the lowest performance level corresponding to the interrupted subtask and perform the above scheduling operation based on the lowest performance level. In response to reobtaining the computing unit that can continue to execute the subtask, the scheduling module can send the related information (such as input data storage address, model architecture information, model parameter storage address, etc.) of the subtask and the task execution state data of the subtask to the computing unit, so as to control the computing unit to continue to execute the subtask.
[0082] Therefore, for the interrupted task, the execution state data of the task is first recorded, and the computing unit is allocated again according to the above method according to the corresponding lowest performance level, and the interrupted task is continued to execute, so as to avoid the waste of computing resources caused by the interruption of the task and entering the waiting state, and further improve the overall task execution efficiency.
[0083] Referring back to Figure 3 When the GPU of the P40 type interrupts the task 1, the scheduling module can first record the execution state data of the task 1, and then obtain the GPU of the K40 type that can execute the task 1 by performing the above scheduling operation, and send the above data to the GPU of the K40 type to schedule the GPU to continue to execute the task 1. When the task 3 is received, as shown in Figure 3 At this time, the task 2 has been executed, and the task 1 is still being executed, and the GPU of the P40 type can be scheduled to execute the task 3 based on the above resource scheduling method, so as to fully utilize the computing capacity of the high-performance computing unit and improve the overall execution efficiency of the task.
[0084] In some embodiments, when a computing unit that can execute the interrupted subtask is still not obtained by the above scheduling method, the subtask is controlled to enter the waiting state until a computing unit that can execute the task is obtained based on the above scheduling method, and then the subtask is continued to execute.
[0085] Figure 4 A structural schematic diagram of a resource scheduling system according to an example embodiment of the present disclosure is shown.
[0086] As shown in Figure 4 The resource scheduling system 400 includes a GPU resource information management module 410, a task information management module 420, and a scheduling module 430. The resource scheduling system 400 is used to schedule a plurality of computing units in a distributed processing cluster as shown. Figure 4 The distributed processing cluster includes a plurality of computing units (i.e., GPUs) of V100, P40, and K40 types, and different types correspond to different performance levels.
[0087] The GPU resource information management module 410 is configured to store the performance levels of each computing unit in the cluster, and to record the working state of each computing unit (i.e., whether the computing unit is in an idle state) and the minimum performance level corresponding to the subtask being executed by each computing unit. When a computing unit starts to execute a subtask or completes the execution of a subtask, a message is sent to the GPU resource information management module 410 to inform it of the change in the working state.
[0088] The task information management module 420 is configured to store the minimum performance level information corresponding to each subtask in the target task, and the task information of each subtask. For example, in the case of model training, the task information of each subtask can include model architecture information, model parameter storage address, input data storage address, etc. When a subtask is interrupted, the corresponding computing unit also sends the task execution state information of the subtask to the task information management module 420 for storage, for use by the scheduling module 430.
[0089] The scheduling module 430 is configured to perform scheduling of the computing units in the distributed processing cluster. When the scheduling module 430 receives a first subtask, it first obtains the minimum performance level information and the task information of the first subtask from the task information management module 420, and obtains the current GPU resource information from the GPU resource information management module 410, and schedules a computing unit for the first subtask based on the above resource scheduling method. After obtaining the computing unit for executing the first subtask, the scheduling module 430 can send the task information of the first subtask to the corresponding computing unit and control the computing unit to start executing the first subtask. If the execution of a subtask is interrupted during the scheduling process, the corresponding computing unit sends the task execution state information of the subtask to the task information management module 420, which records the information and also sends a notification to the scheduling module 430 to reassign the subtask.
[0090] In some embodiments, after receiving the first subtask, the scheduling module 430 can first split the first subtask into multiple secondary subtasks. For example, in the case of model training, each subtask can be split according to input data batches, so as to be split into multiple secondary subtasks corresponding to multiple data batches, and each secondary subtask is assigned a computing unit by the scheduling module 430 based on the above resource scheduling method.
[0091] According to some embodiments, as shown in FIG. 4, the distributed processing system 400 further includes a GPU resource information management module 410, a task information management module 420, and a scheduling module 430. Figure 5As shown, a resource scheduling apparatus 500 is provided, comprising: a first determining unit 510 configured to determine, for each computing unit of a plurality of computing units used to perform a target task, a performance level of the computing unit based on at least one performance parameter of the computing unit, wherein the target task has a plurality of sub-tasks; a second determining unit 520 configured to determine, based on a data processing amount corresponding to each sub-task of the plurality of sub-tasks, a minimum performance level that should be met by a computing unit capable of performing the sub-task; and a first performing unit 530 configured to perform a scheduling operation in response to receiving a first sub-task of the plurality of sub-tasks, the first performing unit 530 comprising: a first obtaining sub-unit 531 configured to obtain a first computing unit, wherein the first computing unit is an idle computing unit with the highest performance level among at least one first candidate computing unit, and the performance level of each first candidate computing unit of the at least one first candidate computing unit is not lower than the minimum performance level corresponding to the first sub-task; and a scheduling sub-unit 532 configured to schedule the first computing unit to perform the first sub-task.
[0092] The units 510-530 in the apparatus 500 and the sub-units 531, 532 perform operations similar to those of steps S201-S204 of the above-described resource scheduling method, and thus are not described here in detail.
[0093] According to some embodiments, the first performing unit can further comprise: a second obtaining sub-unit configured to, in response to not obtaining the first computing unit, obtain at least one second candidate computing unit of the plurality of computing units, wherein the at least one second candidate computing unit comprises a computing unit of the at least one first candidate computing unit that is performing a second sub-task, and the minimum performance level corresponding to the second sub-task is lower than the minimum performance level corresponding to the first sub-task; and a first selecting sub-unit configured to select one computing unit as a second computing unit from the at least one second candidate computing unit, to interrupt the second sub-task being performed in the second computing unit and cause the second computing unit to perform the first sub-task.
[0094] According to some embodiments, the first selecting sub-unit can be configured to select, from the at least one second candidate computing unit, a computing unit with the highest performance level as the second computing unit.
[0095] According to some embodiments, the first execution unit can further include: a third acquisition subunit configured to, in response to the at least one second candidate computing unit not being acquired, acquire at least one third candidate computing unit in the plurality of computing units, wherein the at least one third candidate computing unit includes a computing unit in the at least one first candidate computing unit that is executing a third subtask, the third subtask corresponds to a same lowest performance level as the first subtask, and the third subtask has a task priority lower than the first subtask; and a second selection subunit configured to select one computing unit as a third computing unit from the at least one third candidate computing unit to interrupt the third subtask being executed in the third computing unit and cause the third computing unit to execute the first subtask.
[0096] According to some embodiments, the second selection subunit can be configured to, in response to determining that the at least one third subtask corresponding to the at least one third candidate computing unit has a same task priority, select, from the at least one third candidate computing unit, a computing unit having a highest performance level as the third computing unit.
[0097] According to some embodiments, the number of the at least one third candidate computing unit is a plurality, and the second selection subunit can be configured to, in response to determining that the at least one third candidate computing unit includes a computing unit executing a subtask having a different task priority, select, from the at least one third candidate computing unit, a computing unit having a highest performance level in at least one fourth candidate computing unit as the third computing unit, wherein the at least one fourth candidate computing unit includes at least one computing unit in the at least one third candidate computing unit that has a lowest task priority of a subtask being executed.
[0098] According to some embodiments, the resource scheduling apparatus of the present disclosure can further include: an acquisition unit configured to acquire task information of the interrupted subtask, the task information including task execution state data of the interrupted subtask at the moment of interruption and a lowest performance level corresponding to the interrupted subtask; and a second execution unit configured to perform a scheduling operation on the interrupted subtask based on the task information to re-determine a computing unit for executing the interrupted subtask and execute the interrupted subtask based on the re-determined computing unit.
[0099] According to some embodiments, the target task can include a model training task or a model inference task, and wherein the second determination unit can be configured to determine the lowest performance level of the computing unit that can execute the subtask based on at least one of a model architecture and a model parameter amount of a model corresponding to the subtask.
[0100] According to some embodiments, the computing unit can be a graphics card.
[0101] According to embodiments of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0102] Reference Figure 6 A block diagram of an electronic device 600, which can be an example of a hardware device that can be applied to aspects of the present disclosure, will now be described, which can be a server or a client of the present disclosure. The electronic device is intended to represent various forms of digital electronic computing devices such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components, their connections, and their functions, as shown in the figures, are meant only to be examples and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0103] As Figure 6 shown, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded into a random access memory (RAM) 603 from a storage unit 608. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0104] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 can be any type of device that can input information to the electronic device 600, can receive inputted digital or character information, and can generate key signal inputs related to user settings and / or function controls of the electronic device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote controller. The output unit 607 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0105] The computing unit 601 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs various methods and processes described above, such as the resource scheduling method described above. For example, in some embodiments, the resource scheduling method described above can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded onto the RAM 603 and executed by the computing unit 601, one or more steps of the resource scheduling method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the resource scheduling method described above by any other appropriate means, such as by means of firmware.
[0106] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0107] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0108] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0110] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0111] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0112] It should be understood that the various forms of flow illustrated above can be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technology disclosed in the present disclosure can be achieved, which is not limited herein.
[0113] While embodiments or examples of the present disclosure have been described with reference to the drawings, it should be understood that the above-described methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present disclosure is not limited by these embodiments or examples, but is only limited by the claims and their equivalents. Various elements in the embodiments or examples can be omitted or replaced by equivalent elements thereof. In addition, each step can be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples can be combined in various ways. It is important that many of the elements described herein can be replaced by equivalent elements that appear after the present disclosure as technology evolves.
Claims
1. A resource scheduling method, comprising: determining, for each of a plurality of computing units for performing a target task, a performance level of the computing unit based on at least one performance parameter of the computing unit, wherein the target task has a plurality of subtasks; determining, based on a data processing amount of each of the plurality of subtasks, a minimum performance level that a computing unit capable of performing the subtask should satisfy; and in response to receiving a first subtask of the plurality of subtasks, performing a scheduling operation, the scheduling operation comprising: obtaining a first computing unit, wherein the first computing unit is a highest-performance idle computing unit among at least one first candidate computing unit, and a performance level of each of the at least one first candidate computing unit is not lower than the minimum performance level corresponding to the first subtask; in response to obtaining the first computing unit, scheduling the first computing unit to perform the first subtask; in response to failing to obtain the first computing unit, obtaining at least one second candidate computing unit of the plurality of computing units, wherein the at least one second candidate computing unit comprises a computing unit of the at least one first candidate computing unit that is performing a second subtask, and a minimum performance level corresponding to the second subtask is lower than the minimum performance level corresponding to the first subtask; and selecting one of the at least one second candidate computing unit as a second computing unit to interrupt the second subtask being performed in the second computing unit and to cause the second computing unit to perform the first subtask.
2. The method of claim 1, wherein, The selecting one of the at least one second candidate computing unit as the second computing unit comprises: selecting, among the at least one second candidate computing unit, a computing unit with a highest performance level as the second computing unit.
3. The method of claim 1 or 2, the scheduling operation further comprising: in response to failing to obtain the at least one second candidate computing unit, obtaining at least one third candidate computing unit of the plurality of computing units, wherein the at least one third candidate computing unit comprises a computing unit of the at least one first candidate computing unit that is performing a third subtask, a minimum performance level corresponding to the third subtask is the same as the minimum performance level corresponding to the first subtask, and a task priority of the third subtask is lower than a task priority of the first subtask; and selecting one of the at least one third candidate computing unit as a third computing unit to interrupt the third subtask being performed in the third computing unit and to cause the third computing unit to perform the first subtask.
4. The method of claim 3, wherein, The selecting one of the at least one third candidate computing unit as the third computing unit comprises: in response to determining that the at least one third subtask corresponding to the at least one third candidate computing unit has the same task priority, selecting, among the at least one third candidate computing unit, a computing unit with a highest performance level as the third computing unit.
5. The method of claim 3, wherein, The at least one third candidate computing unit is a plurality, and the selecting one computing unit as the third computing unit from the at least one third candidate computing unit comprises: In response to determining that the at least one third candidate computing unit includes a computing unit executing a subtask of a different task priority, selecting, from the at least one third candidate computing unit, a computing unit with the highest performance level in at least one fourth candidate computing unit as the third computing unit, wherein the at least one fourth candidate computing unit includes at least one computing unit with the lowest task priority of the subtasks being executed in the at least one third candidate computing unit.
6. The method of claim 3, further comprising: obtaining task information of the interrupted subtask, the task information including task execution state data of the interrupted subtask at the time of interruption and a lowest performance level corresponding to the interrupted subtask; and performing the scheduling operation on the interrupted subtask based on the task information to re-determine a computing unit for executing the interrupted subtask and executing the interrupted subtask based on the re-determined computing unit.
7. The method of claim 1 or 2, wherein, The target task includes a model training task or a model inference task, and wherein the determining, based on the data processing amount of each subtask in the plurality of subtasks, a lowest performance level that a computing unit capable of executing the subtask should satisfy comprises: determining, based on at least one of a model architecture and a model parameter amount of the subtask corresponding model, a lowest performance level that a computing unit capable of executing the subtask should satisfy.
8. The method of claim 1 or 2, wherein, The computing unit is a graphics card.
9. A resource scheduling apparatus, comprising: a first determining unit configured to, for each computing unit in a plurality of computing units for executing a target task, determine a performance level of the computing unit based on at least one performance parameter of the computing unit, wherein the target task has a plurality of subtasks; a second determining unit configured to, based on a data processing amount of each subtask in the plurality of subtasks, determine a lowest performance level that a computing unit capable of executing the subtask should satisfy; and a first executing unit configured to, in response to receiving a first subtask in the plurality of subtasks, perform a scheduling operation, the first executing unit comprising: a first obtaining subunit configured to obtain a first computing unit, wherein the first computing unit is a computing unit with the highest performance level in at least one first candidate computing unit, and a performance level of each first candidate computing unit in the at least one first candidate computing unit is not lower than a lowest performance level corresponding to the first subtask; a scheduling subunit configured to, in response to obtaining the first computing unit, schedule the first computing unit to execute the first subtask; a second obtaining subunit, configured to, in response to the first computing unit not being obtained, obtain at least one second candidate computing unit from the plurality of computing units, wherein the at least one second candidate computing unit comprises a computing unit from the at least one first candidate computing unit that is executing a second subtask, and the second subtask corresponds to a lowest performance level that is lower than the lowest performance level corresponding to the first subtask; and a first selecting subunit, configured to select one computing unit from the at least one second candidate computing unit as a second computing unit, to interrupt the second subtask being executed in the second computing unit and to cause the second computing unit to execute the first subtask.
10. The apparatus of claim 9, wherein, The first selecting subunit is configured to: select, from the at least one second candidate computing unit, a computing unit with the highest performance level as the second computing unit.
11. The apparatus according to claim 9 or 10, wherein the first executing unit further comprises: a third obtaining subunit, configured to, in response to the at least one second candidate computing unit not being obtained, obtain at least one third candidate computing unit from the plurality of computing units, wherein the at least one third candidate computing unit comprises a computing unit from the at least one first candidate computing unit that is executing a third subtask, the third subtask corresponds to a lowest performance level that is the same as the lowest performance level corresponding to the first subtask, and the third subtask has a task priority that is lower than the task priority of the first subtask; and a second selecting subunit, configured to select one computing unit from the at least one third candidate computing unit as a third computing unit, to interrupt the third subtask being executed in the third computing unit and to cause the third computing unit to execute the first subtask.
12. The apparatus of claim 11, wherein, The second selecting subunit is configured to: in response to determining that the at least one third subtask corresponding to the at least one third candidate computing unit has the same task priority, select, from the at least one third candidate computing unit, a computing unit with the highest performance level as the third computing unit.
13. The apparatus of claim 11, wherein, The number of the at least one third candidate computing unit is a plurality, and the second selecting subunit is configured to: in response to determining that the at least one third candidate computing unit comprises a computing unit executing a subtask with a different task priority, select, from the at least one third candidate computing unit, a computing unit with the highest performance level from at least one fourth candidate computing unit as the third computing unit, wherein the at least one fourth candidate computing unit comprises at least one computing unit from the at least one third candidate computing unit that is executing a subtask with the lowest task priority.
14. The apparatus according to claim 11, further comprising: an obtaining unit, configured to obtain task information of an interrupted subtask, the task information comprising task execution state data of the interrupted subtask at a moment of interruption and a lowest performance level corresponding to the interrupted subtask; and The second execution unit is configured to perform the scheduling operation on the interrupted subtask based on the task information, to re-determine a computing unit for executing the interrupted subtask, and to execute the interrupted subtask based on the re-determined computing unit.
15. The apparatus of claim 9 or 10, wherein, The target task includes a model training task or a model inference task, and the second determination unit is configured to: determine, based on at least one of a model architecture and a model parameter quantity of the subtask corresponding model, a minimum performance level that should be met by a computing unit capable of executing the subtask.
16. The apparatus of claim 9 or 10, wherein, The computing unit is a graphics card.
17. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Resource scheduling method, device and system
CN109936604A
Resource scheduling method and device, equipment and storage medium
CN113377520A