Method, device and computer equipment for determining power supply status of graphics processor

By obtaining the real-time workload and historical power supply status of the graphics processor, and combining the current working mode to determine the target power supply status, the power waste problem caused by single data in traditional DVFS technology is solved, and the accuracy of the power supply status determination and power consumption management effect is improved. .

CN118035027BActive Publication Date: 2025-02-18GLENFLY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211411234.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-02-18
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

When traditional DVFS technology adjusts the power supply state of the GPU, the data obtained is relatively single, and the prediction results are not accurate enough, resulting in the problem of power waste.

Method used

By obtaining the real-time workload and historical power supply status of the graphics processor, and combining the current working mode, the target power supply status is determined. The specific steps include obtaining real-time workload, judging power supply adjustment conditions, determining the initial update power supply status, obtaining historical power supply status, and finally determining the target power supply status.

Benefits of technology

It improves the accuracy of determining the power supply status of the graphics processor, reduces power waste, and ensures that power consumption is at a reasonable green level of power saving while providing sufficient performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118035027B_ABST
    Figure CN118035027B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment, storage medium and computer program product for determining the power supply status of a graphics processor. The method comprises: obtaining the real-time workload of the graphics processor; if it is determined based on the real-time workload that the power supply adjustment condition is met, then determining the initial update power supply status based on the real-time workload and the inspection window workload, wherein the inspection window workload is the workload within a selected preset time period; obtaining the historical power supply status of the graphics processor; and determining the target power supply status of the graphics processor based on the initial update power supply status, the historical power supply status and the current working mode of the graphics processor. The use of this method can improve the accuracy of determining the power supply status of the graphics processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for determining a power supply state of a graphics processor. Background Art

[0002] With the development of computer technology, GPUs (graphics processing units) for mobile platforms need to provide sufficient performance for the GPU while ensuring that power consumption is at a reasonable, energy-saving and green level.

[0003] In traditional technology, DVFS (battery management) is generally used to adjust the state of the GPU. Specifically, the traditional processing method is generally to obtain the value of the engine's workload counter, and compare the value of the workload counter with the set engine threshold to determine whether the current power is too high or too low, so as to adjust the GPU state. However, in this way, the data obtained is relatively single, and the prediction results are often not accurate enough, which can easily lead to power waste. Summary of the invention

