Workload-based clock adjustment at processing units
By detecting program threads and workloads and dynamically adjusting the clock frequency of the graphics processing unit, the problem of resource waste in the processing system is solved, and efficient operation of the processing system is achieved.
Patent Information
- Application Number
- CN202080080034.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-11-22
- Filing Date
- 2020-11-20
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2040-11-20
AI Technical Summary
The differences in processing requirements of different programs in a processing system lead to a waste of resources. Existing technologies cannot effectively adjust the clock frequency of a graphics processing unit to meet the specific requirements of each program.
By detecting program threads and workloads, the clock frequency of the graphics processing unit is dynamically adjusted to adapt to the processing requirements of different programs. The clock frequency adjustment module and control module are used to monitor workload parameters to achieve dynamic frequency adjustment.
Effectively save processing resources, meet the processing specifications of each program, and improve the overall efficiency and performance of the processing system.
Smart Images

Figure CN114730200B_ABST
Abstract
Description
Background Art
[0001] A processing system typically uses a specialized processing unit to perform the specified operations for which the processing unit is designed. For example, a processing system may use a graphics processing unit (GPU) to perform graphics and vector processing operations for the processing system. In some cases, a processing unit simultaneously performs operations on behalf of different programs executed at the processing system. For example, a processing system may implement a virtual computing environment, in which the processing system simultaneously executes multiple virtual machines (VMs) at one or more central processing units (CPUs). Each of the VMs requests the GPU of the processing system to perform graphics or vector processing operations, so that the GPU is responsible for performing operations on behalf of different VMs simultaneously. However, the different programs may have different requirements, such as different power requirements, different maximum clock frequency requirements, etc. The different requirements place different processing demands on the GPU (or other processing unit), thereby negatively affecting the entire processing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] The present disclosure may be better understood, and its numerous features and advantages become apparent to those skilled in the art by referencing the accompanying drawings.The use of the same reference numbers in different drawings indicates similar or identical items.
[0003] Figure 1 is a block diagram of a processing system including a graphics processing unit (GPU) that adjusts clock frequency based on detection of executing program threads, according to some embodiments.
[0004] Figure 2 is a diagram showing a method according to some embodiments Figure 1 A diagram of an example of a GPU that adjusts clock frequency based on changes in the GPU's workload.
[0005] Figure 3 According to some embodiments Figure 1 Block diagram of the GPU clock frequency adjustment module.
[0006] Figure 4 is a flow chart of a method for adjusting the clock frequency of a processing unit based on detecting an executing program thread, according to some embodiments. DETAILED DESCRIPTION
[0007] Figures 1 to 4A technique is described for adjusting the clock frequency of a graphics processing unit (GPU) based on identifying program threads executing at a central processing unit (CPU), wherein the program threads are detected based on the workload to be executed. By adjusting the clock frequency based on the identified program threads, the processing unit adapts to the different processing requirements of simultaneously executing programs. Additionally, by identifying program threads based on workload, the processing unit adjusts the clock frequency based on processing requirements, thereby conserving processing resources.
[0008] By way of example, in some embodiments, a CPU executes two different programs (e.g., two different virtual machines) simultaneously. One of the programs (denoted as Program 1) is a program that needs to perform operations at a relatively low frequency in order to, for example, maintain compatibility with other programs or systems. The other program (denoted as Program 2) is a program that needs to perform operations at a relatively high frequency in order to meet performance goals, at least in some cases. Conventionally, the clock of a GPU that simultaneously performs operations for Program 1 and Program 2 is set to the higher of the different clock frequencies, regardless of which program's operations are being executed at the GPU, thereby requiring additional software or hardware for Program 1 to meet its compatibility requirements. Using the techniques herein, the GPU detects which of Program 1 and Program 2 is being executed, and whether the processing requirements of the program being executed are such that the clock frequency needs to be adjusted so that the program being executed meets its processing requirements,
[0009] The GPU clock frequency is adjusted accordingly. The GPU thus meets the processing requirements of each of Program 1 and Program 2, and does so dynamically according to the changing workload, thereby conserving processing resources.
[0010] In addition, by changing the clock frequency based on the detected workload rather than solely based on static conditions (such as a program identifier value or a specified time period), the GPU can meet the processing specifications of each program based on the needs of a given workload, thereby conserving processor resources. For example, in some cases, a higher-performance program may present a relatively lighter workload to the GPU, allowing the processing specifications to fall within a lower clock frequency. Using the techniques described herein, the GPU maintains the frequency of the clock signal at a lower frequency under a relatively lighter workload, even if the corresponding program is associated with a relatively higher specified clock frequency, thereby conserving GPU resources when the program does not need to meet the program specifications.
[0011] Turning to the accompanying drawings, Figure 1A block diagram of a processing system 100 is shown, according to some embodiments, comprising a central processing unit (CPU) 101 and a graphics processing unit (GPU) 102. The processing system 100 is generally configured to execute instructions (organized as computer programs) to perform tasks on behalf of an electronic device. Thus, in various embodiments, the processing system 100 is part of an electronic device such as a desktop or laptop computer, a server, a smartphone, a tablet computer, a gaming console, etc. The processing system 100 comprises Figure 1 Additional components and modules not shown. For example, in some embodiments, the processing system includes one or more memory controllers, input / output controllers, network interfaces, etc. to perform tasks on behalf of the electronic device.
[0012] CPU 101 is typically configured to execute multiple programs, and corresponding program threads, simultaneously. As used herein, a program thread refers to either a single program (e.g., an operating system, an application, etc.) or a single thread of a multithreaded program. In the illustrated example, CPU 101 executes two program threads simultaneously, represented as program 103 and program 104. However, it will be appreciated that in other embodiments, see Figure 1 The described techniques are implemented at a processing system that executes N programs simultaneously, where N is an integer greater than 1. Thus, in some embodiments, CPU 101 implements a virtual computing environment by simultaneously executing multiple virtual machines, where programs 103 and 104 correspond to programs executed by different virtual machines. For example, in some embodiments, program 103 is an operating system associated with one virtual machine, and program 104 is an operating system associated with a different virtual machine executing at the processing system. For purposes of this description, it is assumed that each of programs 103 and 104 has different processing specifications, such as different specified processing speeds, power consumption specifications, etc. For example, in some embodiments, program 103 is a "legacy" program that is specified to execute at a relatively low frequency to provide backward compatibility with other programs or hardware components of the processing system, while program 104 is a newer program that is specified to execute at a relatively high frequency to meet performance targets. As further described herein, GPU 102 is capable of adjusting specified parameters, and specifically, the clock frequency of GPU 102, so that each of programs 103 and 104 conforms to its processing specifications.
[0013] GPU 102 is typically configured to perform graphics and vector processing operations for the processing system. For illustration, in some embodiments, during the execution of programs 103 and 104, CPU 101 generates specified commands requesting GPU 102 to perform specified operations, which are referred to herein as GPU commands (e.g., commands 105 and 107). Examples of GPU commands include drawing commands requesting the GPU to draw a specified object for display, vector commands requesting the GPU to perform specified vector operations, and the like. The one or more CPUs provide the GPU commands to GPU 102 for execution. Each command is issued by and associated with a corresponding program in programs 103 and 104. Thus, for example, in some embodiments, command 105 is a drawing command requesting GPU 102 to draw one or more objects on behalf of program 103, and command 107 is a drawing command requesting GPU 102 to draw one or more objects on behalf of program 104.
[0014] It should be understood that CPU 101 executes programs 103 and 104 simultaneously. Therefore, in some embodiments, CPU 101 provides different commands associated with different ones of programs 103 and 104 to GPU 102 in a time-division multiplexed manner for execution. For illustration, in some embodiments, CPU 101 provides command 105 to GPU 102 for execution on behalf of program 103, then provides command 107 for execution on behalf of program 104, and then provides another command (not shown) for execution on behalf of program 103. As further described herein, in some cases, different programs and therefore different commands have different specified processing requirements, such as different necessary clock frequencies, in order for the programs to meet specified quality requirements or other requirements, such as a specified display frame rate. GPU 102 identifies different processing requirements by analyzing the workload generated based on the commands and adjusts processing parameters, such as clock frequency, based on the identified processing requirements. GPU 102 thus dynamically adjusts processing parameters based on a combination of processing demand and specified processing requirements rather than based on fixed processing parameter values.
[0015] To facilitate the execution of CPU commands (e.g., commands 105 and 107), GPU 102 includes a scheduler 106 and a set of compute units 115. The set of compute units 115 includes multiple compute units (e.g., compute unit 118), each of which includes multiple processing elements configured to perform graphics and vector processing operations, such as single instruction multiple data (SIMD) units, stream processors, etc. In some embodiments, each compute unit includes additional modules to support the processing elements, such as one or more branch units, scalar units, vector units, register files, etc. Scheduler 106 is a module that schedules operations in a wavefront format at the set of compute units 115 based on commands received from one or more CPUs. In some embodiments, GPU 102 includes a command processor or other module to decode received commands into one or more operations and provide the operations to scheduler 106 for scheduling. In addition, in some embodiments, scheduler 106 includes different scheduling modules, each of which schedules operations at different resources of GPU 102. For example, in some embodiments, scheduler 106 includes a scheduling module for scheduling graphics and vector processing operations at compute unit 115, a scheduling module for scheduling memory operations at memory resources of GPU 102, and the like.
[0016] To synchronize operations at compute units 115 (and other modules), GPU 102 employs clock control module 110 to generate a clock signal CK and provide the CK signal to each of compute units 115. In some embodiments, clock control module 110 includes one or more control loops, such as a frequency-locked loop (FLL), for locking the frequency of clock signal CK to a specified frequency, where the specified frequency can be adjusted via control signaling as further described herein. Specifically, GPU 102 sets control signaling to cause clock control module 110 to set the frequency of clock signal CK based on the processing demands placed on GPU 102 by programs 103 and 104, so that each program meets its processing specifications.
[0017] For purposes of illustration, the overall use of the resources of GPU 102 based on a received command or set of commands is referred to herein as a workload (e.g., workloads 116 and 117). Heavier or higher workloads use more of the resources of GPU 102, while lighter or lower workloads use fewer of the resources of GPU 102. Thus, the workload generated by a particular one of programs 103 and 104 is based on the commands generated by that program. Additionally, the workload generated by a program is generally related to the processing specifications of that program. Thus, for example, a program with a relatively high execution frequency (i.e., a program that is expected or specified to execute quickly) typically generates a heavier workload (i.e., a workload that requires more resources to execute). Conversely, a program with a relatively low specified execution frequency generates a lighter workload (i.e., a workload that requires more resources to execute).
[0018] To accommodate the simultaneous execution of programs with different specified execution frequencies, GPU 102 includes a clock frequency adjustment module (CFAM) 108. CFAM 108 monitors parameters indicative of the current workload of GPU 102 and, in effect, detects which of programs 103 and 104 is currently executing on GPU 102 and provides control signaling to clock control module 110 to set the frequency of clock signal CK to the specified clock frequency of the detected program. In some embodiments, examples of parameters monitored by CFAM 108 include the number of wavefronts scheduled by scheduler 106 at compute unit 115 in a specified amount of time, the number of draw commands received by GPU 102 in a specified amount of time, the type of draw or dispatch commands, hints provided by a compiler, or any combination thereof. If the monitored parameter exceeds a workload threshold, CFAM 108 increases the frequency of the CK signal to a higher specified frequency F2. In response to the monitored parameter falling below the workload threshold for a specified amount of time, CFAM 108 decreases the clock frequency of the CK signal to a lower specified frequency F1. In some embodiments, the higher specified frequency F2 and the lower specified frequency F1 are indicated by programs 103 and 104 during initialization of the corresponding programs, via commands provided to GPU 102 by each program, etc. Additionally, in some embodiments, the workload thresholds and frequencies F1 and F2 are programmable values, thereby allowing a programmer to adjust the performance of the executing program to a desired level.
[0019] By way of example, in some embodiments, the parameter monitored by CFAM 108 is the number of draw commands received from each of programs 103 and 104 and scheduled for execution by scheduler 106. In response to the number of draw commands exceeding a specified workload threshold within a specified amount of time (e.g., more than ten draw commands within 100 execution cycles), CFAM 108 assumes that a program associated with a higher specified clock frequency is executing and requiring a large amount of resources. In response, CFAM 108 increases the frequency of the CK signal to the higher specified frequency F2. When the number of received draw commands falls below the specified workload threshold, CFAM 108 assumes that a program associated with a lower specified frequency is executing. In response, CFAM 108 decreases the frequency of the CK signal to the lower specified frequency F1.
[0020] As another example, in some embodiments, the parameter monitored by CFAM 108 is the number of wavefronts scheduled by scheduler 106 for execution at compute unit 115. In response to the number of scheduled wavefronts exceeding a workload threshold (e.g., more than 100 wavefronts within 500 execution cycles), CFAM 108 assumes that a program associated with a higher specified clock frequency is executing and requires a large amount of resources. In response, CFAM 108 increases the frequency of the CK signal to the higher specified frequency F2. When the number of scheduled wavefronts falls below the specified workload threshold, CFAM 108 assumes that a program associated with a lower specified frequency is executing. In response, CFAM 108 decreases the frequency of the CK signal to the lower specified frequency F1.
[0021] In other embodiments, the parameter monitored by CFAM 108 is the number of draw commands of a specified type, such as the number of draw commands used to draw a specified object, an object with a threshold number of vertices, etc. CFAM 108 determines the type of draw command based on command parameters included with commands 105 and 107. For example, in some embodiments, each command indicates the type of object to be drawn, the number of vertices of the object, etc. In other embodiments, these parameters are recognized by the command processor of GPU 102.
[0022] As indicated by the above examples, in some embodiments, CFAM 108 identifies the workload of the GPU based on information stored or monitored at scheduler 106. For example, in some embodiments, scheduler 106 maintains registers or other memory structures that store data indicating the number of draw commands received from CPU 101, the type of draw commands received, the number of wavefronts scheduled for execution, etc., or any combination thereof. Based on the stored information, CFAM 108 identifies the overall workload of GPU 102 and, as described herein, adjusts the clock frequency of the CK clock signal.
[0023] By changing the clock frequency based on detected workload rather than solely based on static conditions (such as a program identifier value or a specified time period), GPU 102 is able to dynamically meet the processing specifications of each program, thereby conserving processor resources. For example, in some cases, a higher-performance program may provide a relatively light workload to GPU 102 (e.g., executing relatively simple drawing commands), causing GPU 102 to maintain the frequency of the CK signal at a lower frequency F1. In contrast, if GPU 102 were to change the clock frequency solely based on static conditions (such as a program identifier), the frequency of the CK signal would increase to a higher frequency, but without a commensurate performance benefit.
[0024] Figure 2 A graph 200 is shown illustrating an example of a CFAM 108 that adjusts the frequency of a clock signal CK based on a detected workload, according to some embodiments. Graph 200 illustrates an x-axis representing time and a y-axis representing the frequency of the clock signal CK. Graph 200 also illustrates a graph 201 illustrating an example of the frequency of the clock signal CK changing over time.
[0025] exist Figure 2 In the example shown in FIG201 , it is assumed that program 103 is associated with a lower specified frequency (denoted as F1), and program 104 is associated with a higher specified frequency. In the illustrated example of graph 201 , at an initial time 202, as indicated by one or more workload parameters, the workload of GPU 102 is below a workload threshold. This indicates that GPU 102 is likely executing commands on behalf of program 103. Therefore, and in response to the workload being below the workload threshold, CFAM 108 sets the frequency of clock signal CK to the lower frequency F1.
[0026] At time 203, after time 202, the workload at GPU 102 increases, causing the workload to exceed the workload threshold. The workload therefore indicates that GPU 102 is executing commands on behalf of program 104. Therefore, and in response to the workload increasing above the workload threshold, CFAM 108 begins increasing the frequency of clock signal CK until, at time 204, the frequency has reached the higher specified frequency F2. As shown, CFAM 108 ramps the clock signal from frequency F1 to frequency F2 over time (between time 203 and time 204), rather than immediately setting the clock frequency to F2 at time 203. In some embodiments, the time between time 203 and time 204 is 50 microseconds or less. By ramping the clock from frequency F1 to frequency F2, GPU 102 continues to execute operations between times 203 and 204, rather than halting execution and evicting data from compute unit 115.
[0027] Between time 204 and time 205, the workload of GPU 102 is above a workload threshold, and in response, CFAM 108 maintains the frequency of clock signal CK at a higher frequency F2. At time 205, the workload of GPU 102 falls below the threshold. In response, CFAM 108 begins ramping the frequency of clock signal CK back to a lower frequency F1. In some embodiments, CFAM 108 employs hysteresis to prevent brief excursions from the workload threshold from causing frequent adjustments to the frequency of clock signal CK. For example, in some embodiments, CFAM 108 begins adjusting the clock signal frequency in response to the workload of GPU 102 being above a threshold for a specified amount of time.
[0028] Figure 3 An example of a CFAM 108 according to some embodiments is shown. In the depicted example, the CFAM 108 includes a control module 320, a set of program frequency registers 322, and a set of workload threshold registers 324. The program frequency registers 322 are a set of programmable registers that store frequency values for each program executed at the processing system of the GPU 102. In some embodiments, each executing program sends commands to the GPU 102 via a device driver. When a program begins execution at the processing system, the program sends frequency information indicating the program's designated execution frequency to the device driver. In response, the device driver programs the corresponding registers in the program frequency registers 322 with the program's designated execution frequency.
[0029] Workload threshold registers 324 are a set of programmable registers that store workload thresholds for each program executed at the processing system of GPU 102. In some embodiments, each executing program is associated with a workload profile that indicates the likely workload generated by the program. In some embodiments, the workload profile is generated by the software developer during the development of the program. In other embodiments, the workload profile is formed by GPU 102 during the first N executions of the program, where N is an integer. For example, during the first N executions of the program, GPU 102 uses a performance monitor (not shown) to measure the workload generated by the program, such as the number of wavefronts scheduled for execution representing the program, the number of draw commands issued by CPU 101 representing the program, and the like. Control module 320 generates a workload threshold indicating the average workload of the program (e.g., the average number of wavefronts or the average number of draw commands generated by the program, or a combination thereof) and stores the workload threshold at the corresponding position in workload threshold registers 324.
[0030] In operation, when at least two programs are concurrently executed at the processing system of the GPU 102, the control module 320 receives information from the scheduler 106, such as the number of wavefronts scheduled or the number of draw commands received within a specified amount of time. The control module 320 compares the workload information with a workload threshold stored in the workload threshold register 324. In response to exceeding the workload threshold, the control module 320 determines that the program is associated with the exceeded threshold and retrieves the program frequency of the program from the program frequency register 322. The control module 320 then sends control signaling to the clock control module 110 to adjust the frequency of the CK clock signal to the retrieved program frequency.
[0031] In response to the workload information indicating that the GPU workload has fallen below the workload threshold, the control module 320 determines that the program is associated with the next lowest workload threshold stored at the workload threshold register 324. The control module 320 retrieves the program frequency of the identified program from the program frequency register 322 and sends control signaling to the clock control module 110 to adjust the frequency of the CK clock signal to the retrieved program frequency.
[0032] Figure 4 A flow chart illustrating a method 400 of setting the frequency of a clock signal at a processing unit based on identifying an executing program indicated by a detected workload, according to some embodiments. For purposes of description, reference is made to Figure 1Method 400 is described with reference to an example implementation at GPU 102 of the processor, but it should be understood that in other embodiments, method 400 is implemented at other processing units and other processing systems. Turning to the flowchart, at block 402, GPU 102 determines a workload threshold for each program being executed at the processing system. As described above, in some embodiments, each program being executed provides a workload threshold after initialization based on a workload distribution created during the development of the program. In other embodiments, GPU 102 identifies the workload threshold for the program being executed by determining the average workload generated by the program during the first N times the program was executed. In other embodiments, GPU 102 is configured to record the workload generated by the program being executed each time the program is executed, and determines the workload threshold by determining the average workload generated by the program during the last M times the program was executed, where M is an integer. GPU 102 records the workload threshold in a corresponding register of workload threshold registers 324.
[0033] At block 404, GPU 102 determines the designated clock frequencies for the programs concurrently executing on the processing system. As described above, in some embodiments, each executing program provides a designated clock frequency to GPU 102 via a device driver. GPU 102 stores the designated clock frequencies at corresponding locations in program frequency registers 322.
[0034] At block 406, the CFAM 108 monitors the workload of the GPU 102 based on information provided by the scheduler 106, such as the number of wavefronts scheduled at the compute units 115, the number of draw commands received by the GPU 102 within a specified amount of time, etc. At block 408, the CFAM 108 determines whether the workload exceeds one of the workload thresholds stored at the workload register 324. If not, the method returns to block 406, and the CFAM 108 maintains the clock speed of the CK clock signal at the current frequency.
[0035] If, at block 408, CFAM 108 determines that the workload has exceeded the workload threshold, CFAM 108 identifies the program associated with the exceeded threshold and further determines the specified program frequency for the program stored at program frequency register 322. At block 410, CFAM 108 sends control signaling to clock control module 110 to adjust the frequency of the CK clock signal to the specified program frequency.
[0036] Method flow moves to block 412, and CFAM 108 continues to monitor the workload of GPU 102 based on information provided by scheduler 106. At block 414, CFAM 108 determines whether the workload has fallen below the workload threshold stored in workload register 324. If not, the method returns to block 412, and CFAM 108 maintains the clock speed of the CK clock signal at the current frequency. In response to the workload falling below the workload threshold, method flow moves to block 416, and CFAM 108 sends control signaling to clock control module 110 to return the frequency of the CK clock signal to the initial lower frequency. Method flow returns to block 406, and CFAM 108 continues to monitor the workload of GPU 102.
[0037] In some embodiments, a method includes: receiving, at a graphics processing unit (GPU) from a central processing unit (CPU), a plurality of commands associated with a plurality of program threads concurrently executing on the CPU, each of the plurality of threads being associated with a corresponding specified clock frequency; determining, at the GPU, a first workload to be executed on the GPU based on at least one of the plurality of commands; identifying a first program thread among the plurality of program threads concurrently executing on the CPU based on the first workload; and, in response to identifying the first program thread, adjusting a clock signal of the GPU to the specified clock frequency associated with the first program thread. In one aspect, identifying the first program thread includes identifying the first program thread in response to the first workload exceeding a first workload threshold.
[0038] In one aspect, the method includes determining, at the GPU, a second workload to be executed at the GPU after the first workload based on at least one other command in the plurality of commands; identifying a second program thread among the plurality of program threads concurrently executing at the CPU based on the second workload; and adjusting the clock signal of the GPU from a first frequency to the specified frequency associated with the second program thread in response to identifying the second program thread. In another aspect, identifying the second program thread includes identifying the second program thread in response to the second workload being below a second workload threshold. In another aspect, the first threshold is programmable. In another aspect, identifying the first workload includes identifying the first workload based on information received at a scheduler of the GPU.
[0039] In one aspect, identifying the first workload comprises identifying the first workload based on a number of wavefronts scheduled for execution at a set of compute units of the GPU. In another aspect, identifying the first workload comprises identifying the first workload based on a type of draw commands received at the GPU. In another aspect, adjusting the clock comprises ramping the clock from a second frequency to the first frequency.
[0040] In some embodiments, a method includes: identifying a first program thread among a plurality of program threads based on a first workload to be executed at a graphics processing unit (GPU), wherein the GPU executes a workload representative of the plurality of program threads, and the plurality of program threads are executed simultaneously at a central processing unit (CPU); and in response to identifying the first program thread, adjusting a clock of the GPU to a first frequency associated with the first program thread. In one aspect, identifying the first program thread includes identifying the first program thread in response to the first workload exceeding a first workload threshold. In another aspect, the method includes: identifying a second program thread among the plurality of program threads based on the first workload to be executed at the GPU; and in response to identifying the second program thread, adjusting the clock of the GPU to a second frequency associated with the second program thread. In another aspect, adjusting the clock includes ramping the clock from a second frequency to the first frequency.
[0041] In some embodiments, a graphics processing unit (GPU) includes: a scheduler for receiving a plurality of commands from a central processing unit (CPU), the plurality of commands associated with a plurality of program threads concurrently executing at the CPU, each of the plurality of threads being associated with a corresponding specified clock frequency; a plurality of compute units configured to execute a workload based on the plurality of commands; a clock control module for generating a first clock signal for the plurality of compute units; and a clock frequency adjustment module configured to: determine a first workload to be executed at the plurality of compute units; identify a first program thread among the plurality of program threads concurrently executing at the CPU based on the first workload; and in response to identifying the first program thread, adjust the clock signal to the specified clock frequency associated with the first program thread. In one aspect, the clock frequency adjustment module is configured to: identify the first program thread in response to the first workload exceeding a first workload threshold.
[0042] In one aspect, the clock frequency adjustment module is configured to: determine a second workload to be executed at the plurality of compute units; identify a second program thread based on the second workload; and in response to identifying the second program thread, adjust the clock signal from the first frequency to a second frequency associated with the second program thread. In another aspect, the clock frequency adjustment module is configured to: identify the second program thread in response to the second workload being below a second workload threshold. In another aspect, the first threshold is programmable. In another aspect, the clock frequency adjustment module is configured to identify the first workload based on the number of wavefronts scheduled at a set of compute units of the GPU. In another aspect, the clock frequency adjustment module is configured to identify the first workload based on the number of draw commands received at the scheduler.
[0043] Computer-readable storage media may include any non-transitory storage medium or combination of non-transitory storage media that can be accessed by a computer system during use to provide instructions and / or data to the computer system. Such storage media may include, but are not limited to, optical media (e.g., compact discs (CDs), digital versatile discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tapes, or magnetic hard disks), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or microelectromechanical system (MEMS)-based storage media. Computer-readable storage media may be embedded in a computing system (e.g., system RAM or ROM), fixedly attached to a computing system (e.g., a magnetic hard drive), removably attached to a computing system (e.g., an optical disc or flash memory based on a universal serial bus (USB)), or connected to a computer system via a wired or wireless network (e.g., a network accessible storage device (NAS)).
[0044] In some embodiments, certain aspects of the technology described above may be implemented by one or more processors of a processing system that executes software. The software includes one or more sets of executable instructions stored or otherwise tangibly embodied on a non-transitory computer-readable storage medium. The software may include instructions and certain data that, when executed by one or more processors, manipulate the one or more processors to perform one or more aspects of the technology described above. The non-transitory computer-readable storage medium may include, for example, a magnetic or optical disk storage device, a solid-state storage device such as a flash memory, a cache, a random access memory (RAM), or other one or more non-volatile memory devices. The executable instructions stored on the non-transitory computer-readable storage medium may be presented in source code, assembly language code, object code, or other instruction formats that are interpreted or otherwise executed by one or more processors.
[0045] It should be noted that not all activities or elements described above in the general description are required, a portion of a particular activity or device may not be required, and one or more other activities may be performed, or elements other than those described may be included. Furthermore, the order in which the activities are listed is not necessarily the order in which the activities are performed. In addition, the concepts have been described with reference to specific embodiments. However, it will be understood by those skilled in the art that various modifications and changes may be made without departing from the scope of the present disclosure as set forth in the appended claims. Accordingly, this specification and drawings are to be regarded as illustrative rather than restrictive, and all such modifications are intended to be included within the scope of the present disclosure.
[0046] The benefits, other advantages, and solutions to problems have been described above with reference to specific embodiments. However, none of the benefits, advantages, solutions to problems, nor any features that may make any benefit, advantage, or solution to problems appear or become more prominent, should be construed as being key, required, or essential features of any or all of the claims. Furthermore, the specific embodiments disclosed above are illustrative only, as the disclosed subject matter may be modified and practiced in different but equivalent manners apparent to those skilled in the art having an understanding of the teachings herein. No limitation is intended to the details of construction or design shown herein, except as described in the appended claims. Therefore, it is apparent that the specific embodiments disclosed above may be altered or modified, and all such variations are considered to be within the scope of the disclosed subject matter. The protection sought herein is therefore as set forth in the appended claims.
Claims
1. A method comprising: determining, in response to receiving a plurality of commands from a central processing unit (CPU), at a graphics processing unit (GPU), determining, at the graphics processing unit, a first workload to be executed at the graphics processing unit based on at least one of the plurality of commands; identifying a first program thread among a plurality of program threads concurrently executing at the central processing unit based on the first workload; as well as In response to identifying the first program thread, a clock signal of the graphics processing unit is adjusted to a specified clock frequency associated with the first program thread.
2. The method of claim 1, wherein: Identifying the first program thread includes identifying the first program thread in response to the first workload exceeding a first workload threshold.
3. The method of claim 2, further comprising: determining, at the graphics processing unit, a second workload to be executed at the graphics processing unit after the first workload based on at least one other command of the plurality of commands; identifying a second program thread among the plurality of program threads concurrently executing at the central processing unit based on the second workload; as well as In response to identifying the second program thread, the clock signal of the graphics processing unit is adjusted from the designated clock frequency associated with the first program thread to the designated clock frequency associated with the second program thread.
4. The method of claim 3, wherein: Identifying the second program thread includes identifying the second program thread in response to the second workload being below a second workload threshold. The method of claim 2 , wherein the first workload threshold is programmable. 6 . The method of claim 1 , wherein determining the first workload comprises determining the first workload further based on information received at a scheduler of the graphics processing unit. 7 . The method of claim 1 , wherein determining the first workload comprises determining the first workload further based on a number of wavefronts scheduled for execution at a set of compute units of the graphics processing unit. 8 . The method of claim 1 , wherein determining the first workload comprises determining the first workload further based on a type of drawing commands received at the graphics processing unit.
9. The method of claim 1, wherein adjusting the clock signal of the graphics processing unit comprises ramping the clock signal from a second frequency to the designated clock frequency associated with the first program thread.
10. A graphics processing unit (GPU), comprising: a scheduler for receiving a plurality of commands from a central processing unit (CPU), the plurality of commands being associated with a plurality of program threads executing concurrently at the central processing unit; a plurality of computing units configured to execute a workload based on the plurality of commands; a clock control module [110], the clock control module being configured to generate a first clock signal for the plurality of computing units; as well as A clock frequency adjustment module [108], wherein the clock frequency adjustment module is configured to: determining a first workload to be executed at the plurality of computing units; identifying a first program thread among the plurality of program threads concurrently executing at the central processing unit based on the first workload; as well as In response to identifying the first program thread, the first clock signal is adjusted to a specified clock frequency associated with the first program thread.
11. The graphics processing unit according to claim 10, wherein the clock frequency adjustment module is configured to: The first program thread is identified in response to the first workload exceeding a first workload threshold.
12. The graphics processing unit according to claim 11, wherein the clock frequency adjustment module is configured to: determining a second workload to be executed at the plurality of computing units; identifying a second program thread based on the second workload; as well as In response to identifying the second program thread, the clock signal is adjusted from the specified clock frequency associated with the first program thread to a second specified clock frequency associated with the second program thread.
13. The graphics processing unit according to claim 12, wherein the clock frequency adjustment module is configured to: The second program thread is identified in response to the second workload being below a second workload threshold. 14 . The graphics processing unit of claim 10 , wherein the clock frequency adjustment module is configured to determine the first workload based on a number of wavefronts scheduled at a group of computation units of the graphics processing unit. 15 . The graphics processing unit of claim 14 , wherein the clock frequency adjustment module is configured to determine the first workload based on a number of drawing commands received at the scheduler.
Citation Information
Patent Citations
SOC method for low-power-consumption GPU
CN107168457A
Computer system capable of adjusting operating frequency dynamically
US20120011377A1