GPU resource management method and device, equipment, storage medium and product

By classifying GPU resources and dynamically scaling them up and down, the problem of low resource utilization in GPU resource management is solved, efficient utilization of GPU resources is achieved, and system performance is improved.

CN118819813APending Publication Date: 2024-10-22CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410473318.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

How to efficiently utilize GPU resources, meet the task execution of different algorithm requirements, and improve resource utilization is a difficult problem in current GPU resource management.

Method used

By classifying the NODE nodes in the cluster, the time-consuming operation of the algorithm to be executed is tested, and based on the time-consuming and GPU resource usage, the nodes are expanded and reduced to dynamically allocate GPU resources.

Benefits of technology

It effectively avoids resource waste, improves GPU resource utilization and system performance, and meets the task execution needs of different algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819813A_ABST
    Figure CN118819813A_ABST
Patent Text Reader

Abstract

The invention discloses a GPU resource management method and device, equipment, a storage medium and a product. The method comprises the steps that NODE nodes in a cluster are classified; testing the to-be-executed algorithm to obtain algorithm time consumption; deploying the to-be-executed algorithm at a corresponding NODE node according to the algorithm time consumption; and when the to-be-executed algorithm is executed on the corresponding NODE node, carrying out capacity expansion and shrinkage operation on the corresponding NODE node according to the GPU resource use condition of the to-be-executed algorithm. By adopting the embodiment of the invention, GPU resources can be efficiently utilized, task execution required by different algorithms is met, and the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of GPU resource management, and in particular to a GPU resource management method, device, equipment, storage medium and product. Background Art

[0002] In recent years, artificial intelligence has developed rapidly. How to achieve high-performance machine learning and deep learning with the lowest computing power is a difficult problem in this field. GPU (graphics processing unit) hardware is the key to maximizing computing power utilization, but its resources are expensive and difficult to fully utilize. How to efficiently use GPU resources to meet the execution of tasks required by different algorithms and improve resource utilization is a problem that needs to be solved. Summary of the invention

[0003] The present application provides a GPU resource management method, apparatus, device, storage medium and product, which can efficiently utilize GPU resources to meet the task execution requirements of different algorithms.

[0004] To achieve the above objectives, the present application provides a GPU resource management method, including:

[0005] Classify NODE nodes in the cluster;

[0006] Test the algorithm to be executed and get the algorithm time consumption;

[0007] Deploy the algorithm to be executed on the corresponding NODE node according to the time consumption of the algorithm;

[0008] When the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed.

[0009] As an improvement of the above solution, the classification of NODE nodes in the cluster includes:

[0010] Get a cluster snapshot and store the cluster resources in the database;

[0011] According to the node type, the NODE nodes in the cluster are classified and labeled; wherein the node types include: test nodes, unused nodes, long-time task nodes and short-time task nodes.

[0012] As an improvement to the above solution, the algorithm to be executed is tested to obtain the algorithm time consumption, including:

[0013] Receive algorithm information to be executed input by the user;

[0014] Start the test service, deploy the algorithm to be executed on the test node, perform the test according to the information of the algorithm to be executed, and obtain the algorithm time consumption.

[0015] As an improvement of the above solution, the step of deploying the algorithm to be executed on a corresponding NODE node according to the algorithm time consumption includes:

[0016] When the algorithm takes longer than a preset time, the algorithm to be executed is deployed on a long-duration task node;

[0017] When the algorithm takes less than or equal to the preset duration, the algorithm to be executed is deployed on the short-time task node.

[0018] As an improvement of the above solution, when the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed, including:

[0019] When the algorithm to be executed is executed on the corresponding NODE node, obtaining the first GPU resource usage rate of each POD node on the NODE node corresponding to the algorithm to be executed;

[0020] According to each of the first GPU resource usage rates, obtaining a second GPU resource usage rate of the algorithm to be executed;

[0021] Compare the second GPU resource usage with a preset minimum usage and a preset maximum usage to obtain a comparison result;

[0022] According to the comparison result, the NODE node corresponding to the algorithm to be executed is expanded or reduced in capacity.

