Computing power resource allocation control method and device, electronic equipment and storage medium

By applying the PID control algorithm optimized by neural network model in GPU resource allocation, dynamically adjusting resource allocation, the problems of inefficient and unbalanced resource allocation under traditional methods are solved, and more efficient, flexible and balanced resource allocation is achieved.

CN119440808AActive Publication Date: 2025-02-14中国联合网络通信有限公司广东省分公司

Patent Information

Application Number
CN202411424947.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-14
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The traditional GPU computing resource allocation method is difficult to adapt to dynamically changing computing tasks and load conditions, resulting in inefficient resource allocation and unbalanced resource allocation.

Method used

Using the PID control algorithm optimized based on neural network model, dynamically controls the computing resource allocation process of the graphics processor, and determines the resource allocation control quantity based on actual resource utilization, setting resource utilization, resource utilization deviation and other parameters. .

Benefits of technology

It improves the accuracy and efficiency of computing resource allocation control, enhances the flexibility and balance of resource allocation, and improves the universality of PID control algorithms in the computing resource allocation control process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440808A_ABST
    Figure CN119440808A_ABST
Patent Text Reader

Abstract

The invention discloses a computing power resource allocation control method and device, electronic equipment and a storage medium. The method comprises the steps of determining a resource utilization rate deviation corresponding to a current moment according to an actual resource utilization rate and a set resource utilization rate corresponding to the current moment of at least one graphic processing process associated with a graphic processor; acquiring a resource allocation control quantity corresponding to a previous moment and a kernel function cumulant corresponding to a current moment; and according to the control parameter prediction model, the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the resource allocation control quantity and the kernel function cumulant, determining the resource allocation control quantity at the current moment, so as to determine an execution decision corresponding to the kernel function to be executed at the next moment of the current moment based on the resource allocation control quantity. According to the technical scheme, the PID control algorithm is optimized based on the neural network model, and the computing power resource allocation process of the graphics processor is dynamically controlled based on the optimized PID algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of resource scheduling technology, and in particular to a computing resource allocation control method, device, electronic device and storage medium. Background Art

[0002] Virtual Graphics Processing Unit (VGPU) computing resource scheduling is to effectively allocate the computing resources of the physical GPU to different virtual machines or container instances in a virtualized environment to ensure that each instance can obtain appropriate GPU performance.

[0003] In the related technologies, in the traditional GPU computing power resource allocation, static allocation or dynamic allocation based on simple rules is usually adopted. These methods may perform well in certain scenarios, but there are some technical problems when facing diverse and dynamically changing loads and task situations.

[0004] First, the computing tasks and load conditions of GPU computing resources may change dynamically due to changes in time and application scenarios. Traditional static allocation is difficult to adapt to this dynamic nature, resulting in inefficient resource allocation. Second, in the case of unbalanced load, balanced distribution of tasks may not be achieved, resulting in some GPUs processing too many tasks and being overloaded, while other GPUs are relatively idle, affecting overall performance. Summary of the invention

[0005] The present invention provides a computing power resource allocation control method, device, electronic device and storage medium to achieve the effect of optimizing a PID control algorithm based on a neural network model, so as to dynamically control the computing power resource allocation process of a graphics processor based on the optimized PID algorithm, thereby improving the accuracy and efficiency of computing power resource allocation control.

[0006] According to one aspect of the present invention, a computing resource allocation control method is provided, the method comprising:

[0007] For at least one graphics processing process associated with a graphics processor, determining a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment; wherein the actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment; and the set resource utilization is used to indicate the amount of computing power resources expected to be applied by the graphics processing process;

[0008] Obtaining a resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and a kernel function accumulation amount corresponding to the current moment; wherein the kernel function accumulation amount is determined based on the resource allocation control amount and the kernel function operation amount at the previous moment; the kernel function operation amount is used to indicate the amount of resources required to execute the kernel function to be executed; the kernel function to be executed is used to execute the graphics processing process based on the graphics processor;

[0009] According to the pre-trained control parameter prediction model, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, the resource allocation control amount of the graphics processing process at the current moment is determined, so as to determine the kernel function execution decision of the graphics processing process at the next moment after the current moment based on the resource allocation control amount.

[0010] According to another aspect of the present invention, a computing resource allocation control device is provided, the device comprising:

[0011] a deviation determination module, configured to determine, for at least one graphics processing process associated with a graphics processor, a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment; wherein the actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment; and the set resource utilization is used to indicate the amount of computing power resources expected to be applied by the graphics processing process;

[0012] A cumulative amount acquisition module, used to acquire the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function cumulative amount corresponding to the current moment; wherein the kernel function cumulative amount is determined based on the resource allocation control amount and the kernel function operation amount at the previous moment; the kernel function operation amount is used to indicate the amount of resources required to execute the kernel function to be executed; the kernel function to be executed is used to execute the graphics processing process based on the graphics processor;

[0013] An allocation control amount determination module is used to determine the resource allocation control amount of the graphics processing process at the current moment based on a pre-trained control parameter prediction model, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, so as to determine the kernel function execution decision of the graphics processing process at the next moment after the current moment based on the resource allocation control amount.

