GPU Kernel Parameter Tuning via Hardware Counter Feedback

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing GPU parameter tuning techniques rely on heuristic or experimental methods that do not consider the underlying system structure, making it challenging to achieve optimal performance, as they often use black box approaches or extensive manual experimentation.

Innovation Solution

A method and system that combine deterministic and heuristic techniques to tune GPU parameters by monitoring hardware and performance counters, representing parameters as optimization problems, and dynamically adjusting them to optimize execution time and resource utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Extent of automation

If heuristic techniques are used for GPU parameter tuning, then the tuning process can be automated, but the system does not consider the underlying hardware structure leading to suboptimal performance

Engineering Contradiction:
Improveautomation of GPU parameter tuningVSAvoidperformance optimization accuracy
Core Design Contradiction:
Extent of automationVSManufacturing precision

Solution Approach 1:

The patent introduces performance counters and hardware monitoring mechanisms as intermediaries between the heuristic tuning algorithm and the GPU hardware. These counters capture actual hardware behavior (memory accesses, compute operations, resource utilization) and feed this structured data back to the tuning algorithm, enabling it to make informed decisions that respect the underlying hardware architecture while maintaining automation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements a feedback loop where performance counters continuously monitor GPU execution metrics, and this feedback is used to iteratively refine parameter tuning decisions. The heuristic algorithm adjusts parameters based on observed performance patterns from the counters, creating a closed-loop system that adapts to actual hardware behavior rather than relying solely on predetermined heuristics.

Inventive Principle:
Principle #23Feedback

2Manufacturing precision

If deterministic techniques with extensive experimentation are used, then optimal parameter values can be found, but the process requires extensive manual observation and experimentation

Engineering Contradiction:
Improveparameter optimization accuracyVSAvoidtime for experimentation and observation
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary characterization of GPU kernels by analyzing performance counter data before the actual parameter tuning process. This preliminary action identifies which hardware counters are most relevant to each kernel type, pre-computing this information so that the subsequent tuning process can focus only on the critical parameters and counters, significantly reducing the experimentation time required.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The tuning process is segmented into distinct phases: (1) kernel characterization using performance counters, (2) identification of critical counters, (3) parameter space exploration, and (4) optimization. This segmentation allows the system to efficiently allocate resources to each phase and avoid unnecessary experimentation in later stages once optimal parameters are identified.

Inventive Principle:
Principle #1Segmentation

3Loss of information

If comprehensive monitoring of all hardware counters is performed, then complete system understanding is achieved, but the complexity and overhead of data collection increases

Engineering Contradiction:
Improvecompleteness of system understandingVSAvoidcomplexity of monitoring system
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent extracts and focuses only on the subset of hardware counters that are most relevant to GPU kernel performance, rather than monitoring all available counters. By analyzing performance patterns and identifying critical counters specific to each kernel type, the system extracts only the essential data needed for effective tuning, reducing monitoring complexity while maintaining complete understanding of the performance-critical aspects.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP3885911B1Method and system for tuning graphics processing unit (GPU) parameters of a GPU kernel
Publication Date: 2023.12.27 TATA CONSULTANCY SERVICES LTD
  • EP3885911B1 patent drawingFigure 1
  • EP3885911B1 patent drawingFigure 2
  • EP3885911B1 patent drawingFigure 3

AI summary

This disclosure relates generally to method and system for tuning graphics processing unit (GPU) parameters of a GPU kernel .The disclosure proposes a combination of both heuristic and deterministic techniques for tuning GPU parameters of a GPU kernel to achieve optimal configuration of the GPU parameters. The proposed method and a system for tuning GPU parameters is based on deterministic techniques and heuristic techniques that includes capturing behavior of the GPU application by monitoring several GPU hardware counters that comprise several hardware resources and performance counters. The proposed tuning GPU parameters also implements a set of heuristic techniques to decide course of the tuning for various GPU parameters based on the captured behaviour of the GPU hardware counters.