[0023] As an improvement of the above solution, the step of scaling up or down the NODE node corresponding to the algorithm to be executed according to the comparison result includes:

[0024] When the second GPU resource usage rate is less than the preset minimum usage rate, if the total number of the POD nodes is greater than a preset number, reducing the POD nodes;

[0025] When the second GPU resource usage rate is greater than the preset maximum usage rate, determining whether there are other idle NODE nodes of the same type as the NODE node corresponding to the algorithm to be executed;

[0026] If it exists, the POD node is expanded; if it does not exist, the type of at least one unused node is set to the type of the NODE node corresponding to the algorithm to be executed.

[0027] To achieve the above purpose, the embodiment of the present application further provides a GPU resource management device, including:

[0028] Node classification module, used to classify NODE nodes in the cluster;

[0029] The test module is used to test the algorithm to be executed and obtain the algorithm time consumption;

[0030] A deployment module, used to deploy the algorithm to be executed on a corresponding NODE node according to the time consumption of the algorithm;

[0031] The expansion and contraction module is used to expand and contract the corresponding NODE node according to the GPU resource usage of the algorithm to be executed when the algorithm to be executed is executed on the corresponding NODE node.

[0032] To achieve the above objectives, an embodiment of the present application also provides a GPU resource management device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the GPU resource management method as described above when executing the computer program.

[0033] To achieve the above-mentioned purpose, an embodiment of the present application also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the GPU resource management method as described above.

[0034] To achieve the above objectives, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which implements the GPU resource management method as described above when executed by a processor.

[0035] Compared with the prior art, the GPU resource management method, device, equipment, storage medium and product provided in the embodiments of the present application classify the NODE nodes in the cluster; test the algorithm to be executed to obtain the algorithm time consumption; deploy the algorithm to be executed on the corresponding NODE node according to the algorithm time consumption; when the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed, thereby avoiding resource waste, being able to efficiently utilize GPU resources, meeting the task execution requirements of different algorithms, and improving resource utilization and system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flowchart of a GPU resource management method provided in an embodiment of the present application;

[0037] Figure 2 is a structural block diagram of a GPU resource management device provided in an embodiment of the present application;

[0038] Figure 3 This is a structural block diagram of a GPU resource management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] See also Figure 1 , Figure 1 : is a flowchart of a GPU resource management method provided in an embodiment of the present application, the GPU resource management method comprising:

[0041] S1. Classify the NODE nodes in the cluster;

[0042] S2. Test the algorithm to be executed and obtain the algorithm time consumption;

[0043] S3, deploying the algorithm to be executed on the corresponding NODE node according to the time consumption of the algorithm;

[0044] S4. When the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed.

[0045] It can be understood that the embodiment of the present application provides a GPU resource management method based on the Kubernetes (K8s) framework, which enables the management of the K8s cluster and the management of GPU resources by entering the control authentication file of the K8s cluster into the system; specifically, by classifying the NODE nodes in the cluster; testing the algorithm to be executed to obtain the algorithm time consumption; deploying the algorithm to be executed on the corresponding NODE node according to the algorithm time consumption; when the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed; wherein the corresponding NODE node is the NODE node where the algorithm to be executed is located.

[0046] The embodiment of the present application deploys the algorithm to be executed on the corresponding NODE node and scales the corresponding NODE node, so as to efficiently utilize GPU resources, meet the task execution requirements of different algorithms, and improve resource utilization and system performance.

[0047] In an optional embodiment, classifying NODE nodes in the cluster includes:

[0048] Get a cluster snapshot and store the cluster resources in the database;

[0049] According to the node type, the NODE nodes in the cluster are classified and labeled; wherein the node types include: test nodes, unused nodes, long-time task nodes and short-time task nodes.

[0050] It is understandable that the cluster needs to be initialized first, specifically, a cluster snapshot is obtained, and the cluster resources are stored in the database; the NODE nodes in the cluster are classified and labeled according to the node type; wherein the node types include: test node (TEST NODE), unused node (IDLE NODE), long-time task node (LONGNODE) ​​and short-time task node (SHORT NODE). Then, after the cluster is initialized, the NODE nodes in the cluster are labeled as test nodes, unused nodes, long-time task nodes or short-time task nodes; one test node, long-time task node and short-time task node are deployed by default, and the remaining NODE nodes are marked as unused nodes.

[0051] In an optional embodiment, the step of testing the algorithm to be executed to obtain the algorithm time consumption includes:

[0052] Receive algorithm information to be executed input by the user;

[0053] Start the test service, deploy the algorithm to be executed on the test node, perform the test according to the information of the algorithm to be executed, and obtain the algorithm time consumption.

[0054] It can be understood that the embodiment of the present application receives the algorithm information to be executed input by the user. Specifically, the user inputs the algorithm information to be executed into the system through a web page, and the system receives the algorithm information to be executed input by the user, and realizes the registration of the image of the algorithm to be executed into the system, providing conditions for subsequent testing; wherein, the algorithm information to be executed includes the algorithm image address, algorithm interface request definition information (ALGO APIDEF of HTTP API request) and algorithm test example. Then, the GPU resource usage of the algorithm to be executed is tested according to the algorithm interface request definition information and the algorithm test example to obtain test data, wherein the test data includes: the algorithm's GPU, CPU, memory, algorithm time and maximum concurrency. Then the algorithm is deployed according to the algorithm time.

[0055] In an optional embodiment, deploying the algorithm to be executed on a corresponding NODE node according to the algorithm time consumption includes:

[0056] When the algorithm takes longer than a preset time, the algorithm to be executed is deployed on a long-duration task node;

[0057] When the algorithm takes less than or equal to the preset duration, the algorithm to be executed is deployed on the short-time task node.

[0058] In the embodiment of the present application, when the algorithm time is greater than the preset time, it means that the algorithm to be executed is a long-time algorithm, and it is deployed on the long-time task node. When the algorithm time is less than or equal to the preset time, it means that the algorithm to be executed is a short-time algorithm, and it is deployed on the short-time task node. After the algorithm to be executed is deployed on the corresponding node, the POD node on the corresponding NODE node can be started to execute the algorithm task; wherein, POD refers to a collection of one or more containers, which is the smallest unit of cluster deployment and logically represents an instance of a certain application; in the embodiment of the present application, the POD node includes two containers: the monitoring container (Agent Container) and the algorithm container (Algorithm Container).

[0059] The embodiment of the present application divides the algorithm into long-time algorithms and short-time algorithms according to the algorithm time consumption, and then allocates different NODE nodes to different algorithms, which can avoid the mixing of long-time services and short-time services, resulting in abnormal fluctuations in TPS (Transactions Per Second) processed by short-time algorithms in NODE nodes and thus system instability.

[0060] In an optional embodiment, when the algorithm to be executed is executed on the corresponding NODE node, scaling the corresponding NODE node according to the GPU resource usage of the algorithm to be executed includes:

[0061] When the algorithm to be executed is executed on the corresponding NODE node, obtaining the first GPU resource usage rate of each POD node on the NODE node corresponding to the algorithm to be executed;

[0062] According to each of the first GPU resource usage rates, obtaining a second GPU resource usage rate of the algorithm to be executed;

[0063] Compare the second GPU resource usage with a preset minimum usage and a preset maximum usage to obtain a comparison result;

[0064] According to the comparison result, the NODE node corresponding to the algorithm to be executed is expanded or reduced in capacity.

[0065] It can be understood that the embodiment of the present application obtains cluster snapshots periodically through the inspection service, and receives the first GPU resource utilization rate of each corresponding POD node through the algorithm container, that is, obtains the first GPU resource utilization rate of each POD node on the NODE node corresponding to the algorithm to be executed, wherein each corresponding POD node is each POD node on the NODE node corresponding to the algorithm to be executed; calculates the second GPU resource utilization rate of the algorithm to be executed according to each first GPU resource utilization rate, and compares it with the pre-configured preset minimum utilization rate and preset maximum utilization rate respectively, and performs expansion and contraction operations on the NODE node corresponding to the algorithm to be executed to realize dynamic allocation of GPU resources.