[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for determining the power status of a graphics processor that can improve the accuracy of determining the power status in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for determining a power supply status of a graphics processor, the method comprising:

[0006] Get the real-time workload of the GPU;

[0007] If it is determined based on the real-time workload that the power supply adjustment condition is met, then the initial updated power supply state is determined based on the real-time workload and the inspection window workload, where the inspection window workload is the workload within the selected preset time period;

[0008] Obtaining a historical power supply status of the graphics processor;

[0009] A target power state of the graphics processor is determined based on the initial update power state, the historical power state, and a current operating mode of the graphics processor.

[0010] In one embodiment, the real-time workload includes the real-time memory workload of the graphics processor; the inspection window workload includes the inspection window memory workload;

[0011] If it is determined based on the real-time workload that the power supply adjustment condition is met, then based on the real-time workload and the inspection window workload, determining an initial update power supply state includes:

[0012] If the real-time memory workload is greater than or equal to the memory workload threshold, an initial update power supply state is determined based on the real-time memory workload and the inspection window memory workload.

[0013] In one embodiment, the real-time workload also includes the real-time engine workload of the graphics processor; the inspection window workload also includes the inspection window engine workload;

[0014] If it is determined based on the real-time workload that the power supply adjustment condition is met, then determining the initial update power supply state based on the real-time workload and the inspection window workload, further comprising:

[0015] If the real-time memory workload is less than the memory workload threshold, determining whether the real-time engine workload is greater than or equal to the engine workload threshold;

[0016] If the engine workload is greater than or equal to the engine workload threshold, an initial update power supply state is determined based on the real-time engine workload and the inspection window engine workload.

[0017] In one of the embodiments, the initial update power supply state includes any one of a frequency increase state, a frequency decrease state or a constant state;

[0018] The determining of the initial update power supply state based on the real-time memory workload and the inspection window memory workload includes:

[0019] Determining a memory workload reference value based on the real-time memory workload and the inspection window memory workload;

[0020] If the memory workload reference value is greater than a first preset ratio of the inspection window memory workload, determining that the initial update power supply state is a frequency reduction state;

[0021] If the memory workload reference value is less than a second preset ratio of the inspection window memory workload, determining that the initial update power supply state is a frequency-upgrade state, wherein the first preset ratio is greater than the second preset ratio;

[0022] Otherwise, it is determined that the initial update power supply state is to remain unchanged.

[0023] In one of the embodiments, the initial update power supply state includes any one of a frequency increase state, a frequency decrease state or a constant state;

[0024] The determining of the initial update power supply state based on the real-time engine workload and the inspection window engine workload includes:

[0025] Determining an engine workload reference value based on the real-time engine workload and the inspection window engine workload;

[0026] If the engine workload reference value is greater than the third preset ratio of the inspection window engine workload, determining that the initial update power supply state is a state frequency increase state;

[0027] If the engine workload reference value is less than the fourth preset ratio of the inspection window engine workload, determining that the initial update power supply state is a frequency reduction state, and the third preset ratio is greater than the fourth preset ratio;

[0028] Otherwise, it is determined that the initial update power supply state is to remain unchanged.

[0029] In one embodiment, the current working mode includes any one of a low power consumption mode, a performance mode and a balanced mode; the initial update power supply state includes any one of an increase frequency state, a decrease frequency state or a constant state; the historical power supply state includes any one of an increase frequency state, a decrease frequency state or a constant state;

[0030] The determining, based on the initial update power state, the historical power state, and the current working mode of the graphics processor, a target power state of the graphics processor includes:

[0031] If the current working mode is a low power consumption mode, selecting a power saving processing strategy according to the initial updated power supply state and the historical power supply state, and determining a target power supply state of the graphics processor based on the power saving processing strategy;

[0032] If the current working mode is the performance mode, selecting a performance processing strategy according to the initial updated power supply state and the historical power supply state, and determining a target power supply state of the graphics processor based on the performance processing strategy;

[0033] If the current working mode is the balanced mode, a state machine processing strategy is selected according to the initial updated power supply state and the historical power supply state, and a target power supply state of the graphics processor is determined based on the state machine processing strategy.

[0034] In a second aspect, the present application further provides a device for determining a power supply state of a graphics processor, the device comprising:

[0035] A first data acquisition module, used to acquire the real-time workload of the graphics processor;

[0036] A first processing module, configured to determine an initial update power supply state based on the real-time workload and the inspection window workload if it is determined that the power supply adjustment condition is met based on the real-time workload, wherein the inspection window workload is the workload within a selected preset time period;

[0037] A second data acquisition module, used to acquire a historical power supply status of the graphics processor;

[0038] The second processing module is used to determine a target power state of the graphics processor based on the initial update power state, the historical power state and the current working mode of the graphics processor.

[0039] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for determining the power supply status of the graphics processor are implemented.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for determining the power supply status of the graphics processor are implemented.

[0041] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method for determining the power supply status of the graphics processor are implemented.

[0042] The above-mentioned method, device, computer equipment, storage medium and computer program product for determining the power supply status of the graphics processor obtain the real-time workload of the graphics processor; if it is determined that the power supply adjustment conditions are met based on the real-time workload, then the initial update power supply status is determined based on the real-time workload and the inspection window workload, and the inspection window workload is the workload within a selected preset time period; the historical power supply status of the graphics processor is obtained; based on the initial update power supply status, the historical power supply status and the current working mode of the graphics processor, the target power supply status of the graphics processor is determined. Therefore, when it is determined that the power supply status of the graphics processor needs to be adjusted, the initial update power supply status is first determined according to the real-time workload, and then the target power supply status of the graphics processor is determined in combination with the historical power supply status and the current working mode of the graphics processor, which can effectively improve the accuracy of determining the power supply status of the graphics processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic flow chart of a method for determining a power supply status of a graphics processor in one embodiment;

[0044] Figure 2A test curve diagram of a method for determining a power supply state of a graphics processor in one embodiment;

[0045] Figure 3 A test curve diagram of a method for determining a power supply state of a graphics processor in another embodiment;

[0046] Figure 4 is a flow chart of a method for determining a power supply status of a graphics processor in another embodiment;

[0047] Figure 5 A schematic diagram of a state machine structure of a method for determining a power supply state of a graphics processor in one embodiment;

[0048] Figure 6 A flowchart of a method for determining a power supply state of a graphics processor in one embodiment;

[0049] Figure 7 is a flow chart of a method for determining a power supply status of a graphics processor in another embodiment;

[0050] Figure 8 is a structural block diagram of a device for determining a power supply state of a graphics processor in one embodiment;

[0051] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] The power supply state determination method of the graphics processor provided in the embodiment of the present application can be applied to a terminal, wherein the terminal can be provided with a GPU (graphics microprocessor) for performing image and graphics related operations, and a software strategy (such as a DVFS (dynamic voltage frequency adjustment) model) that can read the internal register data of the GPU. Specifically, the DVFS model can determine the target power supply state of the GPU by reading the internal register data of the GPU, and the internal register data can be the real-time workload of the GPU, the historical power supply state of the GPU, etc., so that the power supply state of the GPU can be adjusted according to the real-time working condition of the GPU, and finally, on the premise of providing sufficient performance to the GPU, the power consumption of the GPU can also be guaranteed to be within the green range of power saving. Optionally, the power supply state determination method of the graphics processor of the embodiment of the present application can also be applied to a server, wherein the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0054] In one embodiment, the terminal obtains the real-time workload of the graphics processor; if it is determined based on the real-time workload that the power adjustment condition is met, then an initial update power state is determined based on the real-time workload and the inspection window workload, where the inspection window workload is the workload within a selected preset time period; the historical power state of the graphics processor is obtained; and based on the initial update power state, the historical power state and the current working mode of the graphics processor, a target power state of the graphics processor is determined.

[0055] In one embodiment, Figure 1 As shown, a method for determining the power supply status of a graphics processor is provided, and the method is described by taking the application of the method to a terminal as an example, and includes the following steps:

[0056] Step S102, obtaining the real-time workload of the graphics processor.

[0057] Among them, the graphics processor can refer to the microprocessor that performs image and graphics related calculations on personal computers, workstations, game consoles and some mobile devices (such as tablets, smart phones, etc.), and the real-time workload can refer to the amount of calculation involved in the operation of the graphics processor, the amount of memory occupied by the calculation, etc.