[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the computing power resource allocation control method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the computing power resource allocation control method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention determines the resource utilization deviation corresponding to the graphics processing process at the current moment according to the actual resource utilization and the set resource utilization corresponding to the graphics processing process at the current moment for at least one graphics processing process associated with the graphics processor, obtains the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function accumulation amount corresponding to the current moment, determines the resource allocation control amount of the graphics processing process at the current moment according to the control parameter prediction model obtained by pre-training, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, so as to determine the resource allocation control amount of the graphics processing process at the current moment based on the resource allocation control amount. The execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment after the current moment is determined, which solves the problem that the resource allocation control method in the related technology is difficult to adapt to the dynamically changing computing tasks and load conditions, resulting in low resource allocation efficiency and unbalanced resource allocation. The PID control algorithm is optimized based on the neural network model, so as to dynamically control the computing power resource allocation process of the graphics processor based on the optimized PID algorithm, thereby improving the accuracy and efficiency of the computing power resource allocation control, improving the flexibility of the computing power resource allocation control process, improving the balance of the computing power resource allocation, and improving the universality of the PID control algorithm in the computing power resource allocation control process.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a computing resource allocation control method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flowchart of a computing resource allocation control method provided according to Embodiment 2 of the present invention;

[0024] Figure 3 is a flowchart of a computing resource allocation control method provided according to Embodiment 3 of the present invention;

[0025] Figure 4 is a structural schematic diagram of a computing resource allocation control device provided according to Embodiment 4 of the present invention;

[0026] Figure 5 It is a structural diagram of an electronic device that implements the computing power resource allocation control method of an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1 This is a flow chart of a computing resource allocation control method provided by the first embodiment of the present invention. This embodiment is applicable to the case where the computing resource allocation control of a graphics processor is performed. The method can be executed by a computing resource allocation control device. The computing resource allocation control device can be implemented in the form of hardware and / or software. The computing resource allocation control device can be configured in a terminal and / or a server. Figure 1 As shown, the method includes:

[0031] S110. For at least one graphics processing process associated with a graphics processor, determine a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment.

[0032] Among them, a graphics processor (Graphics Processing Unit, GPU) is a microprocessor that is specifically used for image and graphics related processing on personal computers, workstations, game consoles and some mobile devices (tablets, smart phones, etc.). In general, at least one process (or task) associated with graphics processing can be executed based on the resources contained in the GPU. In the case of determining at least one graphics processing process, at least part of the resources contained in the GPU can be allocated to the corresponding graphics processing process so that the graphics processing process performs graphics processing operations based on the allocated GPU resources. The graphics processing process can be a process of performing a series of operations and processing on graphics data. In this embodiment, the graphics processing process can be a corresponding graphics processing task performed on a corresponding virtual graphics processing unit in the graphics processor. It can be understood that the rendering resources and computing resources of the GPU of the physical entity can be encapsulated into multiple independent virtual slices through virtualization technology. Each virtual slice is assigned to a different virtual machine so that it can independently access and utilize GPU resources. At this time, the virtual slice can be used as a virtual graphics processing unit (Virtual Graphics Processing Unit, VGPU). The actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment. The actual resource utilization rate can be understood as the ratio between the amount of resources actually applied by the graphics processing process to perform graphics processing operations within a specific time and the total amount of resources. It should be noted that the method of determining the actual resource utilization rate of the graphics processing process is different for different graphics cards. Exemplarily, assuming that the graphics card set on the GPU is an NVIDIA graphics card, the actual resource utilization rate is usually determined by calculating the percentage of active streaming multiprocessors to the total number of lost multiprocessors. The set resource utilization rate is used to indicate the amount of computing power resources expected to be applied by the graphics processing process. The set resource utilization rate can be understood as the ratio between the amount of resources expected to be applied by the graphics processing process to perform graphics processing operations within a specific time and the total amount of resources.

[0033] In this embodiment, the set resource utilization rate may be a predetermined resource utilization rate allocated to the corresponding graphics processing process, so that the corresponding graphics processing process can execute the corresponding graphics processing task on the graphics processor based on the corresponding set resource utilization rate. Further, in the process of the graphics processing process executing the corresponding graphics processing task, there is a certain deviation between the actual resource utilization rate actually applied to the execution task and the corresponding set resource utilization rate. Furthermore, in order to determine the resource utilization rate deviation corresponding to the graphics processing process at each moment, the actual resource utilization rate and the set resource utilization rate corresponding to the graphics processing process at the current moment may be obtained. Further, the difference between the set resource utilization rate and the actual resource utilization rate may be determined, and the difference may be used as the resource utilization rate deviation corresponding to the graphics processing process at the current moment. Among them, the actual resource utilization rate may be obtained in a variety of ways. Optionally, a performance detection tool may be used to collect the resource utilization rate of the graphics processing process in real time or periodically, and the collected resource utilization rate may be used as the actual resource utilization rate.

[0034] S120, obtaining the resource allocation control amount corresponding to the graphics processing process at the previous moment and the kernel function accumulation amount corresponding to the current moment.

[0035] Among them, the resource allocation control amount can be used to characterize the control amount based on which the resource utilization of the graphics processing process at the corresponding moment is adjusted. When the actual resource utilization and the set resource utilization are determined, the actual resource utilization can be adjusted according to the resource allocation control amount so that the adjusted actual resource utilization approaches the set resource utilization. Thus, the effect of effectively allocating graphics processing resources and improving resource utilization can be achieved. In this embodiment, the resource allocation control amount can be understood as the computing power resources allocated to the graphics processing process. The kernel function accumulation amount can be the resource amount obtained after superposition of at least one resource allocation control amount, and the resource amount can be used to execute the corresponding kernel function. The kernel function accumulation amount at the current moment is determined based on the resource allocation control amount at the previous moment and the kernel function operation amount at the previous moment. The kernel function operation amount can be used to indicate the resource amount required to execute the kernel function to be executed. The kernel function to be executed can be used to execute the graphics processing process based on the graphics processor. Generally, when executing the graphics processing process based on the graphics processor, the corresponding graphics processing process can be executed by sending the kernel function to be executed corresponding to the graphics processing process to the graphics processor. The kernel function operation amount can be determined based on the number of thread blocks carried when the kernel function to be executed is sent and the number of threads in each thread block. In this embodiment, when the resource allocation control amount at the previous moment is determined, the resource allocation control amount can be input into the kernel function execution unit to superimpose the resource allocation control amount with the kernel function accumulation amount contained in the kernel function execution unit. Further, the superimposed kernel function accumulation amount can be compared with the kernel function operation amount. When the superimposed kernel function accumulation amount is greater than the kernel function operation amount, the difference between the superimposed kernel function accumulation amount and the kernel function operation amount can be determined, and the difference can be used as the kernel function accumulation amount at the current moment.

[0036] In this embodiment, in order to determine the resource allocation control amount corresponding to the current moment, the resource allocation control amount corresponding to the previous moment and the kernel function accumulation amount corresponding to the current moment can be obtained. Further, the resource allocation control amount corresponding to the current moment can be determined based on the obtained resource allocation control amount, the kernel function accumulation amount and the determined resource utilization deviation.

[0037] S130. Determine the resource allocation control amount of the graphics processing process at the current moment based on the pre-trained control parameter prediction model, actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation, so as to determine the execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment of the current moment based on the resource allocation control amount.

[0038] Among them, the control parameter prediction model can be a neural network model for predicting feedback control parameters. In this embodiment, the control parameter prediction model can be a neural network model that takes the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation as input objects to determine the feedback control parameters based on the input objects. The control parameter prediction model can be obtained by training the pre-built neural network model based on the actual resource utilization corresponding to the historical moment, the set resource utilization, the resource utilization deviation and the kernel function accumulation, the resource allocation control amount at the previous moment of the historical moment and the actual feedback control parameter corresponding to the historical moment. It can be understood that the feedback control coefficient can be the core of the PID control algorithm, which can determine how the graphics processing process adjusts the actual resource utilization according to the resource utilization deviation to reduce the difference between the actual resource utilization and the set resource utilization. Optionally, the feedback control coefficient may include a proportional coefficient, an integral coefficient and a differential coefficient. The execution decision can be used to characterize whether the corresponding kernel function is executed at the corresponding moment. Optionally, the execution decision may include issuing execution or delaying execution.

[0039] In practical applications, the PID control algorithm can be applied to the allocation control process of VGPU computing power resources. In general, the PID control algorithm can only guarantee the correctness and convergence of its control quantity when the system performance is linear and time-invariant. System performance linearity means that there should be a linear relationship between the resource allocation control quantity and the resource allocation quantity. Time invariance means that when the same resource allocation control quantity is input at any time, the resource allocation quantity output by the system should also be the same, and it is not affected by time changes. However, these two characteristics are difficult to achieve in GPUs. First, the kernel function and data volume called by the GPU often change on a large scale, breaking the linearity and time invariance principles; second, the performance of large-scale parallel computing changes instantly. Limited by parameters such as video memory, computing core, and data transmission, the performance of running at different times varies greatly and cannot be linear. Furthermore, when the GPU computing power resource allocation control is performed based on the PID control algorithm, it may be impossible to accurately control the resource utilization of each graphics processing process, thereby affecting the execution efficiency and execution effect of the graphics processing process.

[0040] In view of the above situation, in this embodiment, the control parameter prediction model can be used to predict the feedback control parameters at the current moment. Further, the resource allocation control amount at the current moment can be determined according to the predicted feedback control parameters, so as to adjust the actual resource utilization rate based on the resource allocation control amount.

[0041] It should be noted that the control parameter prediction model can be a neural network model of any model structure, and optionally, a recursive neural network (RNN). The benefit of applying a recursive neural network is that RNN can learn time-varying patterns and the time dependency of attributes, which is particularly important for non-stationary data systems whose attributes change over time, making it suitable for controlling dynamic systems with time-varying behaviors.

[0042] In this embodiment, when the actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation amount corresponding to the graphics processing process at the current moment are obtained, the actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation amount can be processed according to the control parameter prediction model obtained by pre-training to obtain the feedback control parameter corresponding to the graphics processing process at the current moment. Further, the resource allocation control amount of the graphics processing process at the next moment of the current moment can be determined according to the feedback control parameter. Furthermore, the execution decision corresponding to the kernel function to be executed can be determined based on the resource allocation control amount.

[0043] The technical solution of the embodiment of the present invention determines the resource utilization deviation corresponding to the graphics processing process at the current moment according to the actual resource utilization and the set resource utilization corresponding to the graphics processing process at the current moment for at least one graphics processing process associated with the graphics processor, obtains the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function accumulation amount corresponding to the current moment, determines the resource allocation control amount of the graphics processing process at the current moment according to the control parameter prediction model obtained by pre-training, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, so as to determine the resource allocation control amount of the graphics processing process at the current moment based on the resource allocation control amount. The execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment after the current moment is determined, which solves the problem that the resource allocation control method in the related technology is difficult to adapt to the dynamically changing computing tasks and load conditions, resulting in low resource allocation efficiency and unbalanced resource allocation. The PID control algorithm is optimized based on the neural network model, so as to dynamically control the computing power resource allocation process of the graphics processor based on the optimized PID algorithm, thereby improving the accuracy and efficiency of the computing power resource allocation control, improving the flexibility of the computing power resource allocation control process, improving the balance of the computing power resource allocation, and improving the universality of the PID control algorithm in the computing power resource allocation control process.

[0044] Embodiment 2

[0045] Figure 2This is a flowchart of a computing resource allocation control method provided in the second embodiment of the present invention. On the basis of the above-mentioned embodiment, the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the resource allocation control amount and the kernel function accumulation amount are input into the control parameter prediction model obtained by pre-training to obtain the feedback control parameters corresponding to the graphics processing process at the current moment; based on the resource utilization rate deviation and the feedback control parameters, the resource allocation control amount of the graphics processing process at the current moment is determined. The specific implementation method can be found in the technical solution of this embodiment. Among them, the technical terms that are the same or similar to those in the above-mentioned embodiment are not repeated here.

[0046] like Figure 2 As shown, the method includes:

[0047] S210: For at least one graphics processing process associated with a graphics processor, determine a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment.

[0048] S220, obtaining the resource allocation control amount corresponding to the graphics processing process at the previous moment and the kernel function accumulation amount corresponding to the current moment.

[0049] S230, input the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation into the pre-trained control parameter prediction model to obtain the feedback control parameters corresponding to the graphics processing process at the current moment.

[0050] The feedback control parameter refers to various parameters used to adjust system performance and control accuracy in a feedback control system. In this embodiment, the feedback control parameter can be used to adjust the deviation between the actual resource utilization and the set resource utilization so that the actual resource utilization approaches the set resource utilization.

[0051] In this embodiment, the control parameter prediction model can be obtained by training based on the actual resource utilization rate corresponding to the sample graphics processing process at the historical moment, the set resource utilization rate, the resource utilization rate deviation and the kernel function accumulation, the resource allocation control amount at the previous moment of the historical moment, and the actual feedback control parameter corresponding to the historical moment. Before applying the control parameter prediction model provided by this embodiment, the pre-constructed neural network model can be trained in a supervised or unsupervised manner. Before training the neural network model, multiple training samples can be constructed to train the model based on the training samples. In order to improve the accuracy of the control parameter prediction model, as many and rich training samples as possible can be constructed. Optionally, the training process of the control parameter prediction model can be: obtaining multiple training sample data; training the model to be trained based on the multiple training sample data to obtain the control parameter prediction model.

[0052] The training sample data includes the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation and kernel function accumulation rate corresponding to the sample graphics processing process at the historical moment, the resource allocation control amount at the previous moment of the historical moment, and the actual feedback control parameter corresponding to the historical moment. The sample graphics processing process can be any graphics processing process that has been executed. The actual feedback control parameter can be a feedback control parameter determined according to a preset control parameter determination method. In general, the actual feedback control parameter can be a feedback control parameter that enables the graphics processor to achieve a better effect of resource allocation control on the sample graphics processing process when resource allocation control is performed based on a feedback control algorithm. The model to be trained can be a neural network model with model parameters as initial values ​​or default values.

[0053] In this embodiment, for multiple historical moments associated with the sample graphic processing process, the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation and kernel function accumulation amount, resource allocation control amount at the previous moment of the historical moment, and actual feedback control parameters at the historical moment corresponding to the sample graphic processing process are obtained. Further, training sample data can be constructed according to the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation and kernel function accumulation amount, resource allocation control amount at the previous moment of the historical moment, and actual feedback control parameters at the historical moment. Furthermore, multiple training sample data corresponding to the sample graphic processing process can be obtained. Further, the model to be trained can be trained according to the multiple training sample data to obtain a control parameter prediction model.

[0054] Optionally, the model to be trained is trained based on multiple training sample data to obtain a control parameter prediction model, including: for multiple training sample data, the actual resource utilization, set resource utilization, resource utilization deviation, kernel function accumulation and resource allocation control amount in the training sample data are input into the model to be trained to obtain the predicted control parameters corresponding to the sample graphics processing process at the historical moment; based on the predicted control parameters and the actual feedback control parameters included in the training sample data, the loss value is determined; based on the loss value, the model parameters in the model to be trained are corrected, and the convergence of the loss function in the model to be trained is used as the training goal to obtain the control parameter prediction model.

[0055] The loss value may be a value representing the difference between the predicted output and the actual output. The loss function may be a function determined based on the loss value and used to represent the difference between the predicted output and the actual output. The loss function may be any loss function, and may be a mean square error loss function.

[0056] As an optional implementation of this embodiment, for multiple training sample data, the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation, kernel function accumulation amount and resource allocation control amount in the training sample data can be input into the model to be trained, so as to process the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation, kernel function accumulation amount and resource allocation control amount based on the model to be trained, and obtain the prediction control parameters corresponding to the historical moment. Further, the prediction control parameters can be compared with the actual feedback control parameters in the training sample data to determine the loss value. Further, the model parameters of the model to be trained can be corrected based on the loss value, and then the training error of the loss function in the model to be trained, that is, the loss parameter, can be used as a condition for detecting whether the current loss function has reached convergence, for example, whether the training error is less than the preset error or whether the error change trend tends to be stable, or whether the current model iteration number is equal to the preset number, etc. If the detection reaches the convergence condition, for example, the training error of the loss function is less than the preset error or the error change tends to be stable, it indicates that the training of the model to be trained is completed, and at this time, the iterative training can be stopped. If it is detected that the convergence condition is not met at present, other sample data can be further obtained to train the model to be trained until the training error of the loss function is within the preset range. When the training error of the loss function reaches convergence, the trained model to be trained can be used as the control parameter prediction model.

[0057] Furthermore, when the trained control parameter prediction model is obtained, the actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation amount corresponding to the acquired graphics processing process at the current moment can be input into the pre-trained control parameter prediction model. Furthermore, the actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation amount can be processed based on the control parameter prediction model to obtain the feedback control parameters corresponding to the graphics processing process at the current moment.

[0058] S240, based on the resource utilization deviation and the feedback control parameter, determine the resource allocation control amount of the graphics processing process at the current moment, so as to determine the execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment of the current moment based on the resource allocation control amount.

[0059] In this embodiment, when the feedback control parameter corresponding to the current moment is obtained, the resource allocation control amount of the graphics processing process at the current moment can be determined based on the resource utilization deviation corresponding to the current moment and the feedback control parameter.

[0060] Optionally, the feedback control parameters include a proportional coefficient, an integral coefficient and a differential coefficient; based on the resource utilization deviation and the feedback control parameters, the resource allocation control amount of the graphics processing process at the current moment is determined, including: determining the product between the resource utilization deviation and the total amount of computing cores corresponding to the graphics processor, and using the product as the resource utilization deviation; determining the product between the proportional coefficient and the resource utilization deviation, and using the product as the proportional control amount; determining the product between the integral coefficient and the integral value of the resource utilization deviation, and using the product as the integral control amount; determining the product between the differential coefficient and the differential value of the resource utilization deviation, and using the product as the differential control amount; adding the proportional control amount, the integral control amount and the differential control amount to obtain the resource allocation control amount of the graphics processing process at the current moment.

[0061] The computing core refers to the core unit in a computer processor (such as a CPU or GPU) that is responsible for performing computing tasks. The total number of computing cores can refer to the total number of independent processor cores integrated in a computer processor.

[0062] As an optional implementation of this embodiment, the product between the resource utilization deviation and the total amount of computing cores corresponding to the graphics processor can be determined, and the product can be used as the resource utilization deviation corresponding to the current moment. Further, the product between the proportional coefficient and the resource utilization deviation at the current moment can be determined, and the product can be used as the proportional control amount at the current moment. Also, the integral value corresponding to the resource utilization deviation in the preset time period can be determined, and the product between the integral coefficient and the integral value can be determined, and the product can be used as the integral control amount. Also, the differential value corresponding to the resource utilization deviation in the preset time period can be determined, and the product between the differential coefficient and the differential value can be determined, and the product can be used as the differential control amount. Further, the proportional control amount, the integral control amount and the differential control amount can be added, and the control amount obtained after the addition can be used as the resource allocation control amount of the graphics processing process at the current moment. Among them, the preset time period can be a time period of any length.

[0063] The technical solution of the embodiment of the present invention obtains the feedback control parameters corresponding to the graphics processing process at the current moment by inputting the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation into the pre-trained control parameter prediction model; based on the resource utilization deviation and the feedback control parameters, the resource allocation control amount of the graphics processing process at the current moment is determined, and the feedback control parameters are dynamically adjusted based on the neural network model to improve the allocation control accuracy of computing power resources. In addition, the PID control algorithm is optimized based on the neural network model to achieve the effect of quickly adjusting the feedback control coefficient to converge when the computing power resources of the GPU change dynamically, eliminate large fluctuations and be able to quickly call back to the correct position when the feedback control coefficient changes sharply.

[0064] Embodiment 3

[0065] Figure 3 This is a flowchart of a computing resource allocation control method provided in Example 3 of the present invention. On the basis of the above-mentioned embodiments, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation are input into the control parameter prediction model obtained by pre-training to obtain the feedback control parameters corresponding to the graphics processing process at the current moment; based on the resource utilization deviation and the feedback control parameters, the resource allocation control amount of the graphics processing process at the current moment is determined. The specific implementation method can be found in the technical solution of this embodiment. Among them, the technical terms that are the same or similar to those in the above-mentioned embodiments are not repeated here.

[0066] like Figure 3 As shown, the method includes:

[0067] S310. For at least one graphics processing process associated with a graphics processor, determine a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment.

[0068] S320: Obtain the resource allocation control amount corresponding to the graphics processing process at the previous moment and the kernel function accumulation amount corresponding to the current moment.

[0069] S330. Determine the resource allocation control amount of the graphics processing process at the current moment based on the pre-trained control parameter prediction model, actual resource utilization, set resource utilization, resource utilization deviation, resource allocation control amount and kernel function accumulation amount, and add the resource allocation control amount to the kernel function accumulation amount corresponding to the current moment to obtain the kernel function accumulation amount at the next moment of the current moment.

[0070] In this embodiment, when the resource allocation control amount at the current moment is obtained, the resource allocation control amount can be input into the kernel function execution unit, and the kernel function execution unit can include the kernel function accumulation amount at the current moment. Further, the resource allocation control amount corresponding to the current moment can be added to the kernel function accumulation amount at the current moment, and the resource amount obtained after the addition is used as the kernel function accumulation amount at the next moment of the current moment.

[0071] S340, comparing the accumulated amount of the kernel function at the next moment with the predetermined kernel function operation amount at the next moment corresponding to the function to be executed, and determining the execution decision corresponding to the kernel function to be executed at the next moment based on the comparison result.

[0072] In this embodiment, after obtaining the kernel function accumulation at the next moment, the kernel function accumulation can be compared with the kernel function calculation amount at the next moment to determine whether the kernel function accumulation can support the calculation process of the kernel function to be executed at the next moment.

[0073] Optionally, the execution decision corresponding to the kernel function to be executed at the next moment is determined based on the comparison result, including: when the accumulated amount of the kernel function is greater than the calculation amount of the kernel function, determining that the execution decision corresponding to the kernel function to be executed is to be issued for execution, and determining the difference between the accumulated amount of the kernel function and the calculation amount of the kernel function, and updating the accumulated amount of the kernel function based on the difference; when the accumulated amount of the kernel function is not greater than the calculation amount of the kernel function, determining that the execution corresponding to the kernel function to be executed is delayed execution.

[0074] As an optional implementation of this embodiment, when the kernel function accumulation amount is greater than the kernel function operation amount, the execution decision corresponding to the kernel function to be executed can be determined as sending execution, and the kernel function to be executed can be sent to the graphics processor to execute the graphics processing process based on the graphics processor. Moreover, when the kernel function to be executed is sent for execution, the required amount of resources is the amount of resources corresponding to the kernel function operation amount. Furthermore, the difference between the kernel function accumulation amount and the kernel function operation amount can be determined, and the kernel function accumulation amount can be updated based on the difference, that is, the difference is used as the kernel function accumulation amount at the next moment. Alternatively, when the kernel function accumulation amount is not greater than the kernel function operation amount, the execution decision corresponding to the kernel function to be executed can be determined as delayed execution, and the kernel function accumulation amount at the next moment is kept unchanged.

[0075] In this embodiment, before comparing the kernel function accumulation amount with the kernel function operation amount, the kernel function operation amount corresponding to the kernel function to be executed may be determined first. Optionally, the kernel function operation amount may be determined by: obtaining the number of thread blocks corresponding to the kernel function to be executed and the number of threads in each thread block; determining the product between the number of thread blocks and the number of threads to obtain the kernel function operation amount corresponding to the kernel function to be executed.

[0076] Among them, a thread block is a grouping of multiple threads, that is, a thread block is a collection of multiple threads. Threads in a thread block can collaborate during execution. Thread blocks can be used to organize and manage threads to achieve efficient parallel computing. A thread is an execution unit in a process and the smallest unit that the operating system can schedule operations. It should be noted that the number of thread blocks and the number of threads in each thread block are parameters in the execution parameters associated with the kernel function to be executed, and can be directly obtained based on the execution parameters.

[0077] As an optional implementation of this embodiment, the number of thread blocks corresponding to the kernel function to be executed and the number of threads contained in each thread block can be obtained. Further, the product between the number of thread blocks and the number of threads can be determined, and the product is used as the kernel function operation amount corresponding to the kernel function to be executed.

[0078] The technical solution of the embodiment of the present invention determines the resource allocation control amount of the graphics processing process at the current moment according to the control parameter prediction model obtained by pre-training, the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the resource allocation control amount and the kernel function accumulation amount, adds the resource allocation control amount to the kernel function accumulation amount corresponding to the current moment, and obtains the kernel function accumulation amount at the next moment of the current moment. Further, the kernel function accumulation amount at the next moment is compared with the predetermined kernel function operation amount at the next moment corresponding to the function to be executed, and the execution decision corresponding to the kernel function to be executed at the next moment is determined based on the comparison result, thereby realizing the optimization of the PID control algorithm based on the neural network model, so as to dynamically control the computing power resource allocation process of the graphics processor based on the optimized PID algorithm, thereby improving the accuracy and efficiency of the computing power resource allocation control, improving the flexibility of the computing power resource allocation control process, improving the balance of the computing power resource allocation, and improving the universality of the PID control algorithm in the computing power resource allocation control process.

[0079] Embodiment 4

[0080] Figure 4 Schematic diagram of a computing resource allocation control device provided by Embodiment 4 of the present invention. Figure 4 As shown, the device includes: a deviation determination module 410, a cumulative amount acquisition module 420 and a distribution control amount determination module 430.

[0081] Among them, the deviation determination module 410 is used to determine the resource utilization deviation corresponding to the graphics processing process at the current moment for at least one graphics processing process associated with the graphics processor according to the actual resource utilization and set resource utilization corresponding to the graphics processing process at the current moment; wherein the actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment; the set resource utilization is used to indicate the amount of computing power resources expected to be applied by the graphics processing process; the cumulative amount acquisition module 420 is used to obtain the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function cumulative amount corresponding to the current moment; wherein, the The kernel function accumulation amount is determined based on the resource allocation control amount and the kernel function operation amount at the previous moment; the kernel function operation amount is used to indicate the amount of resources required to execute the kernel function to be executed; the kernel function to be executed is used to execute the graphics processing process based on the graphics processor; the allocation control amount determination module 430 is used to determine the resource allocation control amount of the graphics processing process at the current moment based on the pre-trained control parameter prediction model, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, so as to determine the kernel function execution decision of the graphics processing process at the next moment after the current moment based on the resource allocation control amount.

[0082] The technical solution of the embodiment of the present invention determines the resource utilization deviation corresponding to the graphics processing process at the current moment according to the actual resource utilization and the set resource utilization corresponding to the graphics processing process at the current moment for at least one graphics processing process associated with the graphics processor, obtains the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function accumulation amount corresponding to the current moment, determines the resource allocation control amount of the graphics processing process at the current moment according to the control parameter prediction model obtained by pre-training, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, so as to determine the resource allocation control amount of the graphics processing process at the current moment based on the resource allocation control amount. The execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment after the current moment is determined, which solves the problem that the resource allocation control method in the related technology is difficult to adapt to the dynamically changing computing tasks and load conditions, resulting in low resource allocation efficiency and unbalanced resource allocation. The PID control algorithm is optimized based on the neural network model, so as to dynamically control the computing power resource allocation process of the graphics processor based on the optimized PID algorithm, thereby improving the accuracy and efficiency of the computing power resource allocation control, improving the flexibility of the computing power resource allocation control process, improving the balance of the computing power resource allocation, and improving the universality of the PID control algorithm in the computing power resource allocation control process.

[0083] Optionally, the allocation control amount determination module 430 includes: a control parameter determination unit and a control amount determination unit.

[0084] a control parameter determination unit, configured to input the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount into a pre-trained control parameter prediction model to obtain a feedback control parameter corresponding to the graphics processing process at the current moment;

[0085] The control amount determination unit is used to determine the resource allocation control amount of the graphics processing process at the current moment based on the resource utilization deviation and the feedback control parameter.

[0086] Optionally, the allocation control amount determination module 430 includes: an accumulation amount determination unit and an execution decision determination unit.

[0087] a cumulative amount determining unit, configured to add the resource allocation control amount to the kernel function cumulative amount corresponding to the current moment to obtain the kernel function cumulative amount at a moment next to the current moment;

[0088] The execution decision determination unit is used to compare the accumulated amount of the kernel function at the next moment with the predetermined kernel function operation amount at the next moment corresponding to the function to be executed, and determine the kernel function execution decision at the next moment based on the comparison result.

[0089] Optionally, the execution decision determination unit includes: a sending execution decision determination subunit and a delayed execution decision determination subunit.

[0090] a subunit for determining a decision to issue an execution, configured to determine, when the kernel function accumulation is greater than the kernel function operation amount, that the execution decision corresponding to the kernel function to be executed is to issue an execution, and to determine a difference between the kernel function accumulation and the kernel function operation amount, and to update the kernel function accumulation based on the difference;

[0091] The delayed execution decision determination subunit is used to determine that the kernel function to be executed corresponds to delayed execution when the accumulated amount of the kernel function is not greater than the amount of operation of the kernel function.

[0092] Optionally, the device further includes: a thread quantity acquisition module and a kernel function computation amount determination module.

[0093] A thread number acquisition module is used to obtain the number of thread blocks corresponding to the kernel function to be executed and the number of threads in each thread block;

[0094] The kernel function operation amount determination module is used to determine the product between the number of thread blocks and the number of threads to obtain the kernel function operation amount corresponding to the kernel function to be executed.

[0095] Optionally, the device also includes: a model training module.

[0096] A model training module is used to train and obtain a control parameter prediction model;

[0097] The model training module includes: a sample data acquisition unit and a model training unit.

[0098] A sample data acquisition unit, used to acquire a plurality of training sample data; wherein the training sample data includes the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation and kernel function accumulation amount corresponding to the sample graphics processing process at the historical moment, the resource allocation control amount at the previous moment of the historical moment, and the actual feedback control parameter corresponding to the historical moment;

[0099] The model training unit is used to train the model to be trained based on the multiple training sample data to obtain a control parameter prediction model.

[0100] Optionally, the model training unit includes: a prediction control parameter determination subunit, a loss value determination subunit and a model parameter correction subunit.

[0101] A prediction control parameter determination subunit is used for inputting the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the kernel function accumulation amount and the resource allocation control amount in the training sample data into the model to be trained for the plurality of training sample data, so as to obtain the prediction control parameter corresponding to the sample graphic processing process at the historical moment;

[0102] a loss value determination subunit, configured to determine a loss value based on the prediction control parameter and the actual feedback control parameter included in the training sample data;

[0103] The model parameter correction subunit is used to correct the model parameters in the model to be trained based on the loss value, take the convergence of the loss function in the model to be trained as the training goal, and obtain the control parameter prediction model.

[0104] Optionally, the feedback control parameters include a proportional coefficient, an integral coefficient and a differential coefficient; the control quantity determination unit includes: a deviation quantity determination subunit, a proportional control quantity determination subunit, an integral control quantity determination subunit, a differential control quantity determination subunit and a control quantity determination subunit.

[0105] a deviation determination subunit, configured to determine a product between the resource utilization deviation and the total number of computing cores corresponding to the graphics processor, and use the product as a resource utilization deviation;

[0106] A proportional control amount determination subunit, used to determine the product between the proportional coefficient and the resource utilization deviation, and use the product as the proportional control amount;

[0107] An integral control amount determination subunit, used to determine the product between the integral coefficient and the integral value of the resource utilization deviation, and use the product as the integral control amount;

[0108] A differential control amount determination subunit, used to determine the product between the differential coefficient and the differential value of the resource utilization deviation amount, and use the product as the differential control amount;

[0109] The control amount determination subunit is used to add the proportional control amount, the integral control amount and the differential control amount to obtain the resource allocation control amount of the graphics processing process at the current moment.

[0110] The computing power resource allocation control device provided in the embodiment of the present invention can execute the computing power resource allocation control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0111] Embodiment 5