[0066] Specifically, for one of the POD nodes, the first GPU resource utilization rate of the POD node is obtained through the following steps: obtaining the average concurrency number of the POD node; when the average concurrency number is greater than the preset concurrency number, calculating the concurrency ratio between the average concurrency number and the maximum concurrency number of the algorithm to be executed, and using the concurrency ratio as the first GPU resource utilization rate of the POD node; when the average concurrency number is less than or equal to the preset concurrency number, calculating the duration ratio between the average idle time of the POD node and the statistical time, and using the duration ratio as the first GPU resource utilization rate of the POD node.

[0067] After obtaining the first GPU resource utilization rate of each POD node, the average first GPU resource utilization rate of all POD nodes on the NODE node corresponding to the algorithm to be executed is calculated to obtain the second GPU resource utilization rate, that is, the average value is the second GPU resource utilization rate of the algorithm to be executed.

[0068] The embodiment of the present application uses the concurrency ratio or duration ratio as the first GPU resource utilization rate of the POD node, so as to obtain accurate algorithm resource utilization and thus improve the GPU resource allocation effect.

[0069] In an optional embodiment, the step of scaling up or down the NODE node corresponding to the algorithm to be executed according to the comparison result includes:

[0070] When the second GPU resource usage rate is less than the preset minimum usage rate, if the total number of the POD nodes is greater than a preset number, reducing the POD nodes;

[0071] When the second GPU resource usage rate is greater than the preset maximum usage rate, determining whether there are other idle NODE nodes of the same type as the NODE node corresponding to the algorithm to be executed;

[0072] If it exists, the POD node is expanded; if it does not exist, the type of at least one unused node is set to the type of the NODE node corresponding to the algorithm to be executed.

[0073] It can be understood that the expansion and contraction operation of the corresponding NODE node is to dynamically reduce or expand the POD node on the NODE node corresponding to the algorithm to be executed.

[0074] In the embodiment of the present application, when the second GPU resource usage rate is less than the preset minimum usage rate, if the total number of POD nodes on the NODE node corresponding to the algorithm to be executed is greater than the preset number, the POD nodes on the NODE node corresponding to the algorithm to be executed are reduced. Specifically, one POD node is reduced through the k8s API interface.

[0075] When the second GPU resource usage rate is greater than the preset maximum usage rate, determine whether there are other idle NODE nodes of the same type as the NODE node corresponding to the algorithm to be executed. If so, expand the POD node on the NODE node corresponding to the algorithm to be executed. If not, set the type of at least one unused node to the type of the NODE node corresponding to the algorithm to be executed.

[0076] Among them, an idle NODE node refers to a NODE node in the cluster whose GPU resource utilization rate is less than the preset GPU resource utilization rate. For example, assuming that the algorithm to be executed is deployed on a long-term task node, when the GPU resource utilization rate of the algorithm to be executed is greater than the preset maximum utilization rate, determine whether there are other idle long-term task nodes. If so, a POD node is added to the long-term task node where the algorithm to be executed is located through the k8s API interface. If not, at least one unused node is set as a long-term task node.

[0077] The embodiment of the present application destroys idle POD nodes through expansion and contraction operations, and expands new POD nodes to execute tasks in the task queue. It can efficiently utilize GPU resources, meet the task execution requirements of different algorithms, and improve resource utilization and system performance.

[0078] In an optional embodiment, the GPU resource management method further includes:

[0079] According to the GPU resource usage rate of the POD node on the NODE node corresponding to the algorithm to be executed, the task of the algorithm to be executed is pulled and executed.

[0080] In an embodiment of the present application, when an external algorithm task request is received, the corresponding external algorithm task is stored in a task queue, and the POD node on the NODE node corresponding to the algorithm to be executed will actively pull the task from the task queue and execute it according to its own task execution status, thereby realizing the algorithm call. Specifically, for any POD node, its monitoring container pulls the task of the algorithm to be executed according to the GPU resource utilization rate of the POD node, and hands the task to its algorithm container for execution.

[0081] The embodiment of the present application can make each POD node as saturated as possible, avoid waste of resources, and reduce the complexity of the dispatch center.

