# US 10,311,626 B2 · System and method for identifying graphics workloads for dynamic allocation of resources among GPU shaders

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,311,626 B2
- Document ID: US10311626B2
- Status: Granted
- Kind: B2
- Application number: 15/297,611
- Filed: 2016-10-19
- Published: 2018-04-19
- Granted: 2019-06-04
- Earliest claimed: 2016-10-19
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Rashad Oreifej; Angel E. Socarras; Mark Russell Anderson; Randy Wayne Ramsey
- Web page: https://patentgrep.com/patent/US10311626B2

## CPC

- G06T 15/005: {General purpose rendering architectures}
- G06F 9/38: Concurrent instruction execution, e.g. pipeline or look ahead
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A GPU filters graphics workloads to identify candidates for profiling. In response to receiving a graphics workload for the first time, the GPU determines if the graphics workload would require the GPU shaders to use fewer resources than would be spent profiling and determining a resource allocation for subsequent receipts of the same or a similar graphics workload. The GPU can further determine if the shaders are processing more than one graphics workload at the same time, such that the performance characteristics of each individual graphics workload cannot be effectively isolated. The GPU then profiles and stores resource allocations for a plurality of shaders for processing the filtered graphics workloads, and applies those stored resource allocations when the same or a similar graphics workload is received subsequently by the GPU.

## Claims

### Claim 1

A method comprising:
receiving at a plurality of shaders a first graphics workload;
in response to the plurality of shaders using less than a threshold amount of resources to process the first graphics workload,
storing a first workload identifier; and
applying a default resource allocation to the plurality of shaders when a second graphics workload having the first workload identifier is subsequently received by the plurality of shaders; and
in response to the plurality of shaders using more than the threshold amount of resources,
determining by a performance monitor a resource allocation for the first graphics workload;
storing the resource allocation and a second workload identifier that is different than the first workload identifier; and
applying the resource allocation to the plurality of shaders when a second graphics workload having the second workload identifier is subsequently received by the plurality of shaders.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining by the performance monitor a resource allocation for the first graphics workload in response to determining that the plurality of shaders is dedicated to processing the first graphics workload.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining that the plurality of shaders is dedicated to processing the first graphics workload comprises determining that each shader of the plurality of shaders is processing the first graphics workload and determining that no shader of the plurality of shaders is processing a second graphics workload while the first graphics workload is being processed.

### Claim 4 (depends on 1)

The method of claim 1, wherein the resource allocation comprises one or more of a voltage, clock frequency, and memory resource allocation to be applied to one or more of the shaders when processing the first graphics workload.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
in response to receiving a third graphics workload to be processed by the plurality of shaders concurrently with the second graphics workload, applying to the plurality of shaders the highest clock frequency required either of the stored resource allocation or the third graphics workload.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining a resource allocation comprises:
collecting performance data from a plurality of counters, each counter associated with one or more of the shaders;
aggregating the collected performance data; and
allocating resources to each shader based on the aggregated performance data.

### Claim 7 (depends on 1)

The method of claim 1, wherein the threshold amount of resources comprises a threshold amount of time.

### Claim 8

A method comprising:
receiving a plurality of graphics workloads for processing by a plurality of shaders;
filtering the received graphics workloads based on a comparison of a plurality of processing characteristics to a threshold, wherein the plurality of processing characteristics comprises an amount of resources used by the plurality of shaders to process a first graphics workload;
bypassing determining resource allocations for graphics workloads in the plurality of graphics workloads that do not meet the threshold; and
determining a resource allocation among the plurality of shaders for each filtered graphics workload that meets the threshold.

### Claim 9 (depends on 8)

The method of claim 8, wherein the plurality of processing characteristics comprises an amount of resources used by the plurality of shaders to process a first graphics workload.

### Claim 10 (depends on 8)

The method of claim 8, wherein the plurality of processing characteristics comprises the plurality of shaders being dedicated to processing the first graphics workload.

### Claim 11 (depends on 10)

The method of claim 10, wherein the plurality of shaders being dedicated to processing the first graphics workload comprises each shader of the plurality of shaders executing only the first graphics workload.

### Claim 12 (depends on 8)

The method of claim 8, wherein the resources comprise one or more of a voltage, clock frequency, and memory resource allocation to be applied to one or more of the shaders when processing the first graphics workload.

### Claim 13 (depends on 8)

The method of claim 8, wherein allocating resources comprises:
collecting workload performance data from a plurality of counters, each counter associated with one or more of the shaders;
aggregating the collected performance data; and
setting one or more of a voltage, clock frequency, and memory resource allocation to be applied to one or more of the shaders when processing the first graphics workload based on the aggregated performance data.

### Claim 14 (depends on 8)

The method of claim 8, further comprising:
storing the resource allocation; and
applying the resource allocation to the plurality of shaders when a second graphics workload having a same workload identifier as the first graphics workload is subsequently received by the plurality of shaders.

### Claim 15

A device comprising:
a plurality of shaders for processing a first graphics workload; and
a performance monitor configured to compare an amount of resources used by the plurality of shaders to process the first graphics workload to a threshold amount of resources, determine a resource allocation for the first graphics workload in response to the plurality of shaders using less than the threshold amount of resources to process the first graphics workload, and wherein the performance monitor is configured to bypass determining the resource allocation for the first graphics workload in response to the first graphics workload not meeting the threshold.

### Claim 16 (depends on 15)

The device of claim 15, wherein the performance monitor is further configured to determine a resource allocation for the first graphics workload in response to the plurality of shaders requiring more than a threshold amount of resources to process the first graphics workload.

### Claim 17 (depends on 15)

The device of claim 15, further comprising a memory to store the resource allocation and a workload identifier for the first graphics workload.

### Claim 18 (depends on 17)

The device of claim 17, wherein the performance monitor is further configured to apply the stored resource allocation to a second graphics workload in response to the second workload having a same workload identifier as the first graphics workload.

### Claim 19 (depends on 15)

The device of claim 15, wherein the resource allocation comprises one or more of a voltage, clock frequency, and memory resource allocation to be applied to one or more of the shaders when processing the first graphics workload.

### Claim 20 (depends on 15)

The device of claim 15, wherein the performance monitor is to determine a resource allocation by:
collecting performance data from a plurality of counters, each counter associated with one or more of the shaders;
aggregating the collected performance data; and
allocating resources to each shader based on the aggregated performance data.