[0112] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0113] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0114] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0115] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a computing resource allocation control method.

[0116] In some embodiments, the computing power resource allocation control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the computing power resource allocation control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the computing power resource allocation control method in any other appropriate manner (e.g., by means of firmware).

[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0121] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0122] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A computing resource allocation control method, characterized in that: include: For at least one graphics processing process associated with a graphics processor, determining a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment; wherein the actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment; and the set resource utilization is used to indicate the amount of computing power resources expected to be applied by the graphics processing process; Obtaining a resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and a kernel function accumulation amount corresponding to the current moment; wherein the kernel function accumulation amount is determined based on the resource allocation control amount and the kernel function operation amount at the previous moment; the kernel function operation amount is used to indicate the amount of resources required to execute the kernel function to be executed; the kernel function to be executed is used to execute the graphics processing process based on the graphics processor; According to the pre-trained control parameter prediction model, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount, the resource allocation control amount of the graphics processing process at the current moment is determined, so as to determine the execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment after the current moment based on the resource allocation control amount.

2. The computing resource allocation control method according to claim 1, characterized in that: The determining the resource allocation control amount of the graphics processing process at the current moment according to the control parameter prediction model obtained by pre-training, the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the resource allocation control amount and the kernel function accumulation amount includes: Inputting the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control amount and the kernel function accumulation amount into a pre-trained control parameter prediction model to obtain a feedback control parameter corresponding to the graphics processing process at the current moment; Based on the resource utilization deviation and the feedback control parameter, a resource allocation control amount of the graphics processing process at the current moment is determined.