[0058] Step S104, if it is determined based on the real-time workload that the power supply adjustment condition is met, then the initial updated power supply state is determined based on the real-time workload and the inspection window workload, where the inspection window workload is the workload within the selected preset time period.

[0059] Among them, the power supply adjustment condition refers to the set condition that requires adjustment of the current power supply state of the graphics processor, the inspection window workload can be the workload of a preset time period selected by the terminal, and the initial update power supply state refers to the update state of the graphics processor determined based on the real-time workload, the inspection window workload, etc. For example, the initial update power supply state can be an increase frequency state, a decrease frequency state, a constant state, etc.

[0060] In one of the embodiments, when determining the workload of the inspection window, the terminal can select the workload of the graphics processor within any time period (such as 10ms (milliseconds) -20ms (milliseconds)) within a set adjustment period (such as setting a power supply adjustment every 5 minutes) as the workload of the inspection window, wherein the adjustment period can also be adjusted according to the actual operation of the graphics processor.

[0061] Step S106, obtaining the historical power supply status of the graphics processor.

[0062] The historical power state is relative to the initial update power state. The historical power state may refer to the current power state of the graphics processor. When the terminal determines the initial update power state, the current power state is the historical power state.

[0063] Step S108, determining a target power state of the graphics processor based on the initial update power state, the historical power state, and the current working mode of the graphics processor.

[0064] Among them, the current working mode may refer to the real-time working scenario of the graphics processor. The computing requirements of the graphics processor are different, and accordingly, its working mode may also be different. For example, the current working mode of the graphics processor may be any one of the power saving mode, performance mode and balanced mode. Among them, the target power supply state may refer to the power supply state of the graphics processor finally determined by the terminal.

[0065] In one of the embodiments, after determining the target power supply state, the terminal may send the target power supply state to a PMU (battery management unit), and the PMU updates the current power supply state of the graphics processor.

[0066] In the above-mentioned method for determining the power status of the graphics processor, the real-time workload of the graphics processor is obtained; if it is determined based on the real-time workload that the power adjustment condition is met, then based on the real-time workload and the inspection window workload, the initial update power status is determined, and the inspection window workload is the workload within a selected preset time period; the historical power status of the graphics processor is obtained; based on the initial update power status, the historical power status and the current working mode of the graphics processor, the target power status of the graphics processor is determined. Therefore, when it is determined that the power status of the graphics processor needs to be adjusted, the initial update power status is first determined according to the real-time workload, and then the target power status of the graphics processor is determined in combination with the historical power status and the current working mode of the graphics processor, which can effectively improve the accuracy of determining the power status of the graphics processor.

[0067] In the process of actually determining the initial update power state, analysis can be carried out based on the specific situation of the acquired real-time workload. Therefore, in one embodiment, the real-time workload includes the real-time memory workload of the graphics processor; the inspection window workload includes the inspection window memory workload; if it is determined based on the real-time workload that the power adjustment conditions are met, then the initial update power state is determined based on the real-time workload and the inspection window workload, including: if the real-time memory workload is greater than or equal to the memory workload threshold, then the initial update power state is determined based on the real-time memory workload and the inspection window memory workload.

[0068] Among them, the real-time memory workload can refer to the amount used to measure the memory overhead, the observation window memory workload is the workload of the memory in a preset time period selected by the terminal, and the memory workload threshold can be determined based on the test results, which is the value of the memory workload when the graphics processor is at the optimal balance point; if the terminal determines that the real-time memory workload is greater than or equal to the memory workload threshold, it means that the memory overhead is too large at this time, and the terminal needs to adjust the current power supply status of the graphics processor so that the power supply status of the terminal can adapt to the current real-time memory workload.

[0069] In one embodiment, when determining the memory workload threshold, some standard games and benchmarks can be tested to save power as much as possible while ensuring smooth frames and perfect sharp details, so as to achieve the best balance. Figure 2 As shown in the figure, the test results of running GFX3.0 under the condition of memory clock of 400MHz are shown. The test results are the performance and power change curve of the graphics processor. Figure 2 As can be seen from the figure, as the power increases, the performance improvement becomes smaller and smaller. Figure 2 On the basis of Figure 3 As shown in the figure, the performance growth rate and power change curve of the graphics processor are as follows: Figure 3The balance point between power and performance can be observed. For example, when the power is 900mW, the performance is 13.9FPS. Compared with the maximum performance of 15.4FPS, the performance is only lost by 10%, but the power consumption is saved by 30%.

[0070] Furthermore, by setting the memory clock to 400MHZ and the engine threshold to 70%, the average power consumption and performance of the graphics processor under different memory thresholds are determined. From Table 1, it can be seen that when the engine threshold is fixed at 70%, setting the memory threshold to about 65% can achieve the best balance point. Therefore, it can be determined that the workload memory threshold is 65%. If the memory threshold is further increased, it will result in excess power being provided to the engine when the memory workload is heavier.

[0071] Table 1

[0072]

[0073] Optionally, the average power consumption and performance of the graphics processor under different memory thresholds can be determined by setting the memory clock to 400MHZ and the engine threshold to 0%. As can be seen from Table 2, when the engine threshold is fixed at 0%, setting the memory threshold to about 55% can achieve the best balance point, thereby determining that the workload memory threshold is 55%. If the memory threshold is further increased, excess power will be provided to the engine when the memory workload is heavier. The setting of the engine threshold can be adaptively adjusted according to actual conditions.

