Automatic tuning system for GPU power consumption control parameters
Through the automated test module, GPU power consumption control parameters are obtained and configured, test samples are formed, use cases are executed, and tuning values are automatically determined, which solves the problem of low GPU power consumption tuning efficiency in the existing technology and realizes efficient automatic tuning.
Patent Information
- Application Number
- CN202411441175.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-16
AI Technical Summary
In the prior art, the tuning of GPU power consumption control parameters requires a lot of manual adjustment, which consumes a lot of human resources and time, and is inefficient.
An automatic tuning system for GPU power consumption control parameters is designed. The relevant parameter set is obtained through the test module, the target parameters and variable parameters are extracted, the parameter values are configured, the test samples are formed, the preset use cases are executed, and the maximum performance power consumption ratio is determined. The corresponding tuning value realizes automatic tuning.
It greatly reduces human resource consumption, allows tuning during idle time, and improves the efficiency of tuning GPU power consumption control parameters.
Smart Images

Figure CN119292441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of GPU power consumption control, and in particular to an automatic tuning system for GPU power consumption control parameters. Background Art
[0002] For GPU chips, the rated power consumption defined by different GPU chips may be different. The power consumption of the GPU chip cannot exceed its rated power consumption at any time. To achieve this goal, existing methods usually use algorithms to control the level of dynamic power management (DPM) so that the power consumption of the GPU chip is always less than its rated power consumption.
[0003] However, the effect of algorithm control will be affected by many parameters, such as rated power consumption, DPM parameter definition, DPM frequency modulation interval, etc. Even if a small number of parameters change, other parameters also need to be adjusted accordingly to determine the optimal value of each parameter. Usually, the optimal value of each parameter can refer to the best performance-power ratio of the configured GPU chip when executing the use case. The adjustment process requires manual frequent adjustment of the values of each parameter and the determination of the optimal value through traversal. 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 an urgent problem to be solved. Summary of the invention
[0005] In view of the above technical problems, the technical solution adopted by the present invention is: 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. When the computer program is executed by the processor, the following steps are implemented: S101, obtaining a set of parameters related to GPU power consumption control 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 of [1, M], and M is the number of related parameters included in the related parameter set A.
[0006] 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 of [1, N], N is the number of target parameters included 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 of [1, K], K is the number of variable parameters included in the variable parameter set C, c k ∈A,B∩C= , N+K=M.
[0007] 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.
[0008] S104: For any target parameter, use the test module to configure a definition value corresponding to the target parameter to a corresponding target parameter in the GPU chip.
[0009] 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.
[0010] S106, forming a plurality of test samples according to a plurality of temporary values corresponding to all variable parameters.
[0011] S107, for any test sample, use the test module to configure the test sample into the GPU chip, and have the GPU chip execute a preset use case to obtain a performance-to-power ratio when the GPU chip executes the preset use case.
[0012] S108, determining the test sample corresponding to the maximum performance-to-power consumption ratio as a target sample, wherein the target sample includes tuning values corresponding to each variable parameter.
[0013] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the automatic tuning system of GPU power consumption control parameters provided by the present invention can achieve considerable technical progress and practicality, and has wide industrial utilization value, and has at least the following beneficial effects: 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 related parameters A={a1, a2, ..., a m , …, a M}, where a mis 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 a target parameter set B and a 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 of [1, N], N is the number of target parameters included 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 of [1, K], K is the number of variable parameters included 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.
[0014] It can be seen that the automatic tuning of GPU power consumption control parameters through the test module greatly reduces the consumption of human resources. Moreover, the automated process enables the tuning of GPU power consumption control parameters to be performed during idle time, thereby improving the utilization of idle time and thus improving the efficiency of GPU power consumption control parameter tuning. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] 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; Figure 2 A schematic diagram of a first hardware architecture of an automatic tuning system for GPU power consumption control parameters provided by an embodiment of the present invention; 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
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0018] 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: S101, obtaining a set of parameters related to GPU power consumption control 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 of [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 of [1, N], N is the number of target parameters included in the target parameter set B, b n ∈A, the variable parameter set C = {c1, c2, ..., c k , …, c K}, c kis the kth variable parameter in the variable parameter set C, k is an integer in the range of [1, K], K is the number of variable parameters included 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 a corresponding target parameter in the GPU chip; S105, for any variable parameter, obtaining a preset step size corresponding to the variable parameter, and determining 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, using the test module to configure the test sample into the GPU chip, 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 consumption ratio as a target sample, wherein the target sample includes tuning values corresponding to each variable parameter.
[0019] 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.
[0020] The parameter definition information may refer to the pre-definition of the GPU chip by the user, and the parameter definition information is the condition that must be met when the GPU power consumption control is tuned.
[0021] The test samples contain temporary values corresponding to each variable parameter, and any two test samples are different.
[0022] Specifically, b n ∈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.
[0023] The preset step sizes corresponding to different variable parameters may be different, and the preset step sizes corresponding to each variable parameter can be set by the implementer. For example, the preset step size corresponding to the power consumption detection window duration parameter can be set to 10 milliseconds, and the preset step size corresponding to the dynamic power management unit frequency modulation interval parameter can be set to 50 milliseconds, etc.
[0024] In a specific implementation, 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 as fixed values, respectively configuring each temporary value of the variable parameter into the GPU chip and obtaining the performance-power consumption ratio corresponding to each temporary value; S202 , obtaining a fitting curve between the variable parameter and the performance-power-consumption ratio by fitting according to each temporary value in the variable parameter and the performance-power-consumption ratio corresponding thereto.
[0025] 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.
[0026] Specifically, the fitting method may be quadratic curve fitting, cubic curve fitting, etc., and the implementer may select one according to the actual situation.
[0027] In a specific implementation, 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 basic value; S302, determining a reference range corresponding to the variable parameter according to the base value, a preset range length corresponding to the variable parameter, and an initial range; Accordingly, steps S105 to S108 include: S303, for any variable parameter, obtaining a preset step size corresponding to the variable parameter, and determining 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.
[0028] Among them, assuming that the base value is s, the preset range length corresponding to the variable parameter is d, and the initial range corresponding to the variable parameter is [q1, q2], then 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 may be different, and the preset range lengths corresponding to different variable parameters can be set by the implementer.
[0029] Specifically, in this embodiment, the fitting curve is analyzed to narrow the initial range corresponding to the variable parameter to a 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 spends less time performing performance power consumption ratio testing, thereby further improving the efficiency of GPU power consumption control parameter tuning.
[0030] In a specific implementation, 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 that the variable parameter is a selected parameter; Accordingly, step S106 to step 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 a second reference sample corresponding to the maximum performance-to-power ratio as the target sample.
[0031] 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.
[0032] Specifically, in this embodiment, by analyzing the fitting curve, the variable parameters that have a greater impact on the performance-to-power 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-to-power ratio testing, thereby further improving the efficiency of GPU power consumption control parameter tuning.
[0033] In a specific implementation, the target parameters include at least rated power consumption parameters and dynamic power management unit definition parameters.
[0034] 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.
[0035] The variable parameters may also include board detection chip model parameters, frequency increase threshold parameters, frequency decrease threshold parameters, and the like.
[0036] In a specific implementation, 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.
[0037] The control module includes the N target parameters and the K variable parameters; The business module is used to execute the preset use case.
[0038] In another specific implementation, the GPU chip further includes a frequency module, and the system further includes a power module and a power consumption detection module, see 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.
[0039] 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 business module when executing the preset use case.
[0040] Among them, any target parameter or variable parameter is included in the power module or the frequency module, and the power consumption detection module can refer to a board detection chip.
[0041] In the present invention, the GPU power consumption control parameters are automatically tuned through the test module, which greatly reduces the human resource consumption. Moreover, the automation process allows 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.
[0042] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated 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 appreciated 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, obtaining a set of parameters related to GPU power consumption control 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 of [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 of [1, N], N is the number of target parameters included 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 of [1, K], K is the number of variable parameters included 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 a corresponding target parameter in the GPU chip; S105, for any variable parameter, obtaining a preset step size corresponding to the variable parameter, and determining 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, using the test module to configure the test sample into the GPU chip, 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 consumption ratio as a target sample, wherein the target sample includes tuning values corresponding to each variable parameter.
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 as fixed values, respectively configuring each temporary value of the variable parameter into the GPU chip and obtaining the performance-power consumption ratio corresponding to each temporary value; S202 , obtaining a fitting curve between the variable parameter and the performance-power-consumption ratio by fitting according to each temporary value in the variable parameter and the performance-power-consumption ratio corresponding thereto.
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 basic value; S302, determining a reference range corresponding to the variable parameter according to the base value, a preset range length corresponding to the variable parameter, and an initial range; Accordingly, steps S105 to S108 include: S303, for any variable parameter, obtaining a preset step size corresponding to the variable parameter, and determining 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 that the variable parameter is a selected parameter; Accordingly, step S106 to step 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 a 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 at least include 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 business 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
GPU power consumption control method and device and storage medium
CN117608389A
System power consumption management method and device, electronic equipment and readable storage medium
CN117971438A
Base station power supply and energy storage battery energy-saving regulation and control method and system based on cloud monitoring
CN118449141A