Self-adaptive energy consumption control method, system and equipment based on computing power chip and medium
By constructing an optimal predictive regression model and training an RNN, the problems of low frequency adjustment accuracy and high energy consumption of computing chips under different loads are solved. This enables precise selection of the optimal frequency under different workloads, dynamic adjustment of the frequency to reduce energy consumption and maintain performance, and improves the flexibility and applicability of the system.
Patent Information
- Application Number
- CN202511350160.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In existing technologies, the frequency adjustment of computing chips under different workloads suffers from low tuning accuracy and high energy consumption, making it impossible to effectively balance performance and energy consumption.
By constructing an optimal prediction regression model based on the multi-channel hardware status indicators of computing chips at different frequencies, and using a recurrent neural network (RNN) for model training, the model predicts performance data at different frequencies, obtains the target optimal frequency that meets the preset performance indicators, and performs adaptive frequency adjustment.
It enables precise selection of the target optimal frequency that meets performance requirements and minimizes energy consumption under different workloads, dynamically adjusts the frequency of the computing chip, reduces energy consumption and maintains stable performance, and improves the flexibility and applicability of the system.
Smart Images

Figure CN120872128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to adaptive energy consumption control methods, systems, devices and media based on computing chips. Background Technology
[0002] With the increasing demands of deep learning, artificial intelligence, and high-performance computing, the energy consumption of high-performance computing chips is becoming increasingly prominent when executing complex AI workloads. Existing technologies have proposed methods that rely on white-box information or require transparent access to application code (such as neural network parameter counting and character feature computation) to determine the optimal frequency, thereby performing DVFS (Dynamic Voltage and Frequency Scaling) modifications. However, the applicability of this approach is typically limited by limited data access permissions, increasing system overhead and impacting system performance, and also limiting its applicability. Furthermore, black-box DVFS methods have been proposed. While black-box DVFS does not require access to or modification of application-level code and utilizes monitorable system-level data for frequency adjustment, relying solely on monitorable system-level data leads to frequency adjustment lag, low calibration accuracy, and an inability to reduce chip power consumption.
[0003] In summary, existing technologies for computing chips, which rely on frequency adjustment to maintain a balance between performance and energy consumption under different workloads, suffer from problems such as low tuning accuracy and high energy consumption. Summary of the Invention
[0004] This application provides an adaptive energy consumption control method, system, device, and medium based on computing chips to solve the problems of low adjustment accuracy and high energy consumption in the prior art when computing chips adjust frequency to maintain a balance between performance and energy consumption under different workloads.
[0005] According to one aspect of the embodiments of this application, this application provides an adaptive energy consumption control method based on a computing chip. The method includes: constructing an optimal predictive regression model based on multi-channel hardware status indicators of the computing chip at different frequencies to predict the performance data of the computing chip at different frequencies; obtaining the data to be predicted of the computing chip under the current workload; predicting the data to be predicted based on the optimal predictive regression model to obtain a target optimal frequency that meets preset performance indicators, wherein the target optimal frequency corresponds to optimal energy consumption; and adaptively adjusting the operating frequency of the computing chip under the current workload based on the target optimal frequency.
[0006] Optionally, before constructing the optimal prediction regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies, the method further includes: monitoring the hardware status of the computing chip, obtaining the multi-channel hardware status indicators of the computing chip at different frequencies, wherein the multi-channel hardware status indicators include the performance indicators of the computing chip running under different workloads at different frequencies and the GPU status indicators; and aligning the performance indicators of the computing chip running under each server at different frequencies with the GPU status indicators based on timestamps to construct multiple feature vectors to be trained.
[0007] Optionally, the performance metrics include memory utilization, the GPU metrics include GPU utilization, and the construction of the optimal predictive regression model based on the multi-channel hardware status metrics of the computing chip at different frequencies includes: constructing a regression model to be trained using a recurrent neural network; training the regression model to be trained based on the constructed multiple feature vectors to be trained, predicting a performance data sequence with continuous frequency values, wherein the feature vectors to be trained include the original values and relative changes of memory utilization and GPU utilization at different frequencies; and based on the performance data sequence with continuous frequency values, obtaining the frequency corresponding to the performance data satisfying the preset performance metric conditions as the output frequency of the model training, so as to construct the optimal predictive regression model.
[0008] Optionally, after obtaining the frequency corresponding to the performance data satisfying the preset performance index condition as the output frequency of the model training based on the performance data sequence of the continuous frequency values to construct the optimal prediction regression model, the method further includes: constructing an optimization objective of the loss function, wherein the optimization objective is to minimize the difference between the prediction frequency and the minimum actual frequency satisfying the preset performance index condition; and optimizing the output frequency of the model training through the loss function based on the optimization objective.
[0009] Optionally, the step of acquiring the data to be predicted for the computing chip under the current workload, and predicting the data to be predicted based on the optimal prediction regression model to obtain the target optimal frequency that meets the preset performance index conditions, includes: acquiring the data to be predicted for the computing chip under the current workload, wherein the data to be predicted includes the original values and relative changes of the memory utilization and GPU utilization sampled by the computing chip at different frequencies under the current workload; using the original values and relative changes of the memory utilization and GPU utilization sampled by the computing chip at different frequencies under the current workload as input parameters, and predicting through the optimal prediction regression model to output the target optimal frequency corresponding to the performance data of the computing chip under the current workload meeting the preset performance index conditions.
[0010] Optionally, after obtaining the data to be predicted for the computing chip under the current workload, the method further includes: based on a preset triggering mechanism, comparing the historical memory utilization and / or GPU utilization of the computing chip with the memory utilization and / or GPU utilization of the computing chip under the current workload, and determining whether any of the utilization changes exceeds a preset utilization change threshold; if at least one utilization change exceeds the preset utilization change threshold, then triggering a frequency update.
[0011] Optionally, before obtaining the data to be predicted for the computing chip under the current workload, predicting the data to be predicted based on the optimal prediction regression model, and obtaining the target optimal frequency that meets the preset performance index conditions, the method further includes: obtaining temperature data and power consumption data of the computing chip at different frequencies; constructing an optimal prediction regression model based on the temperature data, power consumption data, and the multi-channel hardware status index of the computing chip at different frequencies to predict the performance data of the computing chip at different frequencies.
[0012] According to another aspect of the embodiments of this application, this application provides an adaptive energy consumption control system based on a computing chip. The system includes: a model building module, used to build an optimal predictive regression model based on multi-channel hardware status indicators of the computing chip at different frequencies, so as to predict the performance data of the computing chip at different frequencies; a prediction module, used to obtain the data to be predicted of the computing chip under the current workload, predict the data to be predicted based on the optimal predictive regression model, and obtain a target optimal frequency that meets the preset performance index conditions, wherein the target optimal frequency corresponds to optimal energy consumption; and an adjustment module, used to adaptively adjust the operating frequency of the computing chip under the current workload based on the target optimal frequency.
[0013] According to another aspect of the embodiments of this application, this application provides a computer device, including: a processor, a memory, and a network interface. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory through the network interface, and the processor executes the machine-readable instructions to perform the steps of the adaptive energy consumption control method based on computing power chips as described above.
[0014] According to another aspect of the embodiments of this application, this application provides a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the steps of the adaptive power consumption control method based on computing chips.
[0015] Compared with related technologies, the technical solutions provided in this application have the following advantages: This application provides an adaptive energy consumption control method based on computing chips, applicable to energy consumption optimization of computing chips under different workload scenarios. It constructs an optimal predictive regression model by pre-analyzing multi-channel hardware status indicators of the computing chip at various frequencies under different workloads. Then, it predicts the data to be predicted for the computing chip under the current workload to determine the target optimal frequency. The prediction process can predict performance trends at different frequencies, thus accurately selecting the target optimal frequency that meets performance requirements and minimizes chip energy consumption. This ensures that the selection of the target optimal frequency fully reflects the balance between the computing demands of the workload and the available computing resources of the computing chip. Frequency adjustment of the computing chip is based on the target optimal frequency, ensuring chip performance while reducing energy consumption. Furthermore, by analyzing the multi-channel hardware status indicators of the computing chip at different frequencies under workloads, the chip's operating frequency can be dynamically adjusted according to the workload. This process does not require access to or modification of application code, greatly improving deployment flexibility and applicability. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an optional adaptive energy consumption control method based on a computing chip, according to an embodiment of this application. Figure 2 This is a flowchart illustrating an optional step S102 provided according to an embodiment of this application; Figure 3 This is an overall architecture diagram of an optional adaptive energy consumption control system based on a computing chip, according to an embodiment of this application. Figure 4 This is a flowchart illustrating an optional step S104 provided according to an embodiment of this application; Figure 5 This is a schematic diagram of an optional adaptive energy consumption control system module based on a computing chip, according to an embodiment of this application. Figure 6 This is a schematic diagram of an optional computer device structure provided for an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] To address the problems mentioned in the background art, according to one aspect of the embodiments of this application, an embodiment of an adaptive energy consumption control method based on a computing chip is provided.
[0021] It should be noted that the adaptive energy consumption control method based on computing power chips provided in this application embodiment is generally executed by a server and / or terminal device. Correspondingly, the adaptive energy consumption control system based on computing power chips is generally set in the server and / or terminal device.
[0022] like Figure 1 As shown, Figure 1 This is a flowchart illustrating an adaptive energy consumption control method based on a computing chip, provided in an embodiment of the present invention. Taking the adaptive energy consumption control method based on a computing chip being executed by a server as an example, the method includes the following steps: Step S102: Construct an optimal predictive regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies to predict the performance data of the computing chip at different frequencies.
[0023] In this embodiment, the adaptive energy consumption control method based on computing chips is applicable to scenarios where computing chips adjust their frequency to meet performance requirements and optimize energy consumption under different workloads, including AI (Artificial Intelligence) servers, high-performance computing, deep neural networks, large language model training, and inference scenarios, optimizing the energy efficiency of computing chips while maintaining computing performance within an acceptable range.
[0024] In this embodiment, the black-box DVFS (Dynamic Voltage and Frequency Scaling) method can be used to collect multi-channel hardware status indicators of the computing chip at different frequencies in real time. Black-box DVFS is a dynamic voltage and frequency adjustment technology that does not rely on explicit load monitoring or prediction models. It is characterized by the abstraction of the underlying hardware status, reducing the software layer's dependence on hardware details. It employs preset strategies or heuristic algorithms to indirectly infer the load status based on system behavior patterns, thereby dynamically adjusting the voltage and frequency.
[0025] The multi-channel hardware status indicators may include, but are not limited to: chip computing unit utilization, memory utilization, computing frequency, power consumption, temperature, and bandwidth utilization. Chip computing unit utilization can be GPU (Graphics Processing Unit) utilization. These multi-channel hardware status indicators can be used to evaluate the performance of computing chips. During the model training phase, the aforementioned multi-channel hardware status indicators of the computing chip at different frequencies refer to historical data of the computing chip operating under different workloads, used to construct model training samples for model training.
[0026] As one possible implementation, the process of acquiring multi-channel hardware status indicators of a computing chip at different frequencies based on black-box DVFS can include: signal acquisition: acquiring multiple signals from within the computing chip; signal processing: weighting the acquired signals to obtain a load signal to reflect the degree of influence of different signals on the load; load prediction: sending the load signal to the EMA (Exponential Moving Average) module, executing the exponential moving average algorithm, and using the EMA module to predict the load demand for the next time period based on historical load data and the current load signal; frequency and voltage adjustment: comparing the results obtained by the EMA module with preset threshold values. If the predicted performance demand is higher than the upper limit, a request is made to increase the frequency and voltage; conversely, if the predicted performance demand is lower than the lower limit, a request is made to decrease the frequency and voltage.
[0027] Furthermore, after collecting the required number of computing chips' multi-channel hardware status indicators at different frequencies, a Recurrent Neural Network (RNN) can be used for modeling to learn the computing performance trends under different frequency settings and capture the correspondence between frequency and performance data. During training, the main focus is on constructing a mapping relationship between power consumption, computing power, and frequency to extract key features, such as performance loss trends when the frequency decreases, computing bottleneck characteristics (memory-constrained, computationally limited, etc.), and power consumption characteristics under different load modes. Through continuous model training, when the required number of training iterations or model convergence is met, the corresponding model is taken as the optimal predictive regression model. Based on the optimal predictive regression model, the data to be predicted for the computing chips under different workloads can be predicted. In the process of predicting the performance data of computing chips at different frequencies using the optimal predictive regression model, there may be one or more frequencies whose performance data meets the preset performance index conditions. These one or more frequency points can be selected as the optimal frequency.
[0028] Step S104: Obtain the data to be predicted for the computing chip under the current workload, predict the data to be predicted based on the optimal prediction regression model, and obtain the target optimal frequency under the preset performance index conditions. The target optimal frequency corresponds to the optimal energy consumption.
[0029] In this embodiment, the data to be predicted for the computing chip under the current workload can also be obtained through black-box DVFS. This data includes, but is not limited to, GPU utilization, memory utilization, computing frequency, power consumption, temperature, and bandwidth utilization. Then, a trained optimal prediction regression model is used to predict the data sampled at different frequency points based on the current workload state. During the prediction process, the frequency corresponding to a preset performance metric can be selected as the target optimal frequency output. The preset performance metric may include: compared to the performance at the maximum frequency, the performance at the current frequency is ≥90% of the maximum performance at the maximum frequency. The target optimal frequency may be the minimum frequency within the frequency range predicted by the model under the preset performance metric, i.e., ensuring performance requirements and also the frequency at which the computing chip achieves the lowest energy consumption under the current workload.
[0030] In some examples, the methods for obtaining sample data for performance evaluation include: for workload performance evaluation, chip performance can be represented by GFLOPS (floating-point operations per second). Especially for AI deep learning, evaluating performance using GFLOPS can measure the performance of each AI benchmark at different execution stages. This is obtained by using the interface in PyTorch's `thop` library to print the computational cost and time for each layer of the deep network; the ratio is the calculated GFLOPS. Forward and backward propagation in AI model training often exhibit significant performance differences; therefore, performance needs to be measured at the granularity of forward and backward operations for each layer.
[0031] Step S106: Adaptively adjust the operating frequency of the computing chip under the current workload based on the target optimal frequency.
[0032] In this embodiment, based on the DVFS control method, the operating frequency of the computing chip can be dynamically and adaptively adjusted according to the target optimal frequency predicted in real time by the model. When the operating frequency of the computing chip under the current workload is adjusted to the target optimal frequency, it can meet the optimization goals of minimum power consumption and maximum energy efficiency, thereby reducing unnecessary energy loss. At the same time, the computing performance of the computing chip is guaranteed, so that the performance loss does not exceed the preset performance index conditions. In addition, the adaptive frequency adjustment strategy can intelligently switch frequencies under different workload scenarios, rather than operating at a fixed frequency under various workload scenarios, thereby optimizing the balance between power consumption and computing power.
[0033] In this embodiment of the invention, multi-channel hardware status indicators are obtained through a black-box DVFS method without modifying the upper-layer application code. This method is applicable to various artificial intelligence computing loads, ensuring system transparency and low overhead. The multi-channel hardware status indicators of the computing chip at various frequencies under workloads are pre-analyzed, and an optimal predictive regression model is constructed based on an RNN model. Then, the data to be predicted for the computing chip under the current workload is predicted to determine the target optimal frequency. The prediction process can predict performance trends at different frequencies, thereby accurately selecting the target optimal frequency that meets performance requirements and minimizes chip power consumption. This ensures that the selection of the target optimal frequency fully reflects the balance between the computing requirements of the workload and the available computing resources of the computing chip. Based on the target optimal frequency, the operating frequency of the computing chip is dynamically adjusted, ensuring chip performance while reducing power consumption, greatly improving deployment flexibility and applicability.
[0034] In some optional embodiments, prior to step S102 above, the method further includes: Hardware status monitoring of computing chips is performed to obtain multi-channel hardware status indicators of computing chips at different frequencies. The multi-channel hardware status indicators include performance indicators of computing chips running under different workloads at different frequencies and GPU status indicators. Based on timestamps, the performance metrics of the computing chip running at different frequencies on each server are aligned with the GPU status metrics to construct multiple feature vectors to be trained.
[0035] In this embodiment, before the offline modeling process, it is first necessary to collect performance metrics and GPU status metrics of the computing chip running at different frequencies on different server benchmark tests. The selected benchmark tests include compute-intensive, memory-intensive, and hybrid intensive models. In these benchmark tests, performance metrics and corresponding GPU status metrics are recorded, and timestamp alignment is used to obtain performance data for each model unit, capturing performance metrics and GPU status metrics under different frequency settings. Timestamp alignment can be ensured based on a time synchronization protocol, which avoids data misalignment. For example, if timestamps are not aligned, the model may mistakenly believe that high GPU utilization at a certain moment is caused by a low frequency. The performance metrics and GPU status metrics of each model unit constitute an analysis sample for the model, thereby constructing multiple feature vectors to be trained.
[0036] Furthermore, the hardware status of the computing chip can be monitored using black-box DVFS. During monitoring, multi-channel hardware status indicators include hardware features and real-time features. Hardware features are obtained through interfaces provided in standard libraries, such as the NVML library for NVIDIA GPUs. Real-time features include graphics processing frequency, GPU utilization, memory utilization, and power consumption.
[0037] In this embodiment, the aforementioned GPU metrics include GPU utilization and memory utilization. Since GPU utilization and memory utilization are more effective in representing the use of hardware resources, this embodiment uses NVML as the main tool for reading GPU hardware counters and uses its command-line tool nvidia-smi to adjust the GPU frequency and collect the required metrics, including GPU utilization and memory utilization.
[0038] In this embodiment, by monitoring the hardware status of the computing chip and constructing feature vectors, high-quality data input can be provided for subsequent models, thereby improving model performance and prediction accuracy. Aligning performance metrics with GPU status metrics based on timestamps can avoid data misalignment caused by time deviations. Combining performance metrics with GPU status metrics ensures that the constructed multiple feature vectors to be trained contain multi-dimensional information, which can more comprehensively reflect the operating status of the computing chip, providing richer input to the model and improving its expressive power.
[0039] In some alternative embodiments, combined with Figure 2 As shown, step S102 above includes: S1021, Construct a regression model to be trained using a recurrent neural network; S1022, The regression model to be trained is trained based on the constructed multiple feature vectors to be trained, and a performance data sequence with continuous frequency values is predicted. The feature vectors to be trained include the original values and relative changes of memory utilization and GPU utilization at different frequencies. S1023, Based on the performance data sequence of the continuous frequency values, obtain the frequency corresponding to the performance data satisfying the preset performance index conditions as the output frequency for model training, so as to construct the optimal prediction regression model.
[0040] Combination Figure 3As shown, during offline modeling, input features need to be collected. For the input features, Freq1, Freq2, Freq3, ... represent frequency points. At each frequency point, data representing GPU utilization (GPU_util) and data representing memory utilization (Mem_util) are collected. The modeling process uses RNN as the modeling basis and frequency as the label. During model training, frequency optimization can also be performed through the loss function so that the optimal frequency of the training output can meet the performance requirements while minimizing energy consumption.
[0041] In some possible implementations, because the frequency range is between the default frequency and the maximum frequency under idle conditions, and the gradient is collected from low to high frequencies, the sequences of GPU utilization and memory utilization at different frequencies are ordered and have cross-frequency dependencies. For example... Figure 3 As shown, the load only begins to saturate and reach the bandwidth bottleneck as the frequency increases. The performance range corresponding to the bandwidth bottleneck is the optimizable frequency range, that is, the performance portion above the optimal frequency. This dynamic behavior is a sequential characteristic; therefore, the method provided in this embodiment is applicable to RNN models, for which a regression model to be trained can be constructed using a recurrent neural network.
[0042] Furthermore, combined Figure 3As shown, the input features of the regression model to be trained, GPU utilization and memory utilization, are divided into two categories: raw values: including GPU utilization and memory utilization corresponding to each frequency point Freqn, reflecting the resource consumption of the application at each frequency point. For example, the raw values of GPU utilization and memory utilization corresponding to frequency point Freq1 are 50% and 30%, respectively; the raw values of GPU utilization and memory utilization corresponding to frequency point Freq2 are 60% and 40%, respectively; and the raw values of GPU utilization and memory utilization corresponding to frequency point Freq3 are 66% and 30%, respectively. Relative Change Value: This represents the percentage change in GPU and memory utilization at each frequency point Freqn relative to the maximum frequency. It indicates the trend of resource utilization increase or decrease with frequency changes. For example, if the original GPU and memory utilization values at the maximum frequency of the computing chip are 90% and 95% respectively at 1GHz, and the original GPU and memory utilization values at frequency point Freq1 are 50% and 30% respectively, then the relative change value for GPU utilization is (50%-90%) / 90%=-44%, and the relative change value for memory utilization is (30%-95%) / 95%=-68%. These inputs together constitute a multi-frequency utilization feature sequence, essentially a time series structure in the frequency dimension. For the labels required for offline modeling, the optimal frequency point is used. If one or more frequencies meet the preset performance indicators, they can be selected as the optimal output frequency for the model. The optimal frequency for model training is the smallest frequency within the interval, i.e., the frequency that achieves the lowest power consumption while ensuring performance requirements.
[0043] Furthermore, the regression model to be trained uses the hardware state sequence at different frequencies to predict which frequency the load is suitable to run at. That is, the frequency optimization function is obtained by RNN modeling regression to find the frequency corresponding to the lowest power consumption, as shown in equation (1) below.
[0044] (1) In equation (1), f Indicates frequency; P(f) Indicates power consumption with respect to frequency f The function represents the computing chip's frequency. f Power consumption during runtime; Perf( f This represents the performance as a function of frequency, indicating the chip's performance at a given frequency. f Performance metrics during runtime (including FLOPS, throughput, latency, etc.) typically improve with increasing frequency; α represents a coefficient indicating the performance metric condition, representing the ratio of the allowable lower limit of performance to the maximum performance; Perf max This indicates the maximum performance value.
[0045] Based on the above equation (1), it can be seen that the model learns an implicit mapping from the hardware resource response trend of the computing chip → performance satisfaction → optimal frequency, as shown in the following equation (2): (2) In equation (2), the input dataset X consists of a series of feature vectors to be trained. x f Composition, each vector x f Corresponding to a frequency f The following hardware status indicators, x f Including computing chips in frequency f The original values of memory utilization and GPU utilization, and their relative changes, are shown below. f The value range starts from the minimum frequency. f min up to maximum frequency f max Output f ∗ This represents the optimal frequency, meaning the lowest frequency selected while still meeting performance requirements; Perf f Represents frequency f Performance metrics under; Perf f max Represents frequency f max The maximum performance is achieved under the following conditions; where the performance metric is: Perf f ≥0.9Perf f max α=0.9, meaning the performance reaches at least 90% of the maximum performance; argmin f This means selecting the minimum frequency among all frequencies that meet the performance requirements. f .
[0046] Furthermore, in the mechanism of each layer of the regression model to be trained, the input layer uses the feature vectors to be trained, sampled sequentially from low to high frequency, as input. Each time step in the sequence of feature vectors to be trained represents the state at a frequency point. The input at each time step includes: GPU utilization and memory utilization. GPU utilization can refer to the consumption of core computing resources (GPU utilization); memory utilization can refer to memory bandwidth pressure (Memory utilization), including the original value and the relative change value, to reveal the potential "response slope" and resource saturation point, thereby enhancing the model's ability to perceive changes in nonlinear behavior. This layer transforms the hardware behavior sequence in discrete frequency space into a time series tensor acceptable to RNN, preserving the sequentiality of the physical change process.
[0047] Hidden state propagation layer: Consists of multiple identical cyclic units arranged in frequency order. Each unit receives the input features of the current frequency point and the hidden state of the previous frequency point, and executes equation (3): h t =σ( W·x t + U·h t-1 + b (3) in, h t Indicates the current time step t The hidden state is a vector representing the state at time step [0, 1]. t At that time, the state of the hidden layer of the model; σ represents the activation function, including the sigmoid function, tanh function, etc.; W This represents the input weight matrix, used to map the input to the hidden state space; x t Indicates the current time step t The input vector; U This represents the hidden state weight matrix, used to weight the hidden state from the previous time step. h t-1 Mapped to the current hidden state space; b This represents the bias vector, used to adjust the input to the activation function, increasing the model's flexibility. Here, W, U, and... b The quantity is known.
[0048] Each hidden state h t In effect, it encodes the dynamic dependency between historical resource responses and the current state at the current frequency, forming a global memory of the overall frequency response trend through cyclical propagation. This mechanism does not assume a fixed response function, but rather allows the network to automatically learn which frequency bands are sensitive to resource changes and at which performance converges. Therefore, this layer has the ability to model "saturation points" and "inflection points of nonlinear responses."
[0049] Final Hidden State Reading Layer: In this layer, the last hidden state hT of the RNN is treated as a compressed representation of the behavior of the entire frequency sequence, that is, extracting the overall performance resource response trend from low frequency to high frequency. This vector is not just a numerical transformation, but encodes cross-frequency behavior patterns such as performance change intervals and bandwidth bottleneck frequency bands in the sequence through time structure. Regression Output Layer: This layer performs linear regression mapping on the final hidden state, outputting a performance data sequence of continuous frequency values, representing the minimum fit frequency of the workload while maintaining performance ≥90% of the maximum performance, i.e., the energy-efficient point. In other words, the frequency corresponding to the performance data meeting the preset performance index conditions is used as the output frequency for model training. This layer learns the implicit objective function approximation form from the performance data sequence trend to the optimal point, rather than explicitly modeling the polynomial relationship chain of "frequency → power consumption → performance", thereby enhancing the model's generalization ability. Based on the above method, the optimal predictive regression model will be obtained through training, and the output result of the training will be the above-mentioned output frequency.
[0050] In this embodiment, a regression model to be trained is constructed using an RNN. The input vector integrates the original values and relative changes of the memory utilization and GPU utilization of the computing chip at different frequencies. The time-series modeling capability of the RNN is used to capture the dynamic correlation between hardware state and frequency, thereby predicting the performance data sequence corresponding to continuous frequency values. During model training, frequencies that meet preset performance index conditions are selected as output targets based on the predicted performance data sequence. Through iterative optimization, the model accurately fits the relationship between the optimal frequency and hardware state, and finally generates an optimal model that can efficiently output the optimal frequency configuration based on real-time hardware data, significantly improving the energy efficiency and performance stability of the computing chip under dynamic load.
[0051] In some optional embodiments, after step S102, the method further includes: The optimization objective of the loss function is to minimize the difference between the prediction frequency and the minimum actual frequency that satisfies the preset performance index condition. Based on the optimization objective, the output frequency of the model training is optimized using a loss function.
[0052] In this embodiment, to improve the accuracy of frequency prediction, an optimization objective can be set for the frequency. This objective can be: minimizing the difference between the predicted frequency and the minimum actual frequency required to meet performance requirements. Based on the optimization objective, the output frequency of the model training is optimized using a loss function. This loss function can include, but is not limited to, mean squared error (MSE) loss function, mean absolute error (MAE) loss function, Huber Loss, and bounding loss.
[0053] In some alternative embodiments, combined with Figure 4 As shown, step S104 above includes: S1041. Obtain the data to be predicted from the computing power chip under the current workload, wherein the data to be predicted includes the original values and relative changes of the memory utilization and the GPU utilization sampled by the computing power chip at different frequencies under the current workload. S1042. Using the original values and relative changes of the memory utilization and GPU utilization sampled by the computing chip at different frequencies under the current workload as input parameters, the optimal prediction regression model is used to predict and output the target optimal frequency corresponding to the performance data of the computing chip under the current workload meeting the preset performance index conditions.
[0054] In this embodiment, combined with Figure 3 As shown, the real-time GPU utilization (Gpu Util.) and memory utilization (Mem Util.) of the computing chip under the current workload can be obtained by sampling with a counter, and the original values and relative changes are used as the data to be predicted and input into the trained model. It should be noted that the frequency corresponding to the data to be predicted must be consistent with the frequency used during RNN training to ensure data consistency in frequency and comparability.
[0055] Furthermore, during the decision-making phase, the optimal predictive regression model outputs the target optimal frequency at which the performance data of the computing chip under the current workload meets the preset performance index conditions, based on the original values and relative changes of the input GPU utilization and memory utilization. To reduce data collection overhead, this embodiment can use only the memory utilization and GPU utilization at three frequency points for prediction.
[0056] In this embodiment, the original values and relative changes of memory utilization and GPU utilization sampled by the computing chip at different frequencies under the current workload are used as input parameters of the optimal prediction regression model. This enables the prediction of the target optimal frequency at which the performance data of the computing chip under the current workload meets the preset performance index conditions. This approach can both ensure performance requirements and find the target optimal frequency corresponding to the lowest power consumption, thereby adjusting the operating frequency of the computing chip to the target optimal frequency, thus ensuring performance while reducing power consumption.
[0057] In some optional embodiments, after step S1041, the method further includes: Based on a preset triggering mechanism, the historical memory utilization and / or GPU utilization of the computing chip are compared with the memory utilization and / or GPU utilization of the computing chip under the current workload to determine whether the utilization change value of any one of them exceeds the preset utilization change threshold. If at least one utilization rate change value exceeds the preset utilization rate change threshold, a frequency update is triggered.
[0058] In this embodiment, based on the target optimal frequency output by the optimal predictive regression model, the system can further perform frequency updates. In this embodiment, frequency updates may only be needed when one or more indicators of the workload change significantly, including when the change in memory utilization of the computing chip under the current workload exceeds a preset utilization change threshold, such as... Figure 3 In the case of ∆(Mem Util.)>Threshold), or if the change in GPU utilization of the computing chip under the current workload compared to the historical GPU utilization used during model training exceeds a preset utilization change threshold, such as... Figure 3 In this context, either ∆(GPU Util.) > Threshold; or the change in utilization between both GPU utilization and the historical utilization used during model training exceeds a preset utilization change threshold, i.e., simultaneously satisfying ∆(Mem Util.) > Threshold and ∆(GPU Util.) > Threshold. For example, a frequency update will only be performed when the change in GPU utilization of the computing chip relative to the GPU utilization used during model training exceeds a 20% utilization change threshold A under the current workload.
[0059] In this embodiment, the above-described mechanism ensures the efficiency and targeted nature of the optimization process. Specifically, historical memory utilization and historical GPU utilization can be compared by averaging these values to reduce computational load. In this embodiment, the setting of a trigger mechanism ensures the efficiency and targeted nature of the optimization process.
[0060] In some optional embodiments, prior to step S104, the method further includes: Acquire temperature and power consumption data of the computing chip at different frequencies; An optimal predictive regression model is constructed based on the temperature data and power consumption data of the computing chip at different frequencies, as well as the multi-channel hardware status indicators, to predict the performance data of the computing chip at different frequencies.
[0061] In some examples, temperature and power consumption feature data can be introduced into the original RNN model by adding temperature sensing and real-time power consumption monitoring. The optimal prediction regression model mentioned above can be constructed by combining the multi-channel hardware status indicators of the computing chip. Based on this, the performance data of the computing chip at different frequencies can be predicted. By introducing temperature and power consumption data for model training and prediction, the safety and stability of the system under extreme load or high temperature environment can be further improved.
[0062] It is important to know that when temperature and power consumption data are incorporated into the training of the RNN model, the data to be predicted for the computing chip under the current workload can also include temperature and power consumption data. Based on this, predictions can be made that take into account extreme load and high temperature environments in performance predictions. By combining extreme load and high temperature environments, the target optimal frequency can be selected, further improving the safety and stability of the system under extreme load or high temperature environments.
[0063] According to another aspect of the embodiments of this application, such as Figure 5 As shown, corresponding to the adaptive energy consumption control method based on computing chip in the above embodiments, this embodiment provides an adaptive energy consumption control system based on computing chip, the system comprising: The model building module 501 is used to build an optimal predictive regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies, so as to predict the performance data of the computing chip at different frequencies. Prediction module 503 is used to acquire the data to be predicted of the computing chip under the current workload, predict the data to be predicted based on the optimal prediction regression model, and obtain the target optimal frequency under the condition of satisfying the preset performance index, wherein the target optimal frequency corresponds to the optimal energy consumption. The adjustment module 505 is used to adaptively adjust the operating frequency of the computing chip under the current workload based on the target optimal frequency.
[0064] It should be noted that in this embodiment, the model building module 501 can be used to execute step S102 in this application embodiment, the prediction module 503 in this embodiment can be used to execute step S104 in this application embodiment, and the adjustment module 505 in this embodiment can be used to execute step S106 in this application embodiment.
[0065] In some optional embodiments, the system further includes: a data acquisition module for monitoring the hardware status of the computing chip and acquiring the multi-channel hardware status indicators of the computing chip at different frequencies, the multi-channel hardware status indicators including the performance indicators of the computing chip running under different workloads at different frequencies and the GPU status indicators; and a data processing module for aligning the performance indicators of the computing chip running under each server at different frequencies with the GPU status indicators based on timestamps to construct multiple feature vectors to be trained.
[0066] In some optional embodiments, the model building module 501 includes: a model building submodule, used to build a regression model to be trained through a recurrent neural network; a model training submodule, used to train the regression model to be trained based on multiple constructed feature vectors to be trained, predicting a performance data sequence with continuous frequency values, wherein the feature vectors to be trained include the original values and relative changes of memory utilization and GPU utilization at different frequencies; and a frequency output submodule, used to obtain the frequency corresponding to the performance data satisfying the preset performance index conditions as the output frequency of the model training based on the performance data sequence with continuous frequency values, so as to construct the optimal predictive regression model.
[0067] In some optional embodiments, the system further includes: an optimization objective construction module for constructing an optimization objective for the loss function, wherein the optimization objective is to minimize the difference between the prediction frequency and the minimum actual frequency that satisfies the preset performance index condition; and an optimization module for optimizing the output frequency of the model training using the loss function based on the optimization objective.
[0068] In some optional embodiments, the prediction module 503 includes: a data acquisition submodule for acquiring the data to be predicted of the computing chip under the current workload, wherein the data to be predicted includes the original values and relative changes of the memory utilization and GPU utilization sampled at different frequencies under the current workload; and a model prediction submodule for using the original values and relative changes of the memory utilization and GPU utilization sampled at different frequencies under the current workload as input parameters, and performing prediction through the optimal prediction regression model to output the target optimal frequency corresponding to the performance data of the computing chip under the current workload satisfying the preset performance index conditions.
[0069] In some optional embodiments, the system further includes: a judgment submodule, configured to, based on a preset triggering mechanism, compare the historical memory utilization and / or GPU utilization of the computing chip with the memory utilization and / or GPU utilization of the computing chip under the current workload, and determine whether any of the utilization changes exceeds a preset utilization change threshold; and a triggering submodule, configured to, if at least one utilization change exceeds the preset utilization change threshold, trigger a frequency update.
[0070] In some optional embodiments, the system further includes: a data acquisition module, further configured to acquire temperature data and power consumption data of the computing chip at different frequencies; and a model building module, further configured to build an optimal predictive regression model based on the temperature data, power consumption data and multi-channel hardware status indicators of the computing chip at different frequencies, in order to predict the performance data of the computing chip at different frequencies.
[0071] It should be noted that the examples and application scenarios implemented by the above modules, sub-modules, and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules and sub-modules, as part of the system, can run in the hardware environment of the adaptive energy consumption control system based on computing chips, and can be implemented through software or hardware.
[0072] According to another aspect of the embodiments of this application, this application provides a computer device, such as... Figure 6 As shown, it includes a memory 601, a processor 603, a communication interface 605, and a communication bus 607. The memory 601 stores a computer program that can run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 803 executes the computer program, it implements the steps of the above-mentioned adaptive energy consumption control method based on computing power chip.
[0073] The memory and processor in the aforementioned computer equipment communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0074] The aforementioned memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0075] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0076] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the adaptive power consumption control method based on a computing chip in any of the above embodiments.
[0077] Optionally, in this embodiment, the computer-readable medium is configured to store program code for the processor to execute the steps of the adaptive power consumption control method based on computing chip described in the above embodiments, wherein the steps of the adaptive power consumption control method based on computing chip specifically include: S102. Construct an optimal predictive regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies to predict the performance data of the computing chip at different frequencies. S104. Obtain the data to be predicted by the computing chip under the current workload, predict the data to be predicted based on the optimal prediction regression model, and obtain the target optimal frequency under the preset performance index conditions. The target optimal frequency corresponds to the optimal energy consumption. S106. Adaptively adjust the operating frequency of the computing chip under the current workload based on the target optimal frequency.
[0078] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here. Furthermore, in the specific implementation of this application embodiment, the above embodiments can be consulted, and corresponding technical effects can be achieved.
[0079] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof. For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0080] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0081] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0082] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0083] It should be noted that, in this document, relational terms such as "first," "second," etc., are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprise," "include," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprises a…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0084] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An adaptive energy consumption control method based on a computing chip, characterized in that, The method includes: An optimal predictive regression model is constructed based on the multi-channel hardware status indicators of computing chips at different frequencies to predict the performance data of computing chips at different frequencies. Obtain the data to be predicted from the computing chip under the current workload, predict the data to be predicted based on the optimal prediction regression model, and obtain the target optimal frequency that meets the preset performance index conditions. The target optimal frequency corresponds to the optimal energy consumption. The operating frequency of the computing chip under the current workload is adaptively adjusted based on the target optimal frequency.
2. The adaptive energy consumption control method based on a computing chip according to claim 1, characterized in that, Before constructing the optimal predictive regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies, the method further includes: Hardware status monitoring of computing chips is performed to obtain multi-channel hardware status indicators of computing chips at different frequencies. The multi-channel hardware status indicators include performance indicators of computing chips running under different workloads at different frequencies and GPU status indicators. Based on timestamps, the performance metrics of the computing chip running at different frequencies on each server are aligned with the GPU status metrics to construct multiple feature vectors to be trained.
3. The adaptive energy consumption control method based on a computing chip according to claim 2, characterized in that, The performance metrics include memory utilization, the GPU metrics include GPU utilization, and the construction of the optimal prediction regression model based on multi-channel hardware status metrics of the computing chip at different frequencies includes: A regression model to be trained is constructed using a recurrent neural network; The regression model to be trained is trained based on the multiple feature vectors to be trained obtained, and a performance data sequence with continuous frequency values is predicted. The feature vectors to be trained include the original values and relative changes of memory utilization and GPU utilization at different frequencies. Based on the performance data sequence of the continuous frequency values, the frequency corresponding to the performance data satisfying the preset performance index conditions is obtained as the output frequency for model training, so as to construct the optimal prediction regression model.
4. The adaptive energy consumption control method based on a computing chip according to claim 3, characterized in that, After obtaining the frequency corresponding to the performance data satisfying the preset performance index condition as the output frequency for model training from the performance data sequence based on the continuous frequency values, in order to construct the optimal predictive regression model, the method further includes: The optimization objective of the loss function is to minimize the difference between the prediction frequency and the minimum actual frequency that satisfies the preset performance index condition. Based on the optimization objective, the output frequency of the model training is optimized using a loss function.
5. The adaptive energy consumption control method based on a computing chip according to claim 3, characterized in that, The step of acquiring the data to be predicted from the computing chip under the current workload, predicting the data to be predicted based on the optimal prediction regression model, and obtaining the target optimal frequency that meets the preset performance index conditions includes: Obtain the data to be predicted for the computing chip under the current workload, including the original values and relative changes of the memory utilization and the GPU utilization sampled by the computing chip at different frequencies under the current workload. The original values and relative changes of the memory utilization and GPU utilization sampled by the computing chip at different frequencies under the current workload are used as input parameters. The optimal prediction regression model is used to predict and output the target optimal frequency corresponding to the performance data of the computing chip under the current workload meeting the preset performance index conditions.
6. The adaptive energy consumption control method based on a computing chip according to claim 5, characterized in that, After acquiring the data to be predicted from the computing power chip under the current workload, the method further includes: Based on a preset triggering mechanism, the historical memory utilization and / or GPU utilization of the computing chip are compared with the memory utilization and / or GPU utilization of the computing chip under the current workload to determine whether the utilization change value of any one of them exceeds the preset utilization change threshold. If at least one utilization rate change value exceeds the preset utilization rate change threshold, a frequency update is triggered.
7. The adaptive energy consumption control method based on a computing chip according to any one of claims 1 to 6, characterized in that, Before obtaining the data to be predicted from the computing chip under the current workload, predicting the data to be predicted based on the optimal prediction regression model, and obtaining the target optimal frequency that meets the preset performance index conditions, the method further includes: Acquire temperature and power consumption data of the computing chip at different frequencies; An optimal predictive regression model is constructed based on the temperature data and power consumption data of the computing chip at different frequencies, as well as the multi-channel hardware status indicators, to predict the performance data of the computing chip at different frequencies.
8. An adaptive energy consumption control system based on a computing chip, characterized in that, The system includes: The model building module is used to build the optimal predictive regression model based on the multi-channel hardware status indicators of the computing chip at different frequencies, so as to predict the performance data of the computing chip at different frequencies. The prediction module is used to acquire the data to be predicted of the computing chip under the current workload, predict the data to be predicted based on the optimal prediction regression model, and obtain the target optimal frequency under the condition of meeting the preset performance index. The target optimal frequency corresponds to the optimal energy consumption. The adjustment module is used to adaptively adjust the operating frequency of the computing chip under the current workload based on the target optimal frequency.
9. A computer device, comprising: A processor, a memory, and a network interface, wherein the memory stores machine-readable instructions executable by the processor, characterized in that: when the computer device is running, the processor communicates with the memory via the network interface, and the processor executes the machine-readable instructions to perform the steps of the adaptive energy consumption control method based on a computing chip as described in any one of claims 1 to 7.
10. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the steps of the adaptive energy consumption control method based on computing chip as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Frequency modulation method and device, electronic equipment and readable storage medium
CN115718536A
Method, device and equipment for dynamically adjusting power consumption of video card component
CN120215668A
Optimal operating point estimator for hardware operating under a shared power / thermal constraint
US20200142466A1
Dynamic voltage and frequency scaling system, related method and storage medium
WO2024174950A1
KR20210078260A
Cited By
System-on-chip energy efficiency management method and device based on multi-dimensional perception, and storage medium
CN121433479A
Chip power management method and system and medium
CN122018667A