[0074] Table 2

[0075]

[0076] In the above embodiment, the terminal determines the memory workload threshold of the graphics processor when it is in the optimal balance state through the test results, and thus determines whether the power supply state needs to be initially updated by comparing the real-time memory workload with the memory workload threshold, thereby avoiding the situation of diminishing marginal effects.

[0077] Among them, in the process of actually determining the initial update power supply state, there may be a situation where the power supply adjustment conditions are determined not to be met based on the real-time memory workload. Therefore, in one of the embodiments, the real-time workload also includes the real-time engine workload of the graphics processor; the inspection window workload also includes the inspection window engine workload; if it is determined based on the real-time workload that the power supply adjustment conditions are met, then the initial update power supply state is determined based on the real-time workload and the inspection window workload, and it also includes: if the real-time memory workload is less than the memory workload threshold, then it is determined whether the real-time engine workload is greater than or equal to the engine workload threshold; if the engine workload is greater than or equal to the engine workload threshold, then the initial update power supply state is determined based on the real-time engine workload and the inspection window engine workload.

[0078] Among them, the real-time engine workload can refer to the quantity used to measure the working status of the engine, the inspection window engine workload is the workload of the engine in a preset time period selected by the terminal, and the engine workload threshold can also be determined based on the test results, which can be the engine threshold corresponding to the memory workload threshold when the graphics processor is at the optimal balance point. If the terminal determines that the real-time memory workload is less than the memory workload threshold, it determines whether the real-time engine workload is greater than or equal to the engine workload threshold. If the engine workload is greater than or equal to the engine workload threshold, it means that the current engine workload is relatively large, and the terminal needs to adjust the current power supply status of the graphics processor so that the power supply status of the terminal can adapt to the current real-time engine workload.

[0079] In the above embodiment, when the terminal determines that the real-time memory workload is less than the memory workload threshold, it will determine whether the real-time engine workload is greater than or equal to the engine workload threshold, thereby determining whether it is necessary to adjust the current power supply status of the graphics processor, thereby adjusting the power supply status of the graphics processor from the perspective of the engine, so as to improve the accuracy of determining the power supply status of the graphics processor through diversified data.

[0080] Among them, the terminal determines the initial update power supply state differently according to the real-time memory workload and according to the real-time engine workload. In one embodiment, the initial update power supply state includes any one of an up-frequency state, a down-frequency state or a unchanged state; the initial update power supply state is determined based on the real-time memory workload and the inspection window memory workload, including: determining a memory workload reference value based on the real-time memory workload and the inspection window memory workload; if the memory workload reference value is greater than a first preset ratio of the inspection window memory workload, determining the initial update power supply state to be a down-frequency state; if the memory workload reference value is less than a second preset ratio of the inspection window memory workload, determining the initial update power supply state to be an up-frequency state, wherein the first preset ratio is greater than the second preset ratio; otherwise, determining the initial update power supply state to be an unchanged state.

[0081] The frequency increase state may refer to a state where the power of the graphics processor is increased, the frequency reduction state may refer to a state where the power of the graphics processor is reduced, and the unchanged state may refer to a state where the power of the graphics processor is unchanged.

[0082] Among them, the memory workload reference value can be a value obtained by calculating based on the real-time memory workload and the observation window memory workload. Specifically, the real-time memory workload and the observation window memory workload can be divided to obtain the memory workload reference value; the first preset ratio of the observation window memory workload can refer to the real-time memory workload high (high) threshold set according to the observation window memory workload, and the second preset ratio of the observation window memory workload can refer to the real-time memory workload low (low) threshold set according to the observation window memory workload. The first preset ratio is greater than the second preset ratio. Specifically, the first preset ratio can be 3 / 4, and the second preset ratio can be 1 / 2. The specific values ​​of the first preset ratio and the second preset ratio can be set according to the actual situation, as long as the first preset ratio is greater than the second preset ratio.

[0083] In one of the embodiments, the terminal can determine the initial update power supply state based on the memory workload reference value and the inspection window memory workload; if the memory workload reference value is greater than the first preset ratio of the inspection window memory workload, it is considered that the power provided by the graphics processor to the engine is too high at this time, and its frequency can be reduced, that is, the initial update power supply state can be determined as a down-frequency state; if the memory workload reference value is less than the second preset ratio of the inspection window memory workload, it means that the memory occupancy is small at this time, and the power of the graphics processor can be appropriately increased to improve the performance of the graphics processor, that is, the initial update power supply state can be determined as an up-frequency state; if the memory workload reference value is between the first preset ratio of the inspection window memory workload and the second preset ratio of the inspection window memory workload, it can be determined that the initial update power supply state is unchanged.

[0084] In the above embodiment, the terminal determines the initial update power supply state by comparing the memory workload reference value with the first preset ratio of the inspection window memory workload and the second preset ratio of the inspection window memory workload by considering the memory overhead, thereby avoiding marginal effects and achieving the optimal balance point.

[0085] Among them, according to the real-time engine workload, the initial update power supply state can also be determined, and the initial update power supply state at this time can also include any one of an up-frequency state, a down-frequency state or a constant state. In one embodiment, the initial update power supply state is determined based on the real-time engine workload and the inspection window engine workload, including: determining the engine workload reference value based on the real-time engine workload and the inspection window engine workload; if the engine workload reference value is greater than the inspection window engine workload of the third preset ratio, then determining the initial update power supply state as an up-frequency state; if the engine workload reference value is less than the inspection window engine workload of the fourth preset ratio, then determining the initial update power supply state as a down-frequency state, and the third preset ratio is greater than the fourth preset ratio; otherwise, determining the initial update power supply state as a constant state.

[0086] Among them, the engine workload reference value can be a value calculated based on the real-time engine workload and the inspection window engine workload. Specifically, the real-time engine workload and the inspection window engine workload can be divided to obtain the engine workload reference value; the inspection window engine workload of the third preset ratio can refer to the high threshold of the real-time engine workload set according to the inspection window engine workload, and the inspection window engine workload of the fourth preset ratio can refer to the low threshold of the real-time internal engine workload set according to the inspection window engine workload. The third preset ratio is greater than the fourth preset ratio. Specifically, the third preset ratio can be the same as the first preset ratio, the fourth preset ratio can be the same as the second preset ratio, the third preset ratio can also be different from the first preset ratio, and the fourth preset ratio can also be different from the second preset ratio. The specific values ​​of the third preset ratio and the fourth preset ratio can be set according to the actual situation, as long as the third preset ratio is greater than the fourth preset ratio. In this embodiment, the third preset ratio is the same as the first preset ratio, the fourth preset ratio is the same as the second preset ratio, so the third preset ratio is 3 / 4 and the fourth preset ratio is 1 / 2.

[0087] In one of the embodiments, the terminal can determine the initial update power supply state based on the engine workload reference value and the inspection window engine workload; if the engine workload reference value is greater than the third preset ratio of the inspection window engine workload, it is considered that the engine needs more power at this time, and the graphics processor power can be increased, that is, the initial update power supply state can be determined as the frequency increase state; if the engine workload reference value is less than the fourth preset ratio of the inspection window engine workload, it means that the engine workload is small at this time, and it can be triggered from the perspective of saving power consumption to appropriately reduce the power of the graphics processor, that is, the initial update power supply state can be determined as the frequency reduction state; if the memory workload reference value is between the third preset ratio of the inspection window memory workload and the fourth preset ratio of the inspection window memory workload, it can be determined that the initial update power supply state is to remain unchanged.

[0088] In the above embodiment, the terminal determines the initial update power supply state by comparing the reference value of the boot workload with the third preset ratio of the inspection window engine workload and the fourth preset ratio of the inspection window engine workload by considering the real-time engine workload. Thus, the initial update power supply state of the graphics processor can be determined from the perspective of performance and power saving, so that the power consumption of the graphics processor can be guaranteed to be at a reasonable power-saving green level while providing sufficient performance to the graphics processor.

[0089] Furthermore, after determining the initial update power state of the graphics processor, the terminal can determine the target power state of the graphics processor based on the historical power state of the graphics processor and the current operating mode of the graphics processor. By combining multiple data, the target power state of the graphics processor can be comprehensively evaluated, which can improve the evaluation accuracy to a certain extent.

[0090] In one embodiment, the current working mode includes any one of a low power consumption mode, a performance mode, and a balanced mode; the initial updated power supply state includes any one of an increased frequency state, a decreased frequency state, or a maintained state; the historical power supply state includes any one of an increased frequency state, a decreased frequency state, or a maintained state; and determining a target power supply state of the graphics processor based on the initial updated power supply state, the historical power supply state, and the current working mode of the graphics processor includes the following steps:

[0091] Step S402: if the current working mode is the low power consumption mode, a power saving processing strategy is selected according to the initial updated power supply state and the historical power supply state, and a target power supply state of the graphics processor is determined based on the power saving processing strategy.

[0092] Among them, the low power consumption mode can be a power saving mode. In the power saving mode, some functions of the graphics processor can remain in a sleep state. The power saving processing strategy can be understood as a more conservative strategy for the purpose of saving power, such as appropriately sacrificing image quality to achieve the purpose of saving power.

[0093] When determining the target power supply state of the graphics processor, the terminal may select a power saving processing strategy in the low power consumption mode, and determine the target power supply state of the graphics processor based on the power saving processing strategy.

[0094] Step S404: if the current working mode is the performance mode, a performance processing strategy is selected according to the initial update power supply state and the historical power supply state, and based on the performance processing strategy, a target power supply state of the graphics processor is determined.

[0095] The performance mode may refer to a mode in which the current operation of the graphics processor is maximized and operates at a higher frequency, and the performance processing strategy may be understood as a more aggressive strategy aimed at improving performance.

[0096] When determining the target power supply state of the graphics processor, the terminal may select a performance processing strategy in the performance mode, and determine the target power supply state of the graphics processor based on the performance processing strategy.

[0097] Step S406: If the current working mode is the balanced mode, a state machine processing strategy is selected according to the initial updated power supply state and the historical power supply state, and a target power supply state of the graphics processor is determined based on the state machine processing strategy.

[0098] Among them, the balance mode refers to a mode in which the graphics processor can automatically adjust the operating frequency according to the load conditions, thereby saving power to a certain extent when the load is light, and providing higher performance when the load is heavy. The state machine processing strategy is a strategy aimed at achieving a balance.

