CN115237244A - Control method, device, terminal device and storage medium for graphics processing unit - Google Patents
Control method, device, terminal device and storage medium for graphics processing unit Download PDFInfo
- Publication number
- CN115237244A CN115237244A CN202210783539.3A CN202210783539A CN115237244A CN 115237244 A CN115237244 A CN 115237244A CN 202210783539 A CN202210783539 A CN 202210783539A CN 115237244 A CN115237244 A CN 115237244A
- Authority
- CN
- China
- Prior art keywords
- gpu
- working
- voltage
- power consumption
- frequency
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/3296—Power saving characterised by the action undertaken by lowering the supply or operating voltage
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Power Sources (AREA)
Abstract
本申请公开了一种图形处理单元的控制方法、装置、终端设备及存储介质,属于终端控制技术领域。应用于终端设备,该方法包括:获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。
The present application discloses a control method, device, terminal device and storage medium of a graphics processing unit, which belong to the technical field of terminal control. Applied to a terminal device, the method includes: obtaining the working cycle and working voltage of a graphics processing unit GPU; obtaining the power consumption of the GPU in the working cycle according to the working cycle and the working voltage; adjusting the working frequency of the GPU and the working voltage of the GPU, In order to make the power consumption of the GPU in the working cycle reach the minimum value, so that the power consumption of the GPU in the working cycle can reach the minimum value. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, so as to avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improve the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
Description
技术领域technical field
本申请涉及终端控制技术领域,特别涉及一种图形处理单元的控制方法、装置、终端设备及存储介质。The present application relates to the technical field of terminal control, and in particular, to a control method, device, terminal device and storage medium for a graphics processing unit.
背景技术Background technique
随着信息技术和互联网技术的发展,用户在日常生活中对终端设备使用的现象已经非常普遍,终端设备在使用过程中如何提高续航能力是人们较为关注的问题。With the development of information technology and Internet technology, it has become very common for users to use terminal devices in daily life. How to improve the battery life of terminal devices during use is a problem that people pay more attention to.
目前,大多数的终端设备在进行功耗降低时,会采用动态电压频率调节(Dynamicvoltage and frequencyscaling,DVFS)机制对图形处理单元(Graphic ProcessUnit,GPU)的工作频率和工作电压进行调整。其中,该DVFS机制是根据当前GPU的利用率情况,调整GPU的工作频率,使得GPU的利用率维持在某一个目标值,以满足当前图形处理任务的计算能力需求。At present, most terminal devices use a dynamic voltage and frequency scaling (Dynamic voltage and frequency scaling, DVFS) mechanism to adjust the working frequency and working voltage of a graphics processing unit (Graphic Process Unit, GPU) when reducing power consumption. Among them, the DVFS mechanism is to adjust the working frequency of the GPU according to the current utilization of the GPU, so that the utilization of the GPU is maintained at a certain target value to meet the computing power requirements of the current graphics processing task.
对于上述已有的DVFS机制来说,基于GPU的功率对频率进行调整之后,虽然可以降低GPU的功率,但是GPU的耗电量依然会出现增加的现象,存在终端设备电量浪费的问题。For the above-mentioned existing DVFS mechanism, after the frequency is adjusted based on the power of the GPU, although the power of the GPU can be reduced, the power consumption of the GPU will still increase, and there is a problem of wasting the power of the terminal equipment.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术的问题,提高终端设备的续航能力,减少终端设备对电量的浪费,本申请实施例提供了一种图形处理单元的控制方法、装置、终端设备及存储介质。所述技术方案如下:In order to solve the problems in the prior art, improve the battery life of the terminal device, and reduce the waste of electricity by the terminal device, the embodiments of the present application provide a control method, device, terminal device and storage medium for a graphics processing unit. The technical solution is as follows:
一个方面,本申请提供了一种图形处理单元的控制方法,应用于终端设备,所述方法包括:In one aspect, the present application provides a method for controlling a graphics processing unit, which is applied to a terminal device, and the method includes:
获取所述图形处理单元GPU的工作周期以及工作电压;Obtain the working cycle and working voltage of the graphics processing unit GPU;
根据所述工作周期以及所述工作电压,获取所述GPU在所述工作周期内的耗电量;According to the working cycle and the working voltage, obtain the power consumption of the GPU in the working cycle;
调整所述GPU的工作频率以及所述GPU的工作电压,以使得所述GPU在所述工作周期内的耗电量达到最小值。The working frequency of the GPU and the working voltage of the GPU are adjusted so that the power consumption of the GPU in the working cycle reaches a minimum value.
一个方面,本申请提供了一种终端设备控制装置,应用于终端设备,所述装置包括:In one aspect, the present application provides an apparatus for controlling terminal equipment, which is applied to terminal equipment, and the apparatus includes:
第一获取模块,用于获取所述图形处理单元GPU的工作周期以及工作电压;a first obtaining module, configured to obtain the working cycle and working voltage of the graphics processing unit GPU;
第二获取模块,用于根据所述工作周期以及所述工作电压,获取所述GPU在所述工作周期内的耗电量;a second obtaining module, configured to obtain the power consumption of the GPU in the working cycle according to the working cycle and the working voltage;
参数调整模块,用于调整所述GPU的工作频率以及所述GPU的工作电压,以使得所述GPU在所述工作周期内的耗电量达到最小值。A parameter adjustment module, configured to adjust the working frequency of the GPU and the working voltage of the GPU, so that the power consumption of the GPU in the working cycle reaches a minimum value.
另一个方面,本申请提供了一种终端设备,所述终端设备包含处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如一个方面所述的图形处理单元的控制方法。In another aspect, the present application provides a terminal device, the terminal device includes a processor and a memory, the memory stores at least one instruction, at least a piece of program, code set or instruction set, the at least one instruction, all the The at least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the control method of the graphics processing unit according to one aspect.
另一个方面,本申请提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如一个方面所述的图形处理单元的控制方法。In another aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, all the The code set or instruction set is loaded and executed by the processor to implement the control method of the graphics processing unit according to one aspect.
另一方面,本申请实施例提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如上述一个方面所述的图形处理单元的控制方法。On the other hand, an embodiment of the present application provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the method for controlling a graphics processing unit according to the above-mentioned one aspect.
另一方面,本申请实施例提供了一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如上述一个方面所述的图形处理单元的控制方法。On the other hand, an embodiment of the present application provides an application publishing platform, the application publishing platform is used for publishing a computer program product, wherein, when the computer program product runs on a computer, the computer is made to execute the above one The control method of the graphics processing unit described in the aspect.
本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include at least:
本申请通过获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。The present application obtains the working cycle and working voltage of the graphics processing unit GPU; obtains the power consumption of the GPU during the working cycle according to the working cycle and working voltage; adjusts the working frequency of the GPU and the working voltage of the GPU, so that the GPU is in the working cycle The power consumption within the GPU reaches the minimum value, so that the power consumption of the GPU during the working cycle reaches the minimum value. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, so as to avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improve the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图;1 is a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application;
图2是本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图;2 is a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application;
图3是本申请一示例性实施例涉及的一种图形处理单元的结构框图;3 is a structural block diagram of a graphics processing unit involved in an exemplary embodiment of the present application;
图4是本申请一示例性实施例涉及的一种SOC系统架构的结构示意图;FIG. 4 is a schematic structural diagram of an SOC system architecture involved in an exemplary embodiment of the present application;
图5是本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图;5 is a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application;
图6是本申请一示例性实施例提供的图形处理单元的控制装置的结构框图;6 is a structural block diagram of a control device of a graphics processing unit provided by an exemplary embodiment of the present application;
图7是本申请一示例性实施例提供的一种终端设备的结构示意图。FIG. 7 is a schematic structural diagram of a terminal device provided by an exemplary embodiment of the present application.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.
随着科学技术的快速发展,各种各样的终端设备已经应用在人们的日常生活中,人们在工作中、生活中、学习中都需要使用终端设备,比如,人们利用终端设备对周围环境进行拍照,利用终端设备对工作中的数据进行记录等。随着人们使用终端设备的场景越来越多,万物互联的推广与使用,终端设备中提高续航能力越来越重要。With the rapid development of science and technology, various terminal devices have been used in people's daily life. People need to use terminal devices in work, life and study. Take pictures, use terminal equipment to record data in work, etc. With more and more scenarios where people use terminal devices and the promotion and use of the Internet of Everything, it is more and more important to improve battery life in terminal devices.
目前,终端设备主要的系统有安卓(Android)系统,iOS系统,Linux系统等,对于各种内核系统的终端设备,各自的中央处理单元(Central Processing Unit,CPU),图像处理单元GPU等处理器在终端设备运行过程中主要作为任务处理单元进行处理,相应的,这些任务处理单元在工作时对终端设备的电量有消耗。At present, the main systems of terminal devices include Android system, iOS system, Linux system, etc. For terminal devices of various kernel systems, their respective central processing unit (Central Processing Unit, CPU), image processing unit GPU and other processors During the operation of the terminal device, it is mainly processed as a task processing unit, and accordingly, these task processing units consume the power of the terminal device during operation.
在实际应用中,为了提高终端设备的续航能力,为延长手机的电池使用时间,终端中的系统级芯片(System on Chip,SOC)设计采用多种方案降低功耗。其中,大多数终端设备中的图形处理器都会采用DVFS机制调整工作频率和工作电压,从而降低GPU工作时的功耗水平。其中,DVFS机制是根据当前GPU的利用率情况,调整GPU的工作频率,使得GPU的利用率维持在某一个目标值,以满足当前图形处理任务的计算能力需求。In practical applications, in order to improve the battery life of the terminal device and prolong the battery life of the mobile phone, the system-on-chip (SOC) design in the terminal adopts various schemes to reduce power consumption. Among them, the graphics processor in most terminal equipment will use the DVFS mechanism to adjust the working frequency and the working voltage, thereby reducing the power consumption level when the GPU is working. Among them, the DVFS mechanism is to adjust the working frequency of the GPU according to the current utilization of the GPU, so that the utilization of the GPU is maintained at a certain target value to meet the computing power requirements of the current graphics processing task.
即,上述DVFS技术的频率电压调整方案是尽可能降低图形处理器的工作频率,以满足负载任务的处理需求,这种调整方案的本质是调整工作频率以使得GPU以最低功率运行能够满足负载任务的处理需求即可。但是,实际生活中,终端设备的使用场景是受限于电池容量的,不断降低GPU的工作功率相当于不断降低GPU的工作主频,在GPU的工作电压降到最低时,如果继续降低工作功率,反而会导致GPU的耗电量的增加,存在终端设备电量浪费的问题。That is, the frequency and voltage adjustment scheme of the above DVFS technology is to reduce the operating frequency of the graphics processor as much as possible to meet the processing requirements of the load task. The essence of this adjustment scheme is to adjust the operating frequency so that the GPU can run at the lowest power to meet the load task. processing needs. However, in real life, the usage scenarios of terminal equipment are limited by the battery capacity. Continuously reducing the working power of the GPU is equivalent to continuously reducing the working frequency of the GPU. When the working voltage of the GPU is reduced to the lowest level, if the working power continues to be reduced , on the contrary, it will lead to an increase in the power consumption of the GPU, and there is a problem of wasting the power of the terminal device.
为了解决上述相关技术中存在的问题,提高终端设备的续航能力,减少终端设备对电量的浪费,本申请提供了一种图形处理单元的控制方法,可以基于GPU的耗电量对工作频率和工作电压进行调整,达到调整工作频率和工作电压之后,可以实现GPU对电池的耗电量是最低的情况。In order to solve the problems existing in the above-mentioned related technologies, improve the battery life of the terminal device, and reduce the waste of power by the terminal device, the present application provides a control method for a graphics processing unit, which can control the working frequency and the working frequency based on the power consumption of the GPU. The voltage is adjusted, and after the operating frequency and operating voltage are adjusted, the power consumption of the GPU on the battery can be minimized.
请参考图1,其示出了本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图,该图形处理单元的控制方法可以用于终端设备中。如图1所示,该图形处理单元的控制方法可以包括如下步骤:Please refer to FIG. 1 , which shows a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application, and the method for controlling a graphics processing unit can be used in a terminal device. As shown in FIG. 1, the control method of the graphics processing unit may include the following steps:
步骤101,获取图形处理单元GPU的工作周期以及工作电压。Step 101: Obtain the working cycle and working voltage of the graphics processing unit GPU.
可选的,本申请中提到的终端设备可以是手机、平板电脑,笔记本电脑,智能眼镜,智能手表,MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3),MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器,台式电脑,膝上型便携计算机,智能家居设备等具有GPU的电子设备。Optionally, the terminal device mentioned in this application may be a mobile phone, a tablet computer, a notebook computer, smart glasses, a smart watch, and an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV) players, desktop computers, laptop computers, smart home devices and other electronic devices with GPU.
在终端设备的GPU运行过程中,各种数据处理任务需要GPU来处理,比如,数据处理任务可以是对图像的渲染、展示等。在本方案中,终端设备可以通过CPU获取GPU的工作周期以及工作电压,也可以通过GPU自身获取自身的工作周期以及工作电压。本方案对获取GPU的工作周期以及工作电压的方式并不限定。During the running process of the GPU of the terminal device, various data processing tasks need to be processed by the GPU, for example, the data processing tasks may be rendering and displaying of images. In this solution, the terminal device can obtain the working cycle and working voltage of the GPU through the CPU, and can also obtain its own working cycle and working voltage through the GPU itself. This solution does not limit the manner of obtaining the working cycle and working voltage of the GPU.
步骤102,根据工作周期以及工作电压,获取GPU在工作周期内的耗电量。Step 102: Obtain the power consumption of the GPU in the working cycle according to the working cycle and the working voltage.
可选的,终端设备可以将获取到的GPU的工作周期以及工作电压,带入至耗电量的计算公式中,从而计算得到GPU在工作周期内的耗电量。比如,终端设备的GPU的耗电量可以写为下面函数:Optionally, the terminal device may bring the obtained working cycle and working voltage of the GPU into the calculation formula of power consumption, so as to calculate the power consumption of the GPU in the working cycle. For example, the power consumption of the GPU of the terminal device can be written as the following function:
e=g(f,v,c,w);e=g(f, v, c, w);
在上述公式中,f表示GPU的工作频率,v表示GPU的工作电压,c表示GPU中运算单元的数量,w表示GPU的工作负载,e表示GPU的耗电量。其中,对于终端设备的GPU来说,其当前的工作周期可以是t,GPU在一个工作周期t内的耗电量可以用e表示。c可以是默认的固定数量,也可以是进行调整后的当前运行的运算单元的数量。In the above formula, f represents the operating frequency of the GPU, v represents the operating voltage of the GPU, c represents the number of computing units in the GPU, w represents the workload of the GPU, and e represents the power consumption of the GPU. Wherein, for the GPU of the terminal device, its current working cycle may be t, and the power consumption of the GPU in one working cycle t may be represented by e. c can be a default fixed number or an adjusted number of currently running arithmetic units.
步骤103,调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。Step 103: Adjust the working frequency of the GPU and the working voltage of the GPU, so that the power consumption of the GPU during the working cycle reaches the minimum value, so that the power consumption of the GPU during the working cycle reaches the minimum value.
可选的,在本方案中,通过调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。在调整过程中,终端设备可以对工作频率进行调整,并根据调整后的工作频率以及电压计算公式,获取目标电压,目标电压是调整后的工作频率对应的工作电压。其中,电压计算公式是:v=k2*f。其中,k2是常数,k2可以由开发人员或者运维人员根据终端设备的系统级芯片的工艺参数设定。可选的,本步骤相当于通过对f和v进行调整,对上述e求取最小值的过程。Optionally, in this solution, by adjusting the working frequency of the GPU and the working voltage of the GPU, the power consumption of the GPU during the working cycle can reach the minimum value, so that the power consumption of the GPU during the working cycle can reach the minimum value. . During the adjustment process, the terminal device can adjust the working frequency, and obtain the target voltage according to the adjusted working frequency and the voltage calculation formula. The target voltage is the working voltage corresponding to the adjusted working frequency. Among them, the voltage calculation formula is: v=k2*f. Among them, k2 is a constant, and k2 can be set by developers or operation and maintenance personnel according to the process parameters of the system-on-chip of the terminal device. Optionally, this step is equivalent to the process of obtaining the minimum value of the above e by adjusting f and v.
综上所述,本申请通过获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。To sum up, the present application obtains the working cycle and working voltage of the graphics processing unit GPU; obtains the power consumption of the GPU during the working cycle according to the working cycle and working voltage; adjusts the working frequency of the GPU and the working voltage of the GPU to The power consumption of the GPU in the work cycle is minimized, so that the power consumption of the GPU in the work cycle is minimized. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, so as to avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improve the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
在一种可能实现的方式中,本申请中还可以对GPU的运算单元的数量进行调整,提高终端设备的GPU的能量效率。In a possible implementation manner, in this application, the number of computing units of the GPU may also be adjusted to improve the energy efficiency of the GPU of the terminal device.
请参考图2,其示出了本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图,该图形处理单元的控制方法可以用于终端设备中。如图2所示,该图形处理单元的控制方法可以包括如下步骤:Please refer to FIG. 2 , which shows a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application, and the method for controlling a graphics processing unit can be used in a terminal device. As shown in FIG. 2, the control method of the graphics processing unit may include the following steps:
步骤201,获取图形处理单元GPU的工作周期以及工作电压。
可选的,t表示工作周期,终端设备获取到的GPU的工作周期t可以用以下公式表示:t=k1*(w/f),其中,w表示GPU的工作负载,f表示GPU的当前工作频率。即,终端设备可以根据GPU的当前工作频率以及GPU的工作负载,计算出GPU的当前工作周期。其中,k1与上述k2类似,也是由开发人员或者运维人员根据终端设备的系统级芯片的工艺参数设定。另外,GPU的工作电压可以用v表示,GPU的工作电压与GPU的工作频率之间的关系(v=k2*f)可以参考上述图1中步骤103中的描述,此处不再赘述。Optionally, t represents the work cycle, and the work cycle t of the GPU obtained by the terminal device can be represented by the following formula: t=k1*(w/f), where w represents the workload of the GPU, and f represents the current work of the GPU frequency. That is, the terminal device can calculate the current working cycle of the GPU according to the current working frequency of the GPU and the workload of the GPU. Among them, k1 is similar to the above k2, and is also set by developers or operation and maintenance personnel according to process parameters of the system-on-chip of the terminal device. In addition, the working voltage of the GPU can be represented by v, and the relationship between the working voltage of the GPU and the working frequency of the GPU (v=k2*f) can refer to the description in
步骤202,获取GPU的顶模的能量利用率以及子核能量利用率,子核能量利用率是GPU中各个正在运行的运算单元的能量利用率的平均利用率。Step 202: Obtain the energy utilization rate of the top die and the sub-core energy utilization rate of the GPU, where the sub-core energy utilization rate is the average utilization rate of the energy utilization rate of each running computing unit in the GPU.
其中,GPU的顶模的能量利用率是GPU的顶模对电池能量的利用率。GPU中各个正在运行的运算单元的能量利用率是GPU中各个正在运行的运算单元对电池能量的利用率。The energy utilization rate of the top mold of the GPU is the utilization rate of the battery energy by the top mold of the GPU. The energy utilization rate of each running computing unit in the GPU is the utilization rate of the battery energy by each running computing unit in the GPU.
可选的,请参考图3,其示出了本申请一示例性实施例涉及的一种图形处理单元的结构框图。如图3所示,在图形处理单元300中包含了顶模301,各个运算单元302。在上述图3中,图形处理单元300可以分为一个顶模(Topmodule)301以及各个运算单元(core)302,其中顶模301可以负责终端设备中的内存访问、几何处理等工作,各个运算单元302可以负责终端设备中的Fragment处理等工作。顶模301的时钟为fTOP,各个运算单元302使用同一个时钟fCORE,终端设备对顶模301的时钟与各个运算单元302的时钟相互独立控制。Optionally, please refer to FIG. 3 , which shows a structural block diagram of a graphics processing unit involved in an exemplary embodiment of the present application. As shown in FIG. 3 , the
其中,GPU中可以包含一个顶模和多个运算单元,在本方案中,终端设备还可以获取顶模的能量利用率以及子核能量利用率。比如,终端设备通过GPU的性能计数器(performance counter)对顶模301的能量利用率进行计算,得到αTOP,通过GPU的性能计数器对各个正在运行的运算单元302的利用率进行计算,并根据各个正在运行的运算单元302的利用率获取平均值,从而得到GPU中各个正在运行的运算单元的能量利用率的平均利用率αCORE。The GPU may include one top model and multiple computing units. In this solution, the terminal device can also obtain the energy utilization rate of the top mold and the energy utilization rate of the sub-cores. For example, the terminal device calculates the energy utilization rate of the top die 301 through the performance counter of the GPU to obtain αTOP, and calculates the utilization rate of each running
可选的,本方案中终端设备的GPU的运算单元的数量可以是默认的固定数量,也可以是灵活调整的。即,如果GPU中运行的运算单元的数量是固定数量的,本方案可以跳过步骤202直接进入步骤204,如果GPU中运行的运算单元的数量是灵活调整的,可以进入步骤203。也就是说,如果GPU中运行的运算单元的数量是固定数量的,在上述e=g(f,v,c,w)中,c相当于一个常数。Optionally, in this solution, the number of computing units of the GPU of the terminal device may be a fixed number by default, or may be flexibly adjusted. That is, if the number of operation units running in the GPU is fixed, the solution can skip
步骤203,根据顶模的能量利用率以及子核能量利用率,调整GPU中各个正在运行的运算单元的数量。
可选的,如果GPU中的运算单元的个数可以单独控制打开或关闭其工作电源,由于不同运算单元的处理能力以及完成的子工作负载不同,相互之间涉及到很多配合,本方案可以针对不同情况获取一个最优的运算单元工作数目,从而使得能量效率最高。Optionally, if the number of computing units in the GPU can be individually controlled to turn on or off its working power, due to the different processing capabilities of different computing units and the different sub-workloads completed, a lot of cooperation is involved. In different situations, an optimal number of operation units can be obtained, so that the energy efficiency is the highest.
可选的,终端设备根据顶模的能量利用率以及子核能量利用率,调整GPU中各个正在运行的运算单元的数量的方式可以如下:根据顶模的能量利用率以及子核能量利用率,计算第一比例值;当第一比例值大于第一阈值时,在GPU中各个正在运行的运算单元的数量基础上增加第一预设数量个运算单元;当第一比例值小于第二阈值时,在GPU中各个正在运行的运算单元的数量基础上减少第一预设数量个运算单元。其代码可以如下:Optionally, the terminal device may adjust the number of running computing units in the GPU according to the energy utilization rate of the top mold and the energy utilization rate of the sub-cores as follows: according to the energy utilization rate of the top mold and the energy utilization rate of the sub-nuclei, Calculate the first proportion value; when the first proportion value is greater than the first threshold value, add a first preset number of operation units on the basis of the number of running operation units in the GPU; when the first proportion value is less than the second threshold value , on the basis of the number of each running operation unit in the GPU, the first preset number of operation units is reduced. Its code can be as follows:
Defineβ=k*αCORE/αTOP Defineβ=k*α CORE /α TOP
Ifβ>βU Ifβ>β U
Iecrease core number,Ncore=Ncore+ΔIecrease core number, N core =N core +Δ
Else Ifβ<βD Else Ifβ <βD
Decrease top module frequency,Ncore=Ncore-ΔDecrease top module frequency,N core =N core -Δ
EndifEndif
其中,β表示第一比例值,第一阈值是βU,第二阈值是βD,第一预设数量是Δ,Ncore是正在运行的运算单元的数量。k是常数,可以由开发人员或者运维人员根据终端设备的系统级芯片的工艺参数设定。即,终端设备将获取到的顶模的能量利用率以及子核能量利用率带入上述β的计算公式中,得到第一比例值β,判断β与第一阈值,第二阈值之间的大小关系,当β>第一阈值时,在GPU中各个正在运行的运算单元的数量基础上增加Δ个运算单元。当β<第二阈值时,在GPU中各个正在运行的运算单元的数量基础上减少Δ个运算单元。Wherein, β represents a first proportional value, the first threshold is β U , the second threshold is β D , the first preset number is Δ, and N core is the number of running operation units. k is a constant, which can be set by developers or operation and maintenance personnel according to the process parameters of the system-on-chip of the terminal device. That is, the terminal device brings the obtained energy utilization rate of the top mold and the energy utilization rate of the sub-nuclei into the above calculation formula of β, obtains the first proportional value β, and determines the size between β and the first threshold and the second threshold. relationship, when β>the first threshold, Δ computing units are added on the basis of the number of running computing units in the GPU. When β<the second threshold, Δ operation units are reduced based on the number of each running operation unit in the GPU.
比如,βU可以是3,βD可以是1/3,Δ取值为2,若Ncore是5,计算得到的β是4时,则在正在运行的运算单元的数量基础上增加2个,那么调整后的正在运行的运算单元的数量是7。若Ncore是5,计算得到的β是0.2时,则在正在运行的运算单元的数量基础上减少2个,那么调整后的正在运行的运算单元的数量是3。可选的,当β处于第二阈值至第一阈值之间时,终端设备可以保持正在运行的运算单元的数量不变。即,当第一比例值大于第一阈值时,说明GPU的顶模的能量利用率较高,可以增加运算单元的数目以增强GPU的处理能力,提高GPU的能量效率。当第一比例值小于第二阈值时,说明GPU的顶模的能量利用率较低,可以减少运算单元的数目以增强GPU的处理能力,提高GPU的能量效率。For example, β U can be 3, β D can be 1/3, and Δ is 2. If N core is 5 and the calculated β is 4, add 2 based on the number of running operation units. , then the adjusted number of running arithmetic units is 7. If N core is 5 and the calculated β is 0.2, then the number of running computing units is reduced by 2, and the adjusted number of running computing units is 3. Optionally, when β is between the second threshold and the first threshold, the terminal device may keep the number of running computing units unchanged. That is, when the first proportional value is greater than the first threshold, it means that the energy utilization rate of the top model of the GPU is relatively high, and the number of computing units can be increased to enhance the processing capability of the GPU and improve the energy efficiency of the GPU. When the first proportional value is less than the second threshold, it means that the energy utilization rate of the top model of the GPU is low, and the number of computing units can be reduced to enhance the processing capability of the GPU and improve the energy efficiency of the GPU.
在一种可能实现的方式中,在减少运算单元的数量时,终端设备可以按照如下方式:当第一比例值小于第二阈值时,终端设备可以确定GPU中各个正在运行的运算单元的任务优先级;按照任务优先级从低到高的顺序,将GPU中各个正在运行的运算单元依次减少第一预设数量个运算单元。即,当第一比例值小于第二阈值时,终端设备可以获取各个正在运行的运算单元的任务优先级。比如,各个正在运行的运算单元分别是运算单元一,运算单元二,运算单元三,运算单元四,运算单元五,这五个运算单元各自处理的任务是任务一,任务二,任务三,任务四,任务五,这五个运算单元各自处理的任务按照任务优先级从低到高的顺序排列依次是任务一,任务四,任务五,任务三,任务二,当终端设备计算的第一比例值小于第二阈值时,获取到各个正在运行的运算单元的任务优先级,仍然以上述Δ取值为2为例,减少运算单元的数量时,将GPU中运算单元一和运算单元四关闭。In a possible implementation manner, when reducing the number of computing units, the terminal device may follow the following manner: when the first proportional value is smaller than the second threshold, the terminal device may determine the priority of the tasks of each running computing unit in the GPU level; according to the order of task priority from low to high, each running operation unit in the GPU is sequentially reduced by a first preset number of operation units. That is, when the first proportional value is smaller than the second threshold, the terminal device may acquire the task priority of each running computing unit. For example, each running operation unit is operation unit 1, operation unit 2, operation unit 3, operation unit 4, operation unit 5. The tasks processed by these five operation units are task 1, task 2, task 3, and task. Four, task five, the tasks processed by these five computing units are arranged in order of task priority from low to high: task one, task four, task five, task three, task two, when the terminal device calculates the first proportion When the value is less than the second threshold, the task priority of each running computing unit is obtained, still taking the value of Δ as 2 as an example, when reducing the number of computing units, turning off computing unit 1 and computing unit 4 in the GPU.
步骤204,根据工作周期,工作电压以及GPU中各个正在运行的运算单元的数量,获取GPU在工作周期内的耗电量。Step 204: Acquire the power consumption of the GPU in the working cycle according to the working cycle, the working voltage and the number of each running computing unit in the GPU.
可选的,仍然以上述e表示GPU在工作周期内的耗电量,终端设备将工作周期,工作电压以及GPU中各个正在运行的运算单元的数量带入上述公式即可得到,此处不再赘述。Optionally, the above e is still used to represent the power consumption of the GPU in the working cycle. The terminal device can obtain the working cycle, the working voltage and the number of running computing units in the GPU into the above formula. Repeat.
步骤205,调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。Step 205: Adjust the working frequency of the GPU and the working voltage of the GPU, so that the power consumption of the GPU during the working cycle reaches the minimum value, so that the power consumption of the GPU during the working cycle reaches the minimum value.
可选的,以上述终端设备的GPU的耗电量可以写为下面函数:e=g(f,v,c,w)为例,由于f表示GPU的工作频率,v表示GPU的工作电压,c表示GPU中运算单元的数量,w表示GPU的工作负载,e表示GPU的耗电量。由于在DVFS机制中f和v之间存在线性映射关系:v=k2*f,因此可以将e=g(f,v,c,w)简化为e=g(f,c,w),本方案的目标是求取 Optionally, the power consumption of the GPU of the above-mentioned terminal device can be written as the following function: e=g(f, v, c, w) as an example, since f represents the working frequency of the GPU, and v represents the working voltage of the GPU, c represents the number of computing units in the GPU, w represents the workload of the GPU, and e represents the power consumption of the GPU. Since there is a linear mapping relationship between f and v in the DVFS mechanism: v=k2*f, e=g(f, v, c, w) can be simplified to e=g(f, c, w), this The goal of the program is to obtain
例如,终端设备通过上述方式获取到的GPU的工作周期如下:For example, the working cycle of the GPU obtained by the terminal device in the above manner is as follows:
那么,GPU的工作电压为v=k2*f,因此,GPU的动态功耗可以按照如下公式表示:Then, the working voltage of the GPU is v=k2*f, therefore, the dynamic power consumption of the GPU can be expressed according to the following formula:
Pdyn=k3v2f;P dyn = k 3 v 2 f;
那么,GPU的动态功耗对应的耗电量为Edyn=Pdynt=k4f2w;Then, the power consumption corresponding to the dynamic power consumption of the GPU is Edyn =P dyn t=k 4 f 2 w;
可选的,本方案中还考虑了GPU的静态功耗,GPU的静态功耗可以按照如下公式表示:Optionally, the static power consumption of the GPU is also considered in this solution, and the static power consumption of the GPU can be expressed according to the following formula:
Plkg=k5v2;P lkg = k 5 v 2 ;
那么,GPU的静态功耗对应的耗电量为Elkg=Plkgt=k6fw;Then, the power consumption corresponding to the static power consumption of the GPU is E lkg =P lkg t=k 6 fw;
GPU的总耗电量为e=Edyn+Elkg;The total power consumption of the GPU is e=E dyn +E lkg ;
本方案中对DVFS机制进行了调整,选择满足工作负载的最低工作频率时对应的能量消耗最小,即,求取上面k3,k4,k5均为常数,也都可以由开发人员或者运维人员根据终端设备的系统级芯片的工艺参数设定。In this scheme, the DVFS mechanism is adjusted, and the corresponding energy consumption is the smallest when the lowest operating frequency that satisfies the workload is selected, that is, to obtain The above k3, k4, and k5 are all constants, and they can also be set by developers or operation and maintenance personnel according to the process parameters of the system-level chip of the terminal device.
在上述图3中,GPU中包含顶模以及运算单元,在本步骤中,终端设备可以按照如下方式进行调整:将GPU的顶模的工作频率调整至第一频率以及将GPU的顶模的工作电压调整至第一电压,以使得GPU的顶模在工作周期内的耗电量达到最小值;以及,将GPU的运算单元的工作频率调整至第二频率以及将GPU的运算单元的工作电压调整至第二电压,以使得GPU的运算单元在工作周期内的耗电量达到最小值。In the above-mentioned FIG. 3 , the GPU includes a top mode and an arithmetic unit. In this step, the terminal device can be adjusted as follows: adjusting the working frequency of the GPU top mode to the first frequency and adjusting the working frequency of the GPU top mode The voltage is adjusted to the first voltage, so that the power consumption of the top die of the GPU reaches the minimum value in the working cycle; to the second voltage, so that the power consumption of the computing unit of the GPU in the working cycle reaches the minimum value.
可选的,本方案中,将GPU的顶模的工作频率调整至第一频率以及将GPU的顶模的工作电压调整至第一电压,以使得GPU的顶模在工作周期内的耗电量达到最小值的过程可以如下:Optionally, in this solution, the working frequency of the top die of the GPU is adjusted to the first frequency and the working voltage of the top die of the GPU is adjusted to the first voltage, so as to make the power consumption of the top die of the GPU in the working cycle. The process of reaching the minimum value can be as follows:
终端设备可以将上述获取到的顶模的能量利用率αTOP与第五阈值进行比较,当αTOP>第五阈值时,增加顶模的工作频率,且根据v=k2*f获取调整后的工作频率对应的顶模的工作电压,从而对顶模的工作电压进行调整。将上述获取到的顶模的能量利用率αTOP与第六阈值进行比较,当αTOP<第六阈值时,减少顶模的工作频率,且根据v=k2*f获取调整后的工作频率对应的顶模的工作电压,从而对顶模的工作电压进行调整,当顶模的工作频率达到最低工作电压时能够工作的最高频率时,控制顶模的工作频率保持不变。其对应的代码可以如下:The terminal device can compare the obtained energy utilization rate αTOP of the top mold with the fifth threshold, and when αTOP > the fifth threshold, increase the operating frequency of the top mold, and obtain the adjusted operating frequency according to v=k2*f The working voltage of the corresponding top mold is adjusted, so as to adjust the operating voltage of the top mold. Compare the energy utilization rate αTOP of the top mold obtained above with the sixth threshold, when αTOP < the sixth threshold, reduce the operating frequency of the top mold, and obtain the adjusted operating frequency according to v=k2*f. The operating voltage of the top mold is adjusted to adjust the operating voltage of the top mold. When the operating frequency of the top mold reaches the highest frequency that can be operated at the lowest operating voltage, the operating frequency of the top mold is controlled to remain unchanged. The corresponding code can be as follows:
Ifα_TOP>α_(TOP_U)Ifα_TOP>α_(TOP_U)
Increase top module frequency,f_TOP,##增加顶模的工作频率Increase top module frequency, f_TOP, ##Increase the working frequency of the top module
AdjustTop module workingvoltage;##调整顶模的工作电压AdjustTop module workingvoltage; ##Adjust the working voltage of the top module
Else Ifα_TOP<α_(TOP_D)Else Ifα_TOP<α_(TOP_D)
Decrease top module frequency,f_TOP##减少顶模的工作频率Decrease top module frequency,f_TOP##Reduce the working frequency of the top module
Iff_TOP reaches f_(TOP_min),then maintain f_TOPat the minimumfrequency.##当顶模的工作频率达到最低工作电压时能够工作的最高频率时,控制顶模的工作频率保持不变Iff_TOP reaches f_(TOP_min),then maintain f_TOPat the minimumfrequency.##When the operating frequency of the top mold reaches the highest frequency that can work when the minimum operating voltage is reached, the operating frequency of the control top mold remains unchanged
AdjustTop module workingvoltage;##调整顶模的工作电压AdjustTop module workingvoltage; ##Adjust the working voltage of the top module
EndifEndif
其中,α_(TOP_U)是第五阈值,α_(TOP_D)是第六阈值,可选的,第五阈值和第六阈值可以由开发人员预先设置在终端设备中,比如,第五阈值可以是80%,第六阈值可以是30%。Wherein, α_(TOP_U) is the fifth threshold, and α_(TOP_D) is the sixth threshold. Optionally, the fifth threshold and the sixth threshold may be preset in the terminal device by the developer. For example, the fifth threshold may be 80 %, the sixth threshold may be 30%.
可选的,本方案中,将GPU的运算单元的工作频率调整至第二频率以及将GPU的运算单元的工作电压调整至第二电压,以使得GPU的运算单元在工作周期内的耗电量达到最小值的过程可以如下:Optionally, in this solution, the operating frequency of the computing unit of the GPU is adjusted to the second frequency and the operating voltage of the computing unit of the GPU is adjusted to the second voltage, so that the power consumption of the computing unit of the GPU in the working cycle is adjusted. The process of reaching the minimum value can be as follows:
可选的,终端设备还可以将上述获取到的子核能量利用率αCORE与第五阈值进行比较,当αCORE>第七阈值时,增加运算单元的工作频率,且根据v=k2*f获取调整后的工作频率对应的运算单元的工作电压,从而对运算单元的工作电压进行调整。将上述获取到的子核能量利用率αCORE与第八阈值进行比较,当αCORE<第八阈值时,减少运算单元的工作频率,且根据v=k2*f获取调整后的工作频率对应的运算单元的工作电压,从而对运算单元的工作电压进行调整,当运算单元的工作频率达到最低工作电压时能够工作的最高频率时,控制运算单元的工作频率保持不变。其对应的代码可以如下:Optionally, the terminal device may also compare the obtained sub-core energy utilization αCORE with the fifth threshold, and when αCORE > the seventh threshold, increase the operating frequency of the computing unit, and obtain the adjustment according to v=k2*f. The operating voltage of the operation unit corresponding to the later operating frequency is adjusted, so as to adjust the operation voltage of the operation unit. Compare the obtained sub-core energy utilization αCORE with the eighth threshold, when αCORE<the eighth threshold, reduce the operating frequency of the arithmetic unit, and obtain the arithmetic unit corresponding to the adjusted operating frequency according to v=k2*f The operating voltage of the arithmetic unit is adjusted, and when the operating frequency of the arithmetic unit reaches the highest frequency that can work when the minimum operating voltage is reached, the operating frequency of the arithmetic unit is controlled to remain unchanged. The corresponding code can be as follows:
Ifα_CORE>α_(CORE_U)Ifα_CORE>α_(CORE_U)
Increase core module frequency,f_CORE##增加运算单元的工作频率Increase core module frequency,f_CORE##Increase the operating frequency of the operation unit
Adjust core workingvoltage;##调整运算单元的工作电压Adjust core workingvoltage; ##Adjust the working voltage of the operation unit
Else Ifα_CORE<α_(CORE_D)Else Ifα_CORE<α_(CORE_D)
Decrease core module frequency,f_CORE##减少运算单元的工作频率Decrease core module frequency,f_CORE##Reduce the operating frequency of the operation unit
Iff_CORE reaches f_(CORE_min),then maintain f_COREat the minimumfrequency.当运算单元的工作频率达到最低工作电压时能够工作的最高频率时,控制运算单元的工作频率保持不变Iff_CORE reaches f_(CORE_min), then maintain f_CORE at the minimumfrequency. When the operating frequency of the operation unit reaches the highest frequency that can work when the minimum operating voltage is reached, the operating frequency of the control operation unit remains unchanged
Adjustcoreworkingvoltage;##调整运算单元的工作电压Adjustcoreworkingvoltage; ##Adjust the working voltage of the operation unit
EndifEndif
其中,α_(CORE_U)是第七阈值,α_(CORE_D)是第八阈值,可选的,第七阈值和第八阈值可以由开发人员预先设置在终端设备中,比如,第七阈值可以是80%,第八阈值可以是30%。Wherein, α_(CORE_U) is the seventh threshold, and α_(CORE_D) is the eighth threshold. Optionally, the seventh threshold and the eighth threshold can be preset in the terminal device by the developer. For example, the seventh threshold can be 80 %, the eighth threshold may be 30%.
在上述内容中,由于实际GPU有最低工作电压的限制,因此,当GPU中的顶模的工作电压达到最低工作电压,GPU中的运算单元的工作电压达到最低工作电压时,上述v也可以看做是一个常数,因此通过推导可以得到GPU的动态功耗对应的耗电量为Edyn=Pdynt=k4w;In the above content, since the actual GPU is limited by the minimum working voltage, when the working voltage of the top die in the GPU reaches the minimum working voltage and the working voltage of the computing unit in the GPU reaches the minimum working voltage, the above v can also be seen. Do is a constant, so the power consumption corresponding to the dynamic power consumption of the GPU can be obtained by derivation as E dyn =P dyn t=k 4 w;
GPU的静态功耗对应的耗电量为 The power consumption corresponding to the static power consumption of the GPU is
因此,本方案在最低工作电压时保持工作频率不变,防止一直降低工作频率带来的增加静态功耗的问题,即,在调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值的过程中,当GPU的工作电压达到最低工作电压时,控制GPU的工作频率保持不变。Therefore, this solution keeps the working frequency unchanged at the lowest working voltage to prevent the problem of increasing static power consumption caused by the constant reduction of the working frequency. When the power consumption of the GPU reaches the minimum value, when the working voltage of the GPU reaches the minimum working voltage, the working frequency of the GPU is controlled to remain unchanged.
在一种可能实现的方式中,终端设备还可以在将GPU的顶模的工作频率调整至第一频率以及将GPU的顶模的工作电压调整至第一电压,以使得GPU的顶模在工作周期内的耗电量达到最小值之后,获取调整后的GPU的顶模的工作频率以及调整前的GPU的顶模的工作频率;当调整后的GPU的顶模的工作频率与调整前的GPU的顶模的工作频率之间的比值大于第三阈值时,增加双倍速率DDR存储系统的工作频率;当调整后的GPU的顶模的工作频率与调整前的GPU的顶模的工作频率之间的比值小于第四阈值时,减少DDR存储系统的工作频率;当调整后的GPU的顶模的工作频率与调整前的GPU的顶模的工作频率之间的比值处于第四阈值与第三阈值范围之内时,保持DDR存储系统的工作频率不变;其中,第三阈值大于第四阈值。In a possible implementation manner, the terminal device may further adjust the working frequency of the top die of the GPU to the first frequency and the working voltage of the top die of the GPU to the first voltage, so that the top die of the GPU is working After the power consumption in the cycle reaches the minimum value, obtain the working frequency of the adjusted GPU's top mode and the pre-adjustment GPU's top mode's operating frequency; When the ratio between the operating frequencies of the top mode of the GPU is greater than the third threshold, the operating frequency of the double-rate DDR storage system is increased; When the ratio between the two is less than the fourth threshold, the operating frequency of the DDR storage system is reduced; when the ratio between the operating frequency of the adjusted GPU's top mode and the pre-adjusted GPU's top mode operating frequency is between the fourth threshold and the third When the threshold value is within the range, the operating frequency of the DDR memory system is kept unchanged; wherein, the third threshold value is greater than the fourth threshold value.
可选的,本申请中GPU可以处于SOC系统架构中,GPU处理的任务还可以涉及SOC系统中的其他子系统共同完成,当GPU处理的负载发生变化时,其他子系统的频率也需要进行调整以提高SOC的能量效率。与GPU相关的子系统包括双倍速率(Double Data Rate,DDR)存储系统,CPU系统以及Display显示系统。Optionally, in this application, the GPU may be in the SOC system architecture, and the tasks processed by the GPU may also involve other subsystems in the SOC system to be completed together. When the load processed by the GPU changes, the frequencies of other subsystems also need to be adjusted. to improve the energy efficiency of the SOC. Subsystems related to GPU include Double Data Rate (DDR) storage system, CPU system and Display display system.
请参考图4,其示出了本申请一示例性实施例涉及的一种SOC系统架构的结构示意图。如图4所示,在SOC架构400中包含了CPU 401,GPU 402,Display显示系统403以及DDR存储系统404。终端设备还可以在将GPU的顶模的工作频率调整至第一频率以及将GPU的顶模的工作电压调整至第一电压,以使得GPU的顶模在工作周期内的耗电量达到最小值之后,可以继续对DDR存储系统的工作频率进行调整,以提高SOC的能量效率。Please refer to FIG. 4 , which shows a schematic structural diagram of an SOC system architecture involved in an exemplary embodiment of the present application. As shown in FIG. 4 , the
可选的,对DDR存储系统的工作频率进行调整的代码可以如下:Optionally, the code for adjusting the operating frequency of the DDR storage system can be as follows:
If f_(TOP_curr)/f_(TOP_prev)>f_(TOP_ratio_u)If f_(TOP_curr)/f_(TOP_prev)>f_(TOP_ratio_u)
IncreaseDDRfrequency,f_(DDR_freq);##增加DDR存储系统的工作频率IncreaseDDRfrequency,f_(DDR_freq);##Increase the working frequency of the DDR storage system
Adjust DDR workingvoltage;##调整DDR存储系统的工作电压Adjust DDR workingvoltage; ##Adjust the working voltage of the DDR storage system
Else if f_(TOP_curr)/f_(TOP_prev)<f_(TOP_ratio_d)Else if f_(TOP_curr)/f_(TOP_prev)<f_(TOP_ratio_d)
DecreaseDDRfrequency,f_(DDR_freq);##减少DDR存储系统的工作频率DecreaseDDRfrequency,f_(DDR_freq);##Decrease the operating frequency of the DDR memory system
Adjust DDR workingvoltage;##调整DDR存储系统的工作电压Adjust DDR workingvoltage; ##Adjust the working voltage of the DDR storage system
ElseElse
Maintain DDR frequency.##保持DDR存储系统的工作频率Maintain DDR frequency.##Maintain the operating frequency of the DDR storage system
EndifEndif
其中,f_(TOP_curr)是调整后的GPU的顶模的工作频率,f_(TOP_prev)是调整前的GPU的顶模的工作频率,f_(TOP_ratio_u)是第三阈值,f_(TOP_ratio_d)是第四阈值,可选的,第三阈值和第四阈值可以由开发人员预先设置在终端设备中,比如,第三阈值可以是2,第四阈值可以是1/2。可选的,每次对DDR存储系统增加或者减少的工作频率可以是当前DDR存储系统的工作频率的一半。Among them, f_(TOP_curr) is the operating frequency of the top mode of the GPU after adjustment, f_(TOP_prev) is the operating frequency of the top mode of the GPU before adjustment, f_(TOP_ratio_u) is the third threshold, and f_(TOP_ratio_d) is the fourth The threshold, optionally, the third threshold and the fourth threshold may be preset in the terminal device by the developer, for example, the third threshold may be 2, and the fourth threshold may be 1/2. Optionally, the operating frequency of the DDR memory system that is increased or decreased each time may be half of the current operating frequency of the DDR memory system.
需要说明的是,本方案也可以对SOC架构中的显示系统以及CPU的工作电压和工作频率进行调整,从而提高SOC的能量效率,其方式可以参考对DDR存储系统的调整方式,此处不再赘述。It should be noted that this solution can also adjust the operating voltage and operating frequency of the display system and the CPU in the SOC architecture, thereby improving the energy efficiency of the SOC. The method can refer to the adjustment method for the DDR storage system, which is not repeated here. Repeat.
综上所述,本申请通过获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。To sum up, the present application obtains the working cycle and working voltage of the graphics processing unit GPU; obtains the power consumption of the GPU during the working cycle according to the working cycle and working voltage; adjusts the working frequency of the GPU and the working voltage of the GPU to The power consumption of the GPU in the work cycle is minimized, so that the power consumption of the GPU in the work cycle is minimized. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, so as to avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improve the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
另外,本申请通过调整GPU中运算单元的数量,可以灵活改变GPU对负载的执行力度,提高终端设备的GPU的能量效率。本申请还可以对SOC系统架构上的其他子系统的工作频率和工作电压进行调整,提高了SOC的能量效率。In addition, by adjusting the number of computing units in the GPU, the application can flexibly change the execution strength of the GPU on the load, and improve the energy efficiency of the GPU of the terminal device. The present application can also adjust the operating frequency and operating voltage of other subsystems on the SOC system architecture, thereby improving the energy efficiency of the SOC.
以终端设备是手机为例,手机在运行游戏应用程序过程中,通过本方案中基改进的DVFS机制对GPU的工作电压和工作频率进行调整,从而延长手机的持续时间,提高续航能力。Taking the terminal device as a mobile phone as an example, when the mobile phone runs the game application program, the working voltage and operating frequency of the GPU are adjusted through the improved DVFS mechanism in this solution, thereby prolonging the duration of the mobile phone and improving the battery life.
请参考图5,其示出了本申请一示例性实施例提供的一种图形处理单元的控制方法的方法流程图,该图形处理单元的控制方法可以用于终端设备中。如图5所示,该图形处理单元的控制方法可以包括如下步骤:Please refer to FIG. 5 , which shows a method flowchart of a method for controlling a graphics processing unit provided by an exemplary embodiment of the present application, and the method for controlling a graphics processing unit can be used in a terminal device. As shown in FIG. 5 , the control method of the graphics processing unit may include the following steps:
步骤501,检测α_TOP是否大于α_(TOP_U)。
若大于,执行步骤502,否则执行步骤503。If it is greater than, go to step 502, otherwise go to step 503.
步骤502,增加顶模的工作频率,调整顶模的工作电压。
步骤503,检测α_TOP是否小于α_(TOP_D)。
若小于,进入步骤504,否则执行步骤505。If less than, go to step 504, otherwise go to step 505.
步骤504,减少顶模的工作频率,调整顶模的工作电压。In
步骤505,检测α_CORE是否大于α_(CORE_U)。
若大于,执行步骤506,否则执行步骤507。If it is greater than, go to step 506, otherwise go to step 507.
步骤506,增加运算单元的工作频率,调整运算单元的工作电压。
步骤507,检测α_CORE是否小于α_(CORE_D)。
若小于,进入步骤508,否则执行步骤509。If it is less than, go to step 508 , otherwise go to step 509 .
步骤508,减少运算单元的工作频率,调整运算单元的工作电压。
步骤509,计算β。
步骤510,检测β是否大于βU。
若是,执行步骤511,否则执行步骤512。If yes, go to step 511, otherwise go to step 512.
步骤511,增加正在运行的运算单元的数量。
步骤512,检测β是否小于βD。
若是,执行步骤513,否则保持正在运行的运算单元的数量不变。If yes, go to step 513, otherwise keep the number of running operation units unchanged.
步骤513,减少正在运行的运算单元的数量。
可选的,上述各个参数与图2实施例中的各个参数含义相同,此处不再赘述。需要说明的是,步骤501至步骤504的执行,与步骤505至步骤508的执行可以同时进行,也可以调整先后顺序,此处不再赘述。Optionally, the above parameters have the same meanings as those in the embodiment of FIG. 2 , and details are not repeated here. It should be noted that the execution of
步骤514,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值。Step 514: Obtain the power consumption of the GPU during the working cycle; adjust the working frequency of the GPU and the working voltage of the GPU, so that the power consumption of the GPU during the working cycle reaches a minimum value.
综上所述,本申请通过获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。To sum up, the present application obtains the working cycle and working voltage of the graphics processing unit GPU; obtains the power consumption of the GPU during the working cycle according to the working cycle and working voltage; adjusts the working frequency of the GPU and the working voltage of the GPU to The power consumption of the GPU in the work cycle is minimized, so that the power consumption of the GPU in the work cycle is minimized. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, so as to avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improve the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参考图6,其示出了本申请一示例性实施例提供的图形处理单元的控制装置的结构框图。该图形处理单元的控制装置600可以用于终端设备中,以执行图1、图2或图5所示实施例提供的方法中由终端设备执行的全部或者部分步骤。该图形处理单元的控制装置600包括:Please refer to FIG. 6 , which shows a structural block diagram of a control apparatus of a graphics processing unit provided by an exemplary embodiment of the present application. The control apparatus 600 of the graphics processing unit can be used in a terminal device to perform all or part of the steps performed by the terminal device in the method provided by the embodiment shown in FIG. 1 , FIG. 2 or FIG. 5 . The control device 600 of the graphics processing unit includes:
第一获取模块601,用于获取所述图形处理单元GPU的工作周期以及工作电压;a first obtaining
第二获取模块602,用于根据所述工作周期以及所述工作电压,获取所述GPU在所述工作周期内的耗电量;A second obtaining
参数调整模块603,用于调整所述GPU的工作频率以及所述GPU的工作电压,以使得所述GPU在所述工作周期内的耗电量达到最小值。The
综上所述,本申请通过获取图形处理单元GPU的工作周期以及工作电压;根据工作周期以及工作电压,获取GPU在工作周期内的耗电量;调整GPU的工作频率以及GPU的工作电压,以使得GPU在工作周期内的耗电量达到最小值,以使得GPU在工作周期内的耗电量达到最小值。本申请基于耗电量最小值的方式对GPU的工作频率以及GPU的工作电压进行调整,可以避免降低GPU的工作频率过程中GPU的耗电量依旧增加的情况出现,提高了终端设备的续航能力,减少了终端设备对电量的浪费。To sum up, the present application obtains the working cycle and working voltage of the graphics processing unit GPU; obtains the power consumption of the GPU during the working cycle according to the working cycle and working voltage; adjusts the working frequency of the GPU and the working voltage of the GPU to The power consumption of the GPU in the work cycle is minimized, so that the power consumption of the GPU in the work cycle is minimized. The present application adjusts the working frequency of the GPU and the working voltage of the GPU based on the minimum value of the power consumption, which can avoid the situation that the power consumption of the GPU still increases during the process of reducing the working frequency of the GPU, and improves the battery life of the terminal device. , reducing the waste of power on the terminal equipment.
可选的,所述装置还包括:第三获取模块和第一调整模块Optionally, the device further includes: a third acquisition module and a first adjustment module
所述第三获取模块,用于在所述根据所述工作周期以及所述工作电压,获取所述GPU在所述工作周期内的耗电量之前,获取所述GPU的顶模的能量利用率以及子核能量利用率,所述子核能量利用率是所述GPU中各个正在运行的运算单元的能量利用率的平均利用率;The third obtaining module is configured to obtain the energy utilization rate of the top die of the GPU before obtaining the power consumption of the GPU in the working cycle according to the working cycle and the working voltage And the sub-core energy utilization rate, the sub-core energy utilization rate is the average utilization rate of the energy utilization rate of each running computing unit in the GPU;
所述第一调整模块,用于根据所述顶模的能量利用率以及子核能量利用率,调整所述GPU中各个正在运行的运算单元的数量;The first adjustment module is configured to adjust the number of each running computing unit in the GPU according to the energy utilization rate of the top die and the sub-core energy utilization rate;
所述第二获取模块,用于根据所述工作周期,所述工作电压以及所述GPU中各个正在运行的运算单元的数量,获取所述GPU在所述工作周期内的耗电量。The second obtaining module is configured to obtain the power consumption of the GPU in the working cycle according to the working cycle, the working voltage and the number of each running operation unit in the GPU.
可选的,所述第一调整模块,包括:第一计算单元,第一增加单元和第一减少单元;Optionally, the first adjustment module includes: a first calculation unit, a first increase unit and a first decrease unit;
所述第一计算单元,用于根据所述顶模的能量利用率以及子核能量利用率,计算第一比例值;the first calculation unit, configured to calculate a first proportional value according to the energy utilization rate of the top mold and the energy utilization rate of the sub-nuclei;
所述第一增加单元,用于当所述第一比例值大于第一阈值时,在所述GPU中各个正在运行的运算单元的数量基础上增加第一预设数量个运算单元;The first adding unit is configured to add a first preset number of computing units on the basis of the number of operating computing units in the GPU when the first proportional value is greater than the first threshold;
所述第一减少单元,用于当所述第一比例值小于第二阈值时,在所述GPU中各个正在运行的运算单元的数量基础上减少第一预设数量个运算单元。The first reducing unit is configured to reduce a first preset number of operation units on the basis of the number of each running operation unit in the GPU when the first proportional value is smaller than the second threshold.
可选的,所述第一减少单元,包括:第一确定子单元和第一减少子单元;Optionally, the first reduction unit includes: a first determination subunit and a first reduction subunit;
所述第一确定子单元,用于当所述第一比例值小于第二阈值时,确定所述GPU中各个正在运行的运算单元的任务优先级;The first determination subunit is configured to determine the task priority of each running computing unit in the GPU when the first proportional value is less than the second threshold;
所述第一减少子单元,用于按照所述任务优先级从低到高的顺序,将所述GPU中各个正在运行的运算单元依次减少第一预设数量个运算单元。The first reduction sub-unit is configured to sequentially reduce each running operation unit in the GPU by a first preset number of operation units according to the order of the task priority from low to high.
可选的,所述参数调整模块,包括:第二调整模块以及第三调整模块,Optionally, the parameter adjustment module includes: a second adjustment module and a third adjustment module,
所述第二调整模块,用于将所述GPU的顶模的工作频率调整至第一频率以及将所述GPU的顶模的工作电压调整至第一电压,以使得所述GPU的顶模在所述工作周期内的耗电量达到最小值;The second adjustment module is used to adjust the working frequency of the top die of the GPU to the first frequency and adjust the working voltage of the top die of the GPU to the first voltage, so that the top die of the GPU is at The power consumption in the working cycle reaches a minimum value;
所述第三调整模块,用于将所述GPU的运算单元的工作频率调整至第二频率以及将所述GPU的运算单元的工作电压调整至第二电压,以使得所述GPU的运算单元在所述工作周期内的耗电量达到最小值。The third adjustment module is used to adjust the operating frequency of the computing unit of the GPU to the second frequency and adjust the operating voltage of the computing unit of the GPU to the second voltage, so that the computing unit of the GPU is The power consumption during the working cycle reaches a minimum value.
可选的,所述装置还包括:Optionally, the device further includes:
第四获取模块,用于在所述将所述GPU的顶模的工作频率调整至第一频率以及将所述GPU的顶模的工作电压调整至第一电压,以使得所述GPU的顶模在所述工作周期内的耗电量达到最小值之后,获取调整后的所述GPU的顶模的工作频率以及调整前的所述GPU的顶模的工作频率;a fourth acquisition module, configured to adjust the operating frequency of the top mold of the GPU to the first frequency and the operating voltage of the top mold of the GPU to the first voltage, so that the top mold of the GPU After the power consumption in the working cycle reaches the minimum value, obtain the adjusted operating frequency of the GPU's top mold and the pre-adjusted operating frequency of the GPU's top mold;
第二增加模块,用于当调整后的所述GPU的顶模的工作频率与调整前的所述GPU的顶模的工作频率之间的比值大于第三阈值时,增加双倍速率DDR存储系统的工作频率;A second adding module, configured to add a double-rate DDR storage system when the ratio between the adjusted operating frequency of the GPU's top mode and the pre-adjusted operating frequency of the GPU's top mode is greater than a third threshold operating frequency;
第二减少模块,用于当调整后的所述GPU的顶模的工作频率与调整前的所述GPU的顶模的工作频率之间的比值小于第四阈值时,减少所述DDR存储系统的工作频率;A second reducing module, configured to reduce the operating frequency of the DDR memory system when the ratio between the adjusted operating frequency of the GPU's top mold and the pre-adjusted operating frequency of the GPU's top mold is less than a fourth threshold working frequency;
第一保持模块,用于当调整后的所述GPU的顶模的工作频率与调整前的所述GPU的顶模的工作频率之间的比值处于所述第四阈值与所述第三阈值范围之内时,保持所述DDR存储系统的工作频率不变;其中,所述第三阈值大于所述第四阈值。The first holding module is used for when the ratio between the adjusted operating frequency of the GPU's top mold and the pre-adjusted operating frequency of the GPU's top mold is in the range between the fourth threshold and the third threshold when the operating frequency of the DDR storage system is kept unchanged; wherein the third threshold is greater than the fourth threshold.
可选的,在所述将所述GPU的工作频率调整至目标频率以及将所述GPU的工作电压调整至目标电压的过程中,当所述GPU的工作电压达到最低工作电压时,控制所述GPU的工作频率保持不变。。Optionally, in the process of adjusting the working frequency of the GPU to the target frequency and adjusting the working voltage of the GPU to the target voltage, when the working voltage of the GPU reaches a minimum working voltage, control the The operating frequency of the GPU remains the same. .
图7是本申请一示例性实施例提供的一种终端设备的结构示意图。如图7所示,终端设备700包括中央处理单元(Central Processing Unit,CPU)701、包括随机存取存储器(Random Access Memory,RAM)702和只读存储器(Read Only Memory,ROM)703的系统存储器704,以及连接系统存储器704和中央处理单元701的系统总线705。所述终端设备700还包括帮助计算机内的各个器件之间传输信息的基本传输/输出系统(Input/Output System,I/O系统)706,和用于存储操作系统712、应用程序713和其他程序模块714的大容量存储设备707。FIG. 7 is a schematic structural diagram of a terminal device provided by an exemplary embodiment of the present application. As shown in FIG. 7 , the terminal device 700 includes a central processing unit (Central Processing Unit, CPU) 701 , a system memory including a random access memory (Random Access Memory, RAM) 702 and a read only memory (Read Only Memory, ROM) 703 704 , and a
所述基本传输/输出系统706包括有用于显示信息的显示器706和用于用户传输信息的诸如鼠标、键盘之类的传输设备709。其中所述显示器706和传输设备709都通过连接到系统总线705的传输输出控制器710连接到中央处理单元701。所述基本传输/输出系统706还可以包括传输输出控制器710以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的传输。类似地,传输输出控制器710还提供输出到显示屏、打印机或其他类型的输出设备。The basic transmission/
所述大容量存储设备707通过连接到系统总线705的大容量存储控制器(未示出)连接到中央处理单元701。所述大容量存储设备707及其相关联的计算机可读介质为终端设备700提供非易失性存储。也就是说,所述大容量存储设备707可以包括诸如硬盘或者CD-ROM(Compact Disc Read-Only Memory,只读光盘)驱动器之类的计算机可读介质(未示出)。The
所述计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM(Erasable Programmable Read Only Memory,可擦除可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,带电可擦可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机存储介质不局限于上述几种。上述的系统存储器704和大容量存储设备707可以统称为存储器。The computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid state Storage of its technology, CD-ROM, DVD (Digital Video Disc, high-density digital video disc) or other optical storage, cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art know that the computer storage medium is not limited to the above-mentioned ones. The
终端设备700可以通过连接在所述系统总线705上的网络接口单元711连接到互联网或者其它网络设备。所述存储器还包括一个或者一个以上的程序,所述一个或者一个以上程序存储于存储器中。The terminal device 700 can be connected to the Internet or other network devices through the
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的图形处理单元的控制方法中,由终端设备执行的全部或部分步骤。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the graphics processing unit described in the above embodiments In the control method, all or part of the steps performed by the terminal device.
本申请实施例还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的图形处理单元的控制方法,由终端设备或者服务器执行的全部或部分步骤。Embodiments of the present application further provide a computer program product, where at least one instruction is stored in the computer program product, and the at least one instruction is loaded and executed by the processor to implement the control of the graphics processing unit according to the above embodiments A method, all or part of the steps performed by a terminal device or a server.
需要说明的是:上述实施例提供的装置在执行终端设备的控制时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the apparatus provided in the above-mentioned embodiment executes the control of the terminal equipment, only the division of the above-mentioned functional modules is used as an example for illustration. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210783539.3A CN115237244A (en) | 2022-06-27 | 2022-06-27 | Control method, device, terminal device and storage medium for graphics processing unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210783539.3A CN115237244A (en) | 2022-06-27 | 2022-06-27 | Control method, device, terminal device and storage medium for graphics processing unit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115237244A true CN115237244A (en) | 2022-10-25 |
Family
ID=83671228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210783539.3A Pending CN115237244A (en) | 2022-06-27 | 2022-06-27 | Control method, device, terminal device and storage medium for graphics processing unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115237244A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115857655A (en) * | 2022-12-23 | 2023-03-28 | 摩尔线程智能科技(北京)有限责任公司 | GPU power consumption control method, device, device, medium and program product |
CN115877938A (en) * | 2022-12-23 | 2023-03-31 | 摩尔线程智能科技(北京)有限责任公司 | Control method, device, equipment, storage medium and program product of GPU |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090295794A1 (en) * | 2008-05-30 | 2009-12-03 | Asustek Computer Inc. | Method for controlling operating modes of graphics processing unit |
CN103246340A (en) * | 2012-02-06 | 2013-08-14 | 索尼公司 | Device and method for dynamically adjusting frequency of central processing unit |
CN107168457A (en) * | 2017-03-22 | 2017-09-15 | 深圳市博巨兴实业发展有限公司 | A kind of low-power consumption GPU SOC methods |
CN110245061A (en) * | 2019-04-30 | 2019-09-17 | 上海兆芯集成电路有限公司 | Computing device, method for predicting power consumption thereof, and computer-readable storage medium |
CN114594849A (en) * | 2020-12-04 | 2022-06-07 | 三星电子株式会社 | Integrated circuit for performing dynamic voltage and frequency scaling operations and method of operation thereof |
-
2022
- 2022-06-27 CN CN202210783539.3A patent/CN115237244A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090295794A1 (en) * | 2008-05-30 | 2009-12-03 | Asustek Computer Inc. | Method for controlling operating modes of graphics processing unit |
CN103246340A (en) * | 2012-02-06 | 2013-08-14 | 索尼公司 | Device and method for dynamically adjusting frequency of central processing unit |
CN107168457A (en) * | 2017-03-22 | 2017-09-15 | 深圳市博巨兴实业发展有限公司 | A kind of low-power consumption GPU SOC methods |
CN110245061A (en) * | 2019-04-30 | 2019-09-17 | 上海兆芯集成电路有限公司 | Computing device, method for predicting power consumption thereof, and computer-readable storage medium |
CN114594849A (en) * | 2020-12-04 | 2022-06-07 | 三星电子株式会社 | Integrated circuit for performing dynamic voltage and frequency scaling operations and method of operation thereof |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115857655A (en) * | 2022-12-23 | 2023-03-28 | 摩尔线程智能科技(北京)有限责任公司 | GPU power consumption control method, device, device, medium and program product |
CN115877938A (en) * | 2022-12-23 | 2023-03-31 | 摩尔线程智能科技(北京)有限责任公司 | Control method, device, equipment, storage medium and program product of GPU |
CN115877938B (en) * | 2022-12-23 | 2024-01-12 | 摩尔线程智能科技(北京)有限责任公司 | GPU control method, device, equipment, storage medium and program product |
CN115857655B (en) * | 2022-12-23 | 2024-01-23 | 摩尔线程智能科技(北京)有限责任公司 | Method, device, equipment, medium and program product for controlling power consumption of GPU |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9557804B2 (en) | Dynamic power limit sharing in a platform | |
CN112005218B (en) | Method, device and system for distributing power of image processor | |
US9600330B2 (en) | Method and system for regulation and control of a multi-core central processing unit | |
US9529646B2 (en) | Power-efficient interaction between multiple processors | |
US20120260083A1 (en) | Adjusting Device Performance over Multiple Time Domains | |
KR101471303B1 (en) | Device and method of power management for graphic processing unit | |
CN107209543B (en) | Clock rate adjustment for processing unit | |
CN115237244A (en) | Control method, device, terminal device and storage medium for graphics processing unit | |
US20120260081A1 (en) | Adjusting Device Performance Based on Processing Profiles | |
CN105045367A (en) | Android system equipment power consumption optimization method based on game load prediction | |
US20140149753A1 (en) | Thermal Power Budget Allocation for Maximum User Experience | |
CN110795238B (en) | Load calculation method, device, storage medium and electronic equipment | |
KR101707096B1 (en) | Generic host-based controller latency method and apparatus | |
CN106502962A (en) | Electronic device and method for controlling operation of processor core in electronic device | |
WO2017131907A2 (en) | Systems and methods for providing power efficiency via memory latency control | |
US12271243B2 (en) | Power consumption management method and apparatus | |
WO2021120015A1 (en) | Power limit determination method and apparatus | |
CN110825199A (en) | Information processing method and device, electronic device and medium | |
CN110928587A (en) | Control method and control device | |
CN116012523A (en) | A scene loading method, system and storage medium based on a virtual three-dimensional exhibition hall | |
CN103543982B (en) | A kind of clock frequency management method and mobile device | |
CN110580092A (en) | Terminal heat dissipation method and device and computer readable storage medium | |
CN111143055A (en) | Virtual cloud host pre-allocation method, apparatus, readable storage medium and electronic device | |
CN119473998A (en) | Processor, chip system and service quality configuration method for related requests | |
CN116204306A (en) | Resource management method, device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |