Register Sharing Mechanism for GPU Stall Cycle Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current GPU architectures face inefficiencies due to register spills when program register usage exceeds the available General Purpose Registers (GRFs), leading to increased stall cycles and reduced execution performance.

Innovation Solution

A register sharing mechanism is implemented to dynamically reallocate GRFs among threads by disabling hardware threads, optimizing GRF configuration through successive compilations to minimize stall cycles, and selecting the machine code version with the lowest stall cycles for dispatch.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If the compiler generates spills by assigning memory slots for variables exceeding the static register file size, then register allocation is simplified, but the likelihood of stalls due to cache misses increases

Engineering Contradiction:
Improveregister allocation simplicityVSAvoidstall cycles
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The patent implements dynamic register allocation where the register file size is adjusted at runtime based on the number of active threads. When hardware threads are disabled, their registers are reallocated to active threads, allowing the system to adapt register resources dynamically rather than using a fixed static allocation. This resolves the contradiction by enabling sophisticated register management without requiring complex compile-time spill analysis.

Inventive Principle:
Principle #15Dynamics

2Device complexity

If a static register file size is used for each thread, then compiler optimization is simplified, but execution efficiency decreases when register usage exceeds the allocated size

Engineering Contradiction:
Improvecompiler optimization complexityVSAvoidexecution efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent makes the register file universal by allowing it to serve multiple threads dynamically. The same physical register file is shared among active threads through the disabling and reallocating of hardware threads, rather than having dedicated static registers for each thread. This multi-functional approach improves execution efficiency while keeping compiler complexity manageable, as the compiler only needs to know the maximum register file size rather than optimizing for a fixed per-thread allocation.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If many fill instructions are inserted for spilled variables, then all variables can be tracked in memory, but very little useful execution is performed and the machine spends more time stalling

Engineering Contradiction:
Improvevariable tracking accuracyVSAvoiduseful execution throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the parameter of register file size dynamically at runtime based on the number of active threads. Instead of using a fixed small register file that requires frequent spills and fills, the system expands the effective register file size by utilizing disabled thread registers. This parameter change reduces the frequency of fill instructions while maintaining accurate variable tracking, thereby improving useful execution throughput.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11579878B2Register sharing mechanism to equally allocate disabled thread registers to active threads
Publication Date: 2023.02.14 INTEL CORP
  • US11579878B2 patent drawing
  • US11579878B2 patent drawing
  • US11579878B2 patent drawing

AI summary

An apparatus is disclosed. The apparatus includes one or more processors comprising register sharing circuitry to receive meta-information indicating a number of threads that are to be disabled and provide an indication that an associated thread is disabled, a plurality of General Purpose Register Files (GRFs), wherein one or more of the plurality of GRFs is associated with one of the plurality of threads and a plurality of multiplexers coupled to the one or more GRFs to receive the indication from the register sharing circuitry and disable thread access to an associated GRF based on an indication that a thread is to be disabled.