CN116416115A - GPU control method, device, equipment, storage medium and program product - Google Patents

GPU control method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN116416115A
CN116416115A CN202211667955.3A CN202211667955A CN116416115A CN 116416115 A CN116416115 A CN 116416115A CN 202211667955 A CN202211667955 A CN 202211667955A CN 116416115 A CN116416115 A CN 116416115A
Authority
CN
China
Prior art keywords
gpu
power consumption
preset
frequency
voltage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211667955.3A
Other languages
Chinese (zh)
Other versions
CN116416115B (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202211667955.3A priority Critical patent/CN116416115B/en
Publication of CN116416115A publication Critical patent/CN116416115A/en
Application granted granted Critical
Publication of CN116416115B publication Critical patent/CN116416115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Sources (AREA)

Abstract

The present disclosure relates to the field of electronic digital data processing technology, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for controlling a GPU. The method comprises the following steps: collecting power consumption of the GPU; and under the condition that the GPU is in an idle state, setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption. According to the display card and the method, under the condition that the user suddenly uses the operating system when the display card stands by for a long time, the display card can quickly respond to the requirement of the user, so that the performance of the display card can be improved, and the user experience is optimized.

Description

GPU control method, device, equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of electronic digital data processing technologies, and in particular, to a GPU control method, a GPU control device, an electronic device, a storage medium, and a program product.
Background
In the related art, if a user suddenly needs to play a game or play a video, the graphics card cannot quickly respond to the user's demand under the condition of long standby.
Disclosure of Invention
The disclosure provides a control technical scheme of a GPU.
According to an aspect of the present disclosure, there is provided a control method of a GPU, including:
collecting power consumption of the GPU;
and under the condition that the GPU is in an idle state, setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption.
By collecting the power consumption of the GPU, and under the condition that the GPU is in an idle state, responding to the fact that the power consumption of the GPU is increased to be greater than or equal to first preset power consumption, setting the working voltage of the GPU to be a preset maximum working voltage, and setting the working frequency of the GPU to be a preset maximum working frequency, the display card can quickly respond to the requirements of the user under the condition that the user suddenly uses an operating system when the display card stands by for a long time, so that the performance of the display card can be improved, and the user experience is optimized.
In one possible implementation, the method further includes:
and setting the GPU to an idle state in response to the operating system entering the idle state.
In this implementation manner, the GPU may be set to an idle state in response to the operating system entering the idle state, and in response to the power consumption of the GPU increasing to be greater than or equal to the first preset power consumption in the case where the GPU is in the idle state, the operating voltage of the GPU is set to a preset maximum operating voltage, and the operating frequency of the GPU is set to the preset maximum operating frequency, so that the user demand can be responded in time.
In one possible implementation, the method further includes:
and under the condition that the GPU is in an idle state, setting the GPU into a burst state in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption.
In this implementation, the GPU is set to the burst state in response to the power consumption of the GPU increasing to be greater than or equal to the first preset power consumption in a case where the GPU is in the idle state, and the case where the power consumption increases suddenly is handled in time.
In one possible implementation manner, after the setting the operating voltage of the GPU to the preset maximum operating voltage and the setting the operating frequency of the GPU to the preset maximum operating frequency, the method further includes:
responding to the GPU to maintain the preset maximum working voltage and the preset maximum working frequency for a first preset duration, and acquiring the current turnover rate of the GPU;
and adjusting the working voltage and frequency of the GPU according to the current turnover rate.
In this implementation manner, the current turnover rate of the GPU is obtained by responding to the GPU to maintain the preset maximum working voltage and the preset maximum working frequency for a first preset time, and the working voltage and the working frequency of the GPU are adjusted according to the current turnover rate, so that the voltage frequency corresponding relation suitable for the current scene can be determined based on the current turnover rate of the GPU, and the working voltage and the working frequency suitable for the current scene can be determined, and the performance power consumption ratio of the GPU can be improved.
In one possible implementation, the method further includes:
and reducing the working voltage and/or the working frequency of the GPU in response to the power consumption of the GPU being greater than or equal to second preset power consumption, wherein the second preset power consumption is greater than the first preset power consumption.
In the implementation manner, the power consumption of the GPU is controlled by adopting the power consumption capping technology by reducing the working voltage and/or the working frequency of the GPU in response to the power consumption of the GPU being greater than or equal to the second preset power consumption, so that the safety of the GPU can be improved.
In one possible implementation, the method further includes:
collecting the temperature of the GPU;
and reducing the working voltage and/or the working frequency of the GPU in response to the temperature of the GPU being greater than or equal to the preset temperature.
In the implementation manner, the temperature of the GPU is acquired, and the working voltage and/or the working frequency of the GPU are reduced in response to the fact that the temperature of the GPU is greater than or equal to the preset temperature, so that the temperature of the GPU is controlled by adopting a temperature wall, and the safety of the GPU can be improved.
According to an aspect of the present disclosure, there is provided a control apparatus of a GPU, including:
the first acquisition module is used for acquiring the power consumption of the GPU;
The first setting module is used for setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption under the condition that the GPU is in an idle state.
In one possible implementation, the apparatus further includes:
and the second setting module is used for responding to the condition that the operating system enters the idle state and setting the GPU into the idle state.
In one possible implementation, the apparatus further includes:
and the third setting module is used for setting the GPU into a burst state in response to the power consumption of the GPU being increased to be greater than or equal to the first preset power consumption under the condition that the GPU is in an idle state.
In one possible implementation, the apparatus further includes:
the acquisition module is used for responding to the condition that the duration of the GPU for maintaining the preset maximum working voltage and the preset maximum working frequency reaches a first preset duration, and acquiring the current turnover rate of the GPU;
and the adjusting module is used for adjusting the working voltage and the frequency of the GPU according to the current turnover rate.
In one possible implementation, the apparatus further includes:
the first reduction module is used for reducing the working voltage and/or the working frequency of the GPU in response to the fact that the power consumption of the GPU is larger than or equal to second preset power consumption, wherein the second preset power consumption is larger than the first preset power consumption.
In one possible implementation, the apparatus further includes:
the second acquisition module is used for acquiring the temperature of the GPU;
and the second reduction module is used for reducing the working voltage and/or the working frequency of the GPU in response to the fact that the temperature of the GPU is greater than or equal to the preset temperature.
According to an aspect of the present disclosure, there is provided an electronic apparatus including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to invoke the executable instructions stored by the memory to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
According to an aspect of the present disclosure, there is provided a computer program product comprising a computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in an electronic device, a processor in the electronic device performs the above method.
In the embodiment of the disclosure, by collecting the power consumption of the GPU and in the case that the GPU is in an idle state, responding to the increase of the power consumption of the GPU to be greater than or equal to the first preset power consumption, setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency, the display card can quickly respond to the requirement of the user under the condition that the user suddenly uses the operating system when the display card is in standby for a long time, thereby improving the performance of the display card and optimizing the user experience.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the technical aspects of the disclosure.
Fig. 1 shows a flowchart of a control method of a GPU provided by an embodiment of the present disclosure.
Fig. 2 shows a block diagram of a control device of a GPU provided by an embodiment of the present disclosure.
Fig. 3 shows a block diagram of an electronic device 1900 provided by an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
In the related art, the working frequency of the graphics card is adjusted along with the utilization rate, so that the user's requirement cannot be responded in time.
The embodiment of the disclosure provides a control method for a Graphics Processing Unit (GPU), which is characterized in that by collecting power consumption of the GPU, and under the condition that the GPU is in an idle state, responding to the power consumption of the GPU to be increased to be greater than or equal to a first preset power consumption, setting working voltage of the GPU to be a preset maximum working voltage, and setting working frequency of the GPU to be a preset maximum working frequency, a display card can quickly respond to requirements of a user under the condition that the user suddenly uses an operating system when the display card stands by for a long time, so that performance of the display card can be improved, and user experience is optimized.
The following describes in detail a control method of the GPU according to an embodiment of the present disclosure with reference to the accompanying drawings.
Fig. 1 shows a flowchart of a control method of a GPU provided by an embodiment of the present disclosure. In one possible implementation, the execution subject of the control method of the GPU (Graphics Processing Unit, graphics processor) may be a control device of the GPU, for example, the control 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 cellular phone, a cordless phone, a Personal digital assistant (Personal DigitalAssistant, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like. In some possible implementations, the control method of the GPU may be implemented by a processor invoking computer readable instructions stored in a memory. As shown in fig. 1, the control method of the GPU includes steps S11 to S12.
In step S11, the power consumption of the GPU is collected.
In step S12, in a case where the GPU is in an idle state, in response to the power consumption of the GPU increasing to be greater than or equal to a first preset power consumption, the operating voltage of the GPU is set to a preset maximum operating voltage, and the operating frequency of the GPU is set to a preset maximum operating frequency.
In the embodiment of the disclosure, the power consumption of the GPU may be read through a preset device. For example, the preset device may be INA3221 or the like, and is not limited herein. In addition, a system management controller (System Management Controller, SMC) in the GPU may periodically read power consumption data of the GPU from the preset device.
In the embodiments of the present disclosure, the power consumption of the GPU may represent the total power consumption of the GPU, which may include the dynamic power consumption of the GPU and the static power consumption of the GPU. For example, the total power consumption P of the GPU total =P dynamic +P static . Wherein P is dynamic Representing dynamic power consumption of GPU, P static Representing the static power consumption of the GPU. The static power consumption of the GPU may be a fixed value, and may be measured by an oscilloscope or may be obtained by other means.
In the embodiment of the present disclosure, in the case where the GPU is in an idle state, it may be determined whether the power consumption of the GPU suddenly increases to be greater than or equal to a first preset power consumption. If the power consumption of the GPU is increased to be greater than or equal to the first preset power consumption, the working voltage of the GPU may be set to a preset maximum working voltage, and the working frequency of the GPU may be set to a preset maximum working frequency. When the GPU is in the idle state, if the power consumption of the GPU increases to be greater than or equal to the first preset power consumption, it may be determined that the power consumption of the GPU suddenly increases to be greater. For example, after the graphics card stands by, the user suddenly starts playing a game or watching a video.
In one possible implementation, the method further includes: and setting the GPU to an idle state in response to the operating system entering the idle state.
As one example of this implementation, the operating system may enter the idle state when the idle task is the only task.
In this implementation manner, the GPU may be set to an idle state in response to the operating system entering the idle state, and in response to the power consumption of the GPU increasing to be greater than or equal to the first preset power consumption in the case where the GPU is in the idle state, the operating voltage of the GPU is set to a preset maximum operating voltage, and the operating frequency of the GPU is set to the preset maximum operating frequency, so that the user demand can be responded in time.
In one possible implementation, the method further includes: and setting the GPU to a burst (burst) state in response to the power consumption of the GPU increasing to be greater than or equal to a first preset power consumption under the condition that the GPU is in an idle state. In this implementation, the GPU is set to the burst state in response to the power consumption of the GPU increasing to be greater than or equal to the first preset power consumption in a case where the GPU is in the idle state, and the case where the power consumption increases suddenly is handled in time.
In one possible implementation, the method further includes: and reducing the working voltage and/or the working frequency of the GPU in response to the power consumption of the GPU being greater than or equal to second preset power consumption, wherein the second preset power consumption is greater than the first preset power consumption.
As one example of this implementation, the operating voltage and operating frequency of the GPU may be reduced in response to the power consumption of the GPU being greater than or equal to a second preset power consumption.
As another example of this implementation, the operating voltage of the GPU may be reduced in response to the power consumption of the GPU being greater than or equal to a second preset power consumption.
As another example of this implementation, the operating frequency of the GPU may be reduced in response to the power consumption of the GPU being greater than or equal to a second preset power consumption.
In this implementation manner, the power consumption of the GPU is controlled by adopting a power capping technique (power capping) by reducing the operating voltage and/or the operating frequency of the GPU in response to the power consumption of the GPU being greater than or equal to the second preset power consumption, so that the security of the GPU can be improved.
In one possible implementation, the method further includes: collecting the temperature of the GPU; and reducing the working voltage and/or the working frequency of the GPU in response to the temperature of the GPU being greater than or equal to the preset temperature.
As an example of this implementation, the operating voltage and operating frequency of the GPU may be reduced in response to the temperature of the GPU being greater than or equal to a preset temperature.
As another example of this implementation, the operating voltage of the GPU is reduced in response to the temperature of the GPU being greater than or equal to a preset temperature.
As another example of this implementation, the operating frequency of the GPU is reduced in response to the temperature of the GPU being greater than or equal to a preset temperature.
In the implementation manner, the temperature of the GPU is acquired, and the working voltage and/or the working frequency of the GPU are reduced in response to the fact that the temperature of the GPU is greater than or equal to the preset temperature, so that the temperature of the GPU is controlled by adopting a temperature wall, and the safety of the GPU can be improved.
In one possible implementation manner, after the setting the operating voltage of the GPU to the preset maximum operating voltage and the setting the operating frequency of the GPU to the preset maximum operating frequency, the method further includes: responding to the GPU to maintain the preset maximum working voltage and the preset maximum working frequency for a first preset duration, and acquiring the current turnover rate of the GPU; and adjusting the working voltage and the working frequency of the GPU according to the current turnover rate.
In this implementation manner, the preset maximum operating voltage and the preset maximum operating frequency may be maintained for a first preset period, that is, after the operating voltage of the GPU is set to the preset maximum operating voltage and the operating frequency of the GPU is set to the preset maximum operating frequency, the preset maximum operating voltage and the preset maximum operating frequency may be maintained until the first preset period is reached.
As one example of this implementation, the GPU may be set to a power consumption scene control state in response to a duration in which the GPU maintains the preset maximum operating voltage and the preset maximum operating frequency reaching a first preset duration.
The flip rate may represent the number of times the signal is flipped per unit time. The current roll-over rate of the GPU may represent the current roll-over rate of the GPU.
In this implementation manner, the corresponding relationship of the target voltage frequency corresponding to the GPU currently may be determined according to the current turnover rate, and the target working voltage and the target working frequency of the GPU may be determined according to the corresponding relationship of the target voltage frequency.
In this implementation manner, the current turnover rate of the GPU is obtained by responding to the GPU to maintain the preset maximum working voltage and the preset maximum working frequency for a first preset time, and the working voltage and the working frequency of the GPU are adjusted according to the current turnover rate, so that the voltage frequency corresponding relation suitable for the current scene can be determined based on the current turnover rate of the GPU, and the working voltage and the working frequency suitable for the current scene can be determined, and the performance power consumption ratio of the GPU can be improved.
As an example of this implementation, the obtaining the current roll-over rate of the GPU includes: acquiring current power consumption parameters of the GPU; and determining the current turnover rate of the GPU according to the current power consumption parameter.
In this example, the power consumption parameter of the GPU may be any parameter capable of representing the power consumption of the GPU. In this example, the current roll-over rate of the GPU may be determined from at least one current power consumption parameter of the GPU. For example, the current slew rate of the GPU may be determined from two or more current power consumption parameters of the GPU.
In this example, by acquiring the current power consumption parameter of the GPU and determining the current roll-over rate of the GPU according to the current power consumption parameter, the current roll-over rate of the GPU can be accurately determined.
In one example, the current power consumption parameter includes at least two of: duty cycle, maximum power consumption, current operating frequency, current operating voltage.
In this example, the power consumption of the GPU may be read by a preset device. The preset device may trigger an interrupt in response to the power consumption of the GPU reaching a preset power consumption threshold. In addition, the system management controller in the GPU may periodically read the power consumption data of the GPU from the preset device. Compared with the mode of singly controlling the power consumption of the GPU by the operating system in the related art, the method has the advantages that the GPU participates in the combined control, so that the power consumption optimization of the operating system layer can be obtained, and the power consumption optimization of the GPU layer can be obtained.
Wherein, according to the second preset time lengthThe collected power consumption and interruption times of the GPU can obtain the duty ratio, the work cycle, the maximum power consumption and the current power consumption of the current scene. For example, duty cycle d=t 2 /(t 1 +t 2 ) Duty cycle c=t 1 +t 2 The maximum power consumption can adopt P max Indicating that the current power consumption may employ P current And (3) representing.
In this example, the current operating frequency and/or the current operating voltage may also be obtained. Wherein the current operating frequency may be f current Indicating that the current operating voltage may be v current And (3) representing.
In one example, the current power consumption parameters may include a duty cycle, a maximum power consumption, a current operating frequency, and a current operating voltage.
In this example, by determining the current slew rate of the GPU according to at least two of the duty cycle, the maximum power consumption, the current operating frequency, the current operating voltage, the accuracy of the determined current slew rate can be improved.
In one example, the determining the current roll-over rate of the GPU according to the current power consumption parameter includes: determining a ratio of the maximum power consumption to the current power consumption; and determining the current turnover rate of the GPU according to the duty ratio, the working period, the ratio, the current working frequency and the current working voltage.
Wherein, the ratio R=P of the maximum power consumption to the current power consumption max /P current
In this example, by determining a ratio of the maximum power consumption to the current power consumption and determining a current roll-over rate of the GPU according to the duty cycle, the ratio, the current operating frequency, and the current operating voltage, an accurate current roll-over rate can more accurately reflect a current scene of the GPU.
In another example, the determining the current roll-over rate of the GPU according to the current power consumption parameter includes: determining a ratio of the current power consumption to the maximum power consumption; and determining the current turnover rate of the GPU according to the duty ratio, the working period, the ratio, the current working frequency and the current working voltage.
In one example, the determining the current roll-over rate of the GPU according to the current power consumption parameter includes: and inputting the current power consumption parameter into a pre-trained neural network, and outputting the current turnover rate through the neural network.
In this example, by pre-training a neural network for determining a roll-over rate according to a power consumption parameter and inputting the current power consumption parameter into the pre-trained neural network, the current roll-over rate is output via the neural network, whereby the accuracy of the determined current roll-over rate can be improved.
In another example, a polynomial function may be pre-designed and each current power consumption parameter may be input into the preset polynomial function to obtain the current slew rate of the GPU.
In one example, a current inversion rate of the GPU may be obtained at a preset frequency, and a target voltage frequency correspondence currently corresponding to the GPU may be redetermined in response to the current inversion rate being different from the inversion rate obtained last time.
Of course, in other examples, the time for obtaining the current inversion rate of the GPU may be flexibly set according to the application scenario, which is not limited herein.
At the process node before 40nm, the dynamic power consumption of the GPU is a large percentage of the total power consumption. With the evolution of the process, the static power consumption gradually increases in the ratio of the total power consumption to the extent comparable to the dynamic power consumption at 7nm, which further increases the difficulty of implementing DVFS (Dynamic Voltage and Frequency Scaling, dynamic voltage frequency adjustment).
In one example, dynamic power consumption P dynamic =α×C×V 2 X F. Wherein alpha is the turnover rate, C is the load capacitance, V is the working voltage, and F is the working frequency. Therefore, by reducing at least one of the slew rate, the load capacitance, the operating voltage, and the operating frequency, the purpose of reducing power consumption can be achieved.
Since the dynamic power consumption is proportional to the square of the operating voltage, the operating voltage is reduced by 30%, and the dynamic power consumption can be reduced by 50%, the voltage reduction is a main means for reducing the power consumption of the GPU. The operating voltage is limited by factors such as the chip process, the switching voltage under the current process conditions, the operating frequency, etc. The chip technology has limitation on the highest voltage and the lowest voltage under a certain technology node, the switching voltage mainly limits the lowest working voltage of the chip, and the working frequency also limits the lowest working voltage of the chip.
The roll-over rate may be application, architecture, design implementation, etc., and the roll-over rate is relatively large with respect to the application. Wherein the application may determine a lower limit of the slew rate and the architecture and design implementation may determine an upper limit of the slew rate. In addition, in the implementation level, the reduction of the slew rate may be implemented by clock gating (clock gating). In some examples, the slew rate may also be referred to as a power factor or a switching coefficient, etc., without limitation herein.
The operating frequency of the GPU is positively correlated to the operating voltage, power consumption, and performance of the GPU. In general, it is desirable to maximize performance and minimize power consumption.
The load capacitance is mainly determined by the chip process. In the chip design stage, it is not generally considered how to actively reduce the load capacitance.
In this implementation manner, at least two voltage frequency correspondence relationships may be preset, and a correspondence relationship between at least two voltage frequency correspondence relationships and a preset slew rate interval may be preset. For example, a plurality of voltage frequency correspondence relationships may be preset. The working voltage corresponding to any working frequency in any voltage frequency corresponding relation can be the minimum working voltage capable of meeting the working frequency; the operating frequency corresponding to any operating voltage in any voltage frequency corresponding relation can be the maximum operating frequency supported by the operating voltage.
After determining the current turnover rate of the GPU, a preset turnover rate interval to which the current turnover rate belongs may be determined, and a voltage frequency corresponding relation corresponding to the preset turnover rate interval to which the current turnover rate belongs may be determined as a target voltage frequency corresponding relation.
As an example of this implementation, a ratio function of the power consumption and the operating frequency of the GPU may be obtained according to the target voltage frequency correspondence and the current roll-over rate; the ratio function is led to work voltage, and target work voltage is determined according to extreme points; and determining a target working frequency according to the corresponding relation between the target working voltage and the target voltage frequency. In this implementation, the power consumption of the GPU may refer to the overall power consumption of the GPU.
For example, the target voltage frequency corresponds to f=f (p, V, t), where F (p, V, t) =c 0 ×p 2 +c 1 ×V 2 +c 2 ×t 2 +c 3 ×p×V+c 4 ×V×t+c 5 ×p×t+c 6 ×p+c 7 ×V+c 8 X t, F represents the operating frequency, V represents the operating voltage, p represents the process angle, t represents the temperature, c 0 To c 8 Is a fitting parameter.
For example, the ratio of the power consumption of the GPU to the operating frequency is P total /F=α×C×V 2 +P static F. Wherein P is total /F may represent the power consumption required per frequency. The target operating voltage can be determined by deriving the ratio function from V. From f=f (p, V, t), the target operating frequency can be determined.
In this implementation, the target voltage frequency corresponding relation and the current turnover rate are used for obtaining
To the ratio function of the power consumption and the working frequency of the GPU, deriving the ratio function to the working voltage, determining a target working voltage according to a pole 5 value point, and determining according to the corresponding relation between the target working voltage and the target voltage frequency
The target operating frequency, thereby enabling the performance-to-power ratio of the GPU to remain theoretically optimal.
The method for controlling the GPU according to the embodiments of the present disclosure is described below through a specific application scenario.
In this implementation, the GPU may be set to an idle state in response to the operating system entering the idle state.
The power consumption of the GPU may be read by the INA 3221. The SMC in the GPU may periodically read the GPU's power 0 consumption data from the INA 3221.
And under the condition that the GPU is in an idle state, setting the GPU to a burst state in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption, setting the working voltage of the GPU to a preset maximum working voltage, and setting the working frequency of the GPU to the preset maximum working frequency.
The current turnover rate of the GPU may be obtained in response to the GPU maintaining the preset maximum operating voltage and the preset maximum operating frequency for a time period of 5 times reaching a first preset time period, and the operating voltage and the operating frequency of the GPU may be adjusted according to the current turnover rate.
The operating voltage and +/of the GPU can be reduced in response to the power consumption of the GPU being greater than or equal to a second preset power consumption
Or operating frequency; the operating voltage and/or operating frequency of the GPU may be reduced in response to the temperature of the GPU being greater than or equal to a preset temperature.
0 it will be appreciated that the various method embodiments mentioned above in this disclosure may be implemented without departing from the principles logic
The embodiments are combined with each other to form a combined embodiment, and the disclosure is not repeated herein. It will be appreciated by those skilled in the art that in the above-described methods of the embodiments, the particular order of execution of the steps should be determined by their function and possible inherent logic.
In addition, the disclosure further provides a control device, an electronic device, a computer readable storage medium and a computer 5 program product of the GPU, which can be used for realizing any one of the control methods of the GPU provided in the disclosure, and corresponding technical schemes and technologies
The effect of the operation can be found in the corresponding description of the method and will not be repeated.
Fig. 2 shows a block diagram of a control device of a GPU provided by an embodiment of the present disclosure. As shown in fig. 2, the control device of the GPU includes:
a first acquisition module 21, configured to acquire power consumption of the GPU;
a first setting module 22 for responding to the power consumption of the GPU when the GPU is in an idle state
And increasing to be greater than or equal to the first preset power consumption, setting the working voltage of the GPU to be a preset maximum working voltage, and setting the working frequency of the GPU to be a preset maximum working frequency.
In one possible implementation, the apparatus further includes:
and the second setting module is used for responding to the condition that the operating system enters the idle state and setting the GPU into the idle state. 5 in one possible implementation, the apparatus further comprises:
and the third setting module is used for setting the GPU into a burst state in response to the power consumption of the GPU being increased to be greater than or equal to the first preset power consumption under the condition that the GPU is in an idle state.
In one possible implementation, the apparatus further includes:
the acquisition module is used for responding to the condition that the duration of the GPU for maintaining the preset maximum working voltage and the preset maximum working frequency reaches a first preset duration, and acquiring the current turnover rate of the GPU;
and the adjusting module is used for adjusting the working voltage and the frequency of the GPU according to the current turnover rate.
In one possible implementation, the apparatus further includes:
the first reduction module is used for reducing the working voltage and/or the working frequency of the GPU in response to the fact that the power consumption of the GPU is larger than or equal to second preset power consumption, wherein the second preset power consumption is larger than the first preset power consumption.
In one possible implementation, the apparatus further includes:
the second acquisition module is used for acquiring the temperature of the GPU;
and the second reduction module is used for reducing the working voltage and/or the working frequency of the GPU in response to the fact that the temperature of the GPU is greater than or equal to the preset temperature.
In the embodiment of the disclosure, by collecting the power consumption of the GPU and in the case that the GPU is in an idle state, responding to the increase of the power consumption of the GPU to be greater than or equal to the first preset power consumption, setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency, the display card can quickly respond to the requirement of the user under the condition that the user suddenly uses the operating system when the display card is in standby for a long time, thereby improving the performance of the display card and optimizing the user experience.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementation and technical effects of the functions or modules may refer to the descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The disclosed embodiments also provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method. Wherein the computer readable storage medium may be a non-volatile computer readable storage medium or may be a volatile computer readable storage medium.
The disclosed embodiments also propose a computer program comprising computer readable code which, when run in an electronic device, causes a processor in the electronic device to carry out the above method.
Embodiments of the present disclosure also provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in an electronic device, causes a processor in the electronic device to perform the above method.
The embodiment of the disclosure also provides an electronic device, including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to invoke the executable instructions stored by the memory to perform the above-described method.
The electronic device may be provided as a terminal, server or other form of device.
Fig. 3 shows a block diagram of an electronic device 1900 provided by an embodiment of the disclosure. For example, electronic device 1900 may be provided as a server. Referring to FIG. 3, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. Electronic device 1900 may operate an operating system based on memory 1932, such as the Microsoft Server operating system (Windows Server) TM ) Apple Inc. developed graphical user interface based operating System (Mac OS X TM ) Multi-user multi-process computer operating system (Unix) TM ) Unix-like operating system (Linux) of free and open source code TM ) Unix-like operating system (FreeBSD) with open source code TM ) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 1932, including computer program instructions executable by processing component 1922 of electronic device 1900 to perform the methods described above.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, they may sometimes be performed in the reverse order, depending on the function involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
If the technical scheme of the embodiment of the disclosure relates to personal information, the product applying the technical scheme of the embodiment of the disclosure clearly informs the personal information processing rule and obtains personal independent consent before processing the personal information. If the technical solution of the embodiment of the present disclosure relates to sensitive personal information, the product applying the technical solution of the embodiment of the present disclosure obtains individual consent before processing the sensitive personal information, and simultaneously meets the requirement of "explicit consent". For example, a clear and remarkable mark is set at a personal information acquisition device such as a camera to inform that the personal information acquisition range is entered, personal information is acquired, and if the personal voluntarily enters the acquisition range, the personal information is considered as consent to be acquired; or in a single
On the device for processing the personal information, under the condition that obvious identification/information is utilized to inform the personal information processing rule, personal authorization is obtained through popup window 5 information or a mode of requesting a person to upload personal information and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing mode, and a type of personal information to be processed.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. For the present invention, without departing from the scope and spirit of the various embodiments described
Many modifications and variations will be apparent to those of ordinary skill in the art. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for controlling a GPU, comprising:
collecting power consumption of the GPU;
and under the condition that the GPU is in an idle state, setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption.
2. The method according to claim 1, wherein the method further comprises:
and setting the GPU to an idle state in response to the operating system entering the idle state.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and under the condition that the GPU is in an idle state, setting the GPU into a burst state in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption.
4. The method according to claim 1 or 2, wherein after the setting of the operating voltage of the GPU to a preset maximum operating voltage and the setting of the operating frequency of the GPU to a preset maximum operating frequency, the method further comprises:
responding to the GPU to maintain the preset maximum working voltage and the preset maximum working frequency for a first preset duration, and acquiring the current turnover rate of the GPU;
and adjusting the working voltage and frequency of the GPU according to the current turnover rate.
5. The method according to claim 1 or 2, characterized in that the method further comprises:
and reducing the working voltage and/or the working frequency of the GPU in response to the power consumption of the GPU being greater than or equal to second preset power consumption, wherein the second preset power consumption is greater than the first preset power consumption.
6. The method according to claim 1 or 2, characterized in that the method further comprises:
collecting the temperature of the GPU;
and reducing the working voltage and/or the working frequency of the GPU in response to the temperature of the GPU being greater than or equal to the preset temperature.
7. A control device for a GPU, comprising:
the first acquisition module is used for acquiring the power consumption of the GPU;
the first setting module is used for setting the working voltage of the GPU to be a preset maximum working voltage and setting the working frequency of the GPU to be a preset maximum working frequency in response to the power consumption of the GPU being increased to be greater than or equal to a first preset power consumption under the condition that the GPU is in an idle state.
8. An electronic device, comprising:
one or more processors;
a memory for storing executable instructions;
wherein the one or more processors are configured to invoke the memory-stored executable instructions to perform the method of any of claims 1 to 6.
9. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 6.
10. A computer program product comprising computer readable code or carrying a computer
A non-transitory computer readable storage medium of readable code that, when executed in an electronic device,
a processor in the electronic device performs the method of any of claims 1 to 6.
CN202211667955.3A 2022-12-23 2022-12-23 GPU control method, device, equipment, storage medium and program product Active CN116416115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211667955.3A CN116416115B (en) 2022-12-23 2022-12-23 GPU control method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211667955.3A CN116416115B (en) 2022-12-23 2022-12-23 GPU control method, device, equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN116416115A true CN116416115A (en) 2023-07-11
CN116416115B CN116416115B (en) 2024-01-30

