Voltage frequency adjusting method and device of GPU, storage medium and program product
By adjusting the GPU frequency and voltage in multiple steps, the problems of hardware stability and circuit complexity in traditional GPU voltage and frequency adjustment technology are solved, achieving more stable and efficient voltage and frequency adjustment, simplifying circuit design and reducing hardware costs.
Patent Information
- Application Number
- CN202510820830.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional GPU voltage and frequency adjustment technology has shortcomings in hardware stability, voltage change slope and circuit design complexity. In particular, large-scale adjustments have an impact on hardware stability and complex circuit design.
The method of adjusting frequency and voltage in multiple steps is adopted. By determining the transition frequency and transition voltage, the adjustment amplitude of each time becomes smaller. The frequency is modulated by a voltage-controlled oscillator to avoid hardware impact caused by large-scale adjustment and make the voltage change slope tend to be ideal.
It reduces the impact on hardware stability, avoids hardware failure and performance degradation, simplifies circuit design, reduces chip area and power consumption, and improves the overall performance and efficiency of the system.
Smart Images

Figure CN120704498A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method for adjusting the voltage and frequency of a GPU, a device for adjusting the voltage and frequency of a GPU, a non-volatile computer-readable storage medium, and a computer program product. Background Art
[0002] In modern computing systems, GPU (Graphical Processing Unit) performance and power management are crucial. Dynamic Voltage and Frequency Scaling (DVFS) technology is widely used in GPUs, dynamically adjusting voltage and frequency based on workload to achieve a balance between performance and power consumption. However, traditional DVFS technology typically uses a one-time, large-scale adjustment of voltage and frequency. This approach has significant limitations in hardware stability, voltage ramp rate, and circuit design complexity. Summary of the Invention
[0003] In view of this, the present disclosure provides a technical solution for regulating the voltage and frequency of a GPU.
[0004] According to one aspect of the present disclosure, a method for adjusting voltage and frequency of a GPU is provided, comprising:
[0005] Get the target frequency and / or target voltage of the GPU;
[0006] determining a transition frequency and a transition voltage according to an initial frequency and / or an initial voltage of the GPU and the target frequency and / or the target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage;
[0007] Based on the transition frequency, adjusting the frequency of the GPU in multiple steps until the target frequency is reached;
[0008] Based on the transition voltage, the voltage of the GPU is adjusted in multiple steps until the target voltage is reached.
[0009] In a possible implementation, there are multiple transition frequencies and multiple transition voltages.
[0010] In a possible implementation, adjusting the GPU frequency in multiple steps based on the transition frequency until the target frequency is reached includes:
[0011] The frequency of the GPU is adjusted in multiple steps based on the transition frequency by a voltage controlled oscillator until the target frequency is reached.
[0012] In a possible implementation, determining the transition frequency and the transition voltage according to the initial frequency and / or initial voltage of the GPU and the target frequency and / or the target voltage includes:
[0013] Determining a transition frequency according to an initial frequency of the GPU, a preset frequency adjustment step, and the target frequency;
[0014] A transition voltage is determined according to the transition frequency and a corresponding relationship between the voltage and frequency of the GPU.
[0015] In a possible implementation, determining the transition frequency and the transition voltage according to the initial frequency and / or initial voltage of the GPU and the target frequency and / or the target voltage includes:
[0016] Determining a transition voltage according to an initial voltage of the GPU, a preset voltage adjustment step size, and the target voltage;
[0017] A transition frequency is determined according to the transition voltage and a corresponding relationship between the voltage and frequency of the GPU.
[0018] In one possible implementation, obtaining a target frequency and / or target voltage of a GPU includes:
[0019] Obtain at least one of a real-time workload, a real-time temperature, and a real-time power consumption of the GPU;
[0020] A target frequency and / or a target voltage of the GPU is calculated according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption.
[0021] In a possible implementation, calculating the target frequency and / or target voltage of the GPU according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption includes:
[0022] The target frequency and / or target voltage of the GPU is calculated based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a dynamic voltage and frequency adjustment algorithm.
[0023] According to another aspect of the present disclosure, a voltage and frequency adjustment device for a GPU is provided, comprising:
[0024] An acquisition module, used to obtain a target frequency and / or target voltage of a GPU;
[0025] a determination module, configured to determine a transition frequency and a transition voltage based on an initial frequency and / or initial voltage of the GPU and the target frequency and / or target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage;
[0026] a frequency adjustment module, configured to adjust the frequency of the GPU in multiple steps based on the transition frequency until the target frequency is reached;
[0027] A voltage regulation module is configured to regulate the voltage of the GPU in multiple steps based on the transition voltage until the target voltage is reached.
[0028] In a possible implementation, there are multiple transition frequencies and multiple transition voltages.
[0029] In a possible implementation, the frequency adjustment module is configured to:
[0030] The frequency of the GPU is adjusted in multiple steps based on the transition frequency by a voltage controlled oscillator until the target frequency is reached.
[0031] In a possible implementation, the determining module is configured to:
[0032] Determining a transition frequency according to an initial frequency of the GPU, a preset frequency adjustment step, and the target frequency;
[0033] A transition voltage is determined according to the transition frequency and a corresponding relationship between the voltage and frequency of the GPU.
[0034] In a possible implementation, the determining module is configured to:
[0035] Determining a transition voltage according to an initial voltage of the GPU, a preset voltage adjustment step size, and the target voltage;
[0036] A transition frequency is determined according to the transition voltage and a corresponding relationship between the voltage and frequency of the GPU.
[0037] In a possible implementation, the obtaining module is configured to:
[0038] Obtain at least one of a real-time workload, a real-time temperature, and a real-time power consumption of the GPU;
[0039] A target frequency and / or a target voltage of the GPU is calculated according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption.
[0040] In a possible implementation, the obtaining module is configured to:
[0041] The target frequency and / or target voltage of the GPU is calculated based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a dynamic voltage and frequency adjustment algorithm.
[0042] According to another aspect of the present disclosure, a voltage and frequency adjustment device for a GPU is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0043] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0044] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0045] In an embodiment of the present disclosure, a target frequency and / or target voltage of a GPU is obtained, and a transition frequency and transition voltage are determined based on the GPU's initial frequency and / or initial voltage, as well as the target frequency and / or target voltage. The transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage. Based on the transition frequency, the GPU frequency is adjusted in multiple steps until the target frequency is reached, and based on the transition voltage, the GPU voltage is adjusted in multiple steps until the target voltage is reached. This provides a more refined method for adjusting GPU voltage and frequency. By adjusting the frequency and voltage in multiple steps, the amplitude of each adjustment decreases, significantly reducing the current rate of change (di / dt), thereby effectively mitigating the impact on hardware stability and avoiding hardware failures and performance degradation caused by excessive current changes due to large-amplitude adjustments. Furthermore, the present embodiment can make the voltage change slope approach an idealized fixed slope, rather than a traditional parabolic shape, which helps better control the voltage change process and further enhances system stability. In addition, due to the use of a small-step adjustment method, a general voltage-controlled oscillator can be directly used for frequency modulation, without the need for a complex secondary circuit to assist the voltage-controlled oscillator in its operation, thereby streamlining the circuit design, reducing the chip area and power consumption, lowering hardware costs, and improving the overall performance and efficiency of the system.
[0046] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0048] Figure 1 A flowchart of a method for adjusting GPU voltage and frequency is shown in an embodiment of the present disclosure.
[0049] Figure 2 A block diagram illustrating a DVFS system for a GPU.
[0050] Figure 3 A flow chart illustrating a DVFS system for a GPU.
[0051] Figure 4 A circuit diagram showing a voltage controlled oscillator.
[0052] Figure 5 FIG. 1 is a schematic diagram showing waveforms of voltage changing over time in a method for adjusting GPU voltage and frequency in the related art.
[0053] Figure 6 A schematic diagram of a waveform showing voltage changes over time in a method for adjusting GPU voltage and frequency provided by an embodiment of the present disclosure is shown.
[0054] Figure 7 A block diagram of a GPU voltage and frequency adjustment device provided by an embodiment of the present disclosure is shown.
[0055] Figure 8 It is a block diagram showing a voltage and frequency adjustment device 1900 for a GPU according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0057] As used herein, the terms "comprises," "comprising," "having," or variations thereof are open ended and include one or more stated features, integers, elements, steps, parts, or functions, but do not preclude the presence or addition of one or more other features, integers, elements, steps, parts, functions, or groups thereof.
[0058] When an element is referred to as being "connected," "coupled," "responsive" or variations thereof to another element, it can be directly connected, coupled or responsive to the other element or intervening elements may be present.
[0059] Although the terms first, second, third, etc. may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another element / operation. Therefore, without departing from the teachings of the present invention, the first element / operation in some embodiments may be referred to as the second element / operation in other embodiments.
[0060] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0061] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0062] The DVFS (Dynamic Voltage and Frequency Scaling) technology in related technologies usually uses a one-time, large-scale adjustment of voltage and frequency. For example, when the GPU workload changes significantly, the system will directly adjust the voltage from 0.6V to 0.9V and the frequency from 1GHz to 1.8GHz. Although this adjustment method is simple and direct, it will cause the current change rate (di / dt) to increase instantaneously, which will impact the stability of the hardware. In addition, the slope of the voltage change is parabolic, rather than an ideal fixed slope, which further increases the instability of the system.
[0063] Another problem is the complexity of the frequency modulation circuit in the related art. In order to meet the regulation requirements of the GPU (Graphical Processing Unit) within a wide frequency range (such as 1800MHz to 400MHz), it is usually necessary to design a secondary circuit to assist the VCO (Voltage-Controlled Oscillator) in its operation. However, the introduction of the secondary circuit not only increases the complexity of the circuit design, but also occupies additional chip area, resulting in increased power consumption. In addition, the VCO is prone to noise interference when modulating the frequency by a large amplitude, affecting the overall performance of the system.
[0064] In summary, the DVFS technology in related technologies has obvious deficiencies in hardware stability, voltage change slope, and circuit design complexity.
[0065] To address technical issues similar to those described above, embodiments of the present disclosure provide a method for adjusting GPU voltage and frequency. The method obtains a target frequency and / or target voltage of a GPU, determines a transition frequency and transition voltage based on the GPU's initial frequency and / or initial voltage, and the target frequency and / or target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage. Based on the transition frequency, the GPU frequency is adjusted in multiple steps until the target frequency is reached, and based on the transition voltage, the GPU voltage is adjusted in multiple steps until the target voltage is reached. This provides a more refined method for adjusting GPU voltage and frequency. By adjusting the frequency and voltage in multiple steps, the amplitude of each adjustment decreases, significantly reducing the current rate of change (di / dt), thereby effectively mitigating the impact on hardware stability and avoiding hardware failures and performance degradation caused by excessive current changes due to large-amplitude adjustments. Furthermore, embodiments of the present disclosure can make the voltage change slope approach an idealized fixed slope, rather than a traditional parabolic shape, which helps better control the voltage change process and further enhances system stability. In addition, due to the use of a small-step adjustment method, a general voltage-controlled oscillator can be directly used for frequency modulation, without the need for a complex secondary circuit to assist the voltage-controlled oscillator in its operation, thereby streamlining the circuit design, reducing the chip area and power consumption, lowering hardware costs, and improving the overall performance and efficiency of the system.
[0066] The voltage and frequency adjustment method of a GPU provided by the embodiments of the present disclosure is described in detail below with reference to the accompanying drawings.
[0067] Figure 1 A flow chart of the voltage and frequency adjustment method of the GPU provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the voltage and frequency adjustment method of the GPU may be a voltage and frequency adjustment device of the GPU. For example, the voltage and frequency adjustment method of the GPU may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device, etc. In some possible implementations, the voltage and frequency adjustment method of the GPU may be implemented by a processor calling computer-readable instructions stored in a memory. As Figure 1 As shown, the GPU voltage frequency adjustment method includes steps S11 to S14.
[0068] In step S11 , a target frequency and / or target voltage of the GPU is obtained.
[0069] In step S12, a transition frequency and a transition voltage are determined based on the initial frequency and / or initial voltage of the GPU, and the target frequency and / or the target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage.
[0070] In step S13, based on the transition frequency, the frequency of the GPU is adjusted in multiple steps until the target frequency is reached.
[0071] In step S14 , based on the transition voltage, the voltage of the GPU is adjusted in multiple steps until the target voltage is reached.
[0072] In the embodiments of the present disclosure, the target frequency may refer to the operating frequency that the GPU needs to achieve, calculated based on factors such as its performance requirements and power consumption control under specific operating conditions. The target voltage may refer to the operating voltage that the GPU needs to achieve, calculated based on factors such as its performance requirements and power consumption control under specific operating conditions. In one possible implementation, after obtaining the target frequency of the GPU, the target voltage may be calculated based on the correspondence between the voltage and frequency of the GPU. In another possible implementation, after obtaining the target voltage of the GPU, the target frequency may be calculated based on the correspondence between the voltage and frequency of the GPU.
[0073] In one possible implementation, obtaining the target frequency and / or target voltage of the GPU includes: obtaining at least one of the real-time workload, real-time temperature, and real-time power consumption of the GPU; and calculating the target frequency and / or target voltage of the GPU based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption.
[0074] Among them, parameters such as GPU real-time workload, real-time temperature and real-time power consumption can be collected in real time through sensors and monitoring tools.
[0075] As an example of this implementation, the target frequency and / or target voltage of the GPU can be determined based on at least the real-time workload of the GPU. The GPU's workload directly affects its performance requirements. For example, when running graphics-intensive applications (such as 3D (3D) games or professional graphics rendering), the GPU requires a higher frequency and voltage to meet high performance requirements; while when running lightweight tasks (such as text editing or web browsing), a lower frequency and voltage are sufficient. By monitoring the real-time workload of the GPU, the target frequency and target voltage suitable for the current task can be dynamically calculated.
[0076] As an example of this implementation, the GPU's target frequency and / or target voltage can be determined based on at least the GPU's real-time temperature. GPUs generate heat during operation, and excessively high temperatures can affect their performance and stability. Therefore, in this example, the target frequency and target voltage can be adjusted based on the GPU's real-time temperature. If the temperature is too high, the frequency and voltage can be lowered to reduce heat generation. If the temperature is within a safe range, the frequency and voltage can be increased appropriately based on workload requirements.
[0077] As an example of this implementation, the GPU's target frequency and / or target voltage can be determined based at least on the GPU's real-time power consumption. In this example, to achieve power consumption control and energy conservation, the target frequency and target voltage can be adjusted based on the GPU's real-time power consumption. If the current power consumption is too high, the frequency and voltage can be lowered to reduce power consumption. If the power consumption is within an allowable range, the frequency and voltage can be adjusted based on workload requirements to optimize performance.
[0078] In other possible implementations, the target frequency and / or target voltage of the GPU may also be affected by factors such as the overall system power budget, the performance mode set by the user (such as energy-saving mode or high-performance mode), the battery power level (for mobile devices), the capabilities and status of the cooling system (such as fan speed and heat sink temperature), and the need for collaborative work with other hardware components (such as the CPU (Central Processing Unit) or memory).
[0079] As an example of this implementation, calculating the target frequency and / or target voltage of the GPU based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption includes: calculating the target frequency and / or target voltage of the GPU based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a DVFS (Dynamic Voltage and Frequency Scaling) algorithm.
[0080] In this implementation, at least some real-time parameters, such as the GPU's real-time workload, real-time temperature, and real-time power consumption, can be input into the DVFS algorithm. Based on these input parameters, the DVFS algorithm can calculate the target frequency and target voltage that best suit the current system state. For example, the DVFS algorithm can comprehensively consider factors such as performance requirements, temperature limits, and power consumption limits to ensure that the GPU meets performance requirements while maintaining hardware stability and optimizing power consumption.
[0081] Imagine a mobile device's GPU is running a graphics-intensive game. The real-time workload is high, requiring a higher frequency to keep the game running smoothly. The high load may cause the real-time temperature to rise, requiring appropriate reductions in frequency or voltage to prevent overheating. Real-time power consumption also needs to be considered to ensure adequate battery life. The DVFS algorithm can calculate a balance based on these real-time parameters. For example, the DVFS algorithm might decide to increase the frequency to 1.5 GHz while simultaneously raising the voltage to 0.8 V to meet the game's performance requirements while avoiding overheating and excessive power consumption. In this way, the DVFS algorithm can dynamically and intelligently adjust the GPU's operating state to suit different application scenarios and system requirements.
[0082] As another example of this implementation, calculating the target frequency and / or target voltage of the GPU based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption includes: calculating the target frequency of the GPU based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a DFS (Dynamic Frequency Scaling) algorithm.
[0083] Figure 2 A block diagram showing the DVFS system of a GPU is shown. Figure 2 In the system, the host is the control center of the entire system and is responsible for sending workloads to the GPU. The workload is a task or data processing request sent by the host to the GPU. The size and complexity of the workload will affect the performance requirements of the GPU. The GPU is responsible for executing the workload sent by the host. The GPU may contain a DVFS module, which can dynamically adjust the frequency and voltage of the GPU based on factors such as workload, temperature, and power consumption. The CRG (Clock and Reset Generator) is responsible for generating clock signals and reset signals, which control the timing and synchronization of the internal circuits of the GPU. The VCO can generate an output of a specific frequency based on the clock signal of the CRG for frequency adjustment of the GPU. The voltage domain is responsible for providing the different voltage levels required by the GPU, which can be controlled by the DVFS module.
[0084] Figure 2 The arrows in the figure can represent data flow or control signal transmission. For example, the host can send a workload to the GPU, and the GPU's DVFS module can adjust the CRG and voltage domain based on the workload and other parameters to change the VCO output frequency and GPU voltage.
[0085] Figure 3The flowchart of the GPU DVFS system is shown in FIG. This flowchart describes the entire process from collecting temperature and power consumption data to finally adjusting the GPU frequency and voltage. Figure 3 As shown, the real-time temperature data of the GPU can be collected through a PVT (Process, Voltage, Temperature) sensor. The real-time power consumption data of the GPU can be collected through a power consumption sensor.
[0086] Based on the collected temperature data, the thermal management module can determine whether to perform relevant actions to control the temperature. These actions can include shutting down and slowing down the GPU. If the temperature exceeds a safe threshold, the system can shut down the GPU via the GPIO (General Purpose Input / Output) interface to prevent damage. Alternatively, the GPU's operating frequency and / or voltage can be reduced to lower power consumption and reduce heat generation.
[0087] The power capping module determines the GPU's target power consumption to prevent excessive power consumption from impacting system stability or battery life. A PID (Proportional-Integral-Derivative) controller can be used to determine the GPU's target frequency and target voltage based on the target power consumption and a DVFS or DFS algorithm. The CRG is responsible for generating the clock and reset signals required by the GPU, which control the GPU's operating frequency. Ultimately, the GPU's voltage is adjusted to the required target voltage to support the target frequency.
[0088] Figure 3 The company demonstrated a closed-loop control system that continuously monitors the GPU's temperature and power consumption, then dynamically adjusts the GPU's frequency and voltage based on this data to optimize performance and power consumption. This regulation helps improve system energy efficiency while ensuring the hardware operates within safe temperature and power consumption ranges.
[0089] In an embodiment of the present disclosure, during the GPU voltage and frequency adjustment process, a transition frequency and a transition voltage can be determined to smoothly transition the GPU from an initial operating state (initial frequency, initial voltage) to a target operating state (target frequency, target voltage) instead of directly making large adjustments. The initial frequency and the initial voltage may refer to the operating frequency and the operating voltage of the GPU at the beginning of the adjustment. That is, the initial frequency and the initial voltage may represent the starting point of the adjustment. The transition frequency and the transition voltage may represent an intermediate frequency value and an intermediate voltage value set between the initial frequency and the target frequency, and between the initial voltage and the target voltage. The transition frequency and the transition voltage are used to adjust the frequency and voltage of the GPU in steps to avoid the hardware impact caused by jumping directly from the initial value to the target value.
[0090] In a possible implementation, there are multiple transition frequencies and multiple transition voltages.
[0091] In this implementation, in order to more finely adjust the frequency and voltage of the GPU, the transition frequency and transition voltage can be set to multiple different values rather than a single intermediate value.
[0092] By setting multiple transition frequencies and voltages, each with a smaller adjustment amplitude, the current rate of change (di / dt) can be significantly reduced, minimizing impact on hardware and improving system stability. Multi-step adjustment can make the voltage slope smoother, closer to the ideal fixed slope, further optimizing system performance and power consumption.
[0093] In one possible implementation, determining the transition frequency and transition voltage based on the initial frequency and / or initial voltage of the GPU, and the target frequency and / or target voltage, includes: determining the transition frequency based on the initial frequency of the GPU, a preset frequency adjustment step, and the target frequency; and determining the transition voltage based on the transition frequency and the corresponding relationship between the voltage and frequency of the GPU.
[0094] As an example of this implementation, the difference between the first transition frequency and the initial frequency is equal to the preset frequency adjustment step, the difference between adjacent transition frequencies is equal to the preset frequency adjustment step, and the difference between the target frequency and the last transition frequency is equal to the preset frequency adjustment step.
[0095] In this implementation, the preset frequency adjustment step size can be a pre-set value representing the magnitude of the frequency change during each adjustment. The preset frequency adjustment step size can be set based on system design requirements and stability considerations. In this implementation, starting from an initial frequency, the frequency is gradually adjusted according to the preset frequency adjustment step size until the target frequency is reached or approached.
[0096] The relationship between GPU voltage and frequency refers to how the voltage should change as the frequency changes in the GPU design. Generally, higher frequencies require higher voltages to maintain GPU stability and performance.
[0097] For example, if the initial frequency is 1 GHz (1000 MHz), the target frequency is 1.2 GHz (1200 MHz), and the preset frequency adjustment step size is 10 MHz, the transition frequency is determined by starting from the initial frequency of 1 GHz and increasing by 10 MHz at a time until the target frequency of 1.2 GHz is reached. The transition frequency sequence is: 1010 MHz, 1020 MHz, 1030 MHz, and so on to 1200 MHz.
[0098] For each transition frequency, a corresponding transition voltage may be determined according to a corresponding relationship between the voltage and frequency of the GPU (eg, a voltage-frequency function of the GPU, a voltage-frequency characteristic curve of the GPU).
[0099] In this implementation, the GPU frequency and voltage do not jump from the initial value to the target value all at once, but are gradually adjusted through a series of small steps. This can avoid the current changes that are too fast due to large adjustments, thereby reducing the impact on the hardware, and reduce system instability through smooth voltage and frequency changes.
[0100] In one possible implementation, determining the transition frequency and transition voltage based on the initial frequency and / or initial voltage of the GPU, and the target frequency and / or target voltage, includes: determining the transition voltage based on the initial voltage of the GPU, a preset voltage adjustment step, and the target voltage; and determining the transition frequency based on the transition voltage and the corresponding relationship between the voltage and frequency of the GPU.
[0101] As an example of this implementation, the difference between the first transition voltage and the initial voltage is equal to the preset voltage adjustment step, the difference between adjacent transition voltages is equal to the preset voltage adjustment step, and the difference between the target voltage and the last transition voltage is equal to the preset voltage adjustment step.
[0102] In this implementation, the preset voltage adjustment step size can be a pre-set value representing the magnitude of the voltage change during each adjustment. The preset voltage adjustment step size can be set based on system design requirements and stability considerations. In this implementation, starting from an initial voltage, the voltage is gradually adjusted according to the preset voltage adjustment step size until it reaches or approaches the target voltage.
[0103] After determining the transition voltage, the transition frequency can be determined based on the relationship between GPU voltage and frequency. This relationship can be based on empirical data or a pre-set voltage-frequency curve, which describes the frequency at which the GPU should operate at a specific voltage.
[0104] For example, if the initial voltage is 0.6V, the target voltage is 0.9V, and the preset voltage adjustment step is 0.03V, the transition voltage sequence is: 0.63V, 0.66V, 0.69V, 0.72V, 0.75V, 0.78V, 0.81V, 0.84V, and 0.87V. For each transition voltage, the corresponding transition frequency can be determined based on the corresponding relationship between GPU voltage and frequency.
[0105] In this implementation, the GPU frequency and voltage do not jump from the initial value to the target value all at once, but are gradually adjusted through a series of small steps. This can avoid the current changes that are too fast due to large adjustments, thereby reducing the impact on the hardware, and reduce system instability through smooth voltage and frequency changes.
[0106] In the embodiment of the present disclosure, the frequency of the GPU may be adjusted in multiple steps based on the transition frequency until the target frequency is reached.
[0107] In one possible implementation, adjusting the frequency of the GPU in multiple steps based on the transition frequency until the target frequency is reached includes: adjusting the frequency of the GPU in multiple steps based on the transition frequency through a voltage-controlled oscillator until the target frequency is reached.
[0108] The GPU may need to be adjusted over a large frequency range (for example, from 1800MHz to 400MHz), while traditional voltage-controlled oscillators can usually only make small frequency adjustments. When attempting to make large frequency adjustments through a voltage-controlled oscillator, noise interference may be generated, which not only affects the performance of the system, but may also exceed the allowable range of business requirements. To solve this problem, the relevant technology requires a secondary circuit to assist the voltage-controlled oscillator in working so as to accurately control the frequency over a large range. However, the introduction of the secondary circuit increases the complexity of the circuit design, occupies more chip area, and thus leads to higher power consumption.
[0109] In this implementation, by adopting a voltage-frequency adjustment scheme with small steps, frequency adjustment over a wide range (e.g., 1800MHz to 400MHz) can be achieved using only a voltage-controlled oscillator (VCO), without the need for secondary circuitry. In this implementation, each adjustment step brings the GPU frequency closer to the target frequency, but with a smaller amplitude, thus avoiding the noise interference that may be caused by large adjustments. Therefore, this implementation can directly use the VCO for frequency modulation without the need for complex secondary circuitry, which helps simplify circuit design, reduce chip footprint and power consumption, lower hardware costs, and improve overall system performance and efficiency.
[0110] Figure 4 The following figure shows a circuit diagram of a voltage-controlled oscillator. A VCO is an electronic oscillator whose output frequency can be controlled by an input voltage. In a phase-locked loop (PLL) system, a VCO is often used to generate a desired output frequency that is synchronized with an input reference frequency.
[0111] exist Figure 4 In a VCO, a variable-frequency oscillator (VCO) generates a variable-frequency oscillating signal. The VCO's output frequency is proportional to the voltage applied to its control input. A phase frequency detector (PFD) compares the phase difference between a reference signal (FREF) and the VCO's output signal. A quadrature phase multiplier (QPMP) converts the phase error signal detected by the PFD into a higher-frequency signal for better VCO control. A delta-sigma modulator (ΔΣ) converts the phase error signal into a format suitable for controlling the VCO. A delta-sigma modulator typically generates a control voltage that adjusts the VCO's output frequency. A digitally controlled oscillator (DCO) receives the control signal from the delta-sigma modulator and adjusts its output frequency accordingly. Lock detect monitors whether the PLL is locked, that is, whether the VCO's output frequency is stable and synchronized with the reference frequency. A reference frequency divider (REFDIV) divides the reference frequency for comparison with the VCO's output frequency. The FDLY (feedback divider) divides the output frequency of the VCO to generate a feedback signal that is synchronized with the reference frequency.
[0112] In a PLL system, the VCO's output frequency is fed back to the PFD via the FDLY and compared with a reference frequency. Any phase or frequency error detected by the PFD is converted into a control voltage via the QPMP and ΔΣ modulator. This voltage adjusts the VCO's output frequency until it synchronizes with the reference frequency. When the system reaches lock, the VCO's output frequency is stable and synchronized with the reference frequency.
[0113] In the embodiment of the present disclosure, the voltage of the GPU may be adjusted in multiple steps based on the transition voltage until the target voltage is reached.
[0114] Figure 5 FIG. 1 is a schematic diagram showing waveforms of voltage changing over time in a method for adjusting GPU voltage and frequency in the related art. Figure 6 A schematic diagram of a waveform showing voltage changes over time in a method for adjusting GPU voltage and frequency provided by an embodiment of the present disclosure is shown. Figure 5 and Figure 6 The waveform in can be captured by an oscilloscope. Figure 5 In the circuit, the slope of voltage change is parabolic rather than an ideal fixed slope, which further increases the instability of the system. Figure 6 The waveform in the circuit is close to an ideal fixed slope, which means that the rate of change of voltage over time (dV / dt) is constant. The voltage increases smoothly from the initial voltage to the target voltage, further enhancing the stability of the system.
[0115] In the embodiment of the present disclosure, step S13 and step S14 may be executed in parallel or alternately, depending on the adjustment strategy and system requirements.
[0116] The GPU voltage and frequency adjustment method provided by the embodiments of the present disclosure can be applied to technical fields such as frequency adjustment, voltage adjustment, and power consumption control, and is not limited here.
[0117] The following describes the voltage and frequency adjustment method for the GPU provided by the embodiment of the present disclosure through a specific application scenario. In this implementation, the real-time workload, real-time temperature, and real-time power consumption of the GPU can be obtained, and the target frequency of the GPU can be calculated by a dynamic voltage and frequency adjustment algorithm based on the real-time workload, real-time temperature, and real-time power consumption of the GPU. A plurality of transition frequencies can be determined based on the initial frequency of the GPU, a preset frequency adjustment step, and the target frequency. A plurality of transition voltages can be determined based on the plurality of transition frequencies and the correspondence between the voltage and frequency of the GPU. The frequency of the GPU can be adjusted in multiple steps based on the plurality of transition frequencies by a voltage-controlled oscillator until the target frequency is reached. The voltage of the GPU can be adjusted in multiple steps based on the plurality of transition voltages until the target voltage corresponding to the target frequency is reached.
[0118] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0119] In addition, the present disclosure also provides a GPU voltage and frequency adjustment device, a non-volatile computer-readable storage medium, and a computer program product, all of which can be used to implement any GPU voltage and frequency adjustment method provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding description of the method section and will not be repeated here.
[0120] Figure 7 FIG. 1 is a block diagram of a voltage frequency regulating device for a GPU provided by an embodiment of the present disclosure. Figure 7 As shown, the voltage frequency adjustment device of the GPU includes:
[0121] An acquisition module 71 is configured to obtain a target frequency and / or target voltage of a GPU;
[0122] a determination module 72, configured to determine a transition frequency and a transition voltage based on an initial frequency and / or initial voltage of the GPU and the target frequency and / or target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage;
[0123] a frequency adjustment module 73, configured to adjust the frequency of the GPU in multiple steps based on the transition frequency until the target frequency is reached;
[0124] The voltage regulating module 74 is configured to regulate the voltage of the GPU in multiple steps based on the transition voltage until the target voltage is reached.
[0125] In a possible implementation, there are multiple transition frequencies and multiple transition voltages.
[0126] In a possible implementation, the frequency adjustment module 73 is configured to:
[0127] The frequency of the GPU is adjusted in multiple steps based on the transition frequency by a voltage controlled oscillator until the target frequency is reached.
[0128] In a possible implementation, the determining module 72 is configured to:
[0129] Determining a transition frequency according to an initial frequency of the GPU, a preset frequency adjustment step, and the target frequency;
[0130] A transition voltage is determined according to the transition frequency and a corresponding relationship between the voltage and frequency of the GPU.
[0131] In a possible implementation, the determining module 72 is configured to:
[0132] Determining a transition voltage according to an initial voltage of the GPU, a preset voltage adjustment step size, and the target voltage;
[0133] A transition frequency is determined according to the transition voltage and a corresponding relationship between the voltage and frequency of the GPU.
[0134] In a possible implementation, the obtaining module 71 is configured to:
[0135] Obtain at least one of a real-time workload, a real-time temperature, and a real-time power consumption of the GPU;
[0136] A target frequency and / or a target voltage of the GPU is calculated according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption.
[0137] In a possible implementation, the obtaining module 71 is configured to:
[0138] The target frequency and / or target voltage of the GPU is calculated based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a dynamic voltage and frequency adjustment algorithm.
[0139] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0140] An embodiment of the present disclosure further provides a voltage and frequency adjustment device for a GPU, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0141] An embodiment of the present disclosure further provides a non-volatile computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0142] An embodiment of the present disclosure further provides a computer program product, including a computer program, or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0143] Figure 8FIG1 is a block diagram of a voltage frequency adjustment device 1900 for a GPU according to an exemplary embodiment. For example, the device 1900 can be provided as a server or a terminal device. Figure 8 The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0144] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0145] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the apparatus 1900 to perform the above-described method.
[0146] A computer-readable storage medium can be a tangible device that can hold and store programs / instructions used by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0147] The computer programs (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0148] The computer program (or computer program instructions) for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by utilizing state information of computer-readable program instructions to personalize and customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.
[0149] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0150] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0151] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0152] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0153] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0154] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0155] If the technical solutions of the embodiments of the present disclosure involve personal information, the products applying the technical solutions of the embodiments of the present disclosure have clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solutions of the embodiments of the present disclosure involve sensitive personal information, the products applying the technical solutions of the embodiments of the present disclosure have obtained the individual's separate consent before processing the sensitive personal information, and at the same time meet the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information. The personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0156] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for adjusting GPU voltage and frequency, characterized in that: include: Get the target frequency and / or target voltage of the GPU; determining a transition frequency and a transition voltage according to an initial frequency and / or an initial voltage of the GPU and the target frequency and / or the target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage; Based on the transition frequency, adjusting the frequency of the GPU in multiple steps until the target frequency is reached; Based on the transition voltage, the voltage of the GPU is adjusted in multiple steps until the target voltage is reached.
2. The method according to claim 1, characterized in that The number of the transition frequencies and the number of the transition voltages are both plural.
3. The method according to claim 1, characterized in that The adjusting the frequency of the GPU in multiple steps based on the transition frequency until the target frequency is reached includes: The frequency of the GPU is adjusted in multiple steps based on the transition frequency by a voltage controlled oscillator until the target frequency is reached.
4. The method according to any one of claims 1 to 3, characterized in that The determining of the transition frequency and the transition voltage according to the initial frequency and / or initial voltage of the GPU and the target frequency and / or the target voltage includes: Determining a transition frequency according to an initial frequency of the GPU, a preset frequency adjustment step, and the target frequency; A transition voltage is determined according to the transition frequency and a corresponding relationship between the voltage and frequency of the GPU.
5. The method according to any one of claims 1 to 3, characterized in that The determining of the transition frequency and the transition voltage according to the initial frequency and / or initial voltage of the GPU and the target frequency and / or the target voltage includes: Determining a transition voltage according to an initial voltage of the GPU, a preset voltage adjustment step size, and the target voltage; A transition frequency is determined according to the transition voltage and a corresponding relationship between the voltage and frequency of the GPU.
6. The method according to claim 1, characterized in that Obtaining a target frequency and / or target voltage of the GPU includes: Obtain at least one of a real-time workload, a real-time temperature, and a real-time power consumption of the GPU; A target frequency and / or a target voltage of the GPU is calculated according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption.
7. The method according to claim 6, characterized in that Calculating the target frequency and / or target voltage of the GPU according to at least one of the real-time workload, the real-time temperature, and the real-time power consumption includes: The target frequency and / or target voltage of the GPU is calculated based on at least one of the real-time workload, the real-time temperature, and the real-time power consumption through a dynamic voltage and frequency adjustment algorithm.
8. A voltage frequency adjustment device for a GPU, characterized in that: include: An acquisition module, used to obtain a target frequency and / or target voltage of a GPU; a determination module, configured to determine a transition frequency and a transition voltage based on an initial frequency and / or initial voltage of the GPU and the target frequency and / or target voltage, wherein the transition frequency is greater than the initial frequency and less than the target frequency, and the transition voltage is greater than the initial voltage and less than the target voltage; a frequency adjustment module, configured to adjust the frequency of the GPU in multiple steps based on the transition frequency until the target frequency is reached; A voltage regulation module is configured to regulate the voltage of the GPU in multiple steps based on the transition voltage until the target voltage is reached.
9. A GPU voltage frequency adjustment device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program, or a non-volatile computer-readable storage medium carrying a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.