[0082] A GPU resource management method provided in an embodiment of the present application classifies NODE nodes in a cluster; tests an algorithm to be executed to obtain the algorithm time consumption; deploys the algorithm to be executed on a corresponding NODE node according to the algorithm time consumption; when the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed, thereby avoiding resource waste, being able to efficiently utilize GPU resources, meeting the task execution requirements of different algorithms, and improving resource utilization and system performance.

[0083] See also Figure 2 , Figure 2 1 is a structural block diagram of a GPU resource management device 10 provided in an embodiment of the present application, wherein the GPU resource management device 10 comprises:

[0084] A node classification module 11 is used to classify NODE nodes in the cluster;

[0085] A testing module 12 is used to test the algorithm to be executed and obtain the algorithm time consumption;

[0086] A deployment module 13 is used to deploy the algorithm to be executed on a corresponding NODE node according to the time consumption of the algorithm;

[0087] The expansion and contraction module 14 is used to expand and contract the corresponding NODE node according to the GPU resource usage of the algorithm to be executed when the algorithm to be executed is executed on the corresponding NODE node.

[0088] Optionally, the node classification module 11 is further used for:

[0089] Get a cluster snapshot and store the cluster resources in the database;

[0090] According to the node type, the NODE nodes in the cluster are classified and labeled; wherein the node types include: test nodes, unused nodes, long-time task nodes and short-time task nodes.

[0091] Optionally, the testing module 12 is further used for:

[0092] Receive algorithm information to be executed input by the user;

[0093] Start the test service, deploy the algorithm to be executed on the test node, perform the test according to the information of the algorithm to be executed, and obtain the algorithm time consumption.

[0094] Optionally, the deployment module 13 is further used for:

[0095] When the algorithm takes longer than a preset time, the algorithm to be executed is deployed on a long-duration task node;

[0096] When the algorithm takes less than or equal to the preset duration, the algorithm to be executed is deployed on the short-time task node.

[0097] Optionally, the expansion and contraction module 14 is further used for:

[0098] When the algorithm to be executed is executed on the corresponding NODE node, obtaining the first GPU resource usage rate of each POD node on the NODE node corresponding to the algorithm to be executed;

[0099] According to each of the first GPU usage rates, obtaining a second GPU resource usage rate of the algorithm to be executed;

[0100] Compare the second GPU resource usage with a preset minimum usage and a preset maximum usage to obtain a comparison result;

[0101] According to the comparison result, the NODE node corresponding to the algorithm to be executed is expanded or reduced in capacity.

[0102] Optionally, the expansion and contraction module 14 is further used for:

[0103] When the second GPU resource usage rate is less than the preset minimum usage rate, if the total number of the POD nodes is greater than a preset number, reducing the POD nodes;

[0104] When the second GPU resource usage rate is greater than the preset maximum usage rate, determining whether there are other idle NODE nodes of the same type as the NODE node corresponding to the algorithm to be executed;

[0105] If it exists, the POD node is expanded; if it does not exist, the type of at least one unused node is set to the type of the NODE node corresponding to the algorithm to be executed.

[0106] It is worth noting that the working process of each module in the GPU resource management device 10 described in the embodiment of the present application can refer to the working process of the GPU resource management method described in the above embodiment, and will not be repeated here.

[0107] A GPU resource management device 10 provided in an embodiment of the present application classifies NODE nodes in a cluster; tests algorithms to be executed to obtain algorithm time consumption; deploys the algorithms to be executed on corresponding NODE nodes according to the algorithm time consumption; when the algorithms to be executed are executed on corresponding NODE nodes, the corresponding NODE nodes are expanded or reduced in capacity according to the GPU resource usage of the algorithms to be executed, thereby avoiding waste of resources, making efficient use of GPU resources, satisfying task execution requirements of different algorithms, and improving resource utilization and system performance.

[0108] In addition, an embodiment of the present application further provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the GPU resource management method as described in any of the above embodiments.

[0109] In addition, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the GPU resource management method as described in any of the above embodiments.