3. The computing resource allocation control method according to claim 1, characterized in that: The determining, based on the resource allocation control amount, an execution decision of the graphics processing process corresponding to the kernel function to be executed at the next moment after the current moment comprises: Adding the resource allocation control amount to the kernel function accumulation amount corresponding to the current moment to obtain the kernel function accumulation amount at the next moment of the current moment; The accumulated amount of the kernel function at the next moment is compared with the predetermined kernel function operation amount at the next moment corresponding to the function to be executed, and the execution decision corresponding to the kernel function to be executed at the next moment is determined based on the comparison result.

4. The computing resource allocation control method according to claim 3, characterized in that: The determining, based on the comparison result, the execution decision corresponding to the kernel function to be executed at the next moment includes: In the case where the kernel function accumulation amount is greater than the kernel function operation amount, determining that the execution decision corresponding to the to-be-executed kernel function is to be issued for execution, and determining the difference between the kernel function accumulation amount and the kernel function operation amount, and updating the kernel function accumulation amount based on the difference; When the kernel function accumulation amount is not greater than the kernel function operation amount, it is determined that the kernel function to be executed corresponds to delayed execution.

5. The computing resource allocation control method according to claim 3, characterized in that: Also includes: Obtain the number of thread blocks corresponding to the kernel function to be executed and the number of threads in each thread block; The product of the number of thread blocks and the number of threads is determined to obtain a kernel function operation amount corresponding to the kernel function to be executed.

