A resource scheduling method, device, equipment and medium based on labels
By automatically determining the node labels of the deep learning model, the problem of low efficiency in manually setting node labels in the existing technology is solved, efficient scheduling and reasonable allocation of resources are achieved, and calculation speed and visibility are improved.
Patent Information
- Application Number
- CN202211411819.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-11-11
AI Technical Summary
In the resource deployment of deep learning models, existing open source platforms require manual creation of node labels, resulting in inefficient resource deployment and seriously affecting computing speed.
By obtaining the definition information of resource nodes and the resource scheduling constraints of the deep learning model, the target node and its label are automatically determined, realizing resource scheduling and deployment without manually setting node labels.
It improves the deployment efficiency of deep learning models, ensures reasonable scheduling of resources, avoids waste of resources, and improves the visibility of scheduling.
Smart Images

Figure CN115640112B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a label-based resource scheduling method, device, equipment and medium. Background Art
[0002] With the rapid development of artificial intelligence, deep learning model operations usually require higher computing power. The resource deployment of deep learning models is very complex. Usually, portable and scalable open source platforms are used to manage containerized workloads and services when deploying resources for deep learning models.
[0003] However, when implementing resource deployment of deep learning models through open source platforms, labels of selected nodes (load nodes) in the resource nodes of the open source platform need to be created manually, resulting in inefficient resource deployment of deep learning models and seriously affecting the calculation speed of deep learning models. Summary of the invention
[0004] The present invention provides a label-based resource scheduling method, device, equipment and medium, which can automatically determine node labels according to a deep learning model without manually setting node labels, thereby improving the efficiency of deep learning model deployment.
[0005] According to one aspect of the present invention, a label-based resource scheduling method is provided, comprising:
[0006] When the resource creation of the resource node is completed, the definition information of each resource node is obtained;
[0007] Obtain resource scheduling constraints of the deep learning model resource allocation task, and determine a target node and a target label of the target node in the resource node according to the resource scheduling constraints and the definition information;
[0008] According to the target label, resource scheduling and deployment are performed on the deep learning model resource allocation task.
[0009] Optionally, obtain resource scheduling constraints for deep learning model resource allocation tasks, including:
[0010] The model type and model scale information of the deep learning model resource allocation task are obtained, and the model type and the model scale information are used as the resource scheduling restriction conditions.
[0011] Optionally, determining a target node in the Pod node according to the resource scheduling constraint condition and the definition information includes:
[0012] According to the model type, the model scale information and the definition information, candidate nodes are screened out from the resource nodes and a target number of target nodes required for the deep learning model resource allocation task is determined;
[0013] According to the target quantity, a target node is determined from among the candidate nodes.
[0014] Optionally, screening out candidate nodes from the resource nodes according to the model type, the model scale information, and the definition information includes:
[0015] Determine the GPU quantity and type conditions that the candidate node needs to meet according to the model type and the model scale information;
[0016] According to the definition information, resource nodes that meet the GPU quantity condition and the GPU type condition are determined as candidate nodes.
[0017] Optionally, determine the target number of target nodes required for the deep learning model resource allocation task, including:
[0018] If the model type is a multi-node model, determining the target number according to the first number of GPUs in the definition information corresponding to the candidate node and the second number of GPUs in the model scale information;
[0019] If the model type is a single-node model, the target number is determined to be 1.
[0020] Optionally, determining a target node and a target tag of the target node in the resource node according to the resource scheduling restriction condition and the definition information includes:
[0021] If the model type is a multi-node model, determining the model type as a target label of the target node;
[0022] If the model type is a single-node model, the node GPU name is determined according to the definition information corresponding to the target node, and the node GPU name is determined as the target label of the target node.
[0023] Optionally, the method further includes:
[0024] If the model type is a single-node model, the number of node GPUs is determined according to the definition information corresponding to the target node;
[0025] When the number of GPUs of the node meets the GPU number condition, the unique identification information UUID of the GPU is determined according to the definition information, and the UUID and the model type are determined as the target label of the target node.
[0026] According to another aspect of the present invention, a label-based resource scheduling device is provided, the device comprising:
[0027] A definition information acquisition module, used to acquire definition information of each resource node after the resource creation of the resource node is completed;
[0028] A target label determination module, used to obtain resource scheduling constraints of the deep learning model resource allocation task, and determine a target node and a target label of the target node in the resource node according to the resource scheduling constraints and the definition information;
[0029] A resource scheduling and deployment module is used to schedule and deploy resources for the deep learning model resource allocation task according to the target label.
[0030] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0031] at least one processor; and
[0032] a memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the label-based resource scheduling method described in any embodiment of the present invention.
[0034] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the label-based resource scheduling method described in any embodiment of the present invention when executed.
[0035] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the label-based resource scheduling method described in any embodiment of the present invention is implemented.
[0036] The technical solution provided by the embodiment of the present invention obtains definition information of each resource node after the resource creation of the resource node is completed; obtains resource scheduling constraints of the deep learning model resource allocation task, and determines the target node and the target label of the target node in the resource node according to the resource scheduling constraints and the definition information; performs resource scheduling and deployment for the deep learning model resource allocation task according to the target label, which can solve the problem of manually setting node labels in the prior art; and can realize automatic determination of node labels according to the deep learning model without manually setting node labels, thereby improving the efficiency of deep learning model deployment.
[0037] In addition, by using the model type and model scale information of the deep learning model as resource scheduling constraints, the deep learning model can be reliably deployed; by determining the number of nodes based on the model type and model scale information, appropriate nodes can be deployed for the deep learning model for calculation; by determining the GPU information based on the model type and model scale information, the appropriate GPU can be selected to achieve fast calculation of the deep learning model; by specifically determining the number of nodes based on the model type and GPU quantity information, the reasonable scheduling of resources can be ensured to avoid waste of resources; by determining different labels for nodes based on the model type, the specific deployment of the deep learning model can be known through the labels, which facilitates the processing of node tasks and improves the visibility of scheduling.
[0038] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 is a flow chart of a label-based resource scheduling method provided according to an embodiment of the present invention;
[0041] Figure 2 is a flow chart of another label-based resource scheduling method provided according to an embodiment of the present invention;
[0042] Figure 3 A flowchart of another label-based resource scheduling method provided by an embodiment of the present invention;
[0043] Figure 4 is a flowchart of another label-based resource scheduling method provided according to an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of the structure of a label-based resource scheduling device provided by an embodiment of the present invention;
[0045] Figure 6 It is a structural schematic diagram of an electronic device for implementing the tag-based resource scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] Figure 1 This is a flowchart of a tag-based resource scheduling method provided according to an embodiment of the present invention. This embodiment is applicable to the case where deep learning model resource scheduling deployment is implemented through an open source platform. The method can be executed by a tag-based resource scheduling device, which can be implemented in the form of hardware and / or software. The tag-based resource scheduling device can be configured in an electronic device (such as a terminal or server) with an open source platform. Figure 1 As shown, the method includes:
[0049] Step 110: After the resource creation of the resource node is completed, the definition information of each resource node is obtained.
[0050] Exemplarily, the open source platform may be Kubernetes (k8s). The resource node may be a Pod node in k8s. The processing resources in the host resource pool may be allocated to the k8s cluster in advance. Among them, the processing resources may be GPU resources. The Pod node is the smallest working unit in the k8s cluster. Specifically, the GPU resources may be allocated to the Pod node. The specific allocation situation may be reflected by the definition information of the Pod node.
[0051] In a specific embodiment, the definition information may include the type of GPU assigned to the Pod node, the number of GPUs, the GPU name, and the GPU unique identifier (Universally Unique Identifier, UUID), etc. In addition, the definition information may also include the node label of the Pod node, etc.
[0052] Step 120: Obtain resource scheduling constraints for the deep learning model resource allocation task, and determine the target node and the target label of the target node in the resource node based on the resource scheduling constraints and definition information.
[0053] Due to the different computational requirements of deep learning models, deep learning models may require one or more GPUs for operation. Therefore, it is necessary to allocate resources for deep learning models to implement their deployment and facilitate fast operation.
[0054] Among them, the resource scheduling constraint conditions of the deep learning model resource allocation task may be requirements that need to be followed when allocating resources to the deep learning model. Specifically, in an optional implementation of an embodiment of the present invention, obtaining the resource scheduling constraint conditions of the deep learning model resource allocation task includes: obtaining the model type and model scale information of the deep learning model resource allocation task, and using the model type and model scale information as resource scheduling constraint conditions.
[0055] Specifically, the model type may include a single-node model and a multi-node model. The model scale information may be specifically reflected by information such as the number of GPUs and / or the type of GPUs required for model operation.
[0056] The target node may be an execution node of a deep learning model, i.e., a load node. According to the resource scheduling constraints and definition information, there may be multiple ways to determine the target node in the resource node. Specifically, according to the definition information of the resource node, the node whose definition information meets the resource scheduling constraints may be selected in the resource node as the target node.
[0057] For example, resource matching can be performed based on the demand for GPU resources of the deep learning model in the resource scheduling constraints and the GPU resources of the Pod node in the definition information, and the target node that can meet the execution of the deep learning model can be screened out from the Pod node.
[0058] In this embodiment, there may be multiple situations for determining the target tag. The target tag may be determined by determining the deep learning model information to which the target node belongs and / or the GPU information to which the target node belongs based on the resource scheduling constraints and definition information; based on the deep learning model information and / or GPU information, information screening may be performed in the resource scheduling constraints and definition information to generate a target tag. It can be understood that the target tag may represent the deep learning model information or the GPU information, which may facilitate the user to classify the target node according to the target tag in subsequent applications. For example, during the specific operation of the deep learning model, or when obtaining the data after the model operation for analysis, the user may determine the target node corresponding to a certain deep learning model through the target tag.
[0059] Through the above method, it is possible to automatically determine the target label for the target node in k8s, avoiding the situation where users manually set the corresponding labels according to the specific execution status of each node, saving human resources and improving the efficiency of deep learning model deployment.
[0060] Step 130: Perform resource scheduling and deployment for the deep learning model resource allocation task according to the target label.
[0061] The resource scheduling and deployment may be a Pod resource object scheduling process. Specifically, the resource scheduling and deployment may be to allocate the deep learning model to the corresponding target node for execution.
[0062] In this embodiment, after the resource creation of the resource node is completed, the definition information of each resource node is obtained; the resource scheduling constraint conditions of the deep learning model resource allocation task are obtained, and the target node and the target label of the target node are determined in the resource node according to the resource scheduling constraint conditions and the definition information; the technical means of resource scheduling and deployment of the deep learning model resource allocation task according to the target label solves the problem of manually setting node labels in the prior art, and can realize automatic determination of node labels according to the deep learning model, without the need to manually set node labels, thereby improving the efficiency of deep learning model deployment.
[0063] Figure 2 is a flow chart of another tag-based resource scheduling method provided according to an embodiment of the present invention. Figure 2 As shown, the method includes:
[0064] Step 210: After the resource creation of the resource node is completed, the definition information of each resource node is obtained.
[0065] Step 220: Obtain the model type and model scale information of the deep learning model resource allocation task, and use the model type and model scale information as resource scheduling constraints.
[0066] By using the model type and model scale information of the deep learning model as resource scheduling constraints, reliable deployment of the deep learning model can be achieved.
[0067] Step 230: According to the model type, model scale information and definition information, candidate nodes are screened out from the resource nodes, and the target number of target nodes required for the deep learning model resource allocation task is determined.
[0068] The candidate nodes may be nodes preliminarily screened out based on the model type, model scale information, and definition information. The number of candidate nodes may be one or more. Among the candidate nodes, the target node may be determined based on the target number required for the deep learning model resource allocation task. By determining the number of nodes based on the model type and model scale information, appropriate nodes may be deployed for the deep learning model for calculation.
[0069] Specifically, in an optional implementation of an embodiment of the present invention, candidate nodes are screened out from resource nodes according to model type, model scale information and definition information, including: determining GPU quantity conditions and type conditions that the candidate nodes need to meet according to the model type and model scale information; and determining, according to the definition information, Pod nodes that meet the GPU quantity conditions and type conditions as candidate nodes.
[0070] Among them, when the model type is a single-node model, the GPU quantity condition that the candidate node needs to meet can be determined as follows: the candidate node needs to have at least one GPU. In addition, when the candidate node has only one GPU, it can also be limited that the GPU in the candidate node needs to be able to carry the deep learning model calculation amount corresponding to the model scale information. When the model type is a single-node model, the GPU type condition that the candidate node needs to meet can be determined as follows: the GPU type of each candidate node can be unlimited.
[0071] When the model type is a multi-node model, the GPU number condition that the candidate nodes need to meet can be determined as follows: the number of GPUs possessed by each candidate node is the same; and the number of GPUs that each candidate node needs to have should be greater than or equal to the single-node number threshold specified by the model scale information. When the model type is a multi-node model, the GPU type condition that the candidate nodes need to meet can be determined as follows: the GPU type possessed by each candidate node is the same. By determining the GPU information based on the model type and model scale information, the appropriate GPU can be selected to achieve fast calculation of the deep learning model.
[0072] In an embodiment of the present invention, a node that meets the GPU quantity condition and the type condition can be determined as a candidate node according to the definition information of the Pod node. Further, the candidate node can be provided in the form of a candidate node group, which is convenient for screening the target node in each candidate node group, so that the screened target node meets the same GPU quantity condition and type condition as the candidate node.
[0073] In this embodiment, when the model type is a multi-node model, the deep learning model requires multiple target nodes to jointly execute and realize the operation. When the model type is a single-node model, the deep learning model can be realized by a single target node. When the model type is a multi-node model, it is necessary to specifically determine the target number of target nodes required for the deep learning model based on the model scale information and the definition information corresponding to the candidate nodes. The method for determining the target number can be diverse. The principle of determining the target number is: by screening a sufficient number of target nodes so that the selected target nodes can execute together to meet the calculation amount specified in the model scale information. By specifically determining the number of nodes through the model type and the number of GPUs information, it is possible to ensure the reasonable scheduling of resources and avoid waste of resources.
[0074] Specifically, in an optional implementation of an embodiment of the present invention, the target number of target nodes required for a deep learning model resource allocation task is determined, including: if the model type is a multi-node model, the target number is determined based on the first GPU number in the definition information corresponding to the candidate node and the second GPU number in the model scale information; if the model type is a single-node model, the target number is determined to be 1.
[0075] The first number of GPUs may be the number of GPUs in the candidate node. Specifically, the first number of GPUs may be the number of GPUs in a single candidate node in the candidate node group. The second number of GPUs may be the number of GPUs required by the deep learning model. When the model type is a multi-node model, the target number can be calculated by the formula: To round up.
[0076] Step 240: Determine the target node from the candidate nodes according to the target quantity.
[0077] When determining the target node, the target node and the candidate nodes may satisfy the same GPU quantity condition and type condition. Specifically, a target number of nodes may be selected from the same candidate node group as the target node.
[0078] Step 250: Determine the target label of the target node according to the resource scheduling constraint and definition information.
[0079] In this embodiment, different target labels can be set when the number of target nodes is different. For example, when the target number of target nodes is 1, the GPU information of the target node can be used as the target label. For another example, when the target number of target nodes is multiple, the information of the deep learning model can be used as the target label. Through the above-mentioned label setting, automatic label creation of load nodes in k8s can be realized, and at the same time, the created labels are convenient for distinguishing deep learning models, realizing free scheduling of k8s cluster environment.
[0080] Step 260: Perform resource scheduling and deployment for the deep learning model resource allocation task according to the target label.
[0081] The technical solution provided by the embodiment of the present invention is as follows: after the resource node resources are created, definition information of each resource node is obtained; the model type and model scale information of the deep learning model resource allocation task are obtained, and the model type and model scale information are used as resource scheduling constraints; candidate nodes are screened out from the resource nodes according to the model type, model scale information and definition information, and the target number of target nodes required for the deep learning model resource allocation task is determined; the target node is determined from the candidate nodes according to the target number; the target label of the target node is determined according to the resource scheduling constraints and definition information; a technical means for resource scheduling and deployment of the deep learning model resource allocation task according to the target label can solve the problem of manually setting node labels in the prior art; node labels can be automatically determined according to the deep learning model without manually setting node labels, thereby improving the efficiency of deep learning model deployment; and the number of target nodes can be made to meet the needs of the deep learning model, thereby ensuring reasonable scheduling of resources and avoiding waste of resources.
[0082] Figure 3 A flowchart of another label-based resource scheduling method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method includes:
[0083] Step 310: After the resource creation of the resource node is completed, the definition information of each resource node is obtained.
[0084] Step 320: Obtain the model type and model scale information of the deep learning model resource allocation task, and use the model type and model scale information as resource scheduling constraints.
[0085] Step 330: Determine the target node among the resource nodes according to the resource scheduling constraint conditions and definition information.
[0086] In an optional implementation of an embodiment of the present invention, a target node is determined among resource nodes according to resource scheduling constraints and definition information, including: screening out candidate nodes among resource nodes according to model type, model scale information and definition information, and determining a target number of target nodes required for a deep learning model resource allocation task; determining a target node among candidate nodes according to the target number.
[0087] In an optional implementation of an embodiment of the present invention, candidate nodes are screened out from resource nodes according to model type, model scale information and definition information, including: determining GPU quantity conditions and type conditions that the candidate nodes need to meet according to the model type and model scale information; and determining resource nodes that meet the GPU quantity conditions and type conditions as candidate nodes according to the definition information.
[0088] In an optional implementation of an embodiment of the present invention, the target number of target nodes required for a deep learning model resource allocation task is determined, including: if the model type is a multi-node model, the target number is determined based on the first GPU number in the definition information corresponding to the candidate node and the second GPU number in the model scale information; if the model type is a single-node model, the target number is determined to be 1.
[0089] Step 340: If the model type is a multi-node model, the model type is determined as the target label of the target node.
[0090] In this embodiment, model types may include: deep learning training environment, deep learning reasoning environment, deep learning single-node environment, and deep learning cluster environment, etc. Each model type can be defined as a multi-node model or a single-node model. For a multi-node model, the deep learning model information can be directly used as the target label. For example, for a deep learning model of a "deep learning cluster environment", the "deep learning cluster environment" can be directly used as the target label of the target node. Through the above settings, it is easy to distinguish the deployment nodes corresponding to each deep learning model. When the task is executed subsequently, it is convenient to directly select the load node labeled "deep learning cluster environment" for execution.
[0091] Step 350: If the model type is a single-node model, determine the node GPU name according to the definition information corresponding to the target node, and determine the node GPU name as the target label of the target node.
[0092] In this embodiment, for a single-node model, GPU information can be used as a target label. For example, for a deep learning model of a "deep learning single-node environment", the node GPU name of the target node can be used as a target label. Through the above settings, a multi-node model can be intuitively distinguished from a single-node model. When the target label is GPU information, it can be known that the target node executes the deep learning model task alone, and the single-node model can be quickly deployed without traversing the information of other nodes.
[0093] Step 360: Perform resource scheduling and deployment for the deep learning model resource allocation task according to the target label.
[0094] Based on the above implementation, optionally, the method further includes: if the model type is a single-node model, determining the number of node GPUs according to the definition information corresponding to the target node; when the number of node GPUs meets the GPU number condition, determining the UUID of the GPU according to the definition information, and determining the UUID and the model type as the target label of the target node.
[0095] Among them, the number of node GPUs meeting the GPU number condition can be understood as the number of node GPUs is greater than or equal to the number of GPUs required by the deep learning model. When the number of node GPUs meets the GPU number condition, the UUID of the GPU is used as the target label, and the type of GPU used to execute the deep learning model can be known on the basis of distinguishing whether the deep learning model is a single-node model. When the deep learning model is a single-node model, the model type is set in the target label at the same time, which can facilitate the distinction between different deep learning models.
[0096] The technical solution provided by the embodiment of the present invention is as follows: after the resource creation of the resource node is completed, the definition information of each resource node is obtained; the model type and model scale information of the deep learning model resource allocation task are obtained, and the model type and model scale information are used as resource scheduling constraints; according to the resource scheduling constraints and definition information, the target node is determined in the resource node; if the model type is a multi-node model, the model type is determined as the target label of the target node; if the model type is a single-node model, the node GPU name is determined according to the definition information corresponding to the target node, and the node GPU name is determined as the target label of the target node; according to the target label, the technical means of resource scheduling and deployment of the deep learning model resource allocation task can solve the problem of manually setting node labels in the prior art; the node label can be automatically determined according to the deep learning model without manually setting the node label, thereby improving the efficiency of deep learning model deployment; different labels are determined for nodes by model type, and the specific deployment of the deep learning model can be known through the label, which is convenient for processing node tasks and improving the visibility of scheduling.
[0097] In order to better introduce the technical solution provided by the embodiment of the present invention, the embodiment of the present invention can refer to the following implementation methods:
[0098] Figure 4 FIG. 1 is a flowchart of another label-based resource scheduling method provided according to an embodiment of the present invention. Figure 4 As shown in the figure, after the resource creation of the resource node is completed, the definition information of each resource node is obtained. The model type and model scale information of the deep learning model resource allocation task are obtained, and the model type and model scale information are used as resource scheduling constraints. According to the model type and model scale information, the GPU quantity and type conditions that the candidate nodes need to meet are determined; according to the definition information, the resource nodes that meet the GPU quantity and type conditions are determined as candidate nodes. If the model type is a multi-node model, according to Determine the target quantity; and determine the model type as the target label of the target node. If the model type is a single-node model, determine the target quantity to be 1; and determine the node GPU name and node GPU quantity according to the definition information corresponding to the target node; determine the node GPU name as the target label of the target node; when the node GPU quantity meets the GPU quantity condition, determine the UUID and model type as the target label of the target node; otherwise, determine the model type as the target label of the target node. According to the target label, perform resource scheduling and deployment for the deep learning model resource allocation task.
[0099] The method provided by the embodiment of the present invention can solve the problem of manually setting node labels in the prior art; it can automatically determine node labels according to the deep learning model without manually setting node labels, thereby improving the efficiency of deep learning model deployment; and it can make the number of target nodes meet the needs of the deep learning model, thereby ensuring the reasonable scheduling of resources and avoiding resource waste; at the same time, the specific deployment of the deep learning model can be known through labels, which facilitates the processing of node tasks and improves the visibility of scheduling.
[0100] Figure 5 A schematic diagram of a resource scheduling device based on labels provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes: a definition information acquisition module 510, a target tag determination module 520, and a resource scheduling and deployment module 530. Among them:
[0101] A definition information acquisition module 510 is used to acquire definition information of each resource node after the resource creation of the resource node is completed;
[0102] A target label determination module 520 is used to obtain resource scheduling constraints of the deep learning model resource allocation task, and determine a target node and a target label of the target node in the resource node according to the resource scheduling constraints and definition information;
[0103] The resource scheduling and deployment module 530 is used to schedule and deploy resources for deep learning model resource allocation tasks according to target tags.
[0104] Optionally, the target tag determination module 520 includes:
[0105] The resource scheduling constraint determination unit is used to obtain the model type and model scale information of the deep learning model resource allocation task, and use the model type and model scale information as resource scheduling constraint conditions.
[0106] Optionally, the target tag determination module 520 includes:
[0107] A target quantity determination unit is used to select candidate nodes from the Pod nodes according to the model type, model scale information, and definition information, and determine the target number of target nodes required for the deep learning model resource allocation task;
[0108] The target node determination unit is used to determine the target node among the candidate nodes according to the target quantity.
[0109] Optionally, a target quantity determination unit is used to:
[0110] Determine the number and type of GPUs that the candidate nodes need to meet based on the model type and model scale information;
[0111] According to the definition information, Pod nodes that meet the GPU quantity and type conditions are determined as candidate nodes.
[0112] Optionally, the target quantity determination unit is further specifically used for:
[0113] If the model type is a multi-node model, the target number is determined according to the first number of GPUs in the definition information corresponding to the candidate node and the second number of GPUs in the model scale information;
[0114] If the model type is a single-node model, the target number is determined to be 1.
[0115] Optionally, the target tag determination module 520 includes:
[0116] A first target label determination unit, configured to determine the model type as a target label of a target node if the model type is a multi-node model;
[0117] The second target label determination unit is used to determine the node GPU name according to the definition information corresponding to the target node if the model type is a single-node model, and determine the node GPU name as the target label of the target node.
[0118] Optionally, the device further includes:
[0119] A node GPU quantity determination module is used to determine the node GPU quantity according to the definition information corresponding to the target node if the model type is a single-node model;
[0120] Another target label determination module is used to determine the UUID of the GPU according to the definition information when the number of GPUs of the node meets the GPU number condition, and determine the UUID and the model type as the target label of the target node.
[0121] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not fully described in the embodiments of the present invention, please refer to the methods provided by all the above embodiments of the present invention.
[0122] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0123] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0124] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0125] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a tag-based resource scheduling method.
[0126] In some embodiments, the tag-based resource scheduling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the tag-based resource scheduling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the tag-based resource scheduling method in any other appropriate manner (e.g., by means of firmware).
[0127] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0129] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0131] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may 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), a blockchain network, and the Internet.
[0132] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A label-based resource scheduling method, characterized in that: include: When the resource creation of the resource node is completed, the definition information of each resource node is obtained; Obtain resource scheduling constraints of the deep learning model resource allocation task, and determine a target node and a target label of the target node in the resource node according to the resource scheduling constraints and the definition information; According to the target label, resource scheduling and deployment are performed on the deep learning model resource allocation task; Obtain resource scheduling constraints for deep learning model resource allocation tasks, including: The model type and model scale information of the deep learning model resource allocation task are obtained, and the model type and the model scale information are used as the resource scheduling restriction conditions.
2. The method according to claim 1, characterized in that Determining a target node among the resource nodes according to the resource scheduling restriction condition and the definition information includes: According to the model type, the model scale information and the definition information, candidate nodes are screened out from the resource nodes, and a target number of target nodes required for the deep learning model resource allocation task is determined; According to the target quantity, a target node is determined from among the candidate nodes.
3. The method according to claim 2, characterized in that Screening out candidate nodes from the resource nodes according to the model type, the model scale information, and the definition information includes: Determine the GPU quantity and type conditions that the candidate node needs to meet according to the model type and the model scale information; According to the definition information, resource nodes that meet the GPU quantity condition and the GPU type condition are determined as candidate nodes.
4. The method according to claim 2, characterized in that: Determine the target number of target nodes required for deep learning model resource allocation tasks, including: If the model type is a multi-node model, determining the target number according to the first GPU number in the definition information corresponding to the candidate node and the second GPU number in the model scale information; If the model type is a single-node model, the target number is determined to be 1.
5. The method according to claim 3, characterized in that: Determining a target node and a target tag of the target node in the resource node according to the resource scheduling restriction condition and the definition information includes: If the model type is a multi-node model, determining the model type as a target label of the target node; If the model type is a single-node model, the node GPU name is determined according to the definition information corresponding to the target node, and the node GPU name is determined as the target label of the target node.
6. The method according to claim 5, characterized in that Also includes: If the model type is a single-node model, the number of node GPUs is determined according to the definition information corresponding to the target node; When the number of GPUs of the node meets the GPU number condition, the unique identification information UUID of the GPU is determined according to the definition information, and the UUID and the model type are determined as the target label of the target node.
7. A label-based resource scheduling device, characterized in that: include: A definition information acquisition module, used to acquire definition information of each resource node after the resource creation of the resource node is completed; A target label determination module, used to obtain resource scheduling constraints of the deep learning model resource allocation task, and determine a target node and a target label of the target node in the resource node according to the resource scheduling constraints and the definition information; A resource scheduling and deployment module, used to perform resource scheduling and deployment on the deep learning model resource allocation task according to the target label; The target tag determination module includes: The resource scheduling constraint determination unit is used to obtain the model type and model scale information of the deep learning model resource allocation task, and use the model type and model scale information as resource scheduling constraint conditions.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the tag-based resource scheduling method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the label-based resource scheduling method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Cluster node label creation method and system, electronic equipment and storage medium
CN112527449A