[0110] See also Figure 3 , Figure 3 1 is a structural block diagram of a GPU resource management device 20 provided in an embodiment of the present application, wherein the GPU resource management device 20 includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps in the above-mentioned GPU resource management method embodiment are implemented. Alternatively, when the processor 21 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0111] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the GPU resource management device 20.

[0112] The GPU resource management device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the GPU resource management device 20 and does not limit the GPU resource management device 20. The GPU resource management device 20 may include more or fewer components than shown in the diagram, or may combine certain components, or may include different components. For example, the GPU resource management device 20 may also include input and output devices, network access devices, buses, and the like.

[0113] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the GPU resource management device 20, and uses various interfaces and lines to connect various parts of the entire GPU resource management device 20.

[0114] The memory 22 can be used to store the computer program and / or module. The processor 21 implements various functions of the GPU resource management device 20 by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0115] Wherein, if the module / unit integrated in the GPU resource management device 20 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, the steps of the above-mentioned method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0116] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0117] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

Claims

1. A GPU resource management method, characterized in that: include: Classify NODE nodes in the cluster; Test the algorithm to be executed and get the algorithm time consumption; Deploy the algorithm to be executed on the corresponding NODE node according to the time consumption of the algorithm; When the algorithm to be executed is executed on the corresponding NODE node, the corresponding NODE node is expanded or reduced in capacity according to the GPU resource usage of the algorithm to be executed.

2. The GPU resource management method according to claim 1, wherein: The classification of NODE nodes in the cluster includes: Get a cluster snapshot and store the cluster resources in the database; According to the node type, NODE nodes in the cluster are classified and labeled; wherein the node types include: test nodes, unused nodes, long-time task nodes and short-time task nodes.

3. The GPU resource management method according to claim 2, wherein: The algorithm to be executed is tested to obtain the algorithm time consumption, including: Receive algorithm information to be executed input by the user; Start the test service, deploy the algorithm to be executed on the test node, perform the test according to the information of the algorithm to be executed, and obtain the algorithm time consumption.

4. The GPU resource management method according to claim 2, wherein: The step of deploying the algorithm to be executed on a corresponding NODE node according to the algorithm time consumption includes: When the algorithm takes longer than a preset time, the algorithm to be executed is deployed on a long-duration task node; When the algorithm takes less than or equal to the preset duration, the algorithm to be executed is deployed on the short-time task node.

5. The GPU resource management method according to claim 1, wherein: When the algorithm to be executed is executed on the corresponding NODE node, scaling the corresponding NODE node is performed according to the GPU resource usage of the algorithm to be executed, including: When the algorithm to be executed is executed on the corresponding NODE node, obtaining the first GPU resource usage rate of each POD node on the NODE node corresponding to the algorithm to be executed; According to each of the first GPU usage rates, obtaining a second GPU resource usage rate of the algorithm to be executed; Compare the second GPU resource usage with a preset minimum usage and a preset maximum usage to obtain a comparison result; According to the comparison result, the NODE node corresponding to the algorithm to be executed is expanded or reduced in capacity.

6. The GPU resource management method according to claim 5, wherein: The step of scaling up or down the NODE node corresponding to the algorithm to be executed according to the comparison result includes: When the second GPU resource usage rate is less than the preset minimum usage rate, if the total number of the POD nodes is greater than a preset number, reducing the POD nodes; When the second GPU resource usage rate is greater than the preset maximum usage rate, determining whether there are other idle NODE nodes of the same type as the NODE node corresponding to the algorithm to be executed; If it exists, the POD node is expanded; if it does not exist, the type of at least one unused node is set to the type of the NODE node corresponding to the algorithm to be executed.

7. A GPU resource management device, characterized in that: include: Node classification module, used to classify NODE nodes in the cluster; The test module is used to test the algorithm to be executed and obtain the algorithm time consumption; A deployment module, used to deploy the algorithm to be executed on a corresponding NODE node according to the time consumption of the algorithm; The expansion and contraction module is used to expand and contract the corresponding NODE node according to the GPU resource usage of the algorithm to be executed when the algorithm to be executed is executed on the corresponding NODE node.

8. A GPU resource management device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the GPU resource management method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute the GPU resource management method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the GPU resource management method according to any one of claims 1 to 6.