An automatic tuning system for GPU power control parameters

By designing an automatic tuning system for GPU power consumption control parameters and using the test module to automatically obtain and configure parameters, the time-consuming and labor-intensive manual tuning problem in existing technologies is solved, and efficient GPU power consumption control parameter optimization is achieved.

CN119292441BActive Publication Date: 2025-10-14沐曦科技(成都)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411441175.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-10-14
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

In the prior art, the process of tuning GPU power consumption control parameters requires a lot of manual adjustments, which is time-consuming and labor-intensive, and inefficient.

Method used

An automatic tuning system for GPU power consumption control parameters is designed. The test module automatically obtains and configures relevant parameters, forms test samples, and determines the maximum performance-power ratio to optimize parameters.

Benefits of technology

It greatly reduces human resource consumption and improves the efficiency of GPU power consumption control parameter tuning. It can be performed automatically during idle time, thereby improving the utilization of idle time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292441B_ABST
    Figure CN119292441B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of GPU power consumption control, in particular to an automatic tuning system for GPU power consumption control parameters, which comprises a test module, a GPU chip, a processor and a memory storing a computer program; when the computer program is executed by the processor, the following steps are implemented: obtaining parameter definition information and configuring the parameter definition information into the GPU chip by using the test module; forming a plurality of test samples according to a plurality of temporary values corresponding to all variable parameters respectively; configuring each test sample into the GPU chip by using the test module and obtaining a corresponding performance power consumption ratio; determining that a test sample corresponding to a maximum performance power consumption ratio is a target sample; and automatically tuning the GPU power consumption control parameters by using the test module, so that the consumption of human resources is greatly reduced, the utilization rate of idle time is improved, and the efficiency of tuning the GPU power consumption control parameters is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the GPU power consumption control technical field, in particular to a kind of automatic tuning system of GPU power consumption control parameter. BACKGROUND

[0002] For GPU chip, the rated power defined by different GPU chips can be different, the power of GPU chip at any time cannot exceed its rated power, to achieve this purpose, the existing method usually uses algorithm to control the level of dynamic power management (DPM), so that the power of GPU chip is always less than its rated power.

[0003] However, the effect of algorithm control can be influenced by many parameters, for example, rated power, DPM parameter definition, DPM frequency interval, etc., even if a small number of parameters change, other parameters also need to be adjusted, to determine the optimal value of each parameter, usually, the optimal value of each parameter can be the performance power ratio of the configured GPU chip when executing use case is best, and the adjustment process needs to manually adjust the value of each parameter frequently, and the optimal value is determined by traversal method, obviously, the adjustment process will consume a lot of human resources and time.

[0004] Therefore, how to improve the efficiency of GPU power consumption control parameter tuning has become a problem to be solved. SUMMARY

[0005] To solve the above technical problems, the technical scheme adopted by the present application is:

[0006] An automatic tuning system of GPU power consumption control parameter, the system comprises: test module, GPU chip, processor and memory storing computer program, when the computer program is executed by the processor, the following steps are realized:

[0007] S101, obtain the related parameter set A={a1, a2, …, a m , …, a M} of GPU power consumption control, wherein a m m is an integer in the range of [1, M], and M is the number of related parameters contained in the related parameter set A.

[0008] S102, extract target parameter set B and variable parameter set C from the related parameter set A, wherein the target parameter set B={b1, b2, …, b n , …, b N}, b nis the nth target parameter in the target parameter set B, n is an integer in the range [1, N], N is the number of target parameters contained in the target parameter set B, b n ∈A, the variable parameter set C={c1, c2, ..., c k ,…,c K}, c k is the kth variable parameter in the variable parameter set C, k is an integer in the range [1, K], K is the number of variable parameters contained in the variable parameter set C, c k ∈A,B∩C= , N+K=M.

[0009] S103 , obtaining parameter definition information, where the parameter definition information includes definition values ​​corresponding to N target parameters and initial ranges corresponding to K variable parameters.

[0010] S104 : For any target parameter, use the test module to configure a definition value corresponding to the target parameter to the corresponding target parameter in the GPU chip.

[0011] S105 : For any variable parameter, obtain a preset step size corresponding to the variable parameter, and determine a plurality of temporary values ​​corresponding to the variable parameter according to the preset step size and an initial range corresponding to the variable parameter.

[0012] S106: Form several test samples according to several temporary values ​​corresponding to all variable parameters.

[0013] S107 , for any test sample, configure the test sample into the GPU chip using the test module, and have the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case.

[0014] S108 , determining the test sample corresponding to the maximum performance-to-power ratio as a target sample, where the target sample includes tuning values ​​corresponding to respective variable parameters.

[0015] Compared with the prior art, the present invention has significant advantages. By utilizing the above technical solution, the present invention provides an automatic tuning system for GPU power consumption control parameters, which can achieve considerable technological advancement and practicality, and has wide industrial application value. It has at least the following advantages:

[0016] The present invention provides an automatic tuning system for GPU power consumption control parameters, the system comprising: a test module, a GPU chip, a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: obtaining a set of relevant parameters A={a1, a2, ..., am ,…,a M}, where a m is the mth related parameter in the related parameter set A, m is an integer in the range of [1, M], M is the number of related parameters contained in the related parameter set A, and the target parameter set B and the variable parameter set C are extracted from the related parameter set A, wherein the target parameter set B={b1, b2, ..., b n ,…,b N}, b n is the nth target parameter in the target parameter set B, n is an integer in the range [1, N], N is the number of target parameters contained in the target parameter set B, b n ∈A, the variable parameter set C={c1, c2, ..., c k ,…,c K}, c k is the kth variable parameter in the variable parameter set C, k is an integer in the range [1, K], K is the number of variable parameters contained in the variable parameter set C, c k ∈A,B∩C= , N+K=M, obtain parameter definition information, the parameter definition information includes definition values ​​corresponding to N target parameters and initial ranges corresponding to K variable parameters. For any target parameter, use the test module to configure the definition value corresponding to the target parameter to the corresponding target parameter in the GPU chip. For any variable parameter, obtain the preset step size corresponding to the variable parameter. According to the preset step size and initial range corresponding to the variable parameter, determine several temporary values ​​corresponding to the variable parameter. According to the several temporary values ​​corresponding to all variable parameters, form several test samples. For any test sample, use the test module to configure the test sample to the GPU chip. The GPU chip executes the preset use case to obtain the performance-power-consumption ratio when the GPU chip executes the preset use case. Determine the test sample corresponding to the maximum performance-power-consumption ratio as the target sample. The target sample includes the tuning values ​​corresponding to each variable parameter.

[0017] It can be seen that automating the tuning of GPU power control parameters through the test module greatly reduces human resource consumption. Moreover, the automated process allows the tuning of GPU power control parameters to be performed during idle time, improving the utilization of idle time and thus improving the efficiency of GPU power control parameter tuning. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A schematic diagram of a flow chart of a computer program being executed by a processor in an automatic tuning system for GPU power consumption control parameters provided by an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of a first hardware architecture of a system for automatically tuning GPU power consumption control parameters provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of a second hardware architecture of a system for automatically tuning GPU power consumption control parameters provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] This embodiment provides a system for automatically tuning GPU power consumption control parameters, the system comprising: a test module, a GPU chip, a processor, and a memory storing a computer program, see Figure 1 , is a flow chart of a computer program executed by a processor in an automatic tuning system for GPU power consumption control parameters provided by an embodiment of the present invention. When the computer program is executed by the processor, the following steps are implemented:

[0024] S101, obtain the relevant parameter set A={a1, a2, ..., a m ,…,a M}, where a m is the mth related parameter in the related parameter set A, m is an integer in the range [1, M], and M is the number of related parameters included in the related parameter set A;

[0025] S102, extracting a target parameter set B and a variable parameter set C from the relevant parameter set A, wherein the target parameter set B = {b1, b2, ..., b n ,…,b N}, b nis the nth target parameter in the target parameter set B, n is an integer in the range [1, N], N is the number of target parameters contained in the target parameter set B, b n ∈A, the variable parameter set C={c1, c2, ..., c k ,…,c K}, c k is the kth variable parameter in the variable parameter set C, k is an integer in the range [1, K], K is the number of variable parameters contained in the variable parameter set C, c k ∈A,B∩C= , N+K=M;

[0026] S103, obtaining parameter definition information, wherein the parameter definition information includes definition values ​​corresponding to N target parameters and initial ranges corresponding to K variable parameters;

[0027] S104, for any target parameter, using the test module to configure a definition value corresponding to the target parameter to the corresponding target parameter in the GPU chip;

[0028] S105: For any variable parameter, obtain a preset step size corresponding to the variable parameter, and determine a number of temporary values ​​corresponding to the variable parameter according to the preset step size and an initial range corresponding to the variable parameter;

[0029] S106, forming a plurality of test samples according to a plurality of temporary values ​​corresponding to all variable parameters;

[0030] S107, for any test sample, configuring the test sample into the GPU chip using the test module, and having the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case;

[0031] S108 , determining the test sample corresponding to the maximum performance-to-power ratio as a target sample, where the target sample includes tuning values ​​corresponding to respective variable parameters.

[0032] Among them, the test module can refer to an automated testing tool, and the relevant parameters include but are not limited to rated power consumption parameters, dynamic power management unit definition parameters, power consumption detection window duration parameters, dynamic power management unit frequency modulation interval parameters, etc.

[0033] The parameter definition information may refer to the pre-definition of the GPU chip by the user, and the parameter definition information is the conditions that must be met when the GPU power consumption control is optimized.

[0034] The test samples contain temporary values ​​corresponding to each variable parameter, and any two test samples are different.

[0035] Specifically, bn ∈A can indicate that any target parameter has a corresponding related parameter, c k ∈A can indicate that any variable parameter has a corresponding related parameter, B∩C= It can indicate that any target parameter does not have a corresponding variable parameter. Similarly, any variable parameter does not have a corresponding target parameter. Combined with N+K=M, it can indicate that any related parameter corresponds to a target parameter or a variable parameter.

[0036] The preset step sizes corresponding to different variable parameters may be different, and the preset step sizes corresponding to each variable parameter may be set by the implementer. For example, the preset step size corresponding to the power consumption detection window duration parameter may be set to 10 milliseconds, and the preset step size corresponding to the dynamic power management unit frequency modulation interval parameter may be set to 50 milliseconds, etc.

[0037] In a specific embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0038] S201, for any variable parameter, using the test module to configure N target parameters and other K-1 variable parameters in the GPU chip to fixed values, respectively configuring each temporary value of the variable parameter to the GPU chip and obtaining a performance-power-consumption ratio corresponding to each temporary value;

[0039] S202 : According to each temporary value in the variable parameter and the performance-power-consumption ratio corresponding thereto, a fitting curve between the variable parameter and the performance-power-consumption ratio is obtained by fitting.

[0040] Among them, for a temporary value of a variable parameter, the temporary value is configured as the value of the variable parameter in the GPU chip, the GPU chip is used to execute a preset use case, and the performance power consumption ratio of the GPU chip executing the preset use case is obtained as the performance power consumption ratio corresponding to the temporary value.

[0041] Specifically, the fitting method may be quadratic curve fitting, cubic curve fitting, etc., and the implementer may select one based on the actual situation.

[0042] In a specific embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0043] S301, for any variable parameter, determining a variable parameter value corresponding to a maximum performance-to-power ratio in a fitting curve corresponding to the variable parameter as a base value;

[0044] S302, determining a reference range corresponding to the variable parameter according to the base value, the preset range length corresponding to the variable parameter, and the initial range;

[0045] Accordingly, steps S105 to S108 include:

[0046] S303: For any variable parameter, obtain a preset step size corresponding to the variable parameter, and determine a plurality of reference values ​​corresponding to the variable parameter according to the preset step size and a reference range corresponding to the variable parameter;

[0047] S304, forming a plurality of first reference samples according to a plurality of reference values ​​corresponding to all variable parameters;

[0048] S305: For any first reference sample, configure the first reference sample into the GPU chip using the test module, and have the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case;

[0049] S306: Determine the first reference sample corresponding to the maximum performance-to-power ratio as the target sample.

[0050] Among them, let the base value be s, the preset range length corresponding to the variable parameter be d, and the initial range corresponding to the variable parameter be [q1, q2]. The reference range can be the intersection of [sd / 2, s+d / 2] and [q1, q2]. The preset range lengths corresponding to different variable parameters can be different, and the preset range lengths corresponding to different variable parameters can be set by the implementer.

[0051] Specifically, in this embodiment, by analyzing the fitting curve, the initial range corresponding to the variable parameter is narrowed down to the reference range, so that the number of reference values ​​determined according to the reference range is smaller than the number of temporary values ​​determined according to the initial range. Accordingly, the number of first reference samples formed is also smaller than the number of test samples, and the test module takes less time to perform performance power consumption ratio testing, thereby further improving the efficiency of GPU power consumption control parameter tuning.

[0052] In a specific embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0053] S401, for any variable parameter, calculating the variance of each temporary value corresponding to the variable parameter;

[0054] S402, if the variance is greater than or equal to a preset variance threshold, determining the variable parameter as a selected parameter;

[0055] Accordingly, steps S106 to S108 include:

[0056] S404, forming a plurality of second reference samples according to a plurality of temporary values ​​corresponding to all selected parameters;

[0057] S405: For any second reference sample, configure the second reference sample into the GPU chip using the test module, and have the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case;

[0058] S406: Determine the second reference sample corresponding to the maximum performance-to-power ratio as the target sample.

[0059] When the variance is smaller than a preset variance threshold, it indicates that the variable parameter has little influence on the performance-to-power ratio and can be ignored.

[0060] Specifically, in this embodiment, by analyzing the fitting curve, the variable parameters that have a greater impact on the performance-power-consumption ratio are retained as selected parameters. Accordingly, the number of second reference samples formed according to the selected parameters will be smaller than the number of test samples, and the test module will take less time to perform performance-power-consumption ratio testing, thereby further improving the efficiency of GPU power consumption control parameter tuning.

[0061] In a specific implementation, the target parameters include at least rated power consumption parameters and dynamic power management unit definition parameters.

[0062] In a specific implementation, the variable parameters include at least a power consumption detection window duration parameter and a dynamic power management unit frequency modulation interval parameter.

[0063] The variable parameters may also include board detection chip model parameters, frequency increase threshold parameters, frequency decrease threshold parameters, and the like.

[0064] In a specific embodiment, the GPU chip includes a control module and a service module. Figure 2 , which is a first hardware architecture diagram of a system for automatically tuning GPU power consumption control parameters provided by an embodiment of the present invention.

[0065] The control module includes the N target parameters and the K variable parameters;

[0066] The business module is used to execute the preset use case.

[0067] In another specific embodiment, the GPU chip further includes a frequency module, and the system further includes a power module and a power consumption detection module. Figure 3 , which is a second hardware architecture diagram of a system for automatically tuning GPU power consumption control parameters provided by an embodiment of the present invention.

[0068] The control module configures the power module and the frequency module according to the N target parameters and the K variable parameters configured by the test module;

[0069] The power consumption detection module is used to obtain the performance power consumption ratio of the service module when executing the preset use case.

[0070] Any target parameter or variable parameter is included in the power module or the frequency module, and the power consumption detection module may refer to a board detection chip.

[0071] In the present invention, the GPU power consumption control parameters are automatically tuned through the test module, which greatly reduces human resource consumption. Moreover, the automation process enables the GPU power consumption control parameters to be tuned during idle time, thereby improving the utilization rate of idle time and thus improving the efficiency of GPU power consumption control parameter tuning.

[0072] Although some specific embodiments of the present invention have been described in detail by way of example, it will be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. An automatic tuning system for GPU power consumption control parameters, characterized in that: The system includes: a test module, a GPU chip, a processor, and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: S101, obtain the relevant parameter set A={a1, a2, ..., a m ,…,a M }, where a m is the mth related parameter in the related parameter set A, m is an integer in the range [1, M], and M is the number of related parameters included in the related parameter set A; S102, extracting a target parameter set B and a variable parameter set C from the relevant parameter set A, wherein the target parameter set B = {b1, b2, ..., b n ,…,b N }, b n is the nth target parameter in the target parameter set B, n is an integer in the range [1, N], N is the number of target parameters contained in the target parameter set B, b n ∈A, the variable parameter set C={c1, c2, ..., c k ,…,c K }, c k is the kth variable parameter in the variable parameter set C, k is an integer in the range [1, K], K is the number of variable parameters contained in the variable parameter set C, c k ∈A,B∩C= , N+K=M; S103, obtaining parameter definition information, wherein the parameter definition information includes definition values ​​corresponding to N target parameters and initial ranges corresponding to K variable parameters; S104, for any target parameter, using the test module to configure a definition value corresponding to the target parameter to the corresponding target parameter in the GPU chip; S105: For any variable parameter, obtain a preset step size corresponding to the variable parameter, and determine a number of temporary values ​​corresponding to the variable parameter according to the preset step size and an initial range corresponding to the variable parameter; S106, forming a plurality of test samples according to a plurality of temporary values ​​corresponding to all variable parameters; S107, for any test sample, configuring the test sample into the GPU chip using the test module, and having the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case; S108 , determining the test sample corresponding to the maximum performance-to-power ratio as a target sample, where the target sample includes tuning values ​​corresponding to respective variable parameters.

2. The automatic tuning system for GPU power consumption control parameters according to claim 1, characterized in that: When the computer program is executed by a processor, the following steps are also implemented: S201, for any variable parameter, using the test module to configure N target parameters and other K-1 variable parameters in the GPU chip to fixed values, respectively configuring each temporary value of the variable parameter to the GPU chip and obtaining a performance-power-consumption ratio corresponding to each temporary value; S202 : According to each temporary value in the variable parameter and the performance-power-consumption ratio corresponding thereto, a fitting curve between the variable parameter and the performance-power-consumption ratio is obtained by fitting.

3. The automatic tuning system for GPU power consumption control parameters according to claim 2, characterized in that: When the computer program is executed by a processor, the following steps are also implemented: S301, for any variable parameter, determining a variable parameter value corresponding to a maximum performance-to-power ratio in a fitting curve corresponding to the variable parameter as a base value; S302, determining a reference range corresponding to the variable parameter according to the base value, the preset range length corresponding to the variable parameter, and the initial range; Accordingly, steps S105 to S108 include: S303: For any variable parameter, obtain a preset step size corresponding to the variable parameter, and determine a plurality of reference values ​​corresponding to the variable parameter according to the preset step size and a reference range corresponding to the variable parameter; S304, forming a plurality of first reference samples according to a plurality of reference values ​​corresponding to all variable parameters; S305: For any first reference sample, configure the first reference sample into the GPU chip using the test module, and have the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case; S306: Determine the first reference sample corresponding to the maximum performance-to-power ratio as the target sample.

4. The automatic tuning system for GPU power consumption control parameters according to claim 2, characterized in that: When the computer program is executed by a processor, the following steps are also implemented: S401, for any variable parameter, calculating the variance of each temporary value corresponding to the variable parameter; S402, if the variance is greater than or equal to a preset variance threshold, determining the variable parameter as a selected parameter; Accordingly, steps S106 to S108 include: S404, forming a plurality of second reference samples according to a plurality of temporary values ​​corresponding to all selected parameters; S405: For any second reference sample, configure the second reference sample into the GPU chip using the test module, and have the GPU chip execute a preset use case to obtain a performance-power-consumption ratio when the GPU chip executes the preset use case; S406: Determine the second reference sample corresponding to the maximum performance-to-power ratio as the target sample.

5. The automatic tuning system for GPU power consumption control parameters according to claim 1, characterized in that: The target parameters include at least rated power consumption parameters and dynamic power management unit definition parameters.

6. The automatic tuning system for GPU power consumption control parameters according to claim 1, characterized in that: The variable parameters include at least a power consumption detection window duration parameter and a dynamic power management unit frequency modulation interval parameter.

7. The automatic tuning system for GPU power consumption control parameters according to claim 1, characterized in that: The GPU chip includes a control module and a service module; The control module includes the N target parameters and the K variable parameters; The business module is used to execute the preset use case.

8. The automatic tuning system for GPU power consumption control parameters according to claim 7, characterized in that: The GPU chip also includes a frequency module, and the system also includes a power module and a power consumption detection module; The control module configures the power module and the frequency module according to the N target parameters and the K variable parameters configured by the test module; The power consumption detection module is used to obtain the performance power consumption ratio of the service module when executing the preset use case.

Citation Information

Patent Citations

  • Power consumption distribution method based on multiple computing devices

    CN114546666A

  • Power consumption adjustment method, device and equipment of graphics processor, and storage medium

    CN116610477A