Dynamic Programming Shader Scheduling for GPU Resource Constraints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Complex shaders in video game development often exceed the available resources of graphics processing units (GPUs), leading to inefficient compilation and execution due to suboptimal partitioning techniques.

Innovation Solution

A dynamic programming method is employed to generate a schedule for executing shader operations, modeling the computational processor to minimize computational cost by creating a directed graph with precedence relations, allowing for the selection of paths with the lowest aggregate computational cost, even if individual operations do not yield the lowest cost.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If shader execution is partitioned into passes to virtualize GPU resources, then complex shaders can be executed on limited hardware, but the partitioning process becomes computationally expensive and time-consuming

Engineering Contradiction:
Improveability to execute complex shaders on limited GPU resourcesVSAvoidcompilation and partitioning time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The shader program is divided into multiple passes, each handling a subset of operations. The compiler segments the shader code into discrete operation nodes that can be scheduled independently, allowing complex shaders to run on limited GPU resources by executing different operation subsets across multiple passes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The dynamic programming algorithm performs preliminary analysis of all shader operations and pre-determines the optimal execution schedule before actual shader execution. By calculating the minimum-cost schedule in advance using operation dependencies and resource constraints, the system avoids runtime optimization overhead while ensuring efficient resource utilization.

Inventive Principle:
Principle #10Preliminary action

2Use of energy by moving object

If greedy techniques are used to select lower cost operations at each node, then local computational cost is reduced, but the overall path computational cost increases

Engineering Contradiction:
Improvelocal operational costVSAvoidoverall execution efficiency
Core Design Contradiction:
Use of energy by moving objectVSProductivity

Solution Approach 1:

The dynamic programming algorithm incorporates feedback by considering the global optimization goal when making local decisions. Each operation node's selection is informed by the overall path cost to the final machine state, ensuring that locally optimal choices contribute to global optimality. The algorithm uses the cost function C(s,finMS) that reflects the minimum cost from any state s to the final state, providing feedback that guides operation selection.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The operation scheduling system is dynamic and adaptive, adjusting the execution plan based on operation dependencies and resource constraints. The dynamic programming approach allows the system to flexibly select operations at each stage while maintaining awareness of the overall optimization goal, rather than following a fixed greedy strategy.

Inventive Principle:
Principle #15Dynamics

3Reliability

If more GPU resources are allocated to handle complex shaders, then shader execution quality improves, but hardware cost and resource availability worsen

Engineering Contradiction:
Improveshader execution qualityVSAvoidGPU resource requirements
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The shader program is divided into multiple passes, each handling a subset of operations. This segmentation allows the same limited GPU resources to be reused across different passes, effectively multiplying the available computational capacity without requiring additional hardware resources.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the execution parameters by introducing multiple passes and optimizing the schedule dynamically. By adjusting the temporal distribution of operations across passes and using dynamic programming to find the minimum-cost schedule, the system achieves high execution quality with fixed hardware resources.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS7788635B2Technique for processing a computer program
Publication Date: 2010.08.31 SONY INTERACTIVE ENTERTAINMENT LLC
  • US7788635B2 patent drawing
  • US7788635B2 patent drawing
  • US7788635B2 patent drawing

AI summary

The present invention is directed to a method for processing, in a computer system, a computer program having a plurality of operations. The method features calling a dynamic programming routine to generate a schedule for executing a subgroup of the plurality of operations by modeling operations of a computational processor associated with the computer system to minimize a computational cost of placing the computer system in a final machine state (finMS).