Parameter adjustment method, component, processor, device, medium and product
By acquiring the processor's current operating parameters, temperature, and power consumption, and utilizing power consumption calculation strategies and voltage-frequency mapping relationships, the processor's operating parameters can be quickly adjusted, solving the problem of slow processor response speed in existing technologies and achieving efficient operating parameter adjustment.
Patent Information
- Application Number
- CN202411998603.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing methods for controlling processor operating parameters rely on the collaborative work of multiple hardware and software units, resulting in high time overhead, an inability to quickly respond to dynamically changing workloads, and an impact on processor performance.
By acquiring the processor's current operating parameters, temperature, and power consumption, and utilizing power consumption calculation strategies and voltage-frequency mapping relationships, the processor's load data is determined. Based on the target power consumption, the operating parameters for the next operating cycle are adjusted, reducing hardware and software unit coordination and avoiding processor interruptions.
It enables rapid response to workload changes within milliseconds, improving the processor's reaction and adjustment speed, increasing work efficiency, and reducing the time overhead of software and hardware unit coordination.
Smart Images

Figure CN119917375B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of graphics processing technology, and in particular to a parameter adjustment method, component, processor, device, medium and product. Background Technology
[0002] Current processors typically rely on the complex collaborative work of multiple hardware and software units to control their operating parameters. These include, but are not limited to, scheduling and management units, workload monitoring units, policy control units, performance monitoring units, etc. Software drives monitor and provide feedback to each unit, which is then transmitted to the control unit for parameter control. Summary of the Invention
[0003] In view of this, embodiments of this application provide at least one parameter adjustment method, component, processor, device, medium, and product.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] On one hand, embodiments of this application provide a method for adjusting processor operating parameters. The method includes: acquiring the processor's current operating parameters, current temperature, and current power consumption; determining current load data based on the processor's corresponding power consumption calculation strategy, using the current operating parameters, current temperature, and current power consumption; the current load data characterizing the processor's load status; and determining the processor's operating parameters for the next operating cycle using the current load data, the current temperature, a preset target power consumption, and the power consumption calculation strategy; wherein the power consumption calculation strategy is used to calculate the corresponding power consumption using voltage and frequency obtained based on a pre-trained voltage-frequency mapping relationship.
[0006] On the other hand, embodiments of this application provide a management and control component disposed in a processor. The management and control component includes: an acquisition unit for acquiring the processor's current operating parameters, current temperature, and current power consumption; a first determination unit for determining current load data based on a power consumption calculation strategy corresponding to the processor, using the current operating parameters, current temperature, and current power consumption; the current load data characterizing the processor's load status; and a second determination unit for determining the processor's operating parameters in the next operating cycle using the current load data, the current temperature, a preset target power consumption, and the power consumption calculation strategy; wherein the power consumption calculation strategy is used to calculate the corresponding power consumption using voltage and frequency obtained based on a pre-trained voltage-frequency mapping relationship.
[0007] In another aspect, embodiments of this application provide a computer device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement some or all of the steps in the above-described method.
[0008] In another aspect, embodiments of this application provide a processor that includes the aforementioned management and control components.
[0009] In another aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the above-described method.
[0010] In another aspect, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement some or all of the steps in the above-described method.
[0011] In this embodiment, a power consumption calculation strategy is used to determine the operating parameters for the next cycle by utilizing the processor's current operating parameters. This allows for rapid, accurate, and efficient adjustment of the processor's operating parameters based on the current working scenario. It enables rapid response to workload changes within milliseconds, significantly improving reaction and adjustment speed. It also reduces the number of hardware and software units, allowing for efficient and rapid coordination of calculations. Furthermore, it avoids initiating interrupts to the processor, greatly improving its operating efficiency.
[0012] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this application. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0014] Figure 1 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 1 ;
[0015] Figure 2 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 2 ;
[0016] Figure 3 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 3 ;
[0017] Figure 4 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 4 ;
[0018] Figure 5 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 5 ;
[0019] Figure 6 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 6 ;
[0020] Figure 7 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 7 ;
[0021] Figure 8 A schematic diagram of the static power consumption model provided in the embodiments of this application;
[0022] Figure 9 A schematic diagram of the VF model provided in the embodiments of this application;
[0023] Figure 10 This is a schematic diagram of the control flow provided in the embodiments of this application;
[0024] Figure 11 A schematic diagram illustrating the composition of a management and control component provided in an embodiment of this application;
[0025] Figure 12 This is a schematic diagram of the hardware entity of a computer device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.
[0029] This application provides a method for adjusting processor operating parameters, which can be executed by the processor of a computer device. The computer device refers to a device with data processing capabilities, such as a server, laptop, tablet, desktop computer, smart TV, set-top box, or mobile device (e.g., mobile phone, portable video player, personal digital assistant, dedicated messaging device, portable gaming device).
[0030] Existing methods for controlling processor operating parameters rely on multiple hardware and software units. Hardware units occupy additional performance power area (PPA) on the chip, while software units add extra overhead. The extensive coordination between hardware and software increases time overhead, especially in scenarios requiring rapid response. Real-time monitoring and reading of internal processor counters are necessary, but this requires triggering interrupts to the processor, indirectly impacting overall processor performance. Under dynamically changing workloads, existing methods cannot adapt quickly, exhibiting slow response and adjustment speeds.
[0031] To accurately and efficiently adjust processor operating parameters, this application proposes a method for adjusting processor operating parameters. The method includes: acquiring the processor's current operating parameters, current temperature, and current power consumption; determining current load data based on the processor's corresponding power consumption calculation strategy, using the current operating parameters, current temperature, and current power consumption; the current load data characterizing the processor's load status; and determining the processor's operating parameters for the next operating cycle using the current load data, the current temperature, a preset target power consumption, and the power consumption calculation strategy; wherein the power consumption calculation strategy is used to calculate the corresponding power consumption using voltage and frequency obtained based on a pre-trained voltage-frequency mapping relationship.
[0032] Figure 1 A schematic diagram of the implementation process of a processor operating parameter adjustment method provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method includes the following steps S101 to S103:
[0033] Step S101: Obtain the processor's current operating parameters, current temperature, and current power consumption.
[0034] The operating parameters are those related to the processor's performance. Adjusting these operating parameters allows you to adjust the processor's performance. For example, operating parameters include the processor's operating voltage and frequency. The processor can be a Graphics Processing Unit (GPU), a Central Processing Unit (CPU), or any other type of processor.
[0035] In some embodiments, during processor operation, it is necessary to adjust the processor's operating parameters in real time to maximize its performance. To enable real-time adjustment of these parameters based on the processor's current situation, it is necessary to obtain the processor's current operating parameters, current temperature, and current power consumption.
[0036] In some embodiments, the current operating parameters of the processor can be obtained through parameter monitoring software, the operating temperature of the processor can be obtained through sensors inside the processor, and the current power consumption of the processor can be monitored through sensors outside the processor.
[0037] Step S102: Based on the power consumption calculation strategy corresponding to the processor, determine the current load data using the current operating parameters, current temperature, and current power consumption.
[0038] The power consumption calculation strategy refers to the method used by the processor to calculate power consumption. Different processors employ different power consumption calculation strategies. For example, a power consumption calculation strategy can be a power consumption calculation model or a power consumption calculation formula. By inputting the parameters related to power consumption calculation into the model or formula, the processor's power consumption can be obtained.
[0039] In some embodiments, during normal operation of the processor, the power consumption of the processor under different operating parameters and configurations is collected. These operating parameters, configurations, and power consumption are used as sample data. A power consumption calculation model is trained using a deep learning algorithm to obtain the trained power consumption calculation model. The power consumption calculation model is then converted into a formula to obtain a power consumption calculation strategy.
[0040] The current load data represents the processor's load status. Different tasks correspond to different loads, and the processor's workload varies when processing different tasks. For example, the load data ranges from 0 to 1, with a larger load data indicating a greater processor workload.
[0041] The power consumption calculation strategy is used to calculate the corresponding power consumption using the voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training.
[0042] In some embodiments, the voltage-frequency mapping relationship characterizes the correspondence between the processor's voltage and frequency; that is, for a fixed voltage, a fixed frequency can be obtained by referring to the voltage-frequency mapping relationship; conversely, for a fixed frequency, a fixed voltage can also be obtained by referring to the voltage-frequency mapping relationship.
[0043] In this embodiment of the application, the power consumption calculation strategy can be used to calculate the power consumption of the processor based on the voltage and frequency obtained through the voltage-frequency mapping relationship described above, combined with other parameters of the processor (such as the processor's load and temperature). Of course, the processor's load can also be inferred from the processor's current power consumption, voltage and frequency (obtained through the voltage-frequency mapping relationship described above) and other parameters of the processor (such as the processor's temperature).
[0044] In some embodiments, the total power consumption of the processor is determined by both static power consumption and dynamic power consumption. Static power consumption refers to the power consumed by the integrated circuit even when there is no switching activity. It is mainly caused by the leakage current of the transistors and is related to the threshold voltage and supply voltage of the transistors. Static power consumption characterizes the power consumption consumed by the processor in standby mode. Dynamic power consumption refers to the power consumption generated when the transistors are in switching states during chip operation. Dynamic power consumption mainly consists of two parts: dynamic switching power consumption caused by dynamic switching current and power consumption generated by short-circuit current.
[0045] Static power consumption can be determined using a static power consumption calculation strategy, while dynamic power consumption can be determined using a dynamic power consumption calculation strategy. The input parameters for the static power consumption calculation strategy include operating parameters and temperature, while the input parameters for the dynamic power consumption calculation strategy include operating parameters and load data.
[0046] In some embodiments, operating parameters include voltage and frequency; the static power consumption calculation strategy is related to voltage and temperature; and the dynamic power consumption calculation strategy is related to voltage, frequency, and load data.
[0047] In some embodiments, the processor's operating parameters include voltage and frequency, and the power consumption calculation strategy includes a static power consumption calculation strategy and a dynamic power consumption calculation strategy; the dynamic power consumption calculation strategy is used to calculate the corresponding dynamic power consumption using load data and voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training; the static power consumption calculation strategy is used to calculate the corresponding static power consumption using the obtained voltage and temperature.
[0048] The dynamic power consumption reflects the power consumption related to the real-time load of the processor. The dynamic power consumption is related to the voltage, frequency and load data. The higher the voltage and frequency, the higher the dynamic power consumption. The greater the load represented by the load data, the higher the dynamic power consumption.
[0049] The static power consumption is positively correlated with voltage and temperature; the higher the voltage, the higher the static power consumption; the higher the temperature, the higher the static power consumption.
[0050] In some embodiments, based on the static power consumption calculation strategy, the current static power consumption is determined using the current voltage and the current temperature; based on the current static power consumption and the current power consumption, the current dynamic power consumption is determined; based on the dynamic power consumption calculation strategy, the current load data is determined using the current dynamic power consumption and the current voltage and frequency.
[0051] In some embodiments, the power consumption calculation strategy corresponds to a power consumption calculation model, which can be trained using sample data. The power consumption calculation model represents the relationship between the current voltage and frequency, current temperature, current power consumption, and current load data. The current voltage and frequency, current temperature, and current power consumption are input into the power consumption calculation model, and the model outputs the current load data.
[0052] Step S103: Using the current load data, the current temperature, the preset target power consumption, and the power consumption calculation strategy, determine the working parameters of the processor in the next running cycle.
[0053] The target power consumption is the expected power consumption of the processor in the next runtime cycle. By determining the processor's operating parameters for the next runtime cycle in each runtime cycle, the power consumption of the processor in the next runtime cycle can be adjusted.
[0054] The runtime cycle is the adjustment period for the processor's operating parameters. The runtime cycle can be set according to the processor's actual operating conditions. For example, the runtime cycle may include several clock cycles.
[0055] In some embodiments, the processor's operating parameters include voltage and frequency, wherein the voltage and frequency satisfy voltage-frequency mapping data corresponding to the processor. Among multiple voltage-frequency combinations satisfying the voltage-frequency mapping data, a target voltage-frequency combination is determined; wherein the target voltage frequency is the voltage-frequency combination among the multiple voltage-frequency combinations whose predicted power consumption, obtained based on the power consumption calculation strategy, is closest to and less than the target power consumption; the voltage and frequency in the target voltage-frequency combination are then determined as the processor's operating parameters for the next operating cycle.
[0056] In some embodiments, the power consumption calculation strategy corresponds to a power consumption calculation model, which can be trained using sample data. The power consumption calculation model characterizes the relationship between the operating parameters of the next operating cycle, the current temperature, the target power consumption, and the current load data. The current load data, current temperature, and preset target power consumption are input into the power consumption calculation model, and the model outputs the operating parameters for the next operating cycle.
[0057] For example, the operating parameters are voltage V and frequency F, the load data is α, and the current temperature T and current power consumption P1 are known. The power consumption calculation strategy uses the formula F1(V, T, IDDQ) + F2(V, F, α), which outputs the power consumption. Here, IDDQ is a built-in parameter of the processor, representing the processor's quiescent current, and IDDQ can be predetermined. Substituting the current V, F, T, and P1 into the formula yields the load data α; substituting the current load data α, the current temperature T, and the preset target power consumption P2 into the formula, combined with the mapping relationship between V and F, yields the processor's V and F for the next operating cycle. The processor operates according to the determined V and F in the next operating cycle.
[0058] In this embodiment, the current operating parameters, current temperature, and current power consumption of the processor are obtained. Based on the power consumption calculation strategy corresponding to the processor, the current load data is determined using the current operating parameters, current temperature, and current power consumption. The current load data represents the load status of the processor. Using the current load data, a preset target power consumption, and the power consumption calculation strategy, the operating parameters of the processor in the next running cycle are determined. The power consumption calculation strategy includes a static power consumption calculation strategy and a dynamic power consumption calculation strategy. The static power consumption calculation strategy is related to the operating parameters and temperature, while the dynamic power consumption strategy is related to the operating parameters and load data. Thus, by using the static and dynamic power consumption calculation strategies to determine the operating parameters for the next running cycle using the processor's current operating parameters, the processor's operating parameters can be adjusted quickly, accurately, and efficiently according to the current working situation. It can respond quickly to workload changes within milliseconds, significantly improving reaction and adjustment speed. It can reduce the number of hardware and software units, efficiently and quickly coordinating calculations. It does not initiate interrupts to the processor, greatly improving the processor's working efficiency.
[0059] Figure 2 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 2 This method can be executed by the processor of a computer device. Based on Figure 1 The processor's operating parameters include voltage and frequency, and the voltage and frequency satisfy the voltage-frequency mapping data corresponding to the processor; Figure 1 S103 in the middle can be updated to S201 to S202, which will combine Figure 2 The steps shown are explained.
[0060] Step S201: Determine the target voltage frequency combination from among the multiple voltage frequency combinations that satisfy the voltage frequency mapping data.
[0061] Here, voltage refers to the voltage required for the processor to operate normally. Frequency refers to the processor's operating frequency, which represents the number of instructions the processor executes per second.
[0062] The voltage-frequency mapping data represents the mapping relationship between discrete voltages and discrete frequencies during normal processor operation. The voltage-frequency mapping data includes multiple voltage-frequency combinations, with each voltage corresponding to a specific frequency. Each processor has its own set of voltage-frequency mapping data. For example, the voltage-frequency mapping data is presented as a table recording these multiple voltage-frequency combinations.
[0063] The target voltage frequency is the voltage frequency combination among the plurality of voltage frequency combinations that has the closest expected power consumption to the target power consumption and is less than the target power consumption, based on the power consumption calculation strategy.
[0064] In some embodiments, the voltage and frequency at which the processor operates normally satisfy the voltage-frequency mapping data corresponding to the processor; that is, the voltage and frequency at which the processor operates are a voltage-frequency combination in the voltage-frequency mapping data. The projected power consumption in the power consumption calculation strategy is related to several parameters: voltage, frequency, current temperature, and current load data. Given a fixed current temperature and current load data, each voltage-frequency combination corresponds to a projected power consumption. With a determined voltage-frequency combination, in order to adjust the projected power consumption of the processor in the next operating cycle to a preset target power consumption, only the projected power consumption closest to and less than the target power consumption among multiple voltage-frequency combinations can be selected as the target power consumption for the processor in the next operating cycle. Therefore, based on the preset target power consumption, the voltage-frequency combination closest to and less than the target power consumption can be determined from multiple voltage-frequency combinations, and this voltage-frequency combination is used as the voltage and frequency of the processor in the next operating cycle.
[0065] In some embodiments, the power consumption calculation strategy corresponds to a power consumption calculation formula. Based on a preset order, each voltage frequency combination is substituted into the power consumption calculation formula. Combining the known current load data and current temperature, the expected power consumption corresponding to each voltage frequency combination can be obtained. The expected power consumption closest to and less than the target power consumption is selected from the multiple expected power consumptions corresponding to multiple voltage frequency combinations. The target voltage frequency combination corresponding to the selected expected power consumption is used as the processor's operating parameter in the next running cycle.
[0066] In some embodiments, the power consumption calculation strategy corresponds to a power consumption calculation formula. A general voltage-frequency relationship exists within the processor, and this relationship is configurable. Combining the power consumption calculation formula and the voltage-frequency relationship, along with current load data, current temperature, and a preset target power consumption, a set of voltage frequencies can be determined. Among multiple voltage frequency combinations, the voltage frequency combination closest to the solved voltage frequencies is identified. This closest combination is then substituted into the power consumption calculation formula to obtain the expected power consumption. If the expected power consumption is less than the target power consumption, a voltage frequency combination larger than the closest combination is selected to determine the corresponding expected power consumption; if the expected power consumption is greater than the target power consumption, a voltage frequency combination smaller than the closest combination is selected. This also allows for the selection of a target voltage frequency combination that is closest to and less than the target power consumption. This approach is equivalent to first determining an initial voltage frequency combination and then finding a target voltage frequency combination that is closest to and less than the target power consumption.
[0067] Step S202: Determine the voltage and frequency in the target voltage-frequency combination as the operating parameters of the processor in the next operating cycle.
[0068] In this context, the voltage and frequency in the target voltage-frequency combination represent the processor's operating parameters for the next runtime cycle. By adjusting the processor's operating parameters to match the voltage and frequency in the target voltage-frequency combination during the next runtime cycle, the processor's power consumption can be approximately adjusted to the target power consumption.
[0069] For example, the voltage frequency mapping data corresponding to the processor includes five sets of voltage frequencies. These five sets of voltage frequencies are sequentially substituted into the power consumption calculation strategy to obtain five sets of expected power consumption. These five sets of expected power consumption are compared with the preset target power consumption, and it is determined that the third set of expected power consumption is closest to the target power consumption and less than the target power consumption. Therefore, the voltage frequency corresponding to the third set of expected power consumption is used as the working parameter for the next running cycle.
[0070] In this embodiment, a target voltage-frequency combination is determined from among multiple voltage-frequency combinations that satisfy the voltage-frequency mapping data. The voltage and frequency in the target voltage-frequency combination are then determined as the operating parameters of the processor in the next operating cycle. This allows for adjustment of the processor's operating parameters according to a preset voltage-frequency combination to meet specific requirements. Simultaneously, it enables relatively precise adjustment of the processor's operating parameters in each operating cycle based on the target power consumption.
[0071] Figure 3 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 3 This method can be executed by the processor of a computer device. Based on Figure 2 The voltage frequency mapping data is stored in the processor, and the method further includes steps S301 and S302, combining... Figure 3 The steps shown are explained.
[0072] Step S301: In response to the processor being powered on, read the processor's hardware parameters and the voltage-frequency mapping relationship obtained based on pre-training.
[0073] The voltage-frequency mapping data can be stored in the processor. For example, the voltage-frequency mapping data is stored in the read-only memory (ROM) of the control unit.
[0074] Here, hardware parameters refer to parameters related to the processor's hardware characteristics. Different processors correspond to different hardware parameters. For example, hardware parameters are the processor's process parameters, which characterize the switching speed of transistors (MOS transistors) inside a chip.
[0075] The voltage-frequency mapping relationship represents the correspondence between the processor's voltage and frequency.
[0076] In some embodiments, the voltage-frequency mapping relationship corresponds to a voltage-frequency mapping model. The voltage-frequency mapping model can be obtained by training the model based on sample data. Therefore, the voltage-frequency mapping relationship is obtained through pre-training. The voltage-frequency mapping relationship can be viewed as a formula corresponding to the voltage-frequency mapping model. For example, the sample data includes voltage, temperature, and voltage-frequency curves related to hardware parameters, and the voltage-frequency mapping model is obtained by training a deep learning algorithm based on the sample data.
[0077] In some embodiments, the voltage-frequency mapping relationship is a formula corresponding to the voltage-frequency mapping model, and this formula is added to the processor's firmware code. Firmware refers to the device "driver" stored internally within the device. Through the firmware, the operating system can implement the specific machine's operation according to standard device drivers. The processor's hardware parameters are stored in the chip's "electronic fuse" (EFUSE). EFUSE is a non-volatile memory device used to store information and protect the chip. During chip manufacturing, EFUSE can be programmed to store important data, such as the device's unique identification number and encryption keys. This data can be read and used, but once programmed, it cannot be modified or erased. In response to processor power-on, hardware parameters are read from EFUSE, and the voltage-frequency mapping relationship is read from the firmware code.
[0078] Step S302: Based on the processor's hardware parameters and the voltage-frequency mapping relationship, generate voltage-frequency mapping data corresponding to the processor.
[0079] The voltage-frequency mapping relationship corresponds to a voltage-frequency mapping model, and the pre-trained voltage-frequency mapping relationship includes the voltage-frequency mapping relationship for each of the multiple processors. Different processors have different hardware parameters; based on the hardware parameters and the voltage-frequency mapping relationship, the voltage-frequency mapping relationship corresponding to each processor can be generated.
[0080] In some embodiments, the voltage-frequency mapping data is a voltage-frequency mapping table; generating voltage-frequency mapping data corresponding to the processor based on the processor's hardware parameters and the voltage-frequency mapping relationship includes: generating a voltage-frequency curve corresponding to the processor based on the processor's hardware parameters and the voltage-frequency mapping relationship; sampling the voltage-frequency curve corresponding to the processor to obtain multiple voltage-frequency combinations; the voltage-frequency mapping table is used to store the multiple voltage-frequency combinations.
[0081] The pre-trained voltage-frequency mapping relationship includes multiple voltage-frequency curves. After reading the pre-trained voltage-frequency mapping relationship, the processor's hardware parameters are input into the voltage-frequency mapping relationship (equivalent to the formula corresponding to the voltage-frequency mapping model), and the corresponding voltage-frequency curve of the processor is directly output. Based on a preset sampling frequency, the voltage-frequency curve corresponding to the processor is sampled to obtain the horizontal and vertical coordinates at each sampling point, i.e., each voltage-frequency combination. Multiple voltage-frequency combinations are stored in a voltage-frequency mapping table. Different sampling frequencies result in different numbers of voltage-frequency combinations; therefore, different levels of power control precision can be achieved based on different sampling frequencies.
[0082] For example, in response to the processor being powered on, the processor's process parameters and voltage-frequency mapping relationship are read, the process parameters are substituted into the voltage-frequency mapping relationship to obtain the voltage-frequency curve corresponding to the processor, and the voltage-frequency curve is sampled to obtain the voltage-frequency mapping data corresponding to the processor.
[0083] In this embodiment, in response to the processor powering on, the processor's hardware parameters and a voltage-frequency mapping relationship obtained based on pre-training are read; based on the processor's hardware parameters and the voltage-frequency mapping relationship, voltage-frequency mapping data corresponding to the processor is generated. This allows for effective reading of the hardware parameters and the voltage-frequency mapping relationship, and accurate generation of the processor's corresponding voltage-frequency mapping data.
[0084] Figure 4 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 4 This method can be executed by the processor of a computer device. Based on Figure 3 The voltage-frequency mapping relationship is obtained based on a pre-trained voltage-frequency prediction model. The method further includes steps S401 and S402, which combine... Figure 4 The steps shown are explained.
[0085] Step S401: Obtain a first sample set including multiple first sample data; the first sample data includes a voltage-frequency curve related to voltage, temperature, and hardware parameters, the voltage-frequency curve includes the mapping relationship between voltage and frequency and the boundary parameter at the voltage frequency, the boundary parameter being the difference in the pass rate of long-term testing and short-term testing at the voltage frequency.
[0086] Specifically, the voltage frequency prediction model is pre-trained based on the first sample set to obtain a trained voltage frequency prediction model. This trained model is then transformed into a corresponding voltage frequency mapping relationship. For example, the trained voltage frequency prediction model is converted into a formula, which represents the voltage frequency mapping relationship.
[0087] In some embodiments, the first sample data includes voltage-frequency curves related to voltage, temperature, and hardware parameters. Voltage, temperature, and hardware parameters are sample parameters in the first sample data, and the voltage-frequency curve is a sample result in the first sample data. Changes in voltage, temperature, and hardware parameters will affect the processor's frequency for the first sample data. The processor is configured with different voltage, temperature, and hardware parameters; each parameter can have N sets of data. Under each parameter combination, the processor also has N different workloads. The processor's frequency under each configuration is collected, and the processor can generate a voltage-frequency curve based on the collected voltage-frequency data. Each hardware parameter corresponds to one voltage-frequency curve.
[0088] In some embodiments, the processor is tested for each voltage frequency in the voltage-frequency curve, at that voltage frequency, and under the current voltage, temperature, and hardware parameters. The pass rate for long-term tests differs from the pass rate for short-term tests. For example, the processor might have a 100% pass rate after 10 tests and a 98% pass rate after 100 tests. The boundary parameter is the difference in the pass rate between long-term and short-term tests at the given voltage frequency. When generating the voltage-frequency curve, both the boundary parameter corresponding to the voltage frequency and the mapping relationship between voltage and frequency are considered.
[0089] In this embodiment, boundary parameters are added to enable the voltage frequency prediction model to cover a small number of boundary cases. The actual frequency may fluctuate around the prediction curve. This fluctuation can be understood as the standard deviation, which will be added to the model as a boundary parameter.
[0090] Step S402: Obtain the voltage frequency prediction model based on the first sample set; the voltage frequency model is used to generate the voltage frequency mapping relationship of the processor based on the processor's hardware parameters.
[0091] Specifically, a voltage frequency prediction model is obtained by training a model using a model training algorithm based on the first sample set. For example, a voltage frequency prediction model is obtained by training a deep learning algorithm based on the first sample set.
[0092] The trained voltage-frequency prediction model can characterize the relationship between hardware parameters and the voltage-frequency mapping of the processor. By inputting the hardware parameters into the voltage-frequency prediction model, the voltage-frequency mapping of the processor can be generated.
[0093] In this embodiment, a first sample set comprising multiple first sample data is obtained. The first sample data includes voltage-frequency curves related to voltage, temperature, and hardware parameters. These voltage-frequency curves include a mapping relationship between voltage and frequency and boundary parameters at the specified voltage frequency. The boundary parameters represent the difference in the pass rate of long-term and short-term tests at the specified voltage frequency. A voltage-frequency prediction model is obtained based on this first sample set. This allows for training using the first sample set to obtain an accurate voltage-frequency prediction model. Considering the boundary parameters improves the robustness of the model.
[0094] Figure 5 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 5 This method can be executed by the processor of a computer device. Based on Figure 1 , Figure 1 S102 in the middle can be updated to S501 to S503, which will combine Figure 5 The steps shown are explained.
[0095] Step S501: Based on the static power consumption calculation strategy, determine the current static power consumption using the current operating parameters and the current temperature.
[0096] The static power consumption calculation strategy is related to the current operating parameters and the current temperature. By substituting the current operating parameters and the current temperature into the static power consumption calculation strategy, the static power consumption can be obtained. For example, the static power consumption calculation strategy corresponds to the formula F1(V, T, IDDQ), where IDDQ is the static current, which is predetermined. The current operating parameter is the voltage. Substituting the current voltage V and temperature T into formula F1, the static power consumption is output.
[0097] Step S502: Determine the current dynamic power consumption based on the current static power consumption and the current power consumption.
[0098] The processor's current power consumption can be calculated using both the current static power consumption and the current dynamic power consumption. Given the current static power consumption and the current power consumption, the current dynamic power consumption is obtained by subtracting the current static power consumption from the current dynamic power consumption.
[0099] Step S503: Based on the dynamic power consumption calculation strategy, determine the current load data using the current dynamic power consumption and the current operating parameters.
[0100] The dynamic power consumption calculation strategy is related to the current operating parameters and the current load data. By substituting the current operating parameters and the current dynamic power consumption into the dynamic power consumption calculation strategy, the current load data can be obtained. For example, the dynamic power consumption calculation strategy corresponds to the formula F2(V, F, α), where the current operating parameters are voltage V and frequency F. Substituting the current voltage V, frequency F, and dynamic power consumption into formula F2 outputs the current load data α.
[0101] In this embodiment, based on the static power consumption calculation strategy, the current static power consumption is determined using the current operating parameters and the current temperature; based on the current static power consumption and the current power consumption, the current dynamic power consumption is determined; and based on the dynamic power consumption calculation strategy, the current load data is determined using the current dynamic power consumption and the current operating parameters. In this way, accurate current load data can be determined based on the processor's corresponding power consumption calculation strategy, using the current operating parameters, current temperature, and current power consumption.
[0102] Figure 6 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 6 This method can be executed by the processor of a computer device. Based on Figure 5 , Figure 5 S501 in the middle can be updated to S601 to S602, which will combine Figure 6 The steps shown are explained.
[0103] Step S601: Read the static current of the processor.
[0104] The quiescent current IDDQ refers to the leakage current when all transistors in the processor are at rest. Leakage current persists even when transistors are off, and this is a major cause of quiescent power consumption.
[0105] In some embodiments, the processor's IDDQ is stored in the processor's EFUSE. The processor's IDDQ can be read from the processor's EFUSE after the processor is powered on.
[0106] Step S602: Determine the current static power consumption based on the static current, the current operating parameters, and the current temperature.
[0107] The quiescent current, current operating parameters, and current temperature all affect the current quiescent power consumption. By incorporating the quiescent current, current operating parameters, and current temperature into the quiescent power consumption calculation strategy, the current quiescent power consumption can be obtained.
[0108] For example, the static power consumption calculation strategy corresponds to the formula F1(V, IDDQ, T). The current operating parameter is voltage V. Substituting the current voltage V, temperature T, and static current IDDQ into formula F1, the current static power consumption is output.
[0109] In this embodiment, the processor's quiescent current is read; based on the quiescent current, the current operating parameters, and the current temperature, the current quiescent power consumption is determined. This allows for accurate determination of quiescent power consumption based on the quiescent current, current operating parameters, and current temperature.
[0110] Figure 7 This is a schematic diagram of the implementation flow of a processor operating parameter adjustment method provided in an embodiment of this application. Figure 7 This method can be executed by the processor of a computer device. Based on Figure 2 The processor is equipped with a voltage setting unit and a frequency setting unit. The method further includes steps S701 and S702, which combine... Figure 7 The steps shown are explained.
[0111] Step S701: Send the voltage of the next operating cycle to the voltage setting unit so that the voltage of the processor is set to the voltage of the next operating cycle through the voltage setting unit.
[0112] The voltage setting unit is used to set the processor voltage in each operating cycle. After the processor's second determining unit determines the processor voltage for the next operating cycle using current load data, a preset target power consumption, and a power consumption calculation strategy, it can send the voltage to the voltage setting unit. In the next operating cycle, the voltage setting unit sets the processor voltage to the voltage for the next operating cycle.
[0113] Step S702: Send the frequency of the next operating cycle to the frequency setting unit, so that the frequency of the processor is set to the frequency of the next operating cycle through the frequency setting unit.
[0114] The frequency setting unit is used to set the processor's frequency in each runtime cycle. After the processor's second determination unit determines the processor's frequency for the next runtime cycle using current load data, a preset target power consumption, and a power consumption calculation strategy, it can send the frequency to the frequency setting unit. In the next runtime cycle, the frequency setting unit sets the processor's frequency to the frequency of the next runtime cycle.
[0115] In this embodiment, the processor voltage is set to the voltage of the next operating cycle by a voltage setting unit, and the processor frequency is set to the frequency of the next operating cycle by a frequency setting unit. This allows for setting the voltage and frequency of the processor's operating cycle using both the voltage setting unit and the frequency setting unit, improving the efficiency of voltage and frequency adjustment.
[0116] In some embodiments, the method further includes: in response to the processor running a cycle with the operating parameters of the next operating cycle, reacquiring the temperature and power consumption of the processor, and determining new operating parameters based on the operating parameters of the next operating cycle, the target power consumption, the power consumption calculation strategy, and the reacquiring temperature and power consumption.
[0117] After determining the operating parameters for the next running cycle of the processor, the processor will run with the determined operating parameters in the next running cycle. In the next running cycle, the processor's temperature and power consumption can be reacquired. Based on the operating parameters, target power consumption, power consumption calculation strategy, and the reacquired temperature and power consumption, the operating parameters for the next running cycle are determined.
[0118] For example, the operating parameters include voltage and frequency. In response to the processor running a cycle at the voltage and frequency of the next operating cycle, the processor's temperature and power consumption are acquired again. Based on the power consumption calculation strategy corresponding to the processor, the load data can be determined using the running voltage, frequency, acquired temperature and power consumption. Using the load data, temperature, target power consumption and power consumption calculation strategy, a new voltage and frequency can be determined.
[0119] In this embodiment, in response to the processor running a cycle with the operating parameters of the next operating cycle, the processor's temperature and power consumption are reacquired, and new operating parameters are determined based on the operating parameters of the next operating cycle, the target power consumption, the power consumption calculation strategy, and the reacquired temperature and power consumption. Thus, by periodically executing the operating parameter adjustment process, the operating parameters for the next operating cycle can be recalculated in each operating cycle, enabling timely adjustment of the processor's operating parameters and improving processor performance.
[0120] In some embodiments, the static power consumption calculation strategy is obtained based on a pre-trained static power consumption model, and the method further includes: obtaining a second sample set including multiple second sample data; the second sample data includes static power consumption related to voltage, temperature and quiescent current, wherein the static power consumption is the power consumption of the processor under no-load conditions at voltage and temperature; obtaining the static power consumption model based on the second sample set; the static power consumption model is used to generate static power consumption based on the processor's voltage, temperature and quiescent current.
[0121] Specifically, the static power consumption model is pre-trained based on the second sample set to obtain a trained static power consumption model, which is then converted into a static power consumption calculation strategy. For example, the trained static power consumption model is converted into a formula, which is the static power consumption calculation strategy.
[0122] In some embodiments, the second sample data includes static power consumption related to voltage, temperature, and quiescent current. Voltage, temperature, and quiescent current are sample parameters in the second sample data, and static power consumption is a sample result in the second sample data. Changes in voltage, temperature, and quiescent current affect the processor's static power consumption for the second sample data. The processor is configured with different voltage, temperature, and quiescent current settings; N sets of data can be set for each parameter. Under each parameter combination, the processor's static power consumption is collected as the second sample data. Static power consumption is the processor's power consumption under no-load conditions at the specified voltage and temperature.
[0123] Specifically, a static power consumption model is obtained by training a model using a model training algorithm based on the second sample set. For example, a static power consumption model is obtained by training a deep learning algorithm based on the second sample set.
[0124] The trained static power consumption model can characterize the relationship between voltage, temperature, quiescent current, and the processor's static power consumption. By inputting voltage, temperature, and quiescent current into the static power consumption model, the processor's static power consumption can be generated.
[0125] In some embodiments, the static power consumption calculation strategy is converted into a formula and added to the firmware code; in response to the processor being powered on, the static power consumption calculation strategy of the processor is read from the firmware code.
[0126] In this embodiment, a second sample set comprising multiple second sample data is obtained; the second sample data includes static power consumption related to voltage, temperature, and quiescent current, wherein the static power consumption is the power consumption of the processor under no-load conditions at the specified voltage and temperature; the static power consumption model is obtained based on the second sample set; the static power consumption model is used to generate static power consumption based on the processor's voltage, temperature, and quiescent current. Thus, an accurate static power consumption model can be obtained by training based on the second sample set.
[0127] The following describes the application of the processor operating parameter adjustment method provided in the embodiments of this application in a real-world scenario.
[0128] The technical fields related to the embodiments of this application include computer graphics processing, deep learning, GPU physical characteristic analysis, hardware-software co-control, and dynamic voltage and frequency scaling (DVFS) control technology. In the field of computer graphics processing, the embodiments of this application relate to the application of graphics processing units (GPUs) in graphics rendering, image processing, and high-performance computing, with a particular focus on optimizing the balance between performance and energy consumption. In the field of deep learning, the embodiments of this application involve using deep learning algorithms to model and optimize the operating parameters of the GPU, so as to automatically adjust the GPU's performance parameters under different workloads to achieve optimal energy efficiency. In the field of GPU physical characteristic analysis, the embodiments of this application study the underlying operating characteristics of the GPU and extract key GPU parameters for mathematical analysis. In the field of hardware-software co-control, the embodiments of this application also focus on software-level computational control, enabling it to quickly and accurately coordinate with hardware units, and achieving a more precise and efficient dynamic voltage and frequency scaling (DVFS) strategy through hardware-software co-control. In the field of dynamic voltage and frequency scaling (DVFS) control technology, the embodiments of this application focus on improving existing GPU DVFS control methods by introducing a data-driven model based on physical characteristics, reducing the dependence on multi-unit collaboration, and achieving fast and efficient voltage and frequency scaling.
[0129] In existing technologies, GPU DVFS control methods typically rely on the complex collaborative work of multiple hardware and software units. These include, but are not limited to, scheduling and management units, workload monitoring units, policy control units, performance monitoring units, etc., with software drivers monitoring and providing feedback to each unit, which is then transmitted to the control unit for DVFS control.
[0130] The main drawbacks of existing technologies are: 1. Complex hardware and software requirements: Existing DVFS control methods rely on multiple hardware and software units. Hardware units occupy additional PPA (Power Performance Area) on the chip, and software units add extra load overhead. 2. High coordination and time overhead: The extensive coordination work between hardware and software increases time overhead, especially in scenarios requiring fast response. 3. Consumption of GPU computing space: Real-time monitoring and reading of the GPU's internal counter is required, and reading the counter requires interrupting the GPU, indirectly affecting overall GPU performance. 4. Slow response time and adjustment speed: Under dynamically changing workloads, existing methods cannot adapt quickly, resulting in slow response time and adjustment speed. 5. Inability to set optimal GPU operating parameters: In DVFS control strategies, the GPU's operating frequency is often a pre-set fixed value, indirectly leading to a loss of chip performance.
[0131] Specific improvements in this application include: 1. Reduced hardware and software units: Compared to traditional methods, only a single mathematical operation unit is needed, eliminating the need for additional scheduling and monitoring units, thus reducing the number of hardware components and lowering chip power consumption (PPA). 2. Efficient and fast coordinated computation: Compared to existing technologies, the use of a pre-trained model combined with concise mathematical operations significantly reduces hardware and software coordination time. 3. No GPU computing space occupation: It does not rely on reading internal GPU information or initiating interrupts to the GPU, greatly improving GPU efficiency. 4. Improved response speed and adjustment efficiency: Utilizing a pre-trained mathematical model, the GPU can quickly respond to workload changes within milliseconds, significantly improving response and adjustment speed. 5. Deep learning pre-training to form models: Deep learning technology is used to pre-train the GPU's physical parameters, customizing the optimal operating frequency model for each chip.
[0132] The embodiments of this application aim to rely on deep learning to model and pre-train the physical parameters of GPU operation, and then implant the trained model into the GPU so that it can quickly, accurately and efficiently set the optimal parameters of the GPU according to the current working scenario. This allows the GPU to quickly implement the Boost function, and also allows the GPU to quickly set the voltage and frequency when it reaches hardware thresholds, such as the power limit, in order to improve the overall working performance of the GPU.
[0133] This application's embodiments include the following key components: 1. Static power consumption model: This model is a pre-trained model based on deep learning, with core data extracted from the GPU's power consumption performance under different conditions during actual operation. 2. Voltage-frequency model: This model is a pre-trained model based on deep learning, with core data extracted from the GPU's frequency performance under different operating conditions. 3. System management unit: A system management control (SMC) unit composed of CPUs (corresponding to the management control component in the above embodiments) is responsible for receiving power consumption and temperature data, inputting them into the pre-trained model for calculation, and setting the optimal voltage and frequency based on the calculation results. 4. Power consumption monitoring unit: The SMC monitors the GPU's current power consumption through external sensors, and can obtain the current power consumption in real time. 5. Temperature monitoring unit: The SMC obtains the GPU's operating temperature through internal GPU sensors, and can obtain the current temperature in real time.
[0134] In some embodiments, the following steps are involved:
[0135] 1. Static Power Consumption Model Data Modeling: Under different conditions, specific parameters are set, and data is collected and modeled. Specific parameters of the static power consumption model include voltage, temperature, and IDDQ (corresponding to the static current in the above embodiments). Under these specific parameters, GPU power consumption data is collected.
[0136] 2. Voltage-Frequency Model (VF Model) Modeling: Specific parameters are set under different conditions, and data is collected and modeled under various GPU operating conditions. The specific parameters of the VF model include voltage, temperature, and process (corresponding to the hardware parameters in the above embodiments). Under these specific parameters, for different workloads, the GPU's voltage-frequency parameter pairs are collected to construct VF curves.
[0137] 3. The trained model is solidified into mathematical calculation formulas. The software extracts the chip parameters (corresponding to the processor parameters in the above embodiments) and inputs them into the pre-trained model for voltage-frequency calculation, generating and saving a table. Specifically, the chip's process parameters are input into the VF model to obtain the VF table corresponding to the chip (corresponding to the voltage-frequency mapping data in the above embodiments). The VF table stores the voltage-frequency domain mapping relationship.
[0138] 4. During operation, SMC reads the GPU's current total power consumption, temperature, voltage, and quiescent current (IDDQ), and calculates the current dynamic power consumption based on the static power consumption model. Specifically, the static power consumption model is transformed into formula F3(V, T, IDDQ) (corresponding to the static power consumption calculation strategy in the above embodiment), where V is the voltage, T is the temperature, and IDDQ is the quiescent current. Substituting the voltage, temperature, and quiescent current into formula F3 yields the static power consumption; subtracting the static power consumption from the total power consumption gives the dynamic power consumption.
[0139] 5. Calculate the current load data activity factor (corresponding to the load data in the above embodiment) based on dynamic power consumption, voltage, and frequency, and save the activity factor for calculation at the next moment. Specifically, the calculation formula for dynamic power consumption is F4(α, V, F) (corresponding to the dynamic power consumption calculation strategy in the above embodiment). For example, F4 is represented by formula (1):
[0140] F4(α, V, F) = α * C * V 2 *F Formula (1);
[0141] Where F4 is the dynamic power consumption function, α is the activity factor, C is a constant, V is the voltage, and F is the frequency. Substituting the dynamic power consumption, voltage, and frequency into formula (1), α, i.e., the activity factor, is calculated.
[0142] 6. Based on the activity factor, temperature, and current hardware redundancy budget (corresponding to the preset target power consumption in the above embodiments), such as the Power Budget, calculate the maximum GPU frequency and voltage that can be achieved at the next moment, and send the voltage and frequency control information to the Voltage and Frequency control unit (corresponding to the voltage setting unit and frequency setting unit in the above embodiments). Specifically, the new voltage and frequency are calculated using formula (2):
[0143] P=F4(α,V,F)+F3(V,T,IDDQ) Formula (2);
[0144] Where F4 corresponds to dynamic power consumption, F3 corresponds to static power consumption, and P is the total power consumption. Taking the Power Budget as P, the activity factor, temperature, and current hardware redundancy budget are substituted into formula (2) for calculation to obtain the voltage V and frequency F.
[0145] 7. After receiving new instructions (voltage V and frequency F), the Voltage and Frequency control unit makes corresponding settings, thereby allowing the GPU to enter the next state.
[0146] Figure 8 This is a schematic diagram of the static power consumption model provided in an embodiment of this application. During the pre-training process of the static power consumption model (corresponding to the static power consumption calculation strategy in the above embodiment), the GPU is in static mode with no workload. Three parameters are set: voltage 801, temperature 802, and quiescent current 803. Each parameter has N different values. Under the preset GPU configuration 804, the GPU will generate static power consumption 805. By changing the values of voltage, temperature, and IDDQ, the GPU will generate different power consumptions. N sets of values for GPU voltage, temperature, and IDDQ, along with the power consumption corresponding to each value combination, are collected as training samples. This is then trained using the deep learning module 806 to obtain the static power consumption model 807. The static power consumption model reflects the correspondence between the three parameters—voltage, temperature, and IDDQ—and static power consumption.
[0147] Figure 9 This is a schematic diagram of the VF model provided in the embodiments of this application. During the pre-training process of the VF model (corresponding to the voltage-frequency prediction model in the above embodiments), three parameters are set: voltage 901, temperature 902, and hardware parameter 903 (process). Each parameter has N different values. VF curves 905 are generated under different GPU workloads 904, with each hardware parameter corresponding to one VF curve. Considering the slight difference in test pass rate during different number of tests performed by the GPU under each VF configuration, the voltage-frequency boundary parameter 906 (margin) is added to the VF curve. The VF model 908 is obtained by training based on the deep learning module 907 using multiple sets of sample data. The margin represents the difference in test pass rate for the GPU at different voltage and frequency execution times.
[0148] Figure 10This is a schematic diagram of the control flow provided in the embodiments of this application. It includes a memory 1001 (SMC ROM), a system management unit 1002 (SMC), a voltage setting unit 1003, and a frequency setting unit 1004. A VF table 1007 (chip VF table) is generated based on hardware parameters 1005 (chip parameter_1) and VF model 1006 (VF model). The VF table 1007 and the static power consumption model 1008 are stored in the memory 1001. After the GPU boot module 1009 starts working, it reads the VF table 1007 and the static power consumption model 1008 from the memory 1001. When the GPU working module 1010 is working, the current power consumption 1011 is read through the power consumption sensor and the current temperature 1012 is read through the temperature sensor. The current load data 1014 is calculated through the power consumption calculation strategy 1013 (corresponding to formula (2)). Determine whether the current power consumption has reached the power consumption budget 1015. If the current power consumption has not reached the power consumption budget, increase the voltage frequency 1016. If the current power consumption exceeds the power consumption budget, decrease the voltage frequency 1017. Finally, a new voltage-frequency pair 1018 is obtained. The new voltage is set by the voltage setting unit 1003, and the new frequency is set by the frequency setting unit 1004.
[0149] based on Figure 10 This includes the following steps:
[0150] Step 1: Based on the physical characteristics of the GPU, perform reliability testing (corner testing) and mathematical modeling of specific parameters (voltage, temperature, IDDQ, process parameters) to obtain the static power consumption model and voltage frequency model.
[0151] Step 2: Convert the two models into mathematical formulas and add them to the firmware code, where the input parameters Parameter_1 and Parameter_2 are obtained by reading the chip's EFUSE.
[0152] Wherein, Parameter_1 is the chip's Process parameter, and Parameter_2 is IDDQ.
[0153] Step 3: After the chip is powered on, read Parameter_1 and generate a unique VFtable for each chip according to the model formula. This table is saved to the SMC ROM for subsequent use.
[0154] Substituting Parameter_1 into the formula corresponding to the VF model yields the VF table for the chip.
[0155] Step 4: The chip powers on according to the default startup configuration and sets the corresponding initial Voltage-Frequency.
[0156] When the chip starts up, it configures an initial voltage and determines the initial frequency by looking up a table based on the initial voltage.
[0157] Step 5: GPU loads workload. SMC acquires the power consumption value (Power) returned by the power sensor and the temperature value (Temperature) returned by the temperature sensor in real time. It inputs the current V, F, Power, and Temperature into the static power consumption model formula to calculate the current activity factor and temporarily caches it.
[0158] Among them, V, F, Power, Temperature, and IDDQ are input into formula (2) to obtain α, which is the activity factor.
[0159] Step 6: The SMC reads the current power budget (corresponding to the preset target power consumption in the above embodiment), substitutes the cached activity factor, the read temperature, and the power budget into formula (2), and solves for the voltage and frequency. The voltage and frequency are then sent to the corresponding setting unit.
[0160] For example, the activity factor, temperature and IDDQ are substituted into formula (2), and each group of VF in the VF Table is substituted into formula (2) according to a preset order to obtain the expected power consumption corresponding to each group of V and F. The expected power consumption corresponding to each group of VF is compared with the power budget, and the expected power consumption that is closest to the power budget and less than the power budget is selected. The corresponding VF is used as the latest voltage and frequency.
[0161] Step 7: After completing Step 6, continue periodic monitoring and activity factor calculation, and repeat Steps 3 to 6.
[0162] The embodiments of this application have the following beneficial effects: 1. Reduced design complexity: The dynamic adjustment process has a fast cycle and involves fewer hardware and software units, which simplifies the design and reduces the design complexity of the chip. 2. Highly efficient and fast computation: Using a pre-trained model can greatly reduce the processor's computing time; the processor only needs to perform repetitive mathematical operations. 3. Optimal GPU parameters: Based on the working characteristics of the GPU, a large amount of data is used for modeling and analysis to obtain the optimal working parameters of the GPU, enabling the GPU to achieve the highest energy efficiency ratio in actual operation. 4. Strong scalability and easy iteration: The entire control method is highly scalable; for different chips and architectures, only the model parameters need to be updated, greatly reducing the complexity of chip iteration.
[0163] Current commonly used solutions often rely on the coordination of multiple units, mostly depending on the detection and calculation of more hardware units, or on capturing more processor register parameters for comprehensive selection and calculation. Compared with these solutions, the embodiments of this application have significant advantages in computational simplicity, response speed, and algorithm iteration. However, the embodiments of this application require extensive data testing and accurate modeling of the chip.
[0164] The embodiments of this application include: 1. A deep learning-based static power consumption model training method: extraction of key parameters, data testing methods, and model training methods. 2. A deep learning-based voltage-frequency model training method: extraction of key parameters, data testing methods, and model selection and optimization methods. 3. Model implantation methods: code conversion methods for converting model parameters into GPU firmware, and selection and loading methods for key input parameters at power-on. 4. Chip operating state mathematical model: how to integrate the chip's operating parameters into a mathematical model, solve for specific parameters in the model, and use the solved parameters for calculations at the next moment. 5. Chip operating state switching judgment logic: how to determine the parameters of the chip's next operating state based on existing operating conditions. 6. Iteration of control logic: the iterative scheme of the entire control flow, and the sub-modules that need to be replaced during chip iteration.
[0165] The advantages of this application's embodiments include: 1. Reduced design complexity: Existing solutions require numerous hardware units and software algorithm control, while this solution significantly reduces the complexity of hardware unit and software algorithm implementation. 2. Highly efficient and fast computation: Existing solutions require coordination of multiple hardware and software units. If one unit has a large delay, it will affect the speed of the entire control process. This solution only needs to convert the pre-trained deep learning model into firmware code and embed it into the GPU to achieve real-time and fast computation feedback, greatly reducing hardware and software coordination time. 3. Reduced interference with the GPU: Existing solutions rely on monitoring and reading the GPU's internal registers. This solution relies on indirect parameters to measure GPU load, directly avoiding the need to obtain GPU internal parameters, reducing direct interruptions to the GPU, and significantly improving GPU efficiency. 4. Optimal GPU parameters: Existing solutions often use fixed parameters. This solution, based on the GPU's working characteristics, uses a large amount of data for modeling and analysis to obtain the optimal operating parameters for the GPU, tailoring the optimal operating parameters for each GPU, enabling the GPU to achieve the highest energy efficiency ratio in actual operation. 5. High scalability and easy iteration: Existing solutions rely on the coordination of internal GPU units and other key subsystems. If the architecture changes, the entire solution needs to be rebuilt. This solution has high scalability. For different chips and architectures, only the model parameters need to be updated, which greatly reduces the complexity of chip iteration.
[0166] Based on the foregoing embodiments, this application provides a management and control component. The device includes various units and modules included in each unit, which can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0167] Figure 11 This is a schematic diagram of the composition structure of a management and control component provided in an embodiment of this application, such as... Figure 11 As shown, the management control component 1100 includes: an acquisition unit 1110, a first determination unit 1120, and a second determination unit 1130, wherein: the management control component is disposed in the processor;
[0168] The acquisition unit 1110 is used to acquire the processor's current operating parameters, current temperature, and current power consumption;
[0169] The first determining unit 1120 is used to determine the current load data based on the power consumption calculation strategy corresponding to the processor, using the current operating parameters, current temperature and current power consumption; the current load data represents the load status of the processor.
[0170] The second determining unit 1130 is used to determine the working parameters of the processor in the next running cycle by using the current load data, the preset target power consumption and the power consumption calculation strategy.
[0171] The power consumption calculation strategy is used to calculate the corresponding power consumption using the voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training.
[0172] In some embodiments, the processor's operating parameters include voltage and frequency, and the power consumption calculation strategy includes a static power consumption calculation strategy and a dynamic power consumption calculation strategy; the dynamic power consumption calculation strategy is used to calculate the corresponding dynamic power consumption using load data and voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training; the static power consumption calculation strategy is used to calculate the corresponding static power consumption using the obtained voltage and temperature.
[0173] In some embodiments, the voltage and the frequency satisfy the voltage-frequency mapping data corresponding to the processor; the second determining unit 1130 is further configured to determine a target voltage-frequency combination among a plurality of voltage-frequency combinations that satisfy the voltage-frequency mapping data; wherein, the target voltage frequency is the voltage-frequency combination among the plurality of voltage-frequency combinations whose expected power consumption obtained based on the power consumption calculation strategy is closest to and less than the target power consumption; and the voltage and frequency in the target voltage-frequency combination are determined as the working parameters of the processor in the next operating cycle.
[0174] In some embodiments, the acquisition unit 1110 is further configured to, in response to the processor being powered on, read the processor's hardware parameters and a voltage-frequency mapping relationship obtained based on pre-training; and generate voltage-frequency mapping data corresponding to the processor based on the processor's hardware parameters and the voltage-frequency mapping relationship.
[0175] In some embodiments, the voltage-frequency mapping relationship is obtained based on a pre-trained voltage-frequency prediction model; the management control component 1100 further includes a training unit, which is used to acquire a first sample set including multiple first sample data; the first sample data includes voltage-frequency curves related to voltage, temperature, and hardware parameters, the voltage-frequency curves include a mapping relationship between voltage and frequency and boundary parameters at the voltage frequency, the boundary parameters being the difference in the pass rate of long-term testing and short-term testing at the voltage frequency; the voltage-frequency prediction model is obtained based on the first sample set; the voltage-frequency prediction model is used to generate the voltage-frequency mapping relationship of the processor based on the processor's hardware parameters.
[0176] In some embodiments, the first determining unit 1120 is further configured to determine the current static power consumption based on the static power consumption calculation strategy, using the current operating parameters and the current temperature; determine the current dynamic power consumption based on the current static power consumption and the current power consumption; and determine the current load data based on the dynamic power consumption calculation strategy, using the current dynamic power consumption and the current operating parameters.
[0177] In some embodiments, the first determining unit 1120 is further configured to read the static current of the processor; and determine the current static power consumption based on the static current, the current operating parameters, and the current temperature.
[0178] In some embodiments, the processor is provided with a voltage setting unit and a frequency setting unit; the second determining unit 1130 is further configured to send the voltage of the next operating cycle to the voltage setting unit so as to set the voltage of the processor to the voltage of the next operating cycle through the voltage setting unit; and to send the frequency of the next operating cycle to the frequency setting unit so as to set the frequency of the processor to the frequency of the next operating cycle through the frequency setting unit.
[0179] In some embodiments, the acquisition unit 1110 is further configured to reacquire the processor's temperature and power consumption in response to the processor running a cycle with the operating parameters of the next operating cycle; the second determination unit 1130 is further configured to determine new operating parameters based on the operating parameters of the next operating cycle, the target power consumption, the power consumption calculation strategy, and the reacquired temperature and power consumption.
[0180] In some embodiments, the static power consumption calculation strategy is obtained based on a pre-trained static power consumption model; the training unit is further configured to acquire a second sample set including multiple second sample data; the second sample data includes static power consumption related to voltage, temperature and quiescent current, wherein the static power consumption is the power consumption of the processor under no-load conditions at voltage and temperature; the static power consumption model is obtained based on the second sample set; the static power consumption model is used to generate static power consumption based on the processor's voltage, temperature and quiescent current.
[0181] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this application can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0182] It should be noted that, in the embodiments of this application, if the above-described processor operating parameter adjustment method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This 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 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, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.
[0183] This application provides a processor that includes the management and control components described in the above embodiments.
[0184] This application provides a computer device including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.
[0185] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.
[0186] This application provides a computer program including computer-readable code, wherein when the computer-readable code is executed in a computer device, a processor in the computer device performs some or all of the steps in the above-described method.
[0187] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0188] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0189] Figure 12 This application provides a hardware entity diagram of a computer device as an embodiment of the present application, such as... Figure 12 As shown, the hardware entity of the computer device 1200 includes a processor 1201 and a memory 1202, wherein the memory 1202 stores a computer program that can run on the processor 1201, and the processor 1201 executes the program to implement the steps in the method of any of the above embodiments.
[0190] The memory 1202 stores computer programs that can run on the processor. The memory 1202 is configured to store instructions and applications that can be executed by the processor 1201. It can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data, and video communication data) in the processor 1201 and various modules in the computer device 1200. It can be implemented by flash memory or random access memory (RAM).
[0191] The processor 1201 executes the steps of the processor operating parameter adjustment method described above when executing the program. The processor 1201 typically controls the overall operation of the computer device 1200.
[0192] This application provides a computer storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the processor operating parameter adjustment method as described in any of the above embodiments.
[0193] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0194] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.
[0195] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0196] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for adjusting processor operating parameters, characterized in that, The method includes: Obtain the processor's current operating parameters, current temperature, and current power consumption; Based on the power consumption calculation strategy corresponding to the processor, the current load data is determined using the current operating parameters, current temperature, and current power consumption; the current load data characterizes the load status of the processor. Using the current load data, the current temperature, the preset target power consumption, and the power consumption calculation strategy, the operating parameters of the processor in the next running cycle are determined; The processor's operating parameters include voltage and frequency, and the power consumption calculation strategy includes a static power consumption calculation strategy and a dynamic power consumption calculation strategy. The dynamic power consumption calculation strategy is used to calculate the corresponding dynamic power consumption using load data and voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training. The static power consumption calculation strategy is used to calculate the corresponding static power consumption using the obtained voltage and temperature. The voltage-frequency mapping relationship is obtained from the processor's firmware code when the processor is powered on. The method for determining the current load data based on the power consumption calculation strategy corresponding to the processor, using the current operating parameters, current temperature, and current power consumption, includes: determining the current static power consumption based on the static power consumption calculation strategy, using the current operating parameters and current temperature; determining the current dynamic power consumption based on the difference between the current static power consumption and the current power consumption; and determining the current load data based on the dynamic power consumption calculation strategy, using the current dynamic power consumption and the current operating parameters.
2. The method according to claim 1, characterized in that, The voltage and the frequency satisfy the voltage-frequency mapping data corresponding to the processor. The step of determining the processor's operating parameters for the next operating cycle using the current load data, the current temperature, the preset target power consumption, and the power consumption calculation strategy includes: Among multiple voltage frequency combinations that satisfy the voltage frequency mapping data, a target voltage frequency combination is determined; wherein, the target voltage frequency is the voltage frequency combination among the multiple voltage frequency combinations that is closest to and less than the target power consumption, based on the current load data and the power consumption calculation strategy; The voltage and frequency in the target voltage-frequency combination are determined as the operating parameters of the processor in the next operating cycle.
3. The method according to claim 1, characterized in that, The voltage-frequency mapping data is stored in the processor, and the method further includes: In response to the processor being powered on, the processor's hardware parameters and the voltage-frequency mapping relationship obtained based on pre-training are read. Based on the processor's hardware parameters and the voltage-frequency mapping relationship, voltage-frequency mapping data corresponding to the processor is generated.
4. The method according to claim 1, characterized in that, The voltage-frequency mapping relationship is obtained based on a pre-trained voltage-frequency prediction model, the training process of which includes: Acquire a first sample set including multiple first sample data; the first sample data includes voltage frequency curves related to voltage, temperature, and hardware parameters, the voltage frequency curves include the mapping relationship between voltage and frequency and boundary parameters at the voltage frequency, the boundary parameters being the difference in the pass rate of long-term testing and short-term testing at the voltage frequency; The voltage frequency prediction model is obtained based on the first sample set; the voltage frequency prediction model is used to generate the voltage frequency mapping relationship of the processor based on the processor's hardware parameters.
5. The method according to claim 1, characterized in that, The method for determining the current static power consumption based on the static power consumption calculation strategy, using the current operating parameters and the current temperature, includes: Read the static current of the processor; The current static power consumption is determined based on the quiescent current, the current operating parameters, and the current temperature.
6. The method according to claim 2, characterized in that, The processor is provided with a voltage setting unit and a frequency setting unit, and the method further includes: The voltage for the next operating cycle is sent to the voltage setting unit so that the voltage of the processor is set to the voltage for the next operating cycle through the voltage setting unit; The frequency of the next operating cycle is sent to the frequency setting unit so that the frequency of the processor is set to the frequency of the next operating cycle by the frequency setting unit.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: In response to the processor running a cycle with the operating parameters of the next operating cycle, the processor's temperature and power consumption are reacquired, and new operating parameters are determined based on the operating parameters of the next operating cycle, the target power consumption, the power consumption calculation strategy, and the reacquired temperature and power consumption.
8. The method according to any one of claims 1 to 6, characterized in that, The static power consumption calculation strategy is obtained based on a pre-trained static power consumption model, and the method further includes: Obtain a second sample set including multiple second sample data; the second sample data includes static power consumption related to voltage, temperature and quiescent current, the static power consumption being the power consumption of the processor under no-load conditions at voltage and temperature; The static power consumption model is obtained based on the second sample set; the static power consumption model is used to generate static power consumption based on the processor's voltage, temperature and static current.
9. A management control component, disposed in a processor, the management control component comprising: The acquisition unit is used to acquire the processor's current operating parameters, current temperature, and current power consumption. The first determining unit is used to determine the current load data based on the power consumption calculation strategy corresponding to the processor, using the current operating parameters, current temperature and current power consumption; The current load data represents the load status of the processor; The second determining unit is used to determine the operating parameters of the processor in the next running cycle by using the current load data, the current temperature, the preset target power consumption and the power consumption calculation strategy; The processor's operating parameters include voltage and frequency, and the power consumption calculation strategy includes a static power consumption calculation strategy and a dynamic power consumption calculation strategy. The dynamic power consumption calculation strategy is used to calculate the corresponding dynamic power consumption using load data and voltage and frequency obtained based on the voltage-frequency mapping relationship obtained through pre-training. The static power consumption calculation strategy is used to calculate the corresponding static power consumption using the obtained voltage and temperature. The voltage-frequency mapping relationship is obtained from the processor's firmware code when the processor is powered on. The first determining unit is further configured to determine the current static power consumption based on the static power consumption calculation strategy, using the current operating parameters and the current temperature; determine the current dynamic power consumption based on the difference between the current static power consumption and the current power consumption; and determine the current load data based on the dynamic power consumption calculation strategy, using the current dynamic power consumption and the current operating parameters.
10. A processor, characterized in that, The processor includes the management and control components as described in claim 9.
11. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
13. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Power consumption adjusting method and device
CN117296022A
Dynamic voltage frequency adjusting method, device, equipment, medium and processor system
CN117555405A
Chip control method and device, equipment, medium and product
CN119203727A