Family

ID=87052113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211667955.3A Active CN116416115B (en) 2022-12-23 2022-12-23 GPU control method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN116416115B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168457A (en) * 2017-03-22 2017-09-15 深圳市博巨兴实业发展有限公司 A kind of low-power consumption GPU SOC methods
CA3027776A1 (en) * 2018-02-01 2019-08-01 Battelle Memorial Institute Extracting maximal frequency response potential in controllable loads
CN110245061A (en) * 2019-04-30 2019-09-17 上海兆芯集成电路有限公司 Computing device, its power consumption prediction technique and computer readable storage medium
US20200174897A1 (en) * 2018-12-04 2020-06-04 Imagination Technologies Limited Workload Repetition Redundancy
CN115220564A (en) * 2021-04-15 2022-10-21 Oppo广东移动通信有限公司 Power consumption adjusting method and device, storage medium, processor and electronic equipment
CN115237583A (en) * 2021-04-22 2022-10-25 华为技术有限公司 Computing resource scheduling method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168457A (en) * 2017-03-22 2017-09-15 深圳市博巨兴实业发展有限公司 A kind of low-power consumption GPU SOC methods
CA3027776A1 (en) * 2018-02-01 2019-08-01 Battelle Memorial Institute Extracting maximal frequency response potential in controllable loads
US20200174897A1 (en) * 2018-12-04 2020-06-04 Imagination Technologies Limited Workload Repetition Redundancy
CN111275606A (en) * 2018-12-04 2020-06-12 畅想科技有限公司 Workload duplication redundancy
CN110245061A (en) * 2019-04-30 2019-09-17 上海兆芯集成电路有限公司 Computing device, its power consumption prediction technique and computer readable storage medium
CN115220564A (en) * 2021-04-15 2022-10-21 Oppo广东移动通信有限公司 Power consumption adjusting method and device, storage medium, processor and electronic equipment
CN115237583A (en) * 2021-04-22 2022-10-25 华为技术有限公司 Computing resource scheduling method and device