6. The computing resource allocation control method according to claim 1 or 2, characterized in that: Also includes: The control parameter prediction model is obtained through training; The training obtains a control parameter prediction model, including: Acquire a plurality of training sample data; wherein the training sample data includes the actual resource utilization rate, set resource utilization rate, resource utilization rate deviation and kernel function accumulation amount corresponding to the sample graphics processing process at the historical moment, the resource allocation control amount at the previous moment of the historical moment, and the actual feedback control parameter corresponding to the historical moment; The model to be trained is trained based on the plurality of training sample data to obtain a control parameter prediction model.

7. The computing resource allocation control method according to claim 6, characterized in that: The training of the to-be-trained model based on the plurality of training sample data to obtain a control parameter prediction model comprises: For the plurality of training sample data, the actual resource utilization rate, the set resource utilization rate, the resource utilization rate deviation, the kernel function accumulation amount and the resource allocation control amount in the training sample data are input into the model to be trained to obtain the prediction control parameter corresponding to the sample graphic processing process at the historical moment; Determining a loss value based on the predicted control parameter and the actual feedback control parameter included in the training sample data; The model parameters in the model to be trained are modified based on the loss value, and the convergence of the loss function in the model to be trained is taken as the training goal to obtain a control parameter prediction model.

8. The computing resource allocation control method according to claim 2, characterized in that: The feedback control parameters include a proportional coefficient, an integral coefficient, and a differential coefficient; and determining the resource allocation control amount of the graphics processing process at the current moment based on the resource utilization deviation and the feedback control parameters includes: Determine a product of the resource utilization deviation and the total number of computing cores corresponding to the graphics processor, and use the product as the resource utilization deviation; Determine the product of the proportional coefficient and the resource utilization deviation, and use the product as the proportional control amount; Determine the product of the integral coefficient and the integral value of the resource utilization deviation, and use the product as the integral control amount; Determine the product of the differential coefficient and the differential value of the resource utilization deviation, and use the product as the differential control amount; The proportional control amount, the integral control amount and the differential control amount are added together to obtain the resource allocation control amount of the graphics processing process at the current moment.