[0099] When determining the target power supply state of the graphics processor, the terminal may select a state machine processing strategy in the balance mode, and determine the target power supply state of the graphics processor based on the state machine processing strategy.

[0100] In one of the embodiments, under different processing strategies, historical power supply states and initial update power supply states, the target power supply state finally determined is different. Specifically, as shown in Table 3, they are the target power supply states determined in different modes, wherein the new comparison result in Table 3 is the determined initial update power supply state, the historical state is the historical power supply state, and the update state refers to the state set according to the initial update power supply state (which can be understood as the same as the initial update power supply state), and the final decision refers to the determined target power supply state.

[0101] Specifically, when the historical state is DECR (decrease in frequency state) and the current state is INCR (increase in frequency), in the performance mode, if the performance processing strategy is selected, the update state can be directly set to INCR, and the value can be directly updated as the final decision, and sent to the PMU at the same time to improve the DVFS level. This processing method is more aggressive and can obtain better performance. In the low power mode, only the current state is updated to INCR, but it is not sent to the PMU. Only when the initial updated power supply state obtained at the next moment is still INCR, will INCR be updated to the PMU. The processing method is more conservative, and the purpose of power saving can be achieved while appropriately sacrificing image quality.

[0102] Table 3

[0103]

[0104]

[0105]

[0106] In one embodiment, if Figure 5 As shown, it is a schematic diagram of the state machine structure for determining the target power supply state using the state machine processing strategy for the balance mode. Specifically, Figure 5 It involves the state of keeping unchanged (KEEP), the state of reducing frequency (DECR) and the state of increasing frequency (INCR), and each different state can represent the historical state and the initial update power supply state. For example, for the arrow pointing from DECR to KEEP, it can be understood that when DECR is the historical state and KEEP is the initial update power supply state, the update state can be determined to be KEEP, and the final decision is undetermined. For another example, for the arrow pointing from KEEP to INCR, it can be understood that when KEEP is the historical state and INCR is the initial update power supply state, the update state can be determined to be INCR, and the final decision is NA; when DECR is the historical state and DECR is the initial update power supply state, the update state can be determined to be DECR, and the final decision is DECR; when INCR is the historical state and INCR is the initial update power supply state, the update state can be determined to be INCR, and the final decision is INCR.

[0107] In the above embodiment, the terminal determines the target power state of the graphics processor by selecting different processing strategies for different modes and combining the initial updated power state and the historical power state. Since a comprehensive analysis is performed based on the actual situation of various data of the graphics processor, the evaluation accuracy can be improved to a certain extent.

[0108] In one embodiment, if Figure 6 FIG. 1 is a flowchart of a method for determining a power supply status of a graphics processor in one embodiment.

[0109] This embodiment involves an overall flow chart of how to determine the target power supply state, wherein the memory overhead may refer to the real-time memory workload obtained by the terminal, and the workload counter may be used to measure the real-time engine workload. Therefore, the terminal may obtain the count value of the workload counter through the graphics processor (GPU) CSP (content security policy), thereby determining the real-time engine workload. After determining the real-time memory workload and the real-time engine workload, the terminal may determine the initial update power supply state.

[0110] Furthermore, the terminal combines the initial updated power supply status and the historical status to ultimately decide whether to increase, decrease, or keep the graphics processor constant, and sends an increase, decrease, or keep constant signal to the PMU (battery management unit) to request the PMU to update the DVFS level (i.e., change the power supply status). The final decision result is executed by the PMU.

[0111] In one embodiment, if Figure 7 FIG. 1 is a flow chart of a method for determining a power supply status of an image processor in one embodiment.

[0112] Among them, this embodiment involves a flowchart of how to determine the initial power supply update state based on the real-time memory workload and the real-time engine workload. Specifically, the real-time memory workload can refer to the amount used to measure the memory overhead, and the inspection window memory workload is the workload of the memory in the preset time period selected by the terminal. The memory workload threshold can be determined based on the test results, which is the value of the memory workload when the graphics processor is at the optimal balance point. The real-time engine workload can refer to the amount used to measure the engine working condition. The inspection window engine workload is the workload of the engine in the preset time period selected by the terminal. The engine workload threshold can also be determined based on the test results, which can be the engine threshold corresponding to the memory workload threshold when the graphics processor is at the optimal balance point.

[0113] Among them, if the terminal determines that the real-time memory workload is greater than or equal to the memory workload threshold, it means that the memory overhead is too large at this time, and the real-time memory workload and the inspection window memory workload can be divided to obtain a memory workload reference value. If the terminal determines that the memory workload reference value is greater than the first preset ratio of the inspection window memory workload, it is considered that the power provided by the graphics processor to the engine is too high at this time, and its frequency can be reduced, that is, the initial update power supply state can be determined as a down-frequency state; if the memory workload reference value is less than the second preset ratio of the inspection window memory workload, it means that the memory occupancy is small at this time, and the power of the graphics processor can be appropriately increased to improve the performance of the graphics processor, that is, the initial update power supply state can be determined as an up-frequency state. If the memory workload reference value is between the first preset ratio of the inspection window memory workload and the second preset ratio of the inspection window memory workload, it can be determined that the initial update power supply state is unchanged.

