Heterogeneous computing power management method and device, readable medium and electronic equipment
By converting virtual computing resources into heterogeneous computing resources and allocating them based on scheduling information, the problem of automated allocation of heterogeneous computing resources in large-scale and multi-type computing tasks is solved, and the rational allocation of resources and effective response to computing needs is achieved.
Patent Information
- Application Number
- CN202510168266.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
AI Technical Summary
In practical applications, it is difficult for the prior art to automatically and effectively allocate diversified heterogeneous computing resources, especially when dealing with large-scale and multi-type computing tasks, resulting in the computing resources being unable to reasonably correspond to computing needs.
By responding to the work queue's request for virtual computing resources, the virtual computing resources are converted into heterogeneous computing resources based on the standardized ratio, and heterogeneous computing resources are allocated to the work queue based on the scheduling information. The standardized ratio is obtained through performance indicators to standardize the performance test of heterogeneous computing resources.
It has realized the reasonable response to computing needs in the allocation of computing power resources, especially for large-scale and multi-type computing tasks, ensuring that diversified heterogeneous computing power resources can be automatically and effectively allocated.
Smart Images

Figure CN120104319A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology. More specifically, the embodiments of the present disclosure relate to a heterogeneous computing power management method, a heterogeneous computing power management device, a computer-readable storage medium, and an electronic device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims, and no description herein is admitted to be prior art by inclusion in this section.
[0003] Computing power is the ability of a computer device or computer cluster to process information, and is a measure of its efficiency in performing computing tasks. When performing computing tasks of different types and sizes, such as model reasoning, request response, protocol conversion, etc. Computing power resources can be hardware resources that provide computing power, such as CPU (Central Processing Unit). On this basis, heterogeneous computing power can refer to computing power resources with different logical architectures, computing methods, etc., such as CPUs of different versions, different models of the same version, or different manufacturers, or different types of processors such as GPU (Graphics Processing Unit), NPU (Neural Processing Unit), etc.
[0004] In actual applications, computing power resource applications are usually only supported for a specified number of processors, which means that the computing power resources applied for may not reasonably correspond to computing needs. Especially for large-scale, multi-type computing task computing power requirements, diverse heterogeneous computing power resources are difficult to automatically and effectively allocate. Summary of the invention
[0005] In this context, the embodiments of the present disclosure are intended to provide a heterogeneous computing power management method, a heterogeneous computing power management device, a computer-readable storage medium, and an electronic device. The method can reasonably respond to computing needs in computing power resource allocation, especially for large-scale, multi-type computing task computing power needs, so that diversified heterogeneous computing power resources can be automatically and effectively allocated.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for managing heterogeneous computing power is provided, the method comprising: in response to a work queue's request for virtual computing power resources, converting the virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; determining scheduling information corresponding to the heterogeneous computing power resources; and allocating heterogeneous computing power resources to the work queue based on the scheduling information; wherein the standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing power resource using a performance indicator.
[0007] Optionally, the work queue is configured with a computing power resource application quota, and in response to the work queue's request for virtual computing power resources, the virtual computing power resources are converted into heterogeneous computing power resources based on a standardized ratio, including: in response to the work queue's request for virtual computing power resources, the total application amount of computing power resources including the request is determined based on the work queue's historical occupancy of computing power resources; when the total application amount of computing power resources is less than or equal to the computing power resource application quota, the virtual computing power resources are converted into heterogeneous computing power resources based on the standardized ratio.
[0008] Optionally, in response to the work queue's request for virtual computing resources, after determining the total computing resource application amount of the work queue, it also includes: if the total computing resource application amount is greater than the computing resource application quota, placing the work queue's request in a waiting queue.
[0009] Optionally, when the total application amount for computing power resources is greater than the application quota for computing power resources, after placing the request of the working queue into the waiting queue, it also includes: after the working queue releases at least part of the historical occupancy of computing power resources, when the total application amount for computing power resources is less than or equal to the application quota for computing power resources, obtaining the request of the working queue from the waiting queue; in response to the working queue's request for virtual computing power resources, converting the virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; determining the scheduling information corresponding to the heterogeneous computing power resources; allocating heterogeneous computing power resources to the working queue based on the scheduling information, and updating the historical occupancy.
[0010] Optionally, the waiting queue includes multiple requests from the working queue. After the working queue releases at least part of the historical occupancy of the computing resources, and the total application amount of the computing resources is less than or equal to the computing resources application quota, the requests of the working queue are obtained from the waiting queue, including: after the working queue releases at least part of the historical occupancy of the computing resources, respectively determining the total application amount of computing resources corresponding to the requests of each working queue in the waiting queue; obtaining the requests from the waiting queue whose total application amount of computing resources is less than or equal to the computing resources application quota and are placed in the work queue with the earliest timing.
[0011] Optionally, when the total application amount of computing power resources is less than or equal to the computing power resource application quota, before converting the virtual computing power resources into heterogeneous computing power resources based on the standardized ratio, it also includes: converting all heterogeneous computing power resources into all virtual computing power resources based on the standardized ratio; and determining the computing power resource application quota based on all virtual computing power resources.
[0012] Optionally, the number of work queues is greater than one, and the computing power resource application quota is determined based on all virtual computing power resources, including: among all virtual computing power resources, determining the computing power resource application quota corresponding to each work queue respectively.
[0013] According to a second aspect of an embodiment of the present disclosure, a heterogeneous computing power management device is provided, the device comprising: a computing power conversion module, for responding to a work queue's request for virtual computing power resources, and converting virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; a scheduling determination module, for determining scheduling information corresponding to the heterogeneous computing power resources; a resource allocation module, for allocating heterogeneous computing power resources to the work queue based on the scheduling information; wherein the standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing power resource using a performance indicator.
[0014] Optionally, the work queue is configured with a computing power resource application quota and a computing power conversion module, which is specifically used to respond to the work queue's request for virtual computing power resources, and determine the total application amount of computing power resources including the request based on the work queue's historical occupancy of computing power resources; when the total application amount of computing power resources is less than or equal to the computing power resource application quota, the virtual computing power resources are converted into heterogeneous computing power resources based on a standardized ratio.
[0015] Optionally, the computing power conversion module is also used to place the requests of the work queue into a waiting queue when the total application amount of computing power resources is greater than the application quota of computing power resources.
[0016] Optionally, the computing power conversion module is also used to obtain the work queue's request from the waiting queue when the total application amount of computing power resources is less than or equal to the computing power resource application quota after the work queue releases at least part of the historical occupancy of the computing power resources; in response to the work queue's request for virtual computing power resources, convert the virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; the scheduling determination module is used to determine the scheduling information corresponding to the heterogeneous computing power resources; the resource allocation module is used to allocate heterogeneous computing power resources to the work queue based on the scheduling information, and update the historical occupancy.
[0017] Optionally, the waiting queue includes multiple requests from the working queue, and the computing power conversion module is specifically used to determine the total application amount of computing power resources corresponding to the requests of each working queue in the waiting queue after the working queue releases at least part of the historical occupancy of the computing power resources; obtain the requests from the waiting queue whose total application amount of computing power resources is less than or equal to the computing power resource application quota and are placed in the working queue with the earliest timing.
[0018] Optionally, the computing power conversion module is specifically used to convert all heterogeneous computing power resources into all virtual computing power resources based on a standardized ratio; and determine the computing power resource application quota based on all virtual computing power resources.
[0019] Optionally, the number of work queues is greater than one, and the computing power conversion module is specifically used to determine the computing power resource application quota corresponding to each work queue among all virtual computing power resources.
[0020] According to a third aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned heterogeneous computing power management methods is implemented.
[0021] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned heterogeneous computing power management methods by executing the executable instructions.
[0022] According to the heterogeneous computing power management method, heterogeneous computing power management device, computer-readable medium and electronic device of the embodiment of the present disclosure. The method can respond to the request of the work queue for virtual computing power resources, convert the virtual computing power resources into heterogeneous computing power resources based on the standardized ratio, and then determine the scheduling information corresponding to the heterogeneous computing power resources; based on the scheduling information, the corresponding heterogeneous computing power resources can be allocated to the work queue; wherein, the standardized ratio is obtained by using performance indicators to perform standardized performance tests on at least one heterogeneous computing power resource. The embodiment of the present disclosure constructs a standardized ratio from heterogeneous computing power resources to virtual computing power resources through standardized performance tests of performance indicators, and makes a request for virtual computing power resources in the work queue. Based on the standardized ratio, the virtual computing power resources can be converted into heterogeneous computing power resources for scheduling. On this basis, the requests for different heterogeneous computing power resources can be uniformly converted into requests for virtual computing power resources, and the computing requirements in computing power resource allocation can be reasonably responded to, especially for large-scale, multi-type computing task computing power requirements, so that diversified heterogeneous computing power resources can be automatically and effectively allocated. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0024] Figure 1 One of the flowcharts of the heterogeneous computing power management method according to an embodiment of the present disclosure is shown;
[0025] Figure 2 The second flowchart of the heterogeneous computing power management method is shown;
[0026] Figure 3 A schematic diagram of a heterogeneous computing power management device according to an embodiment of the present disclosure is shown;
[0027] Figure 4 A schematic diagram of a storage medium according to an embodiment of the present disclosure is shown;
[0028] Figure 5A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0029] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0030] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0031] According to an embodiment of the present disclosure, a heterogeneous computing power management method, a heterogeneous computing power management device, a computer-readable storage medium, and an electronic device are provided.
[0032] In this document, any number of elements in the drawings is used for illustration rather than limitation, and any naming is used only for distinction and does not have any limiting meaning.
[0033] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION
[0035] At present, computing power resources are usually applied for by specifying the number of processors such as CPUs and GPUs, and then hardware scheduling is performed based on the computing power resource application. The hardware scheduling obtained by this solution meets the quantity requirements, but lacks adaptation to the actual model and computing power of each processor. In actual applications, problems such as insufficient or excessive computing power may occur, resulting in the inability to accurately, timely and effectively automatically allocate computing power resources.
[0036] In the embodiments of the present disclosure, a standardized ratio from heterogeneous computing resources to virtual computing resources can be constructed based on standardized performance tests of performance indicators, so that when a work object makes a request for virtual computing resources, the virtual computing resources can be converted into heterogeneous computing resources for scheduling based on the standardized ratio. On the requesting side, the request information of virtual computing resources can be uniformly adopted, and requests can be made directly from the performance dimension based on business needs; on the scheduling side, virtual computing resources can be accurately matched to suitable heterogeneous computing resources for scheduling.
[0037] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.
[0038] Exemplary application scenarios
[0039] It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present invention, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0040] The heterogeneous computing power management method of the disclosed embodiment can be applied to a variety of application scenarios involving data processing and computing.
[0041] In one application scenario, it may involve reasoning tasks of large models. In the reasoning tasks of natural language understanding and generation of large language models, computing power resources can be allocated when the reasoning task is initiated, so as to be based on business needs for different reasoning tasks. In this application scenario, the heterogeneous computing power management method of the embodiment of the present disclosure can be used, and the work queue initiates a request for virtual computing power resources based on the creation of the reasoning task. In response to the request, the virtual computing power resources are converted into heterogeneous computing power resources based on a standardized ratio, and the heterogeneous computing power resources are scheduled. The standardized ratio is obtained by using performance indicators to perform standardized performance tests on at least one heterogeneous computing power resource.
[0042] Or in another scenario, it can also be applied to reasoning tasks of other models, or the allocation of heterogeneous computing resources during the training of large models.
[0043] Exemplary Methods
[0044] In combination with the above application scenarios, Figure 1 To describe a heterogeneous computing power management method according to an exemplary embodiment of the present disclosure.
[0045] like Figure 1 One of the processes of the heterogeneous computing power management method according to the exemplary embodiment of the present disclosure shown may include the following steps 101 to 103.
[0046] Step 101: In response to a work queue's request for virtual computing resources, convert the virtual computing resources into heterogeneous computing resources based on a standardized ratio.
[0047] In the disclosed embodiments, virtual computing power resources are virtual representations of computing power resources, that is, they do not specifically point to the actual computing power resource hardware type, version, etc., but represent computing power resources with performance indicators. For example, it can be the CPU's main frequency, number of cores, etc., and can also be converted TFLOPS (Tera Floating-point operations per second), TOPS (Tera Operations Per Second), DMIPS (Dhrystone Million Instructions executed Per Second). The work queue corresponds to the business type of the computing task. When the computing task is created in the work queue, the work queue can initiate a request for virtual computing power resources based on the possible computing power requirements of the computing task.
[0048] Heterogeneous computing resources can be computing resources that include multiple real-named representations, such as CPUs, GPUs, or NPUs of different models and versions, so as to guide the specific scheduling of computing resources. On this basis, in response to the work queue's request for virtual computing resources, the virtual computing resources of the virtual reference can be converted into real-named heterogeneous computing resources based on a standardized ratio. The standardized ratio is a conversion ratio that can be equivalently converted between virtual computing resources and heterogeneous computing resources, converting heterogeneous computing resources of different models and versions into virtual computing resources of unified representation, or converting virtual computing resources of unified representation into heterogeneous computing resources of different models and versions.
[0049] The standardized ratio is obtained by using performance indicators to conduct standardized performance testing on at least one heterogeneous computing resource.
[0050] In the disclosed embodiments, standardized performance testing refers to the process of performing a performance test on heterogeneous computing resources based on a performance indicator to obtain a test result corresponding to the performance indicator, which is used to obtain a standardized ratio to indicate how much virtual computing resources the heterogeneous computing resources are actually equivalent to. Different heterogeneous computing resources have different models, specifications, versions, and further different performance wear and tear, and the corresponding standardized ratios are also different. Therefore, standardized performance tests can be performed on the actually schedulable heterogeneous computing resources to obtain their respective standardized ratios.
[0051] On this basis, when converting virtual computing resources into heterogeneous computing resources based on standardized ratios, heterogeneous computing resources can be made equivalent to virtual computing resources, or they can be appropriately surplus. Different work queues can also initiate virtual computing resources defined under different performance indicators according to the needs of business types, and then convert them into heterogeneous computing resources using the corresponding standard conversion ratio.
[0052] Step 102: Determine the scheduling information corresponding to the heterogeneous computing resources.
[0053] In the disclosed embodiment, the scheduling information may be information required to schedule hardware that meets the heterogeneous computing resources to the work queue, and may be hardware information that meets the model, version, and other requirements of the heterogeneous computing resources. Taking the case where the work queue requests virtual computing resources including the main frequency reaching condition A as an example, in response to the request, the heterogeneous computing resources equivalent to condition A determined by the standardized ratio corresponding to the main frequency may include 2 CPUs of model a, and on this basis, based on the conditions of the heterogeneous computing resources, it can be determined that the scheduling information includes CPU 1 of model a and CPU 2 of model a.
[0054] Step 103: Allocate heterogeneous computing resources to the work queue based on the scheduling information.
[0055] In the disclosed embodiment, the scheduling information can point to the hardware actually scheduled, and based on the scheduling information, the specific hardware resources specified by it can be allocated to the work queue that initiates the request, thereby realizing the allocation of heterogeneous computing resources. Taking the case where the work queue requests virtual computing resources including the main frequency reaching condition A as an example, CPU 1 of model a and CPU 2 of model a can be allocated to the work queue based on the scheduling information, so that the work queue executes computing tasks on CPU 1 and CPU 2.
[0056] like Figure 2 The second process of the heterogeneous computing power management method of the exemplary embodiment of the present disclosure is shown. In this method, the work queue is configured with a computing power resource application quota.
[0057] In the disclosed embodiment, a corresponding computing resource application quota can also be configured for the work queue to limit the upper limit of computing resources that the work queue can apply for. The computing resource application quota can be set according to business needs, balance conditions, etc. to avoid excessive computing resource application quotas causing large or long-term vacancy, and to avoid too small a computing resource application quota causing request congestion.
[0058] The method may include the following steps 201 to 204 .
[0059] Step 201: In response to a request for virtual computing resources from a work queue, a total application amount of computing resources including the request is determined based on the historical occupancy of computing resources by the work queue.
[0060] In the disclosed embodiment, the historical occupancy of computing power resources may include heterogeneous computing power resources that have been scheduled and allocated to the work queue, or the accumulation of virtual computing power resources applied for by the work queue before the current request. Based on the work queue's request for virtual computing power resources, the heterogeneous computing power resources that have been scheduled and allocated can be represented as virtual computing power resources, and the virtual computing power resources requested by the work queue this time can be accumulated to obtain the total application amount of computing power resources; or the total application amount of computing power resources can be determined by calculating the total amount of virtual computing power resources that have been applied for by the work queue including this request.
[0061] Step 202: When the total application amount of computing resources is less than or equal to the application amount of computing resources, the virtual computing resources are converted into heterogeneous computing resources based on the standardized ratio.
[0062] In the disclosed embodiment, when the total amount of computing power resources applied is less than the computing power resource application quota, it means that the computing power resource application quota has not yet reached saturation, including the virtual resource computing power applied by the current work queue; when the total amount of computing power resources applied is equal to the computing power resource application quota, it means that the computing power resource application quota has just reached saturation, including the virtual resource computing power applied by the current work queue. At this time, the subsequent processing of converting virtual computing power resources into heterogeneous computing power resources based on the standardized ratio can be performed. For details, please refer to the relevant description of the aforementioned step 101. To avoid repetition, it will not be repeated here.
[0063] Step 203: Determine the scheduling information corresponding to the heterogeneous computing resources.
[0064] Step 204: Allocate heterogeneous computing resources to the work queue based on the scheduling information.
[0065] The standardized ratio is obtained by using performance indicators to conduct standardized performance testing on at least one heterogeneous computing resource.
[0066] In the embodiment of the present disclosure, steps 203 to 204 may correspond to the relevant descriptions of the aforementioned steps 102 to 103, and will not be described again here to avoid repetition.
[0067] For example, taking the implementation on the container orchestration platform Kubernetes as an example, it has a configuration center, which can determine the standardized ratio corresponding to the performance indicators through preliminary standardized performance tests and register them to the configuration center.
[0068] Furthermore, the work queue can be configured in the orchestration file to specify the virtual computing resources under the corresponding performance indicators. In response to the request, the configuration center is queried through dynamic access control (Webhook) to determine the standardized ratio, so as to convert the virtual computing resources to heterogeneous computing resources based on the standardized ratio, and then determine the scheduling information of the heterogeneous computing resources. The scheduling information is updated in the orchestration file, and the heterogeneous computing resources are allocated to the work queue through the k8s scheduling system.
[0069] In an optional embodiment of the present disclosure, the following step 205 may be included after step 201.
[0070] Step 205: When the total application amount of computing resources is greater than the computing resources application quota, the request of the work queue is placed in the waiting queue.
[0071] In the disclosed embodiment, when the total amount of computing power resources applied is greater than the computing power resource application quota, it means that the computing power resource application quota exceeds the critical value of saturation, including the virtual resource computing power applied by the current work queue, so that the virtual computing power resources requested by the work queue cannot be allocated to the work queue. On this basis, an additional waiting queue can be set, and the request for virtual computing power resources of the work queue can be placed in the waiting queue.
[0072] For example, the computing resource application quota corresponding to the work queue is set through k8s ResourceQuota. When the virtual computing resources applied for by the work queue exceed the computing resource quota, the request can be placed in the waiting queue until other tasks in the work queue release sufficient computing resources.
[0073] In an optional embodiment of the present disclosure, step 205 may be followed by steps 206 to 209 .
[0074] Step 206: After the work queue releases at least part of the historical occupancy of computing resources, if the total application amount of computing resources is less than or equal to the computing resource application quota, obtain the request of the work queue from the waiting queue.
[0075] Step 207: In response to the work queue's request for virtual computing resources, convert the virtual computing resources into heterogeneous computing resources based on a standardized ratio.
[0076] Step 208: Determine the scheduling information corresponding to the heterogeneous computing resources.
[0077] Step 209: Allocate heterogeneous computing resources to the work queue based on the scheduling information and update the historical occupancy.
[0078] In the disclosed embodiment, the corresponding historical occupancy in the work queue can be released at the end of the execution of the computing task. At this time, the historical occupancy of the computing resources by the work queue is reduced, and the total application amount of the computing resources can be re-determined. On this basis, if the total application amount of computing resources is still greater than the application amount of computing resources, the requests in the waiting queue will not be processed; if the total application amount of computing resources is less than or equal to the application amount of computing resources, the request of the work queue is obtained from the waiting queue, and computing resources are allocated based on the request. Among them, the process of allocating heterogeneous computing resources based on the request of virtual computing resources in steps 207 to 209 can refer to the relevant description of the aforementioned steps 101 to 103, and will not be repeated here to avoid repetition.
[0079] In an optional embodiment of the present disclosure, the waiting queue includes multiple requests of the work queue.
[0080] In the disclosed embodiment, when the business scale is large and the computing tasks are large, requests from multiple work queues may be placed in the waiting queue. Multiple requests are placed in the waiting queue in the order in which the work queue initiates the request for virtual computing resources, and can be processed sequentially according to the order in which they are placed in the waiting queue, or can be processed according to the amount of virtual computing resources corresponding to each request.
[0081] The aforementioned step 206 may include the following steps A1 to A2.
[0082] Step A1: After the work queue releases at least part of the historical occupancy of the computing resources, the total application amount of the computing resources corresponding to the requests of each work queue in the waiting queue is determined respectively.
[0083] In the disclosed embodiment, when the waiting queue includes multiple requests of the working queue, the requests can also be processed according to the amount of virtual computing resources corresponding to each request. After the working queue releases at least part of the historical occupancy of the computing resources, the earliest placed request can be processed according to the timing of being placed in the waiting queue, and when the earliest placed request is not processed in the processing logic based on the timing, the subsequent placed requests will not be processed; or, the total application amount of computing resources corresponding to the requests of each working queue in the waiting queue can be determined separately, and on the basis of the same historical occupancy of the working queue, the virtual computing resources corresponding to the requests are different, and thus the corresponding total application amount of computing resources is also different.
[0084] For example, before the work queue releases at least part of the historical occupancy of computing resources, because the total application amount of computing resources is greater than the computing resource application quota, requests 1, 2 and 3 of the work queue are placed in the waiting queue in order; after the work queue releases at least part of the historical occupancy of computing resources, the total application amounts of computing resources corresponding to requests 1, 2 and 3 are recalculated respectively.
[0085] Step A2: Obtain from the waiting queue the requests whose total computing resource application amount is less than or equal to the computing resource application quota and are placed in the earliest work queue.
[0086] On this basis, referring to the relevant description of the aforementioned step 202, the total amount of computing resources applied for is less than or equal to the computing resources application quota, indicating that the computing resources application quota under the request has not been reached or has just reached saturation, and when the number of requests is 1, subsequent processing is directly performed, or when the number of requests is greater than 1, the request with the earliest timing in the waiting queue is subsequently processed. Subsequent processing includes executing subsequent processing to convert virtual computing resources into heterogeneous computing resources based on a standardized ratio, which can be specifically referred to the relevant description of the aforementioned step 101, and will not be repeated here to avoid repetition.
[0087] For example, the total amount of computing resources requested for request 1 in the waiting queue is greater than the computing resource application quota, the total amount of computing resources requested for request 2 is equal to the computing resource application quota, and the total amount of computing resources requested for request 3 is less than the computing resource application quota. Request 2 is subsequently processed according to the placement sequence.
[0088] In an optional embodiment of the present disclosure, the computing power resource application amount can be determined through the following steps B1 to B2.
[0089] Step B1: Convert all heterogeneous computing resources into all virtual computing resources based on a standardized ratio.
[0090] In the disclosed embodiment, when determining the amount of computing power resource application, all heterogeneous computing power resources can be converted into all virtual computing power resources based on a standardized ratio, indicating the total computing power performance that can be provided by the configured heterogeneous computing power resources. Under all the virtual computing power resources, the total amount of virtual computing power resources that can be provided can be determined. Among them, all heterogeneous computing power resources can be converted into all virtual computing power resources in different representations based on the standardized ratios corresponding to different performance indicators, so as to meet the needs of different work queues to apply for virtual computing power resources. On this basis, after allocating the virtual computing power resources corresponding to one of the performance indicators, it can be converted to the virtual computing power resources represented by other performance indicators for deduction, so as to synchronize the remaining computing power resources between the virtual computing power resource representations corresponding to different performance indicators.
[0091] For example, when a node goes online in k8s, the Device Plugin driver configured through the hardware device of the heterogeneous computing resources detects its type, model, quantity and other information, and converts it into the corresponding virtual computing resources according to the standardized ratio, and adds it to the statistics of all virtual computing resources through the k8s API.
[0092] Step B2: Determine the computing power resource application amount based on all virtual computing power resources.
[0093] On this basis, the computing power resource application quota of the work queue can be determined based on all virtual computing power resources, that is, the computing power resource application quota of the work queue can be equal to all virtual computing power resources, or the computing power resource application quota of the work queue can be made less than all virtual computing power resources, and the upper limit of the computing power resource application quota configured for the work queue is determined by all virtual computing power resources.
[0094] In an optional embodiment of the present disclosure, the number of work queues is greater than 1, and the aforementioned step B2 may specifically include the following step B21.
[0095] Step B21: Determine the computing resource application quota corresponding to each work queue among all virtual computing resources.
[0096] In the disclosed embodiment, the number of work queues may be greater than one, in which case the corresponding computing resource application quota can be configured for each work queue in all virtual computing resources, and the sum of the computing resource application quotas of all work queues can be equal to or less than all virtual computing resources. In practical applications, the computing resource application quota can be evenly distributed to each work queue, or the appropriate computing resource application quota can be allocated according to the business type corresponding to the work queue, or the computing resource application quota of each work queue can be dynamically allocated according to the real-time load status. For example, if the number of requests of a work queue in the waiting queue exceeds a certain number threshold, the computing resource application quota can be appropriately increased, and the computing resource application quota of another work queue with spare space can be appropriately reduced, thereby achieving dynamic balance.
[0097] According to the heterogeneous computing power management method of the embodiment of the present disclosure, in response to the request of the work queue for virtual computing power resources, the virtual computing power resources can be converted into heterogeneous computing power resources based on the standardized ratio, and then the scheduling information corresponding to the heterogeneous computing power resources can be determined; based on the scheduling information, the corresponding heterogeneous computing power resources can be allocated to the work queue; wherein, the standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing power resource using performance indicators. The embodiment of the present disclosure constructs a standardized ratio from heterogeneous computing power resources to virtual computing power resources through a standardized performance test of performance indicators, and when a work queue makes a request for virtual computing power resources, the virtual computing power resources can be converted into heterogeneous computing power resources for scheduling based on the standardized ratio. On this basis, requests for different heterogeneous computing power resources can be uniformly converted into requests for virtual computing power resources, and computing requirements can be reasonably responded to in the allocation of computing power resources, especially for large-scale, multi-type computing task computing power requirements, so that diversified heterogeneous computing power resources can be automatically and effectively allocated.
[0098] Exemplary Devices
[0099] After introducing the heterogeneous computing power management method according to the exemplary embodiment of the present disclosure, Figure 3 A heterogeneous computing power management device according to an exemplary embodiment of the present disclosure is described.
[0100] It should be noted that other specific details of the various functional modules of the heterogeneous computing power management device of the embodiment of the present disclosure have been described in detail in the implementation of the above-mentioned heterogeneous computing power management method and will not be repeated here.
[0101] Figure 3 A heterogeneous computing power management device 300 according to an exemplary embodiment of the present disclosure is shown, including: a computing power conversion module 301, which is used to respond to a request for virtual computing power resources from a work queue and convert virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; a scheduling determination module 302, which is used to determine scheduling information corresponding to heterogeneous computing power resources; a resource allocation module 303, which is used to allocate heterogeneous computing power resources to the work queue based on the scheduling information; wherein the standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing power resource using a performance indicator.
[0102] In an optional embodiment of the present disclosure, the work queue is configured with a computing power resource application quota, and the computing power conversion module 301 is specifically used to respond to the work queue's request for virtual computing power resources, and determine the total application amount of computing power resources including the request based on the work queue's historical occupancy of computing power resources; when the total application amount of computing power resources is less than or equal to the computing power resource application quota, the virtual computing power resources are converted into heterogeneous computing power resources based on a standardized ratio.
[0103] In an optional embodiment of the present disclosure, the computing power conversion module 301 is also used to place the request of the work queue into the waiting queue when the total application amount of computing power resources is greater than the application quota of computing power resources.
[0104] In an optional embodiment of the present disclosure, the computing power conversion module 301 is also used to obtain the request of the work queue from the waiting queue when the total application amount of computing power resources is less than or equal to the application amount of computing power resources after the work queue releases at least part of the historical occupancy of computing power resources; in response to the work queue's request for virtual computing power resources, convert the virtual computing power resources into heterogeneous computing power resources based on a standardized ratio; the scheduling determination module 302 is used to determine the scheduling information corresponding to the heterogeneous computing power resources; the resource allocation module 303 is used to allocate heterogeneous computing power resources to the work queue based on the scheduling information, and update the historical occupancy.
[0105] In an optional embodiment of the present disclosure, the waiting queue includes multiple requests of the working queue, and the computing power conversion module 301 is specifically used to determine the total application amount of computing power resources corresponding to the requests of each working queue in the waiting queue after the working queue releases at least part of the historical occupancy of the computing power resources; obtain the requests from the waiting queue whose total application amount of computing power resources is less than or equal to the computing power resource application quota and are placed in the working queue with the earliest timing.
[0106] In an optional embodiment of the present disclosure, the computing power conversion module 301 is specifically used to convert all heterogeneous computing power resources into all virtual computing power resources based on a standardized ratio; and determine the computing power resource application quota based on all virtual computing power resources.
[0107] In an optional embodiment of the present disclosure, the number of work queues is greater than one, and the computing power conversion module 301 is specifically used to determine the computing power resource application quota corresponding to each work queue among all virtual computing power resources.
[0108] According to the heterogeneous computing power management device of the embodiment of the present disclosure, in response to the request of the work queue for virtual computing power resources, the virtual computing power resources can be converted into heterogeneous computing power resources based on the standardized ratio, and then the scheduling information corresponding to the heterogeneous computing power resources can be determined; based on the scheduling information, the corresponding heterogeneous computing power resources can be allocated to the work queue; wherein, the standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing power resource using performance indicators. The embodiment of the present disclosure constructs a standardized ratio from heterogeneous computing power resources to virtual computing power resources through a standardized performance test of performance indicators, and when a work queue makes a request for virtual computing power resources, the virtual computing power resources can be converted into heterogeneous computing power resources for scheduling based on the standardized ratio. On this basis, requests for different heterogeneous computing power resources can be uniformly converted into requests for virtual computing power resources, and computing requirements can be reasonably responded to in the allocation of computing power resources, especially for large-scale, multi-type computing task computing power requirements, so that diversified heterogeneous computing power resources can be automatically and effectively allocated.
[0109] It should be noted that although several modules or units of the heterogeneous computing power management device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for concretization.
[0110] Exemplary Storage Media
[0111] The storage medium according to the exemplary embodiment of the present disclosure is described below.
[0112] In this exemplary embodiment, reference Figure 4 As shown, a program product 400 for implementing the above method according to an exemplary embodiment of the present disclosure is described, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0113] The program product 400 may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 above.
[0114] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.
[0116] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (FAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0117] Exemplary Electronic Devices
[0118] refer to Figure 5 An electronic device according to an exemplary embodiment of the present disclosure is described.
[0119] Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0120] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.
[0121] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figures 1 to 2 The method steps shown, etc.
[0122] The storage unit 520 may include a volatile storage unit, such as a random access storage unit (RAM) 521 and / or a cache storage unit 522 , and may further include a read-only storage unit (ROM) 523 .
[0123] The storage unit 520 may also include a program / utility 524 having a set (at least one) of program modules 525, such program modules 525 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0124] The bus 530 may include a data bus, an address bus, and a control bus.
[0125] The electronic device 500 may also communicate with one or more external devices 600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed through an input / output (I / O) interface 550. The electronic device 500 also includes a display unit 540, which is connected to the input / output (I / O) interface 550 for display. In addition, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 through a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0126] It should be noted that, although several modules or submodules of the device are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0127] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0128] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A heterogeneous computing power management method, characterized in that: The method comprises: In response to a request from a work queue for a virtual computing resource, convert the virtual computing resource into a heterogeneous computing resource based on a standardized ratio; Determine scheduling information corresponding to the heterogeneous computing resources; Allocate the heterogeneous computing resources to the work queue based on the scheduling information; The standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing resource using a performance indicator.
2. The method according to claim 1, characterized in that The work queue is configured with a computing resource application quota, and the response to the work queue's request for virtual computing resources is to convert the virtual computing resources into heterogeneous computing resources based on a standardized ratio, including: In response to a request for a virtual computing resource from a work queue, determining a total application amount of computing resources including the request based on a historical amount of computing resources occupied by the work queue; When the total application amount of the computing resources is less than or equal to the computing resources application quota, the virtual computing resources are converted into heterogeneous computing resources based on a standardized ratio.
3. The method according to claim 2, characterized in that After determining the total application amount of computing resources of the work queue in response to the request of the work queue for the virtual computing resources, the method further includes: When the total application amount of the computing resources is greater than the computing resources application quota, the requests of the work queue are placed in the waiting queue.
4. The method according to claim 3, characterized in that: In the case where the total application amount of the computing power resources is greater than the application amount of the computing power resources, after placing the request of the work queue into the waiting queue, the method further includes: After the work queue releases at least part of the historical occupancy of computing resources, if the total application amount of computing resources is less than or equal to the computing resource application quota, obtaining the request of the work queue from the waiting queue; In response to a request from the work queue for a virtual computing resource, converting the virtual computing resource into a heterogeneous computing resource based on a standardized ratio; Determine scheduling information corresponding to the heterogeneous computing resources; The heterogeneous computing resources are allocated to the work queue based on the scheduling information, and the historical occupancy is updated.
5. The method according to claim 4, characterized in that The waiting queue includes multiple requests of the work queue, and after the work queue releases at least part of the historical occupancy of the computing resources, when the total application amount of the computing resources is less than or equal to the computing resource application quota, obtaining the request of the work queue from the waiting queue includes: After the work queue releases at least part of the historical occupancy of the computing resources, respectively determine the total application amount of the computing resources corresponding to the request of each of the work queues in the waiting queue; Obtain from the waiting queue the requests whose total application amount of computing resources is less than or equal to the computing resources application quota and are placed in the work queue with the earliest timing.
6. The method according to claim 2, characterized in that In the case where the total application amount of the computing resources is less than or equal to the application amount of the computing resources, before converting the virtual computing resources into heterogeneous computing resources based on the standardized ratio, the method further includes: Converting all heterogeneous computing resources into all virtual computing resources based on the standardized ratio; The computing power resource application amount is determined based on all the virtual computing power resources.
7. The method according to claim 6, characterized in that The number of the work queues is greater than 1, and the determining the computing resource application amount based on all the virtual computing resources includes: Among all the virtual computing resources, the computing resource application quota corresponding to each work queue is determined respectively.
8. A heterogeneous computing power management device, characterized in that: The device comprises: A computing power conversion module, configured to respond to a request from a work queue for a virtual computing power resource and convert the virtual computing power resource into a heterogeneous computing power resource based on a standardized ratio; A scheduling determination module, used to determine the scheduling information corresponding to the heterogeneous computing resources; A resource allocation module, configured to allocate the heterogeneous computing resources to the work queue based on the scheduling information; The standardized ratio is obtained by performing a standardized performance test on at least one heterogeneous computing resource using a performance indicator.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the heterogeneous computing power management method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the heterogeneous computing power management method described in any one of claims 1 to 7 by executing the executable instructions.