9. A computing resource allocation control device, characterized in that: include: a deviation determination module, configured to determine, for at least one graphics processing process associated with a graphics processor, a resource utilization deviation corresponding to the graphics processing process at the current moment according to an actual resource utilization and a set resource utilization corresponding to the graphics processing process at the current moment; wherein the actual resource utilization is used to indicate the amount of computing power resources applied by the graphics processing process at the current moment; and the set resource utilization is used to indicate the amount of computing power resources expected to be applied by the graphics processing process; A cumulative amount acquisition module, used to acquire the resource allocation control amount corresponding to the graphics processing process at the previous moment of the current moment and the kernel function cumulative amount corresponding to the current moment; wherein the kernel function cumulative amount is determined based on the resource allocation control amount and the kernel function operation amount at the previous moment; the kernel function operation amount is used to indicate the amount of resources required to execute the kernel function to be executed; the kernel function to be executed is used to execute the graphics processing process based on the graphics processor; A control quantity determination module is used to determine the resource allocation control quantity of the graphics processing process at the current moment based on a pre-trained control parameter prediction model, the actual resource utilization, the set resource utilization, the resource utilization deviation, the resource allocation control quantity and the kernel function accumulation quantity, so as to determine the kernel function execution decision of the graphics processing process at the next moment after the current moment based on the resource allocation control quantity.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the computing power resource allocation control method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Particle flow simulation system and method

    CN103324780A

  • GPU (Graphics Processing Unit) resource allocation method, device and equipment and readable storage medium

    CN114168344A

  • Resource scheduling method and device, equipment and storage medium

    CN115098257A

  • Computing power control method and device, storage medium and electronic equipment

    CN116541162A

  • Network resource allocation method and system, storage medium and electronic equipment

    CN117201308A

Cited By

  • GPU-based large-scale parallel computing optimization method

    CN120123107A

  • A GPU-based Optimization Method for Large-scale Parallel Computing

    CN120123107B