[0114] Furthermore, if the terminal determines that the real-time memory workload is less than the memory workload threshold, it determines whether the real-time engine workload is greater than or equal to the engine workload threshold. If the engine workload is greater than or equal to the engine workload threshold, it means that the current engine workload is relatively large, and the terminal needs to adjust the current power supply status of the graphics processor so that the power supply status of the terminal can adapt to the current real-time engine workload.

[0115] Among them, the terminal can divide the real-time engine workload and the inspection window engine workload to obtain an engine workload reference value. Specifically, the terminal can determine the initial update power supply state based on the engine workload reference value and the inspection window engine workload; if the engine workload reference value is greater than the third preset ratio of the inspection window engine workload, it is considered that the engine needs more power at this time, so the graphics processor power can be increased, that is, the initial update power supply state can be determined as an up-clocked state; if the engine workload reference value is less than the fourth preset ratio of the inspection window engine workload, it means that the engine workload is small at this time, and it can be triggered from the perspective of saving power consumption, and the power of the graphics processor can be appropriately reduced, that is, the initial update power supply state can be determined as a down-clocked state; if the memory workload reference value is between the third preset ratio of the inspection window memory workload and the fourth preset ratio of the inspection window memory workload, it can be determined that the initial update power supply state is to remain unchanged.

[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0117] Based on the same inventive concept, the embodiment of the present application also provides a graphics processor power state determination device for implementing the graphics processor power state determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the power state determination device for one or more graphics processors provided below can refer to the limitations of the graphics processor power state determination method above, and will not be repeated here.

[0118] In one embodiment, Figure 8 As shown, a device for determining the power supply status of a graphics processor is provided, comprising: a first data acquisition module, a first processing module, a second data acquisition module and a second processing module, wherein:

[0119] The first data acquisition module 802 is used to acquire the real-time workload of the graphics processor.

[0120] The first processing module 804 is used to determine the initial update power supply state based on the real-time workload and the inspection window workload if the power supply adjustment condition is determined to be met based on the real-time workload, and the inspection window workload is the workload within the selected preset time period.

[0121] The second data acquisition module 806 is used to acquire the historical power supply status of the graphics processor.

[0122] The second processing module 808 is used to determine a target power state of the graphics processor based on the initial update power state, the historical power state and the current working mode of the graphics processor.

[0123] In one embodiment, the real-time workload includes the real-time memory workload of the graphics processor; the inspection window workload includes the inspection window memory workload; the first processing module is also used to determine the initial update power supply state based on the real-time memory workload and the inspection window memory workload if the real-time memory workload is greater than or equal to the memory workload threshold.

[0124] In one embodiment, the real-time workload also includes the real-time engine workload of the graphics processor; the inspection window workload also includes the inspection window engine workload. The first processing module is further used to determine whether the real-time engine workload is greater than or equal to the engine workload threshold if the real-time memory workload is less than the memory workload threshold; if the engine workload is greater than or equal to the engine workload threshold, determine the initial update power supply state based on the real-time engine workload and the inspection window engine workload.

[0125] In one of the embodiments, the initial update power supply state includes any one of an increase frequency state, a decrease frequency state or a unchanged state; the first processing module is also used to determine a memory workload reference value based on the real-time memory workload and the inspection window memory workload; if the memory workload reference value is greater than the inspection window memory workload of a first preset ratio, the initial update power supply state is determined to be a decrease frequency state; if the memory workload reference value is less than the inspection window memory workload of a second preset ratio, the initial update power supply state is determined to be an increase frequency state, wherein the first preset ratio is greater than the second preset ratio; otherwise, the initial update power supply state is determined to be an unchanged state.

[0126] In one of the embodiments, the initial update power supply state includes any one of an up-frequency state, a down-frequency state or a unchanged state; the first processing module is also used to determine the engine workload reference value based on the real-time engine workload and the inspection window engine workload; if the engine workload reference value is greater than the third preset ratio of the inspection window engine workload, the initial update power supply state is determined to be a state up-frequency state; if the engine workload reference value is less than the fourth preset ratio of the inspection window engine workload, the initial update power supply state is determined to be a down-frequency state, and the third preset ratio is greater than the fourth preset ratio; otherwise, the initial update power supply state is determined to be an unchanged state.

[0127] In one of the embodiments, the current working mode includes any one of a low power consumption mode, a performance mode and a balanced mode; the initial updated power supply state includes any one of an increased frequency state, a decreased frequency state or a maintained unchanged state; the historical power supply state includes any one of an increased frequency state, a decreased frequency state or a maintained unchanged state; the second data processing module is further used to select a power saving processing strategy according to the initial updated power supply state and the historical power supply state if the current working mode is the low power consumption mode, and determine the target power supply state of the graphics processor based on the power saving processing strategy; if the current working mode is the performance mode, select a performance processing strategy according to the initial updated power supply state and the historical power supply state, and determine the target power supply state of the graphics processor based on the performance processing strategy;

[0128] If the current working mode is the balanced mode, a state machine processing strategy is selected according to the initial updated power supply state and the historical power supply state, and a target power supply state of the graphics processor is determined based on the state machine processing strategy.

[0129] Each module in the above-mentioned device for determining the power supply status of a graphics processor can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0130] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining the power supply state of a graphics processor is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0131] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0132] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned method for determining the power supply status of a graphics processor when executing the computer program.

[0133] In one embodiment, a 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 method for determining the power supply status of a graphics processor are implemented.

[0134] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above-mentioned method for determining the power supply status of a graphics processor when executed by a processor.

[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining a power supply status of a graphics processor, characterized in that: The method comprises: Acquire the real-time workload of the graphics processor; the real-time workload includes the real-time memory workload of the graphics processor and the real-time engine workload of the graphics processor; If it is determined based on the real-time workload that the power supply adjustment condition is met, then based on the real-time workload and the inspection window workload, an initial update power supply state is determined, the inspection window workload includes the inspection window memory workload and the inspection window engine workload, and the inspection window workload is the workload within the selected preset time period, the steps include: If the real-time memory workload is greater than or equal to the memory workload threshold, determining an initial update power supply state based on the real-time memory workload and the inspection window memory workload; If the real-time memory workload is less than the memory workload threshold, determine whether the real-time engine workload is greater than or equal to the engine workload threshold; if the real-time engine workload is greater than or equal to the engine workload threshold, determine the initial update power supply state based on the real-time engine workload and the inspection window engine workload, and the initial update power supply state includes any one of a frequency increase state, a frequency reduction state or a constant state. The steps include: determining an engine workload reference value based on the real-time engine workload and the inspection window engine workload; if the engine workload reference value is greater than a third preset ratio of the inspection window engine workload, determine that the initial update power supply state is a state frequency increase state; if the engine workload reference value is less than a fourth preset ratio of the inspection window engine workload, determine that the initial update power supply state is a frequency reduction state, and the third preset ratio is greater than the fourth preset ratio; otherwise, determine that the initial update power supply state is a constant state; Obtaining a historical power supply status of the graphics processor; A target power state of the graphics processor is determined based on the initial update power state, the historical power state, and a current operating mode of the graphics processor.

2. The method according to claim 1, characterized in that The initial update power supply state includes any one of a frequency increase state, a frequency decrease state or a constant state; The determining of the initial update power supply state based on the real-time memory workload and the inspection window memory workload includes: Determining a memory workload reference value based on the real-time memory workload and the inspection window memory workload; If the memory workload reference value is greater than a first preset ratio of the inspection window memory workload, determining that the initial update power supply state is a frequency reduction state; If the memory workload reference value is less than a second preset ratio of the inspection window memory workload, determining that the initial update power supply state is a frequency-upgrade state, wherein the first preset ratio is greater than the second preset ratio; Otherwise, it is determined that the initial update power supply state is to remain unchanged.

3. The method according to claim 1, characterized in that The current working mode includes any one of a low power consumption mode, a performance mode and a balanced mode; the initial update power supply state includes any one of an increase frequency state, a decrease frequency state or a remain unchanged state; the historical power supply state includes any one of an increase frequency state, a decrease frequency state or a remain unchanged state; The determining, based on the initial update power state, the historical power state, and the current working mode of the graphics processor, a target power state of the graphics processor includes: If the current working mode is a low power consumption mode, selecting a power saving processing strategy according to the initial updated power supply state and the historical power supply state, and determining a target power supply state of the graphics processor based on the power saving processing strategy; If the current working mode is the performance mode, selecting a performance processing strategy according to the initial updated power supply state and the historical power supply state, and determining a target power supply state of the graphics processor based on the performance processing strategy; If the current working mode is the balanced mode, a state machine processing strategy is selected according to the initial updated power supply state and the historical power supply state, and a target power supply state of the graphics processor is determined based on the state machine processing strategy.

4. A device for determining a power supply status of a graphics processor, characterized in that: The device comprises: A first data acquisition module, used to acquire the real-time workload of the graphics processor; the real-time workload includes the real-time memory workload of the graphics processor and the real-time engine workload of the graphics processor; The first processing module is used to determine the initial update power supply state based on the real-time workload and the inspection window workload if it is determined that the power supply adjustment condition is met based on the real-time workload, the inspection window workload includes the inspection window memory workload and the inspection window engine workload, and the inspection window workload is the workload within the selected preset time period, and is specifically used to: If the real-time memory workload is greater than or equal to the memory workload threshold, determining an initial update power supply state based on the real-time memory workload and the inspection window memory workload; If the real-time memory workload is less than the memory workload threshold, determine whether the real-time engine workload is greater than or equal to the engine workload threshold; if the real-time engine workload is greater than or equal to the engine workload threshold, determine the initial update power supply state based on the real-time engine workload and the inspection window engine workload, and the initial update power supply state includes any one of a frequency increase state, a frequency reduction state or a constant state, which is specifically used for: determining an engine workload reference value based on the real-time engine workload and the inspection window engine workload; if the engine workload reference value is greater than the inspection window engine workload of a third preset ratio, determine the initial update power supply state to be a frequency increase state; if the engine workload reference value is less than the inspection window engine workload of a fourth preset ratio, determine the initial update power supply state to be a frequency reduction state, and the third preset ratio is greater than the fourth preset ratio; otherwise, determine the initial update power supply state to be a constant state; A second data acquisition module, used to acquire a historical power supply status of the graphics processor; The second processing module is used to determine a target power state of the graphics processor based on the initial update power state, the historical power state and the current working mode of the graphics processor.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.

6. A 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 3 are implemented.

7. A computer program product, comprising 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 3 are implemented.

Citation Information

Patent Citations

  • Frequency adjustment method and device, electronic equipment and storage medium

    CN111459682A