Also Published As

Publication number Publication date
CN116416115B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
US9378536B2 (en) CPU/GPU DCVS co-optimization for reducing power consumption in graphics frame processing
EP3373286A1 (en) Method, device and non-transitory computer-readable medium for control of refresh frequency of display unit
CN111309400A (en) Process control method, device, storage medium and electronic equipment
KR20150026786A (en) Electronic device and method for contolling power
CN113032112A (en) Resource scheduling method and device, electronic equipment and storage medium
CN111309617A (en) Application program control method and device, storage medium and electronic equipment
US11563243B2 (en) Charging control method, device and storage medium
CN112799793B (en) Scheduling method and device, electronic equipment and storage medium
CN112528995B (en) Method for training target detection model, target detection method and device
CN116416115B (en) GPU control method, device, equipment, storage medium and program product
CN110992387B (en) Image processing method and device, electronic equipment and storage medium
CN115098262B (en) Multi-neural network task processing method and device
CN114051057B (en) Cloud equipment queuing time determination method and device, electronic equipment and medium
US10558357B2 (en) Method for responding to touch operation and electronic device
CN115857655B (en) Method, device, equipment, medium and program product for controlling power consumption of GPU
CN115469816A (en) Read-write switching method, device and equipment of memory and storage medium
CN108173608B (en) Method, apparatus and storage medium for obtaining power estimation value and electronic device
CN114546910A (en) Access control method, device, storage medium and electronic device
CN116225202B (en) Power consumption control method and device for GPU, electronic equipment and storage medium
EP2733531A1 (en) Method and apparatus for temporal stabilization of streaming frames
CN114979471B (en) Interface display method, device, electronic equipment and computer readable storage medium
CN110765738A (en) System and method for generating card number and electronic equipment
CN113361575B (en) Model training method and device and electronic equipment
CN116540820B (en) Voltage and frequency control system, method and storage medium
CN113721755B (en) Screen power saving method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant