WO2015165045A1 - Power control method and apparatus - Google Patents
Power control method and apparatus Download PDFInfo
- Publication number
- WO2015165045A1 WO2015165045A1 PCT/CN2014/076502 CN2014076502W WO2015165045A1 WO 2015165045 A1 WO2015165045 A1 WO 2015165045A1 CN 2014076502 W CN2014076502 W CN 2014076502W WO 2015165045 A1 WO2015165045 A1 WO 2015165045A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- hpe
- value
- sampling
- performance
- controlled
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Definitions
- the present invention relates to the field of computer technologies, and in particular, to a power control method and apparatus for a heterogeneous processing engine in a heterogeneous processor. Background technique
- a heterogeneous processor will have multiple HPEs (Heterogeneous Processing Engines).
- HPE1 is a CPU. (Central Processing Unit, CPU)
- HPE2 is HPE corresponding to GPU (Graphic Processing Unit)
- HPE1 and HPE2 are different types of HPE.
- Multiple HPEs in a heterogeneous processor can form an application for an HPE group.
- one HPE acts as the main processor, and other HPEs act as an acceleration processing unit to share the memory, heat dissipation, and power of the heterogeneous processor.
- HPE Each HPE in the group has an impact on the performance of the application running on the HPE group.
- Embodiments of the present invention provide a power control method and apparatus for a ⁇ group in a heterogeneous processor, which can ensure the performance of the ⁇ group.
- a power control method including:
- Power control is performed for each HPE based on the correlation between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- determining a performance characterization value of the to-be-controlled HPE group corresponding to each sample according to the performance index value of each HPE obtained each time including: The performance index value of each HPE sampled is determined, and the performance characterization value of each HPE corresponding to each sample is determined;
- the performance characterization values of the HPE group to be controlled corresponding to each sample were determined.
- determining performance characterization of each HPE corresponding to each sample according to the performance index value of each HPE obtained by each sampling Values including:
- the performance index value of the HPE sampled is one, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling;
- the analytic hierarchy process, the network analysis method or the multi-attribute performance decision method is used to calculate at least two performance index values of the HPE obtained by each sampling. , to determine the performance characterization value of the HPE corresponding to each sample.
- determining performance characterization of the to-be-controlled HPE group corresponding to each sampling according to the performance characterization value of each HPE corresponding to each sampling Values including:
- the performance characterization values of each of the HPEs are calculated to determine the performance characterization values of the HPE group to be controlled corresponding to each sample.
- the first possible implementation manner of the first aspect, the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in the fourth possible implementation manner Determining, between each working frequency value of each HPE obtained by each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling, determining the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled Correlation coefficients, including:
- the multivariate linear regression method, the multivariate nonlinear regression method or the complex correlation coefficient method is used to calculate the operating frequency value of each HPE obtained for each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sample to determine A correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect, or the fourth possible aspect of the first aspect before performing power control on each HPE, the following includes:
- the method before performing power control on each of the HPEs according to the determined operating frequency value, the method further includes:
- the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor.
- a power control apparatus including:
- a sampling unit configured to perform performance indicators of each HPE in the HPE group to be controlled that includes at least two heterogeneous processing engines HPE in the heterogeneous processor, and the operating frequency of the HPE corresponding to the performance indicator at least once Sampling
- a first determining unit configured to determine, according to a performance index value of each HPE obtained for each sample, a performance characterization value of the HPE group to be controlled corresponding to each sampling;
- a second determining unit configured to determine an operating frequency value of each HPE and a performance of the HPE group to be controlled according to an operating frequency value of each HPE obtained by each sampling and a performance characterization value of the HPE group to be controlled corresponding to each sampling a correlation coefficient between the characterization values; wherein, the larger the correlation coefficient, the greater the effect of characterizing the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group;
- a control unit is configured to perform power control for each HPE based on a correlation coefficient between an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled.
- the first determining unit is specifically configured to determine, according to performance index values of each type of HPE obtained by each sampling, performance of each HPE corresponding to each sampling. Characterizing the value; determining the performance characterization value of the HPE group to be controlled corresponding to each sample according to the performance characterization value of each HPE corresponding to each sampling.
- the first determining unit is specifically configured to: for each HPE, when the sampled the performance index value of the HPE is In one case, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sample; when the performance index value of the sampled HPE is at least two, The analytic hierarchy process, the network analysis method or the multi-attribute performance decision method is used to calculate at least two performance index values of the HPE obtained by each sampling to determine the performance characterization value of the HPE corresponding to each sample.
- the first determining unit is specifically configured to use an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method.
- the performance characterization values of each HPE corresponding to the second sample are calculated to determine the performance characterization values of the HPE group to be controlled corresponding to each sample.
- the first possible implementation manner of the second aspect, the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in the fourth possible implementation manner is specifically configured to adopt a multiple linear regression method, a multiple nonlinear regression method or a complex correlation coefficient method, and the working frequency value of each HPE obtained for each sampling and the corresponding control to be controlled for each sample
- the performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- control unit is further configured to: before performing power control on each HPE, determine that a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor is greater than The preset bandwidth difference.
- the control unit is specifically configured to determine, according to the correspondence between the preset coefficient interval and the working frequency value, The working frequency value corresponding to the coefficient interval in which the correlation coefficient between the operating frequency value of the HPE and the performance representative value of the HPE group to be controlled is located; wherein, the larger the coefficient value in the coefficient interval, the more the operating frequency value corresponding to the coefficient interval Large; power control for each HPE based on the determined operating frequency value.
- control unit is further configured to perform pre-determination according to the determined operating frequency value before performing power control on each HPE After the determined operating frequency value is power controlled for each HPE, the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor.
- the power control apparatus provided by the second aspect, the performance index of each HPE in the HPE group to be controlled, and the operating frequency of the HPE corresponding to the performance index are obtained according to the The sample value determines the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- Figure 1 is a schematic structural diagram of a heterogeneous processor
- FIG. 2 is a flowchart of a power control method according to an embodiment of the present invention.
- Embodiment 3 is a detailed flowchart of a power control method according to Embodiment 1 of the present invention.
- FIG. 5 is a schematic structural diagram of a power control apparatus according to Embodiment 3 of the present invention.
- FIG. 6 is a schematic structural diagram of a power control device according to Embodiment 4 of the present invention. detailed description
- the present invention provides a power control method and apparatus.
- the following describes the preferred embodiment of the present invention with reference to the accompanying drawings.
- the preferred embodiments described herein are for illustrative purposes only and are not intended to limit the invention. And in the case of no conflict, the features in the embodiments and the embodiments of the present application can be combined with each other.
- An embodiment of the present invention provides a power control method. As shown in FIG. 2, the method includes the following steps: Step 201: To-be-controlled HPE including at least two heterogeneous processing engines HPE in a heterogeneous processor The performance index of each HPE in the group and the working frequency of the HPE corresponding to the performance indicator are sampled at least once;
- Step 202 Determine, according to the performance index value of each HPE obtained in each sample, a performance characterization value of the HPE group to be controlled corresponding to each sample;
- Step 203 Determine, according to an operating frequency value of each HPE obtained by each sampling, and a performance characterization value of the HPE group to be controlled corresponding to each sampling, determine an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled. Correlation coefficient; wherein, the larger the correlation coefficient is, the greater the effect of characterizing the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group;
- Step 204 Perform power control on each HPE according to a correlation coefficient between an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled.
- the correlation coefficient between the operating frequency value of the HPE and the performance characterization value of the HPE group to be controlled characterizes the effect of the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group, that is, the working frequency of the corresponding HPE is characterized.
- the size of the effect of controlling the performance of the HPE group The larger the correlation coefficient, the greater the effect of the HPE's operating frequency on the performance of the HPE group; conversely, the smaller the correlation, the smaller the effect of the HPE's operating frequency on the performance of the HPE group.
- power control is performed on the HPE according to a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled, compared to the power of the prior art.
- the control scheme can ensure the performance of the HPE group to be controlled, and thus the application performance of the HPE group to be controlled can be guaranteed, and the user experience is better.
- FIG. 3 is a flowchart of a method for controlling power of an HPE in a heterogeneous processor according to Embodiment 1 of the present invention, which specifically includes:
- Step 301 For each HPE in the HPE group to be controlled, the performance index of the HPE and the working frequency of the HPE corresponding to the performance index are sampled.
- the number of sampling times may be one time, preferably, the number of sampling times is multiple times, by expanding the data The sample makes the power control more reasonable.
- a tool similar to CodeXL can be used to periodically collect the value of the relevant performance counter corresponding to each HPE and the corresponding operating frequency value, and use the value of the performance counter as the performance index value of the corresponding HPE.
- An HPE may have one operating frequency or multiple operating frequencies. If an HPE has multiple operating frequencies, the average operating frequency can be taken as the working frequency of the HPE.
- an HPE may contain only one performance indicator, and may also include multiple performance indicators.
- the HPE performance indicators corresponding to the GPU mainly include the following seven types:
- ALU Insts PTI Compute instructions per thousand instructions, the number of calculation instructions per thousand instructions in the arithmetic unit (ALU);
- ALU Busy The percentage of GPU Time ALU instructions are processed, the percentage of time in the image processing unit (GPU) that processes the arithmetic logic unit instructions;
- ALU Fetch Ratio The ratio of ALU prefetch instructions
- GPU Clock Busy GPU utilization
- Fetch Unit Stalled The % of GPU Time main memory fetch/load unit is stalled , the main memory acquisition / import unit is suspended as a percentage of the GPU time;
- Fetch from memory PTI Main memory reads per thousand instructions, the number of main memory reads per thousand instructions.
- one, more, or all of the performance metrics can be sampled based on actual conditions.
- the performance index value of the HPE obtained in the step 301 may be one type or two or more types.
- the operating frequency values of each type of HPE obtained by each sampling are as follows:
- the working frequency value obtained by sampling the operating frequency of the jth HPE at the i-th time 1 ⁇ i ⁇ n, 1 j m.
- r ljk represents the performance index value obtained by the i-th time for the kth performance index of the jth HPE, lks.
- Step 302 Determine, according to the performance index value of each HPE obtained by each sampling, a performance characterization value of each HPE corresponding to each sampling.
- the performance index value of the HPE obtained by the sample when the performance index value of the HPE obtained by the sample is one, it can directly determine that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling.
- the performance index value of the HPE obtained by the sample is at least two, the analytic hierarchy process, the network analysis method, or the multi-attribute performance decision method may be used to obtain at least two performance indexes of the HPE obtained for each sampling. The value is calculated to determine the performance table of the HPE corresponding to each sample. Value.
- the performance characterization values of each HPE obtained by each sampling in the above table 301 can be determined as follows:
- R 3 ⁇ 4 represents the performance characterization value of the jth type of HPE corresponding to the ith sampling.
- Step 303 Determine, according to a performance characterization value of each HPE corresponding to each sampling, a performance characterization value of the HPE group to be controlled corresponding to each sampling, and specifically adopt an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method.
- the performance characterization values of each HPE corresponding to each sample are calculated to determine the performance characterization value of the HPE group to be controlled corresponding to each sample.
- analytic hierarchy process network analysis method or multi-attribute performance decision-making method is merely an example, and is a commonly used decision-making method, and is not intended to limit the present invention.
- Other decision methods in the prior art may also be used as an implementation algorithm for determining the performance characterization value of the HPE in step 302 and determining the performance characterization value of the HPE group to be controlled in step 303.
- the performance characterization values of each HPE corresponding to each sample determined in the above table 302 are as follows: The number of sampling times to be controlled by the HPE group performance characterization value
- Step 304 Determine, according to an operating frequency value of each HPE obtained by each sampling, and a performance characterization value of the HPE group to be controlled corresponding to each sampling, determine an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled.
- the correlation coefficient may be multivariate linear regression method, multiple nonlinear regression method or complex correlation coefficient method, and the operating frequency value of each HPE obtained for each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling. A calculation is made to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- the operating frequency value of each HPE obtained by each sampling in the above table 301, and the performance characterization value of the HPE group to be controlled corresponding to each sampling determined in the above table 303, can determine the type of each HPE.
- the correlation coefficient between the operating frequency value and the performance characterization value of the HPE group to be controlled is shown in the following table:
- b'j represents the correlation coefficient between the operating frequency value of the jth HPE and the performance characterization value of the HPE group to be controlled.
- Step 305 Determine whether a difference between a current memory bandwidth of the heterogeneous processor and a theoretical memory bandwidth is greater than a preset bandwidth difference.
- the current memory bandwidth of the heterogeneous processor is close to the theoretical memory bandwidth, and then proceeds to step 306;
- the process proceeds to step 307.
- the preset bandwidth difference can be set by the user according to actual application scenario requirements.
- Step 306 Control power reduction of at least one HPE, and the power control process ends.
- HPE power can be reduced by reducing the operating frequency or operating voltage of the HPE.
- the power reduction of part of the HPE can be controlled, and the power reduction of all the HPEs can also be controlled, which can be determined according to actual conditions.
- Step 307 Determine each type of HPE according to a correspondence between a preset coefficient interval and an operating frequency value.
- the coefficient interval may specifically include three:
- Coefficient interval 1 an interval smaller than the first specified coefficient value
- Coefficient interval 2 an interval greater than or equal to the first specified coefficient value and less than the second specified coefficient value
- a coefficient interval 3 an interval greater than or equal to the second specified coefficient value
- the second specified coefficient value is greater than the first specified coefficient value, that is, three coefficient intervals are divided by using two specified coefficient values.
- the preset coefficient interval 1 corresponds to the operating frequency value fl
- the coefficient interval 2 corresponds to the operating frequency value of £2
- the coefficient interval 3 corresponds to the operating frequency value G, where ⁇ 1 ⁇ £2 ⁇ ⁇ .
- the coefficient interval may specifically include two, four or other numbers, that is, the coefficient interval may specifically include X, and X coefficient intervals are divided by X-1 designated coefficient values, wherein , X is a positive integer greater than or equal to 2.
- Step 308 Pre-determine whether the power of the heterogeneous processor meets the power requirement after performing power control on each of the chirps according to the determined operating frequency value, that is, after determining the power control of each chirp according to the determined operating frequency value, the heterogeneous Whether the power of the processor exceeds the maximum power allowed by the heterogeneous processor.
- the power of the heterogeneous processor meets the power requirement, and the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor, proceeding to step 309;
- the process proceeds to step 310.
- Step 309 Perform power control on each of the ports according to the operating frequency value determined in step 307, and the power control process ends.
- a working frequency value of a corresponding level is determined for each HPE.
- the working frequency of each HPE can be directly controlled to a determined working frequency value, thereby achieving the purpose of power control, and also by controlling each The operating voltage of the HPE is such that the operating frequency of each HPE is a determined operating frequency value for power control purposes.
- Step 310 Reduce the operating frequency value of the at least one HPE determined in step 307, and perform power control on each HPE according to the reduced operating frequency value.
- Embodiment 1 of the present invention considers the relationship between each HPE and the performance of each HPE to the performance of the HPE group when performing power control, and can ensure the performance of the HPE group, and also considers the heterogeneity.
- the memory bandwidth and power requirements of the processor can further improve the rationality and reliability of the power control. Bright.
- each HPE has two performance indexes.
- FIG. 4 is a flowchart of a power control method according to Embodiment 2 of the present invention, which specifically includes: Step 401: For each HPE, two performance indicators of the HPE and the HPE corresponding to the performance index The working frequency is sampled twice.
- Step 402 Determine, according to the performance index value of each enthalpy obtained by each sampling, an analytic hierarchy process to determine a performance characterization value of each ⁇ corresponding to each sampling, specifically:
- R y represents the performance characterization value of the jth type of HPE corresponding to the ith sampling
- r yk represents the performance index value obtained by the first time for the kth performance index of the jth HPE
- X 1 3 ⁇ 4 X 2 , X 2 ', Xj", X 2 ", ⁇ , X 2 "' are weight coefficients, and the specific determination method of the weight coefficient is prior art, and will not be described in detail herein.
- the performance characterization values of each HPE corresponding to each sample determined by the analytic method are as follows:
- Step 403 Determine, according to the performance characterization value of each cockroach corresponding to each sample, an analytic hierarchy process to determine a performance characterization value of the group to be controlled corresponding to each sample, specifically:
- the performance characterization value of the HPE group to be controlled corresponding to the i-th sample is represented; ⁇ ' ⁇ 2 "" ⁇ ⁇ ⁇ 2 is a weight coefficient.
- Step 404 Determine the operating frequency value of each enthalpy and the group to be controlled by using multiple linear regression method according to the working frequency value of each cockroach obtained for each sample and the performance characterization value of the group to be controlled corresponding to each sampling.
- the correlation coefficient between the performance characterization values is:
- Step 405 Determine whether a difference between a current memory bandwidth of the heterogeneous processor and a theoretical memory bandwidth is greater than a preset bandwidth difference.
- the process proceeds to step 406;
- the difference between the current memory bandwidth and the theoretical memory bandwidth of the heterogeneous processor is greater than the preset bandwidth difference, and the process proceeds to step 407.
- Step 406 Control power reduction of the two HPEs to release the memory bandwidth, and the power control process ends.
- Step 407 Determine, according to a correspondence between the preset coefficient interval and the working frequency value, a working frequency value corresponding to a coefficient region in which a correlation coefficient between each HPE operating frequency value and a performance representative value of the HPE group to be controlled is located.
- the coefficient interval specifically includes three:
- Coefficient interval 1 an interval less than 0.5
- Coefficient interval 2 An interval greater than or equal to 0.5 and less than 0.8;
- Coefficient interval 3 an interval greater than or equal to 0.8
- the working frequency value corresponding to the preset coefficient interval 1 is fl
- the operating frequency corresponding to the coefficient interval 2 The value is £2
- the operating frequency value corresponding to the coefficient interval 3 is ⁇ , where ⁇ ! ⁇ 2 ⁇ ⁇ .
- Step 408 Pre-determine whether the power of the heterogeneous processor exceeds the maximum power allowed by the heterogeneous processor after performing power control on each HPE according to the determined working frequency value.
- step 409 When it is determined that power control of each HPE is performed according to the determined operating frequency value, if the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor, proceed to step 409; when determining that each of the determined operating frequency values is determined After the HPE performs power control, if the power of the heterogeneous processor exceeds the maximum power allowed by the heterogeneous processor, the process proceeds to step 410.
- Step 409 Perform power control on each HPE according to the working frequency value determined in step 407, and the power control process ends.
- Step 410 Reduce the operating frequency value of each HPE determined in step 407, and perform power control on each HPE according to the reduced operating frequency value, and the power control process ends.
- the embodiment of the present invention further provides a power control device.
- the structure of the device is as shown in FIG. 5, and the specific structure includes:
- the sampling unit 501 is configured to: perform performance indicators of each HPE in the HPE group to be controlled that includes at least two heterogeneous processing engines HPE in the heterogeneous processor, and perform the operating frequency of the HPE corresponding to the performance indicator at least once Sampling
- a first determining unit 502 configured to determine, according to a performance index value of each HPE obtained for each sample, a performance characterization value of the HPE group to be controlled corresponding to each sampling;
- the second determining unit 503 is configured to determine, according to the working frequency value of each HPE obtained by each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling, the working frequency value of each HPE and the HPE group to be controlled. a correlation coefficient between performance characterization values; wherein, the correlation coefficient is larger, the table The greater the effect of the operating frequency value corresponding to the HPE on the performance characterization value of the HPE group to be controlled; the control unit 504 is configured to calculate a correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled, Each HPE is power controlled.
- the first determining unit 502 is specifically configured to determine, according to the performance index value of each HPE obtained by each sampling, a performance characterization value of each HPE corresponding to each sampling; according to each HPE corresponding to each sampling The performance characterization value determines the performance characterization value of the HPE group to be controlled corresponding to each sample.
- the first determining unit 502 is specifically configured to: for each HPE, when the performance index value of the sampled HPE is one, determine that the performance characterization value of the HPE corresponding to each sample is each sampling.
- the obtained performance index value of the HPE; when the sampled obtained HPE has the performance index value of at least two, the analytic hierarchy process, the network analysis method, or the multi-attribute performance decision method is used to obtain the species for each sample.
- At least two performance index values of the HPE are calculated to determine a performance characterization value of the HPE corresponding to each sample.
- the first determining unit 502 is specifically configured to calculate, by using an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method, a performance characterization value of each HPE corresponding to each sample to determine a corresponding sample for each sample.
- the performance characterization value of the HPE group to be controlled.
- the second determining unit 503 is specifically configured to use a multiple linear regression method, a multiple nonlinear regression method or a complex correlation coefficient method, and the working frequency value of each HPE obtained for each sampling and the corresponding control to be controlled for each sample
- the performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- control unit 504 is further configured to determine, before power control of each HPE, that a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor is greater than a preset bandwidth difference.
- control unit 504 is specifically configured to determine, according to a preset relationship between the coefficient interval and the working frequency value, a coefficient of a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled.
- the control unit 504 is further configured to: before performing power control on each of the HPEs according to the determined operating frequency value, pre-determining the power of the heterogeneous processor after performing power control on each of the HPEs according to the determined operating frequency value. Does not exceed the maximum power allowed by the heterogeneous processor.
- an embodiment of the present invention further provides a power control device, which is shown in FIG. 6 and includes a processor 601, a memory 602, and a communication bus 600.
- the communication bus 600 is used for each part of the device.
- the processor 601 is configured to execute an executable module, such as a computer program, stored in the memory 602.
- the memory 602 may include a high speed random access memory (RAM: Random Access Memory) and may also include a non-volatile memory such as a disk memory.
- the memory 602 stores a program 6021, which can be executed by the processor 601, and the program 6021 includes: for each of the to-be-controlled groups of the heterogeneous processor including at least two heterogeneous processing engines The performance indicator, and the working frequency of the ⁇ corresponding to the performance indicator are at least once; determining the performance characterization value of the group to be controlled corresponding to each sampling according to the performance index value of each enthalpy obtained by each sampling; Determine the correlation coefficient between the operating frequency value of each enthalpy and the performance characterization value of the group to be controlled based on the operating frequency value of each enthalpy obtained for each sampling and the performance characterization value of the group to be controlled corresponding to each sampling.
- the greater the correlation coefficient the greater the effect of characterizing the corresponding operating frequency value of the corresponding ⁇ group on the performance characterization value of the ⁇ group; according to the operating frequency value of each ⁇ and the performance characterization value of the ⁇ group to be controlled Correlation coefficient, power control for each type.
- the program 6021 specifically includes: determining, according to the performance index value of each ⁇ obtained for each sample, a performance characterization value of each ⁇ corresponding to each sampling; The performance characterization value determines the performance characterization value of the group to be controlled corresponding to each sample.
- the program 6021 specifically includes: for each ⁇ , when sampled When the performance index value of the HPE is one, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling; and the performance index value of the HPE obtained by sampling For at least two types, at least two performance index values of the HPE obtained by each sampling are calculated by using an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method to determine the corresponding species for each sample. Performance characterization values for HPE.
- the program 6021 specifically includes: using a analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method to calculate a performance characterization value of each HPE corresponding to each sample to determine a corresponding sample for each sample.
- the performance characterization value of the HPE group to be controlled.
- the program 6021 specifically includes: using a multiple linear regression method, a multiple nonlinear regression method, or a complex correlation coefficient method, and the operating frequency value of each HPE obtained for each sample and the corresponding control to be controlled for each sample
- the performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
- the program 6021 further includes: determining, before power control of each HPE, a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor that is greater than a preset bandwidth difference.
- the program 6021 specifically includes: determining, according to a preset relationship between the coefficient interval and the working frequency value, a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled.
- the operating frequency value corresponding to the coefficient interval wherein, the larger the coefficient value in the coefficient interval, the larger the operating frequency value corresponding to the coefficient interval; and the power control for each HPE according to the determined working frequency value.
- the program 6021 further includes: pre-determining the power of the heterogeneous processor after performing power control on each of the HPEs according to the determined operating frequency value, before performing power control on each of the HPEs according to the determined operating frequency value. Does not exceed the maximum power allowed by the heterogeneous processor.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention may employ computer usable storage media (including but not limited to disk) in one or more of the computer usable program code embodied therein. The form of a computer program product implemented on a memory, CD-ROM, optical storage, etc.).
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements a particular function in a block or blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing a particular function in a block or blocks of a flow or a flow and/or block diagram of a flowchart.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Supply And Distribution Of Alternating Current (AREA)
- Feedback Control In General (AREA)
Abstract
Description
一种功率控制方法及装置 Power control method and device
技术领域 Technical field
本发明涉及计算机技术领域, 特别涉及一种异构处理器中异构处理引擎 的功率控制方法及装置。 背景技术 The present invention relates to the field of computer technologies, and in particular, to a power control method and apparatus for a heterogeneous processing engine in a heterogeneous processor. Background technique
随着科技的发展, 异构处理器已经得到了广泛应用, 其示意图如图 1 所 示,一个异构处理器中会存在多种 HPE ( Heterogeneous Processing Engine , 异 构处理引擎), 例如 HPE1为 CPU ( Central Processing Unit, 中央处理器)对 应的 HPE, HPE2为 GPU ( Graphic Processing Unit, 图像处理单元)对应的 HPE, HPE1和 HPE2即为不同种类的 HPE。 异构处理器中的多种 HPE可以 构成 HPE组运行一个应用,在 HPE组中,一个 HPE作为主处理器,其它 HPE 作为加速处理单元, 共享异构处理器的内存、 散热能力和功率, HPE 组中的 每个 HPE对该 HPE组运行的应用的性能均有影响。 With the development of technology, heterogeneous processors have been widely used. The schematic diagram is shown in Figure 1. A heterogeneous processor will have multiple HPEs (Heterogeneous Processing Engines). For example, HPE1 is a CPU. (Central Processing Unit, CPU) Corresponding HPE, HPE2 is HPE corresponding to GPU (Graphic Processing Unit), HPE1 and HPE2 are different types of HPE. Multiple HPEs in a heterogeneous processor can form an application for an HPE group. In an HPE group, one HPE acts as the main processor, and other HPEs act as an acceleration processing unit to share the memory, heat dissipation, and power of the heterogeneous processor. HPE Each HPE in the group has an impact on the performance of the application running on the HPE group.
现有技术中对异构处理器中 HPE 进行功率控制时, 通常采用 BAPM ( Bidirectional Application Power Management , 双向应用电源管理) 算法, 才艮 据异构处理器的热量空间余量为各 ΗΡΕ分配功率。 然而, 现有的功率控制方 案倾向于最大化利用异构处理器的散热能力, 并不能保证 ΗΡΕ组的性能。 发明内容 In the prior art, when power control is performed on the HPE in the heterogeneous processor, the BAPM (Bidirectional Application Power Management) algorithm is usually used to allocate power to each of the heterogeneous processors according to the heat space margin. However, existing power control schemes tend to maximize the heat dissipation capabilities of heterogeneous processors and do not guarantee the performance of the group. Summary of the invention
本发明实施例提供一种异构处理器中 ΗΡΕ的功率控制方法及装置, 能够 保证 ΗΡΕ组的性能。 Embodiments of the present invention provide a power control method and apparatus for a 异构 group in a heterogeneous processor, which can ensure the performance of the ΗΡΕ group.
第一方面, 提供一种功率控制方法, 包括: In a first aspect, a power control method is provided, including:
对异构处理器中包含至少两种异构处理引擎 ΗΡΕ的待控制 ΗΡΕ组中的每 种 ΗΡΕ的性能指标,以及该性能指标对应的该种 ΗΡΕ的工作频率进行至少一 次采样; 根据每次采样得到的每种 HPE的性能指标值, 确定每次采样对应的待控 制 HPE组的性能表征值; Performing at least one sampling of a performance indicator of each of the to-be-controlled groups of the heterogeneous processor including at least two heterogeneous processing engines, and an operating frequency of the pair corresponding to the performance indicator; Determining the performance characterization value of the HPE group to be controlled corresponding to each sample according to the performance index value of each HPE obtained by each sampling;
根据每次釆样得到的每种 HPE 的工作频率值和每次釆样对应的待控制 HPE组的性能表征值, 确定每种 HPE的工作频率值与待控制 HPE组的性能 表征值之间的相关系数; 其中, 所述相关系数越大, 表征对应 HPE的工作频 率值对待控制 HPE组的性能表征值的作用越大; Determine the operating frequency value of each HPE obtained for each sample and the performance characterization value of the HPE group to be controlled corresponding to each sample, and determine the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled. Correlation coefficient; wherein, the greater the correlation coefficient, the greater the effect of characterizing the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group;
根据每种 HPE的工作频率值与待控制 HPE组的性能表征值之间的相关系 数, 对每种 HPE进行功率控制。 Power control is performed for each HPE based on the correlation between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
结合第一方面, 在第一种可能的实现方式中, 根据每次釆样得到的每种 HPE的性能指标值,确定每次采样对应的待控制 HPE组的性能表征值, 包括: 根据每次采样得到的每种 HPE的性能指标值, 确定每次采样对应的每种 HPE的性能表征值; With reference to the first aspect, in a first possible implementation manner, determining a performance characterization value of the to-be-controlled HPE group corresponding to each sample according to the performance index value of each HPE obtained each time, including: The performance index value of each HPE sampled is determined, and the performance characterization value of each HPE corresponding to each sample is determined;
根据每次釆样对应的每种 HPE的性能表征值, 确定每次釆样对应的待控 制 HPE组的性能表征值。 Based on the performance characterization values of each HPE corresponding to each sample, the performance characterization values of the HPE group to be controlled corresponding to each sample were determined.
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 根据每次采样得到的每种 HPE的性能指标值, 确定每次釆样对应的每种 HPE 的性能表征值, 包括: With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, determining performance characterization of each HPE corresponding to each sample according to the performance index value of each HPE obtained by each sampling Values, including:
针对每种 HPE, 当采样得到的该种 HPE的性能指标值为一种时, 确定每 次采样对应的该种 HPE的性能表征值为每次采样得到的该种 HPE的性能指标 值; For each HPE, when the performance index value of the HPE sampled is one, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling;
当采样得到的该种 HPE的性能指标值为至少两种时, 采用层次分析法、 网络分析法或者多属性效能决策法, 对每次采样得到的该种 HPE的至少两种 性能指标值进行计算, 以确定每次釆样对应的该种 HPE的性能表征值。 When the performance index value of the sampled HPE is at least two, the analytic hierarchy process, the network analysis method or the multi-attribute performance decision method is used to calculate at least two performance index values of the HPE obtained by each sampling. , to determine the performance characterization value of the HPE corresponding to each sample.
结合第一方面的第一种可能的实现方式, 在第三种可能的实现方式中, 根据每次采样对应的每种 HPE 的性能表征值, 确定每次采样对应的待控制 HPE组的性能表征值, 包括: With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, determining performance characterization of the to-be-controlled HPE group corresponding to each sampling according to the performance characterization value of each HPE corresponding to each sampling Values, including:
采用层次分析法、 网络分析法或者多属性效能决策法, 对每次采样对应 的每种 HPE的性能表征值进行计算,以确定每次采样对应的待控制 HPE组的 性能表征值。 Use analytic hierarchy process, network analysis method or multi-attribute effectiveness decision method to correspond to each sampling The performance characterization values of each of the HPEs are calculated to determine the performance characterization values of the HPE group to be controlled corresponding to each sample.
结合第一方面, 第一方面的第一种可能的实现方式, 第一方面的第二种 可能的实现方式, 或者第一方面的第三种可能的实现方式, 在第四种可能的 实现方式中, 根据每次采样得到的每种 HPE的工作频率值和每次采样对应的 待控制 HPE组的性能表征值, 确定每种 HPE的工作频率值与待控制 HPE组 的性能表征值之间的相关系数, 包括: With reference to the first aspect, the first possible implementation manner of the first aspect, the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in the fourth possible implementation manner Determining, between each working frequency value of each HPE obtained by each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling, determining the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled Correlation coefficients, including:
采用多元线性回归法、 多元非线性回归法或者复相关系数法, 对每次采 样得到的每种 HPE的工作频率值和每次釆样对应的待控制 HPE组的性能表征 值进行计算,以确定每种 HPE的工作频率值与待控制 HPE组的性能表征值之 间的相关系数。 The multivariate linear regression method, the multivariate nonlinear regression method or the complex correlation coefficient method is used to calculate the operating frequency value of each HPE obtained for each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sample to determine A correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
结合第一方面, 第一方面的第一种可能的实现方式, 第一方面的第二种 可能的实现方式, 第一方面的第三种可能的实现方式, 或者第一方面的第四 种可能的实现方式, 在第五种可能的实现方式中, 对每种 HPE进行功率控制 之前, 还包括: With reference to the first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect, or the fourth possible aspect of the first aspect In the fifth possible implementation manner, before performing power control on each HPE, the following includes:
确定异构处理器的当前内存带宽和理论内存带宽之间的差值大于预设带 宽差值。 It is determined that the difference between the current memory bandwidth of the heterogeneous processor and the theoretical memory bandwidth is greater than the preset bandwidth difference.
结合第一方面, 第一方面的第一种可能的实现方式, 第一方面的第二种 可能的实现方式, 第一方面的第三种可能的实现方式, 第一方面的第四种可 能的实现方式, 或者第一方面的第五种可能的实现方式, 在第六种可能的实 现方式中,根据每种 HPE的工作频率值与待控制 HPE组的性能表征值之间的 相关系数, 对每种 HPE进行功率控制, 包括: With reference to the first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect, the fourth possible The implementation manner, or the fifth possible implementation manner of the first aspect, in the sixth possible implementation manner, according to a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled, Power control for each HPE, including:
根据预设的系数区间和工作频率值的对应关系, 确定每种 HPE的工作频 率值与待控制 HPE组的性能表征值之间的相关系数所处于的系数区间对应的 工作频率值; 其中, 系数区间中的系数值越大, 系数区间对应的工作频率值 越大; Determining, according to a preset relationship between the coefficient interval and the working frequency value, an operating frequency value corresponding to a coefficient interval in which a correlation coefficient between each HPE operating frequency value and a performance representative value of the HPE group to be controlled is located; wherein, the coefficient The larger the coefficient value in the interval, the larger the operating frequency value corresponding to the coefficient interval;
根据确定的工作频率值, 对每种 HPE进行功率控制。 结合第一方面的第六种可能的实现方式, 在第七种可能的实现方式中, 根据确定的工作频率值, 对每种 HPE进行功率控制之前, 还包括: Power control is performed for each HPE based on the determined operating frequency value. In conjunction with the sixth possible implementation of the first aspect, in a seventh possible implementation, before performing power control on each of the HPEs according to the determined operating frequency value, the method further includes:
预判断根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器 的功率不超过异构处理器允许的功率最大值。 After pre-judging the power control of each HPE based on the determined operating frequency value, the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor.
第二方面, 提供一种功率控制装置, 包括: In a second aspect, a power control apparatus is provided, including:
釆样单元, 用于对异构处理器中包含至少两种异构处理引擎 HPE的待控 制 HPE组中的每种 HPE的性能指标 , 以及该性能指标对应的该种 HPE的工 作频率进行至少一次采样; a sampling unit, configured to perform performance indicators of each HPE in the HPE group to be controlled that includes at least two heterogeneous processing engines HPE in the heterogeneous processor, and the operating frequency of the HPE corresponding to the performance indicator at least once Sampling
第一确定单元, 用于根据每次釆样得到的每种 HPE的性能指标值, 确定 每次采样对应的待控制 HPE组的性能表征值; a first determining unit, configured to determine, according to a performance index value of each HPE obtained for each sample, a performance characterization value of the HPE group to be controlled corresponding to each sampling;
第二确定单元, 用于根据每次采样得到的每种 HPE的工作频率值和每次 采样对应的待控制 HPE组的性能表征值,确定每种 HPE的工作频率值与待控 制 HPE组的性能表征值之间的相关系数; 其中, 所述相关系数越大, 表征对 应 HPE的工作频率值对待控制 HPE组的性能表征值的作用越大; a second determining unit, configured to determine an operating frequency value of each HPE and a performance of the HPE group to be controlled according to an operating frequency value of each HPE obtained by each sampling and a performance characterization value of the HPE group to be controlled corresponding to each sampling a correlation coefficient between the characterization values; wherein, the larger the correlation coefficient, the greater the effect of characterizing the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group;
控制单元,用于根据每种 HPE的工作频率值与待控制 HPE组的性能表征 值之间的相关系数, 对每种 HPE进行功率控制。 A control unit is configured to perform power control for each HPE based on a correlation coefficient between an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled.
结合第二方面, 在第一种可能的实现方式中, 所述第一确定单元, 具体 用于根据每次采样得到的每种 HPE的性能指标值, 确定每次采样对应的每种 HPE的性能表征值; 根据每次采样对应的每种 HPE的性能表征值, 确定每次 釆样对应的待控制 HPE组的性能表征值。 With reference to the second aspect, in a first possible implementation, the first determining unit is specifically configured to determine, according to performance index values of each type of HPE obtained by each sampling, performance of each HPE corresponding to each sampling. Characterizing the value; determining the performance characterization value of the HPE group to be controlled corresponding to each sample according to the performance characterization value of each HPE corresponding to each sampling.
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述第一确定单元, 具体用于针对每种 HPE, 当采样得到的该种 HPE的性能 指标值为一种时, 确定每次釆样对应的该种 HPE的性能表征值为每次釆样得 到的该种 HPE的性能指标值; 当采样得到的该种 HPE的性能指标值为至少两 种时, 采用层次分析法、 网络分析法或者多属性效能决策法, 对每次采样得 到的该种 HPE的至少两种性能指标值进行计算, 以确定每次采样对应的该种 HPE的性能表征值。 结合第二方面的第一种可能的实现方式, 在第三种可能的实现方式中, 所述第一确定单元, 具体用于采用层次分析法、 网络分析法或者多属性效能 决策法, 对每次釆样对应的每种 HPE的性能表征值进行计算, 以确定每次釆 样对应的待控制 HPE组的性能表征值。 With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the first determining unit is specifically configured to: for each HPE, when the sampled the performance index value of the HPE is In one case, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sample; when the performance index value of the sampled HPE is at least two, The analytic hierarchy process, the network analysis method or the multi-attribute performance decision method is used to calculate at least two performance index values of the HPE obtained by each sampling to determine the performance characterization value of the HPE corresponding to each sample. With reference to the first possible implementation manner of the second aspect, in a third possible implementation, the first determining unit is specifically configured to use an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method. The performance characterization values of each HPE corresponding to the second sample are calculated to determine the performance characterization values of the HPE group to be controlled corresponding to each sample.
结合第二方面, 第二方面的第一种可能的实现方式, 第二方面的第二种 可能的实现方式, 或者第二方面的第三种可能的实现方式, 在第四种可能的 实现方式中, 所述第二确定单元, 具体用于采用多元线性回归法、 多元非线 性回归法或者复相关系数法, 对每次采样得到的每种 HPE的工作频率值和每 次采样对应的待控制 HPE组的性能表征值进行计算,以确定每种 HPE的工作 频率值与待控制 HPE组的性能表征值之间的相关系数。 With reference to the second aspect, the first possible implementation manner of the second aspect, the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in the fourth possible implementation manner The second determining unit is specifically configured to adopt a multiple linear regression method, a multiple nonlinear regression method or a complex correlation coefficient method, and the working frequency value of each HPE obtained for each sampling and the corresponding control to be controlled for each sample The performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
结合第二方面, 第二方面的第一种可能的实现方式, 第二方面的第二种 可能的实现方式, 第二方面的第三种可能的实现方式, 或者第二方面的第四 种可能的实现方式, 在第五种可能的实现方式中, 所述控制单元, 还用于对 每种 HPE进行功率控制之前 , 确定异构处理器的当前内存带宽和理论内存带 宽之间的差值大于预设带宽差值。 With reference to the second aspect, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect, or the fourth possible aspect of the second aspect In a fifth possible implementation manner, the control unit is further configured to: before performing power control on each HPE, determine that a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor is greater than The preset bandwidth difference.
结合第二方面, 第二方面的第一种可能的实现方式, 第二方面的第二种 可能的实现方式, 第二方面的第三种可能的实现方式, 第二方面的第四种可 能的实现方式, 或者第二方面的第五种可能的实现方式, 在第六种可能的实 现方式中, 所述控制单元, 具体用于根据预设的系数区间和工作频率值的对 应关系,确定每种 HPE的工作频率值与待控制 HPE组的性能表征值之间的相 关系数所处于的系数区间对应的工作频率值; 其中, 系数区间中的系数值越 大, 系数区间对应的工作频率值越大; 根据确定的工作频率值, 对每种 HPE 进行功率控制。 With reference to the second aspect, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect, and the fourth possible aspect of the second aspect The implementation manner, or the fifth possible implementation manner of the second aspect, in the sixth possible implementation manner, the control unit is specifically configured to determine, according to the correspondence between the preset coefficient interval and the working frequency value, The working frequency value corresponding to the coefficient interval in which the correlation coefficient between the operating frequency value of the HPE and the performance representative value of the HPE group to be controlled is located; wherein, the larger the coefficient value in the coefficient interval, the more the operating frequency value corresponding to the coefficient interval Large; power control for each HPE based on the determined operating frequency value.
结合第二方面的第六种可能的实现方式, 在第七种可能的实现方式中, 所述控制单元, 还用于根据确定的工作频率值, 对每种 HPE进行功率控制之 前, 预判断根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器 的功率不超过异构处理器允许的功率最大值。 根据第一方面提供的功率控制方法, 第二方面提供的功率控制装置, 对 待控制 HPE组中的每种 HPE的性能指标, 以及该性能指标对应的该种 HPE 的工作频率进行釆样, 根据得到的釆样值确定每种 HPE的工作频率值与待控 制 HPE组的性能表征值之间的相关系数, 该相关系数越大, 表征对应 HPE的 工作频率值对待控制 HPE组的性能表征值的作用越大,即对应 HPE的工作频 率对待控制 HPE组的性能的作用越大, 因此, 根据每种 HPE的工作频率值与 待控制 HPE组的性能表征值之间的相关系数对每种 HPE进行功率控制,能够 保证待控制 HPE组的性能。 附图说明 With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation, the control unit is further configured to perform pre-determination according to the determined operating frequency value before performing power control on each HPE After the determined operating frequency value is power controlled for each HPE, the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor. According to the power control method provided by the first aspect, the power control apparatus provided by the second aspect, the performance index of each HPE in the HPE group to be controlled, and the operating frequency of the HPE corresponding to the performance index are obtained according to the The sample value determines the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled. The larger the correlation coefficient, the role of the operating frequency value corresponding to the HPE to control the performance characterization value of the HPE group. The larger, that is, the greater the effect of the operating frequency of the HPE to control the performance of the HPE group. Therefore, the power is applied to each HPE according to the correlation coefficient between the operating frequency value of each HPE and the performance representative value of the HPE group to be controlled. Control can guarantee the performance of the HPE group to be controlled. DRAWINGS
附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本 发明实施例一起用于解释本发明, 并不构成对本发明的限制。 在附图中: 图 1为异构处理器的结构示意图; The drawings are intended to provide a further understanding of the invention, and are intended to be a part of the description of the invention. In the drawings: Figure 1 is a schematic structural diagram of a heterogeneous processor;
图 2为本发明实施例提供的功率控制方法的流程图; 2 is a flowchart of a power control method according to an embodiment of the present invention;
图 3为本发明实施例 1提供的功率控制方法的详细流程图; 3 is a detailed flowchart of a power control method according to Embodiment 1 of the present invention;
图 4为本发明实施例 2提供的功率控制方法的详细流程图; 4 is a detailed flowchart of a power control method according to Embodiment 2 of the present invention;
图 5为本发明实施例 3提供的功率控制装置的结构示意图; FIG. 5 is a schematic structural diagram of a power control apparatus according to Embodiment 3 of the present invention; FIG.
图 6为本发明实施例 4提供的功率控制设备的结构示意图。 具体实施方式 FIG. 6 is a schematic structural diagram of a power control device according to Embodiment 4 of the present invention. detailed description
为了给出异构处理器中能够保证 HPE组性能的 HPE功率控制方案,本发 明实施例提供了一种功率控制方法及装置, 以下结合说明书附图对本发明的 优选实施例进行说明, 应当理解, 此处所描述的优选实施例仅用于说明和解 释本发明, 并不用于限定本发明。 并且在不冲突的情况下, 本申请中的实施 例及实施例中的特征可以相互组合。 In order to provide a power control method and a device for ensuring the performance of the HPE group in the heterogeneous processor, the present invention provides a power control method and apparatus. The following describes the preferred embodiment of the present invention with reference to the accompanying drawings. The preferred embodiments described herein are for illustrative purposes only and are not intended to limit the invention. And in the case of no conflict, the features in the embodiments and the embodiments of the present application can be combined with each other.
本发明实施例提供一种功率控制方法, 如图 2所示, 具体包括如下步骤: 步骤 201、对异构处理器中包含至少两种异构处理引擎 HPE的待控制 HPE 组中的每种 HPE的性能指标,以及该性能指标对应的该种 HPE的工作频率进 行至少一次采样; An embodiment of the present invention provides a power control method. As shown in FIG. 2, the method includes the following steps: Step 201: To-be-controlled HPE including at least two heterogeneous processing engines HPE in a heterogeneous processor The performance index of each HPE in the group and the working frequency of the HPE corresponding to the performance indicator are sampled at least once;
步骤 202、 根据每次釆样得到的每种 HPE的性能指标值, 确定每次釆样 对应的待控制 HPE组的性能表征值; Step 202: Determine, according to the performance index value of each HPE obtained in each sample, a performance characterization value of the HPE group to be controlled corresponding to each sample;
步骤 203、 根据每次采样得到的每种 HPE的工作频率值和每次采样对应 的待控制 HPE组的性能表征值, 确定每种 HPE的工作频率值与待控制 HPE 组的性能表征值之间的相关系数; 其中, 该相关系数越大, 表征对应 HPE的 工作频率值对待控制 HPE组的性能表征值的作用越大; Step 203: Determine, according to an operating frequency value of each HPE obtained by each sampling, and a performance characterization value of the HPE group to be controlled corresponding to each sampling, determine an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled. Correlation coefficient; wherein, the larger the correlation coefficient is, the greater the effect of characterizing the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group;
步骤 204、 根据每种 HPE的工作频率值与待控制 HPE组的性能表征值之 间的相关系数, 对每种 HPE进行功率控制。 Step 204: Perform power control on each HPE according to a correlation coefficient between an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled.
其中, HPE的工作频率值与待控制 HPE组的性能表征值之间的相关系数 表征了对应 HPE的工作频率值对待控制 HPE组的性能表征值的作用大小,即 表征了对应 HPE的工作频率对待控制 HPE组的性能的作用大小。该相关系数 越大, 对应 HPE的工作频率对待控制 HPE组的性能的作用越大; 反之, 该相 关系数越小, 对应 HPE的工作频率对待控制 HPE组的性能的作用越小。 The correlation coefficient between the operating frequency value of the HPE and the performance characterization value of the HPE group to be controlled characterizes the effect of the operating frequency value of the corresponding HPE to control the performance characterization value of the HPE group, that is, the working frequency of the corresponding HPE is characterized. The size of the effect of controlling the performance of the HPE group. The larger the correlation coefficient, the greater the effect of the HPE's operating frequency on the performance of the HPE group; conversely, the smaller the correlation, the smaller the effect of the HPE's operating frequency on the performance of the HPE group.
可见, 采用本发明实施例提供的功率控制方法, 根据每种 HPE的工作频 率值与待控制 HPE组的性能表征值之间的相关系数, 对 HPE进行功率控制, 相比于现有技术的功率控制方案, 能够保证待控制 HPE组的性能, 进而能够 保证待控制 HPE组运行的应用性能, 用户体验更好。 It can be seen that, by using the power control method provided by the embodiment of the present invention, power control is performed on the HPE according to a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled, compared to the power of the prior art. The control scheme can ensure the performance of the HPE group to be controlled, and thus the application performance of the HPE group to be controlled can be guaranteed, and the user experience is better.
下面结合附图, 用具体实施例对本发明实施例提供的功率控制方案进行 详细说明。 The power control scheme provided by the embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
实施例 1 : Example 1
图 3所示为本发明实施例 1提供的异构处理器中 HPE的功率控制方法的 流程图, 具体包括: FIG. 3 is a flowchart of a method for controlling power of an HPE in a heterogeneous processor according to Embodiment 1 of the present invention, which specifically includes:
步骤 301、 针对待控制 HPE组中的每种 HPE, 对该种 HPE的性能指标, 以及该性能指标对应的该种 HPE的工作频率进行釆样。 Step 301: For each HPE in the HPE group to be controlled, the performance index of the HPE and the working frequency of the HPE corresponding to the performance index are sampled.
其中, 采样次数可以为一次, 较佳的, 采样次数为多次, 通过扩大数据 样本, 使功率控制的合理性更高。 Wherein, the number of sampling times may be one time, preferably, the number of sampling times is multiple times, by expanding the data The sample makes the power control more reasonable.
实际实施时, 可以使用类似 CodeXL的工具定时收集每种 HPE对应的相 关性能计数器的值以及对应的工作频率值, 将性能计数器的值作为对应 HPE 的性能指标值。一种 HPE可能具有一个工作频率,也可能具有多个工作频率, 若一种 HPE具有多个工作频率,则可以取平均工作频率作为该种 HPE的工作 频率釆样值。 In actual implementation, a tool similar to CodeXL can be used to periodically collect the value of the relevant performance counter corresponding to each HPE and the corresponding operating frequency value, and use the value of the performance counter as the performance index value of the corresponding HPE. An HPE may have one operating frequency or multiple operating frequencies. If an HPE has multiple operating frequencies, the average operating frequency can be taken as the working frequency of the HPE.
其中,一种 HPE可能仅包含一种性能指标,也可能会包含多种性能指标, 例如 GPU对应的 HPE的性能指标主要包括如下七种: Among them, an HPE may contain only one performance indicator, and may also include multiple performance indicators. For example, the HPE performance indicators corresponding to the GPU mainly include the following seven types:
ALU Insts PTI: Compute instructions per thousand instructions, 算术還辑单 位 (ALU ) 中每千条指令的计算指令数; ALU Insts PTI: Compute instructions per thousand instructions, the number of calculation instructions per thousand instructions in the arithmetic unit (ALU);
ALU Busy: The percentage of GPU Time ALU instructions are processed, 图像处理单元(GPU ) 中处理算术逻辑单元指令的时间百分比; ALU Busy: The percentage of GPU Time ALU instructions are processed, the percentage of time in the image processing unit (GPU) that processes the arithmetic logic unit instructions;
ALU Fetch Ratio: ALU预取指令的比率; ALU Fetch Ratio: The ratio of ALU prefetch instructions;
GPU Clock Busy: GPU利用率; GPU Clock Busy: GPU utilization;
Write Unit Stalled: The % of GPU Time main memory write/store unit is stalled, 主内存写 /存储单位被挂起占 GPU时间的百分比; Write Unit Stalled: The % of GPU Time main memory write/store unit is stalled, the main memory write/storage unit is suspended as a percentage of the GPU time;
Fetch Unit Stalled: The % of GPU Time main memory fetch/load unit is stalled , 主内存获取 /导入单位被挂起占 GPU时间的百分比; Fetch Unit Stalled: The % of GPU Time main memory fetch/load unit is stalled , the main memory acquisition / import unit is suspended as a percentage of the GPU time;
Fetch from memory PTI: Main memory reads per thousand instructions, 每 千条指令主内存读次数。 Fetch from memory PTI: Main memory reads per thousand instructions, the number of main memory reads per thousand instructions.
对于包含多种性能指标的 HPE, 可以根据实际情况对其中一种、 多种或 全部性能指标进行采样。 For HPEs with multiple performance metrics, one, more, or all of the performance metrics can be sampled based on actual conditions.
即本步骤 301中釆样得到的 HPE的性能指标值可能为一种, 也可能为两 种或两种以上。 That is, the performance index value of the HPE obtained in the step 301 may be one type or two or more types.
在本发明实施例中,假设待控制 HPE组中包含 m种 HPE,进行 n次采样, 则每次采样得到的每种 HPE的工作频率值如下表所示: In the embodiment of the present invention, assuming that the HPE group to be controlled includes m kinds of HPEs and performs n times of sampling, the operating frequency values of each type of HPE obtained by each sampling are as follows:
其中, 表示第 i次对第 j种 HPE的工作频率进行采样得到的工作频率值, 1 < i < n, 1 j m。 Wherein, the working frequency value obtained by sampling the operating frequency of the jth HPE at the i-th time, 1 < i < n, 1 j m.
假设每种 HPE均对 s种性能指标进行釆样, 则每次釆样得到的每种 HPE 的性能表征值如下表所示: Assuming that each HPE is smeared on the s performance metrics, the performance characterization values for each HPE obtained for each sample are shown in the following table:
其中, rljk表示第 i次对第 j种 HPE的第 k种性能指标进行釆样得到的性 能指标值, l k s。 Where r ljk represents the performance index value obtained by the i-th time for the kth performance index of the jth HPE, lks.
步骤 302、 根据每次采样得到的每种 HPE的性能指标值, 确定每次采样 对应的每种 HPE的性能表征值。 Step 302: Determine, according to the performance index value of each HPE obtained by each sampling, a performance characterization value of each HPE corresponding to each sampling.
针对每种 HPE, 当釆样得到的该种 HPE的性能指标值为一种时, 可以直 接确定每次采样对应的该种 HPE的性能表征值为每次采样得到的该种 HPE的 性能指标值; 当釆样得到的该种 HPE的性能指标值为至少两种时, 可以采用 层次分析法、网络分析法或者多属性效能决策法,对每次采样得到的该种 HPE 的至少两种性能指标值进行计算, 以确定每次采样对应的该种 HPE的性能表 征值。 For each HPE, when the performance index value of the HPE obtained by the sample is one, it can directly determine that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling. When the performance index value of the HPE obtained by the sample is at least two, the analytic hierarchy process, the network analysis method, or the multi-attribute performance decision method may be used to obtain at least two performance indexes of the HPE obtained for each sampling. The value is calculated to determine the performance table of the HPE corresponding to each sample. Value.
即通过上述步骤 301表中每次采样得到的每种 HPE的性能表征值, 可以 确定每次 HPE的性能表征值如下表所示: That is, the performance characterization values of each HPE obtained by each sampling in the above table 301 can be determined as follows:
其中, R¾表示第 i次采样对应的第 j种 HPE的性能表征值。 Where R 3⁄4 represents the performance characterization value of the jth type of HPE corresponding to the ith sampling.
步骤 303、 根据每次采样对应的每种 HPE的性能表征值, 确定每次采样 对应的待控制 HPE组的性能表征值, 具体可以采用层次分析法、 网络分析法 或者多属性效能决策法,对每次釆样对应的每种 HPE的性能表征值进行计算, 以确定每次采样对应的待控制 HPE组的性能表征值。 Step 303: Determine, according to a performance characterization value of each HPE corresponding to each sampling, a performance characterization value of the HPE group to be controlled corresponding to each sampling, and specifically adopt an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method. The performance characterization values of each HPE corresponding to each sample are calculated to determine the performance characterization value of the HPE group to be controlled corresponding to each sample.
上述层次分析法、 网络分析法或者多属性效能决策法仅为示例, 为常用 的决策方法, 并不用于限定本发明。 现有技术中的其它决策方法也可以作为 步骤 302中确定 HPE的性能表征值和步骤 303中确定待控制 HPE组的性能表 征值的实现算法。 The above-mentioned analytic hierarchy process, network analysis method or multi-attribute performance decision-making method is merely an example, and is a commonly used decision-making method, and is not intended to limit the present invention. Other decision methods in the prior art may also be used as an implementation algorithm for determining the performance characterization value of the HPE in step 302 and determining the performance characterization value of the HPE group to be controlled in step 303.
即通过上述步骤 302表中确定出的每次采样对应的每种 HPE的性能表征 值, 可以确定出每次采样对应的待控制 HPE组的性能表征值如下表所示: 采样次数 待控制 HPE组性能表征值 That is, by performing the performance characterization values of each HPE corresponding to each sample determined in the above table 302, it can be determined that the performance characterization values of the HPE group to be controlled corresponding to each sample are as follows: The number of sampling times to be controlled by the HPE group performance characterization value
第 1次采样 Pi First sampling Pi
第 2次采样 P2 2nd sampling P2
第^欠采样 n 其中, Pl表示第 i次采样对应的待控制 HPE组的性能表征值。 The first undersampling n where P1 represents the performance characterization value of the HPE group to be controlled corresponding to the ith sampling.
步骤 304、 根据每次采样得到的每种 HPE的工作频率值和每次采样对应 的待控制 HPE组的性能表征值, 确定每种 HPE的工作频率值与待控制 HPE 组的性能表征值之间的相关系数, 具体可以采用多元线性回归法、 多元非线 性回归法或者复相关系数法, 对每次采样得到的每种 HPE的工作频率值和每 次采样对应的待控制 HPE组的性能表征值进行计算,以确定每种 HPE的工作 频率值与待控制 HPE组的性能表征值之间的相关系数。 Step 304: Determine, according to an operating frequency value of each HPE obtained by each sampling, and a performance characterization value of the HPE group to be controlled corresponding to each sampling, determine an operating frequency value of each HPE and a performance characterization value of the HPE group to be controlled. The correlation coefficient may be multivariate linear regression method, multiple nonlinear regression method or complex correlation coefficient method, and the operating frequency value of each HPE obtained for each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling. A calculation is made to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
上述多元线性回归法、 多元非线性回归法或者复相关系数法仅为示例, 为常用的数理统计方法, 并不用于限定本发明。 现有技术中的其它数理统计 方法也可以作为步骤 304中确定相关系数的实现算法。 The above multiple linear regression method, multivariate nonlinear regression method or complex correlation coefficient method is merely an example, and is a commonly used mathematical statistics method, and is not intended to limit the present invention. Other mathematical statistics methods in the prior art may also be used as an implementation algorithm for determining correlation coefficients in step 304.
即通过上述步骤 301表中每次采样得到的每种 HPE的工作频率值, 和上 述步骤 303表中确定出的每次采样对应的待控制 HPE组的性能表征值, 可以 确定出每种 HPE的工作频率值与待控制 HPE组的性能表征值之间的相关系数 ^口下表所示: That is, the operating frequency value of each HPE obtained by each sampling in the above table 301, and the performance characterization value of the HPE group to be controlled corresponding to each sampling determined in the above table 303, can determine the type of each HPE. The correlation coefficient between the operating frequency value and the performance characterization value of the HPE group to be controlled is shown in the following table:
其中, b'j表示第 j种 HPE的工作频率值与待控制 HPE组的性能表征值之 间的相关系数。 Where b'j represents the correlation coefficient between the operating frequency value of the jth HPE and the performance characterization value of the HPE group to be controlled.
步骤 305、判断异构处理器的当前内存带宽和理论内存带宽之间的差值是 否大于预设带宽差值。 Step 305: Determine whether a difference between a current memory bandwidth of the heterogeneous processor and a theoretical memory bandwidth is greater than a preset bandwidth difference.
当确定异构处理器的当前内存带宽和理论内存带宽之间的差值不大于预 设带宽差值时, 说明异构处理器的当前内存带宽接近理论内存带宽, 此时, 进入步骤 306; When it is determined that the difference between the current memory bandwidth and the theoretical memory bandwidth of the heterogeneous processor is not greater than the preset bandwidth difference, the current memory bandwidth of the heterogeneous processor is close to the theoretical memory bandwidth, and then proceeds to step 306;
当确定异构处理器的当前内存带宽和理论内存带宽之间的差值大于预设 带宽差值时, 说明异构处理器的当前内存带宽未接近理论内存带宽, 此时, 进入步骤 307。 When it is determined that the difference between the current memory bandwidth and the theoretical memory bandwidth of the heterogeneous processor is greater than the preset bandwidth difference, the current memory bandwidth of the heterogeneous processor is not close to the theoretical memory bandwidth. In this case, the process proceeds to step 307.
其中, 预设带宽差值可由用户根据实际的应用场景需求进行设定。 The preset bandwidth difference can be set by the user according to actual application scenario requirements.
步骤 306、 控制至少一种 HPE的功率降低, 该功率控制流程结束。 Step 306: Control power reduction of at least one HPE, and the power control process ends.
当确定异构处理器的当前内存带宽和理论内存带宽之间的差值不大于预 设带宽差值时,表明异构处理器的内存带宽已经成为瓶颈,此时通过降低 HPE 的功率, 释放内存带宽, 能够提高系统的能效比。 When it is determined that the difference between the current memory bandwidth of the heterogeneous processor and the theoretical memory bandwidth is not greater than the preset bandwidth difference, it indicates that the memory bandwidth of the heterogeneous processor has become a bottleneck. At this time, by reducing the power of the HPE, the memory is released. Bandwidth can increase the energy efficiency ratio of the system.
实施时,可以通过降低 HPE的工作频率或工作电压来达到降低 HPE功率 的目的。 In practice, HPE power can be reduced by reducing the operating frequency or operating voltage of the HPE.
进一步的, 本步骤 306中可以控制部分 HPE的功率降低, 也可以控制全 部 HPE的功率降低, 具体可以根据实际情况而定。 Further, in this step 306, the power reduction of part of the HPE can be controlled, and the power reduction of all the HPEs can also be controlled, which can be determined according to actual conditions.
步骤 307、根据预设的系数区间和工作频率值的对应关系,确定每种 HPE 的工作频率值与待控制 HPE组的性能表征值之间的相关系数所处于的系数区 间对应的工作频率值; 其中, 系数区间中的系数值越大, 系数区间对应的工 作频率值越大。 Step 307: Determine each type of HPE according to a correspondence between a preset coefficient interval and an operating frequency value. The working frequency value corresponding to the coefficient interval in which the correlation coefficient between the operating frequency value and the performance representative value of the HPE group to be controlled is located; wherein, the larger the coefficient value in the coefficient interval, the larger the operating frequency value corresponding to the coefficient interval.
在本发明实施例 1中, 系数区间具体可以包括三个: In the embodiment 1 of the present invention, the coefficient interval may specifically include three:
系数区间 1、 小于第一指定系数值的区间; Coefficient interval 1. an interval smaller than the first specified coefficient value;
系数区间 2、 大于等于第一指定系数值、 小于第二指定系数值的区间; 系数区间 3、 大于等于第二指定系数值的区间; Coefficient interval 2, an interval greater than or equal to the first specified coefficient value and less than the second specified coefficient value; a coefficient interval 3, an interval greater than or equal to the second specified coefficient value;
其中, 第二指定系数值大于第一指定系数值, 即采用两个指定系数值划 分出了 3个系数区间。 Wherein, the second specified coefficient value is greater than the first specified coefficient value, that is, three coefficient intervals are divided by using two specified coefficient values.
预设的系数区间 1对应的工作频率值为 fl , 系数区间 2对应的工作频率 值为 £2, 系数区间 3对应的工作频率值为 G , 其中, ί1< £2< β。 The preset coefficient interval 1 corresponds to the operating frequency value fl, the coefficient interval 2 corresponds to the operating frequency value of £2, and the coefficient interval 3 corresponds to the operating frequency value G, where ί1< £2< β.
在本发明的其它实施例中, 系数区间具体也可以包括两个、 四个或者其 它数量个, 即系数区间具体可以包括 X个, 采用 X-1 个指定系数值划分出 X 个系数区间, 其中, X为大于等于 2的正整数。 In other embodiments of the present invention, the coefficient interval may specifically include two, four or other numbers, that is, the coefficient interval may specifically include X, and X coefficient intervals are divided by X-1 designated coefficient values, wherein , X is a positive integer greater than or equal to 2.
步骤 308、 预判断根据确定的工作频率值对每种 ΗΡΕ进行功率控制后, 异构处理器的功率是否满足功率要求, 即判断根据确定的工作频率值对每种 ΗΡΕ 进行功率控制后, 异构处理器的功率是否超过异构处理器允许的功率最 大值。 Step 308: Pre-determine whether the power of the heterogeneous processor meets the power requirement after performing power control on each of the chirps according to the determined operating frequency value, that is, after determining the power control of each chirp according to the determined operating frequency value, the heterogeneous Whether the power of the processor exceeds the maximum power allowed by the heterogeneous processor.
当确定根据确定的工作频率值对每种 ΗΡΕ进行功率控制后, 异构处理器 的功率满足功率要求, 异构处理器的功率不超过异构处理器允许的功率最大 值时, 进入步骤 309; After determining that the power of each of the ports is controlled according to the determined operating frequency value, the power of the heterogeneous processor meets the power requirement, and the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor, proceeding to step 309;
当确定根据确定的工作频率值对每种 ΗΡΕ进行功率控制后, 异构处理器 的功率不满足功率要求, 异构处理器的功率超过异构处理器允许的功率最大 值时, 进入步骤 310。 When it is determined that the power of each heterogeneous power is controlled according to the determined operating frequency value, the power of the heterogeneous processor does not satisfy the power requirement, and when the power of the heterogeneous processor exceeds the maximum power allowed by the heterogeneous processor, the process proceeds to step 310.
步骤 309、 根据步骤 307中确定的工作频率值, 对每种 ΗΡΕ进行功率控 制, 该功率控制流程结束。 步骤 307中针对每种 HPE确定了一个对应等级的工作频率值,本步骤 309 实施时, 可以直接控制每种 HPE的工作频率为确定的工作频率值, 达到功率 控制的目的, 也可以通过控制每种 HPE的工作电压, 使每种 HPE的工作频率 为确定的工作频率值, 达到功率控制的目的。 Step 309: Perform power control on each of the ports according to the operating frequency value determined in step 307, and the power control process ends. In step 307, a working frequency value of a corresponding level is determined for each HPE. When the step 309 is implemented, the working frequency of each HPE can be directly controlled to a determined working frequency value, thereby achieving the purpose of power control, and also by controlling each The operating voltage of the HPE is such that the operating frequency of each HPE is a determined operating frequency value for power control purposes.
步骤 310、 降低步骤 307中确定的至少一种 HPE的工作频率值, 根据降 低后的工作频率值, 对每种 HPE进行功率控制。 Step 310: Reduce the operating frequency value of the at least one HPE determined in step 307, and perform power control on each HPE according to the reduced operating frequency value.
当确定根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器 的功率不满足功率要求时, 即根据确定的工作频率值对每种 HPE进行功率控 制会导致异构处理器的功率超过异构处理器允许的功率最大值, 此时不能根 据步骤 307中确定的工作频率值, 对每种 HPE进行功率控制, 而是应降低步 骤 307中确定的部分 HPE或者全部 HPE的工作频率值,然后再根据降低后的 工作频率值, 对每种 HPE进行功率控制。 When it is determined that power control of each HPE is performed according to the determined operating frequency value, if the power of the heterogeneous processor does not meet the power requirement, that is, power control of each HPE according to the determined operating frequency value may result in a heterogeneous processor. The power exceeds the maximum power allowed by the heterogeneous processor. At this time, the power control of each HPE cannot be performed according to the operating frequency value determined in step 307, but the operating frequency of some HPEs or all HPEs determined in step 307 should be lowered. The value is then power controlled for each HPE based on the reduced operating frequency value.
可见, 釆用本发明实施例 1 提供的功率控制方法, 在进行功率控制时考 虑到了各 HPE之间的联系和各 HPE对 HPE组性能的作用 , 能够保证 HPE组 性能, 并且也考虑到了异构处理器的内存带宽、 功率要求等条件, 能够进一 步提高功率控制的合理性和可靠性。 明。 It can be seen that the power control method provided by Embodiment 1 of the present invention considers the relationship between each HPE and the performance of each HPE to the performance of the HPE group when performing power control, and can ensure the performance of the HPE group, and also considers the heterogeneity. The memory bandwidth and power requirements of the processor can further improve the rationality and reliability of the power control. Bright.
实施例 2: Example 2:
在本发明实施例 2中, 待控制 HPE组中共包含两种 HPE, 每种 HPE均 具有两种性能指标。 In the second embodiment of the present invention, two HPEs are included in the HPE group to be controlled, and each HPE has two performance indexes.
图 4所示为本发明实施例 2提供的功率控制方法的流程图, 具体包括: 步骤 401、 针对每种 HPE, 对该种 HPE的两种性能指标, 以及该性能指 标对应的该种 HPE的工作频率进行两次采样。 FIG. 4 is a flowchart of a power control method according to Embodiment 2 of the present invention, which specifically includes: Step 401: For each HPE, two performance indicators of the HPE and the HPE corresponding to the performance index The working frequency is sampled twice.
即在本法发明实施例 2中, HPE种类 m=2, 采样次数 n=2 , 每种 HPE的 性能指标采样种类 s=2。 That is, in the second embodiment of the present invention, the HPE type m=2, the number of sampling times n=2, and the sampling type of the performance index of each HPE is s=2.
假设每次釆样得到的每种 HPE的工作频率值如下表所示: Assume that the operating frequency values of each HPE obtained for each sample are as follows:
每次采样得 ΗΡΕ的性能指标值如下表所示: The performance indicator values for each sample are shown in the following table:
步骤 402、 根据每次采样得到的每种 ΗΡΕ的性能指标值, 采用层次分析 法确定每次采样对应的每种 ΗΡΕ的性能表征值, 具体为: Step 402: Determine, according to the performance index value of each enthalpy obtained by each sampling, an analytic hierarchy process to determine a performance characterization value of each 对应 corresponding to each sampling, specifically:
Rii=Xixrin+X2xrii2; Ri2= i'xri2i+X2'xri22;Rii = Xi x rin+X2 x rii2; Ri2 = i' x ri2i+X2' x ri22;
其中, Ry表示第 i次采样对应的第 j种 HPE的性能表征值, ryk表示第 1 次对第 j种 HPE的第 k种性能指标进行釆样得到的性能指标值, i=l、 2, j=l、 2, k=l、 2; X1 ¾ X2、 X2'、 Xj", X2"、 ΧΓ、 X2"'为权重系数, 权重系数 的具体确定方法为现有技术, 在此不再详述。 Where R y represents the performance characterization value of the jth type of HPE corresponding to the ith sampling, and r yk represents the performance index value obtained by the first time for the kth performance index of the jth HPE, i=l, 2, j=l, 2, k=l, 2; X 1 3⁄4 X 2 , X 2 ', Xj", X 2 ", ΧΓ, X 2 "' are weight coefficients, and the specific determination method of the weight coefficient is prior art, and will not be described in detail herein.
假设通过上述步骤 401表中每次采样得到的每种 HPE的性能表征值, 采 用层次分析法确定出的每次釆样对应的每种 HPE的性能表征值如下表所示: Assuming the performance characterization values of each HPE obtained by each sampling in the above table 401, the performance characterization values of each HPE corresponding to each sample determined by the analytic method are as follows:
步骤 403、 根据每次釆样对应的每种 ΗΡΕ的性能表征值, 采用层次分析 法确定每次采样对应的待控制 ΗΡΕ组的性能表征值, 具体为: Step 403: Determine, according to the performance characterization value of each cockroach corresponding to each sample, an analytic hierarchy process to determine a performance characterization value of the group to be controlled corresponding to each sample, specifically:
P2—入 1 xK2i十入 2 X- 22? P2—into 1 x K 2 i into 2 X - 2 2 ?
其中, 表示第 i次釆样对应的待控制 HPE组的性能表征值; ΧΓ' Χ2"" Χι Χ2 为权重系数。 Wherein, the performance characterization value of the HPE group to be controlled corresponding to the i-th sample is represented; ΧΓ' Χ 2 "" Χ ι Χ 2 is a weight coefficient.
假设通过上述步骤 402表中确定出的每次采样对应的每种 ΗΡΕ的性能表 征值, 釆用层次分析法确定出的每次釆样对应的待控制 ΗΡΕ组的性能表征值 ^口下表所示: It is assumed that the performance characterization value of each enthalpy corresponding to each sample determined by the above-mentioned step 402 is determined by the analytic hierarchy process. Show:
步骤 404、 根据每次釆样得到的每种 ΗΡΕ的工作频率值和每次采样对应 的待控制 ΗΡΕ组的性能表征值,采用多元线性回归法确定每种 ΗΡΕ的工作频 率值与待控制 ΗΡΕ组的性能表征值之间的相关系数, 具体为: Step 404: Determine the operating frequency value of each enthalpy and the group to be controlled by using multiple linear regression method according to the working frequency value of each cockroach obtained for each sample and the performance characterization value of the group to be controlled corresponding to each sampling. The correlation coefficient between the performance characterization values is:
设 F尸 (f„, f21), F2=(f12, f22), P=(p p2); 其中, 表示第 i次对第 j种 HPE的工作频率进行采样得到的工作频率值; Let F corpse (f„, f 21 ), F 2 =(f 12 , f 22 ), P=(pp 2 ); where, denote the working frequency value obtained by sampling the working frequency of the jth HPE at the ith time ;
^∑FiFi Σ^∑^1χ1 + 4Χ4_(1 + 4)χ(1 + 4) = 3 ^ ΣFiFi Σ ^ Σ ^ 1χ1 + 4Χ4 _ (1 + 4) χ (1 + 4) = 3
11 ^ 1 1 η 2 11 ^ 1 1 η 2
∑Fp,¾∑ ^lx5 + 4x6,(l + 4)x(6 + 5) = ∑Fp , 3⁄4∑ ^ lx5 + 4x6 , (l + 4)x(6 + 5) =
lp ^ 1 n 2 l p ^ 1 n 2
∑F2P ∑F2∑P,LX5 + 3x6,(l + 3)x(6 + 5) ^ ∑F2P ∑F 2 ∑P , LX5 + 3 x6 ,(l + 3)x(6 + 5) ^
2p ^ 2 n 2 2 p ^ 2 n 2
∑pP-∑ ∑^5x5十 6X6-(5 + 6)x(5 + 6)=05; ∑pP -∑ ∑^ 5x5十6X6 -(5 + 6)x (5 + 6) = 05;
pp 厶 n 2 p p厶n 2
将上述计算出的值代入下述方程组: Substituting the above calculated values into the following equations:
|1llbl+112b2=1lp . | 1 ll b l +1 12 b 2 =1 lp .
)l21Vl22b2=l2 ' 求得 b, b )l 21 Vl 22 b 2 =l 2 ' B, b
29 29 29 29
能表征值之间的相关系数。 Can characterize the correlation coefficient between values.
最终确定出的每种 HPE的工作频率值与待控制 HPE组的性能表征值之间 的相关系数如下表所示: The correlation coefficients between the final determined operating frequency values of each HPE and the performance characterization values of the HPE group to be controlled are shown in the following table:
步骤 405、判断异构处理器的当前内存带宽和理论内存带宽之间的差值是 否大于预设带宽差值。 Step 405: Determine whether a difference between a current memory bandwidth of the heterogeneous processor and a theoretical memory bandwidth is greater than a preset bandwidth difference.
假设异构处理器的理论内存带宽为 16GB/s, 预设带宽差值为 2GB/s。 若异构处理器的当前内存带宽为 15 GB/S , 则异构处理器的当前内存带宽 和理论内存带宽之间的差值不大于预设带宽差值, 进入步骤 406; Assume that the theoretical memory bandwidth of the heterogeneous processor is 16GB/s and the preset bandwidth difference is 2GB/s. If the current memory bandwidth of the heterogeneous processor is 15 GB/s, the difference between the current memory bandwidth of the heterogeneous processor and the theoretical memory bandwidth is not greater than the preset bandwidth difference, and the process proceeds to step 406;
若异构处理器的当前内存带宽为 2GB/S ,则异构处理器的当前内存带宽和 理论内存带宽之间的差值大于预设带宽差值, 进入步骤 407。 If the current memory bandwidth of the heterogeneous processor is 2 GB/s, the difference between the current memory bandwidth and the theoretical memory bandwidth of the heterogeneous processor is greater than the preset bandwidth difference, and the process proceeds to step 407.
步骤 406、 控制两种 HPE的功率降低, 以释放内存带宽, 该功率控制流 程结束。 Step 406: Control power reduction of the two HPEs to release the memory bandwidth, and the power control process ends.
步骤 407、根据预设的系数区间和工作频率值的对应关系,确定每种 HPE 的工作频率值与待控制 HPE组的性能表征值之间的相关系数所处于的系数区 间对应的工作频率值。 Step 407: Determine, according to a correspondence between the preset coefficient interval and the working frequency value, a working frequency value corresponding to a coefficient region in which a correlation coefficient between each HPE operating frequency value and a performance representative value of the HPE group to be controlled is located.
在本发明实施例 2中, 系数区间具体包括三个: In Embodiment 2 of the present invention, the coefficient interval specifically includes three:
系数区间 1、 小于 0.5的区间; Coefficient interval 1: an interval less than 0.5;
系数区间 2、 大于等于 0.5、 小于 0.8的区间; Coefficient interval 2. An interval greater than or equal to 0.5 and less than 0.8;
系数区间 3、 大于等于 0.8的区间; Coefficient interval 3, an interval greater than or equal to 0.8;
预设的系数区间 1对应的工作频率值为 fl, 系数区间 2对应的工作频率 值为 £2, 系数区间 3对应的工作频率值为 β , 其中, ί!< ί2< β。 由于, HPE 1 的工作频率值与待控制 ΗΡΕ组的性能表征值之间的相关系 数为 0.82, 落入系数区间 3, 因此 HPE1对应的工作频率值为 f3; HPE2的工 作频率值与待控制 HPE组的性能表征值之间的相关系数为 0.36, 落入系数区 间 1 , 因此 HPE2对应的工作频率值为 fl。 The working frequency value corresponding to the preset coefficient interval 1 is fl, and the operating frequency corresponding to the coefficient interval 2 The value is £2, and the operating frequency value corresponding to the coefficient interval 3 is β, where ί!<ί2< β. Because the correlation coefficient between the operating frequency value of HPE 1 and the performance characterization value of the group to be controlled is 0.82, which falls within the coefficient interval 3, the operating frequency value corresponding to HPE1 is f3; the operating frequency value of HPE2 and the HPE to be controlled The correlation coefficient between the performance characterization values of the group is 0.36, which falls within the coefficient interval 1, so the operating frequency value corresponding to HPE2 is fl.
步骤 408、 预判断根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器的功率是否超过异构处理器允许的功率最大值。 Step 408: Pre-determine whether the power of the heterogeneous processor exceeds the maximum power allowed by the heterogeneous processor after performing power control on each HPE according to the determined working frequency value.
当确定根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器 的功率不超过异构处理器允许的功率最大值时, 进入步骤 409; 当确定根据确 定的工作频率值对每种 HPE进行功率控制后, 异构处理器的功率超过异构处 理器允许的功率最大值时, 进入步骤 410。 When it is determined that power control of each HPE is performed according to the determined operating frequency value, if the power of the heterogeneous processor does not exceed the maximum power allowed by the heterogeneous processor, proceed to step 409; when determining that each of the determined operating frequency values is determined After the HPE performs power control, if the power of the heterogeneous processor exceeds the maximum power allowed by the heterogeneous processor, the process proceeds to step 410.
步骤 409、 根据步骤 407中确定的工作频率值, 对每种 HPE进行功率控 制, 该功率控制流程结束。 Step 409: Perform power control on each HPE according to the working frequency value determined in step 407, and the power control process ends.
步骤 410、 降低步骤 407中确定的每种 HPE的工作频率值, 根据降低后 的工作频率值, 对每种 HPE进行功率控制, 该功率控制流程结束。 Step 410: Reduce the operating frequency value of each HPE determined in step 407, and perform power control on each HPE according to the reduced operating frequency value, and the power control process ends.
实施例 3: Example 3:
基于同一发明构思, 根据本发明上述实施例提供的功率控制方法, 相应 地, 本发明实施例还提供一种功率控制装置, 其结构示意图如图 5 所示, 具 体包括: Based on the same inventive concept, the power control method according to the above embodiment of the present invention, and correspondingly, the embodiment of the present invention further provides a power control device. The structure of the device is as shown in FIG. 5, and the specific structure includes:
采样单元 501, 用于对异构处理器中包含至少两种异构处理引擎 HPE的 待控制 HPE组中的每种 HPE的性能指标, 以及该性能指标对应的该种 HPE 的工作频率进行至少一次采样; The sampling unit 501 is configured to: perform performance indicators of each HPE in the HPE group to be controlled that includes at least two heterogeneous processing engines HPE in the heterogeneous processor, and perform the operating frequency of the HPE corresponding to the performance indicator at least once Sampling
第一确定单元 502, 用于根据每次釆样得到的每种 HPE的性能指标值, 确定每次采样对应的待控制 HPE组的性能表征值; a first determining unit 502, configured to determine, according to a performance index value of each HPE obtained for each sample, a performance characterization value of the HPE group to be controlled corresponding to each sampling;
第二确定单元 503, 用于根据每次采样得到的每种 HPE的工作频率值和 每次采样对应的待控制 HPE组的性能表征值,确定每种 HPE的工作频率值与 待控制 HPE组的性能表征值之间的相关系数; 其中, 所述相关系数越大, 表 征对应 HPE的工作频率值对待控制 HPE组的性能表征值的作用越大; 控制单元 504, 用于根据每种 HPE的工作频率值与待控制 HPE组的性能 表征值之间的相关系数, 对每种 HPE进行功率控制。 The second determining unit 503 is configured to determine, according to the working frequency value of each HPE obtained by each sampling and the performance characterization value of the HPE group to be controlled corresponding to each sampling, the working frequency value of each HPE and the HPE group to be controlled. a correlation coefficient between performance characterization values; wherein, the correlation coefficient is larger, the table The greater the effect of the operating frequency value corresponding to the HPE on the performance characterization value of the HPE group to be controlled; the control unit 504 is configured to calculate a correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled, Each HPE is power controlled.
进一步的, 第一确定单元 502, 具体用于根据每次采样得到的每种 HPE 的性能指标值, 确定每次采样对应的每种 HPE的性能表征值; 根据每次采样 对应的每种 HPE的性能表征值,确定每次釆样对应的待控制 HPE组的性能表 征值。 Further, the first determining unit 502 is specifically configured to determine, according to the performance index value of each HPE obtained by each sampling, a performance characterization value of each HPE corresponding to each sampling; according to each HPE corresponding to each sampling The performance characterization value determines the performance characterization value of the HPE group to be controlled corresponding to each sample.
进一步的, 第一确定单元 502, 具体用于针对每种 HPE, 当采样得到的该 种 HPE的性能指标值为一种时,确定每次采样对应的该种 HPE的性能表征值 为每次采样得到的该种 HPE的性能指标值; 当采样得到的该种 HPE的性能指 标值为至少两种时, 采用层次分析法、 网络分析法或者多属性效能决策法, 对每次采样得到的该种 HPE的至少两种性能指标值进行计算, 以确定每次采 样对应的该种 HPE的性能表征值。 Further, the first determining unit 502 is specifically configured to: for each HPE, when the performance index value of the sampled HPE is one, determine that the performance characterization value of the HPE corresponding to each sample is each sampling. The obtained performance index value of the HPE; when the sampled obtained HPE has the performance index value of at least two, the analytic hierarchy process, the network analysis method, or the multi-attribute performance decision method is used to obtain the species for each sample. At least two performance index values of the HPE are calculated to determine a performance characterization value of the HPE corresponding to each sample.
进一步的, 第一确定单元 502, 具体用于采用层次分析法、 网络分析法或 者多属性效能决策法, 对每次采样对应的每种 HPE的性能表征值进行计算, 以确定每次采样对应的待控制 HPE组的性能表征值。 Further, the first determining unit 502 is specifically configured to calculate, by using an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method, a performance characterization value of each HPE corresponding to each sample to determine a corresponding sample for each sample. The performance characterization value of the HPE group to be controlled.
进一步的, 第二确定单元 503, 具体用于采用多元线性回归法、 多元非线 性回归法或者复相关系数法, 对每次采样得到的每种 HPE的工作频率值和每 次采样对应的待控制 HPE组的性能表征值进行计算,以确定每种 HPE的工作 频率值与待控制 HPE组的性能表征值之间的相关系数。 Further, the second determining unit 503 is specifically configured to use a multiple linear regression method, a multiple nonlinear regression method or a complex correlation coefficient method, and the working frequency value of each HPE obtained for each sampling and the corresponding control to be controlled for each sample The performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
较佳的, 控制单元 504, 还用于对每种 HPE进行功率控制之前, 确定异 构处理器的当前内存带宽和理论内存带宽之间的差值大于预设带宽差值。 Preferably, the control unit 504 is further configured to determine, before power control of each HPE, that a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor is greater than a preset bandwidth difference.
进一步的, 控制单元 504, 具体用于根据预设的系数区间和工作频率值的 对应关系,确定每种 HPE的工作频率值与待控制 HPE组的性能表征值之间的 相关系数所处于的系数区间对应的工作频率值; 其中, 系数区间中的系数值 越大, 系数区间对应的工作频率值越大; 根据确定的工作频率值,对每种 HPE 进行功率控制。 较佳的, 控制单元 504, 还用于根据确定的工作频率值, 对每种 HPE进 行功率控制之前,预判断根据确定的工作频率值对每种 HPE进行功率控制后, 异构处理器的功率不超过异构处理器允许的功率最大值。 Further, the control unit 504 is specifically configured to determine, according to a preset relationship between the coefficient interval and the working frequency value, a coefficient of a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled. The operating frequency value corresponding to the interval; wherein, the larger the coefficient value in the coefficient interval, the larger the operating frequency value corresponding to the coefficient interval; and the power control for each HPE according to the determined working frequency value. Preferably, the control unit 504 is further configured to: before performing power control on each of the HPEs according to the determined operating frequency value, pre-determining the power of the heterogeneous processor after performing power control on each of the HPEs according to the determined operating frequency value. Does not exceed the maximum power allowed by the heterogeneous processor.
上述各单元的功能可对应于图 2-4任一所示流程中的相应处理步骤,在此 不再赘述。 The functions of the above units may correspond to corresponding processing steps in the flow shown in any of FIG. 2-4, and details are not described herein again.
实施例 4: Example 4:
基于同一发明构思, 本发明实施例还提供一种功率控制设备, 其结构示 意图如图 6所示, 包括处理器 601 , 存储器 602, 和通信总线 600 , 其中: 通 信总线 600用于设备各部分之间的连接通信;处理器 601用于执行存储器 602 中存储的可执行模块, 例如计算机程序。 存储器 602 可能包含高速随机存取 存储器 (RAM: Random Access Memory ), 也可能还包括非不稳定的存储器 ( non-volatile memory ) , 例如磁盘存储器。 Based on the same inventive concept, an embodiment of the present invention further provides a power control device, which is shown in FIG. 6 and includes a processor 601, a memory 602, and a communication bus 600. The communication bus 600 is used for each part of the device. Inter-connection communication; the processor 601 is configured to execute an executable module, such as a computer program, stored in the memory 602. The memory 602 may include a high speed random access memory (RAM: Random Access Memory) and may also include a non-volatile memory such as a disk memory.
在一些实施方式中, 存储器 602存储了程序 6021, 可以被处理器 601执 行,程序 6021包括: 对异构处理器中包含至少两种异构处理引擎 ΗΡΕ的待控 制 ΗΡΕ组中的每种 ΗΡΕ的性能指标, 以及该性能指标对应的该种 ΗΡΕ的工 作频率进行至少一次釆样; 根据每次采样得到的每种 ΗΡΕ的性能指标值, 确 定每次采样对应的待控制 ΗΡΕ 组的性能表征值; 根据每次采样得到的每种 ΗΡΕ的工作频率值和每次采样对应的待控制 ΗΡΕ组的性能表征值, 确定每种 ΗΡΕ的工作频率值与待控制 ΗΡΕ组的性能表征值之间的相关系数; 其中, 所 述相关系数越大,表征对应 ΗΡΕ的工作频率值对待控制 ΗΡΕ组的性能表征值 的作用越大;根据每种 ΗΡΕ的工作频率值与待控制 ΗΡΕ组的性能表征值之间 的相关系数, 对每种 ΗΡΕ进行功率控制。 In some embodiments, the memory 602 stores a program 6021, which can be executed by the processor 601, and the program 6021 includes: for each of the to-be-controlled groups of the heterogeneous processor including at least two heterogeneous processing engines The performance indicator, and the working frequency of the 对应 corresponding to the performance indicator are at least once; determining the performance characterization value of the group to be controlled corresponding to each sampling according to the performance index value of each enthalpy obtained by each sampling; Determine the correlation coefficient between the operating frequency value of each enthalpy and the performance characterization value of the group to be controlled based on the operating frequency value of each enthalpy obtained for each sampling and the performance characterization value of the group to be controlled corresponding to each sampling. Wherein, the greater the correlation coefficient, the greater the effect of characterizing the corresponding operating frequency value of the corresponding ΗΡΕ group on the performance characterization value of the ΗΡΕ group; according to the operating frequency value of each ΗΡΕ and the performance characterization value of the ΗΡΕ group to be controlled Correlation coefficient, power control for each type.
在一些实施方式中, 程序 6021具体包括: 根据每次釆样得到的每种 ΗΡΕ 的性能指标值, 确定每次采样对应的每种 ΗΡΕ的性能表征值; 根据每次采样 对应的每种 ΗΡΕ的性能表征值,确定每次采样对应的待控制 ΗΡΕ组的性能表 征值。 In some embodiments, the program 6021 specifically includes: determining, according to the performance index value of each ΗΡΕ obtained for each sample, a performance characterization value of each 对应 corresponding to each sampling; The performance characterization value determines the performance characterization value of the group to be controlled corresponding to each sample.
在一些实施方式中, 程序 6021具体包括: 针对每种 ΗΡΕ, 当采样得到的 该种 HPE的性能指标值为一种时,确定每次采样对应的该种 HPE的性能表征 值为每次采样得到的该种 HPE的性能指标值; 当采样得到的该种 HPE的性能 指标值为至少两种时, 釆用层次分析法、 网络分析法或者多属性效能决策法, 对每次采样得到的该种 HPE的至少两种性能指标值进行计算, 以确定每次采 样对应的该种 HPE的性能表征值。 In some embodiments, the program 6021 specifically includes: for each ΗΡΕ, when sampled When the performance index value of the HPE is one, it is determined that the performance characterization value of the HPE corresponding to each sample is the performance index value of the HPE obtained by each sampling; and the performance index value of the HPE obtained by sampling For at least two types, at least two performance index values of the HPE obtained by each sampling are calculated by using an analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method to determine the corresponding species for each sample. Performance characterization values for HPE.
在一些实施方式中, 程序 6021具体包括: 釆用层次分析法、 网络分析法 或者多属性效能决策法,对每次采样对应的每种 HPE的性能表征值进行计算, 以确定每次采样对应的待控制 HPE组的性能表征值。 In some embodiments, the program 6021 specifically includes: using a analytic hierarchy process, a network analysis method, or a multi-attribute performance decision method to calculate a performance characterization value of each HPE corresponding to each sample to determine a corresponding sample for each sample. The performance characterization value of the HPE group to be controlled.
在一些实施方式中, 程序 6021具体包括: 采用多元线性回归法、 多元非 线性回归法或者复相关系数法, 对每次釆样得到的每种 HPE的工作频率值和 每次采样对应的待控制 HPE组的性能表征值进行计算,以确定每种 HPE的工 作频率值与待控制 HPE组的性能表征值之间的相关系数。 In some embodiments, the program 6021 specifically includes: using a multiple linear regression method, a multiple nonlinear regression method, or a complex correlation coefficient method, and the operating frequency value of each HPE obtained for each sample and the corresponding control to be controlled for each sample The performance characterization values of the HPE group were calculated to determine the correlation coefficient between the operating frequency value of each HPE and the performance characterization value of the HPE group to be controlled.
在一些实施方式中, 程序 6021还包括: 对每种 HPE进行功率控制之前, 确定异构处理器的当前内存带宽和理论内存带宽之间的差值大于预设带宽差 值。 In some embodiments, the program 6021 further includes: determining, before power control of each HPE, a difference between a current memory bandwidth and a theoretical memory bandwidth of the heterogeneous processor that is greater than a preset bandwidth difference.
在一些实施方式中, 程序 6021具体包括: 根据预设的系数区间和工作频 率值的对应关系,确定每种 HPE的工作频率值与待控制 HPE组的性能表征值 之间的相关系数所处于的系数区间对应的工作频率值; 其中, 系数区间中的 系数值越大, 系数区间对应的工作频率值越大; 根据确定的工作频率值, 对 每种 HPE进行功率控制。 In some embodiments, the program 6021 specifically includes: determining, according to a preset relationship between the coefficient interval and the working frequency value, a correlation coefficient between an operating frequency value of each HPE and a performance representative value of the HPE group to be controlled. The operating frequency value corresponding to the coefficient interval; wherein, the larger the coefficient value in the coefficient interval, the larger the operating frequency value corresponding to the coefficient interval; and the power control for each HPE according to the determined working frequency value.
在一些实施方式中, 程序 6021还包括: 根据确定的工作频率值, 对每种 HPE进行功率控制之前, 预判断根据确定的工作频率值对每种 HPE进行功率 控制后, 异构处理器的功率不超过异构处理器允许的功率最大值。 In some embodiments, the program 6021 further includes: pre-determining the power of the heterogeneous processor after performing power control on each of the HPEs according to the determined operating frequency value, before performing power control on each of the HPEs according to the determined operating frequency value. Does not exceed the maximum power allowed by the heterogeneous processor.
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或 计算机程序产品。 因此, 本发明可采用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明可采用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不限于磁盘 存储器、 CD-ROM、 光学存储器等) 上实施的计算机程序产品的形式。 Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention may employ computer usable storage media (including but not limited to disk) in one or more of the computer usable program code embodied therein. The form of a computer program product implemented on a memory, CD-ROM, optical storage, etc.).
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产 品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图 和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中的流程 和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使得通 过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流 程图一个流程或多个流程和 /或方框图一个方框或多个方框中特定的功能的 装置。 The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowcharts and/or block diagrams, and combinations of flow and/or blocks in the flowcharts and/or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing a particular function in a block or blocks of a flow or a flow and/or a block diagram of a flow diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设 备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个流程或 多个流程和 /或方框图一个方框或多个方框中特定的功能。 The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements a particular function in a block or blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和 /或方框图一个方框或多个方框中特定的功能的步 骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing a particular function in a block or blocks of a flow or a flow and/or block diagram of a flowchart.
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了 基本创造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权 利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 Although the preferred embodiment of the invention has been described, it will be apparent to those skilled in the < Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and modifications
显然, 本领域的技术人员可以对本发明实施例进行各种改动和变型而不 脱离本发明实施例的精神和范围。 这样, 倘若本发明实施例的这些修改和变 型属于本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些 改动和变型在内。 It is apparent that those skilled in the art can make various modifications and changes to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.
Claims
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2014/076502 WO2015165045A1 (en) | 2014-04-29 | 2014-04-29 | Power control method and apparatus |
| CN201480000441.XA CN105378670B (en) | 2014-04-29 | 2014-04-29 | A power control method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2014/076502 WO2015165045A1 (en) | 2014-04-29 | 2014-04-29 | Power control method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2015165045A1 true WO2015165045A1 (en) | 2015-11-05 |
Family
ID=54358006
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2014/076502 Ceased WO2015165045A1 (en) | 2014-04-29 | 2014-04-29 | Power control method and apparatus |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105378670B (en) |
| WO (1) | WO2015165045A1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101819459A (en) * | 2010-03-31 | 2010-09-01 | 中国人民解放军国防科学技术大学 | Heterogeneous object memory system-based power consumption control method |
| WO2013043382A1 (en) * | 2011-09-21 | 2013-03-28 | Qualcomm Incorporated | System and method for managing thermal energy generation in a heterogeneous multi-core processor |
| CN103116526A (en) * | 2013-02-22 | 2013-05-22 | 中国人民解放军国防科学技术大学 | Maximum power consumption control method for high-performance heterogeneous parallel computer |
| CN103119580A (en) * | 2010-09-25 | 2013-05-22 | 英特尔公司 | Application scheduling in heterogeneous multiprocessor computing platforms |
-
2014
- 2014-04-29 CN CN201480000441.XA patent/CN105378670B/en active Active
- 2014-04-29 WO PCT/CN2014/076502 patent/WO2015165045A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101819459A (en) * | 2010-03-31 | 2010-09-01 | 中国人民解放军国防科学技术大学 | Heterogeneous object memory system-based power consumption control method |
| CN103119580A (en) * | 2010-09-25 | 2013-05-22 | 英特尔公司 | Application scheduling in heterogeneous multiprocessor computing platforms |
| WO2013043382A1 (en) * | 2011-09-21 | 2013-03-28 | Qualcomm Incorporated | System and method for managing thermal energy generation in a heterogeneous multi-core processor |
| CN103116526A (en) * | 2013-02-22 | 2013-05-22 | 中国人民解放军国防科学技术大学 | Maximum power consumption control method for high-performance heterogeneous parallel computer |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105378670A (en) | 2016-03-02 |
| CN105378670B (en) | 2019-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zhuang et al. | Efficient and robust large medical image retrieval in mobile cloud computing environment | |
| CN107515663B (en) | Method and device for adjusting running frequency of central processing unit kernel | |
| CN111064808B (en) | Load balancing method and device based on distributed storage system | |
| CN104636187B (en) | Dispatching method of virtual machine in NUMA architecture based on load estimation | |
| WO2017118133A1 (en) | Anomaly detection method for internal virtual machine of cloud system | |
| CN103473115B (en) | virtual machine placement method and device | |
| CN105677000B (en) | The system and method for dynamic voltage frequency adjustment | |
| JP2015535994A5 (en) | ||
| US10216530B2 (en) | Method for mapping between virtual CPU and physical CPU and electronic device | |
| Zhao et al. | Low load DIDS task scheduling based on Q-learning in edge computing environment | |
| CN104102523A (en) | Method for migrating virtual machine and resource scheduling platform | |
| CN103595780A (en) | Cloud computing resource scheduling method based on repeat removing | |
| CN107911399B (en) | Elastic expansion method and system based on load prediction | |
| CN103970256B (en) | Energy saving method and system based on memory compaction and CPU dynamic frequency modulation | |
| CN103970879B (en) | Method and system for regulating storage positions of data blocks | |
| CN105607952A (en) | Virtual resource scheduling method and apparatus | |
| US10282182B2 (en) | Technologies for translation cache management in binary translation systems | |
| CN118567803A (en) | Acceleration method, device and storage medium based on data parallelism and task parallelism | |
| CN108123790B (en) | Side channel attack method and device | |
| CN113157384A (en) | Dynamic migration defense method and system for virtual machine | |
| CN105518568B (en) | Graphics processing system and power gating method thereof | |
| WO2015165045A1 (en) | Power control method and apparatus | |
| JP2015184883A5 (en) | ||
| CN106155782B (en) | Virtual machine migration method and device | |
| CN102073798B (en) | RNA (Ribonucleic acid) secondary structure parallel forecasting method on basis of multicore processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14890954 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 14890954 Country of ref document: EP Kind code of ref document: A1 |