Work-Group Size Determination via Spatial Locality Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining work-group size in OpenCL frameworks do not effectively optimize resource usage and load balance across computing units, particularly in terms of spatial locality and memory access patterns, leading to suboptimal performance.

Innovation Solution

A method and apparatus that calculate spatial locality and footprints of work items within a work-group, converting memory references to symbol expressions, partially evaluating these expressions, and determining work-group size based on reuse distance and memory line size to maximize spatial locality and adhere to resource constraints.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If work-group size is increased to improve parallel processing throughput, then productivity increases, but resource usage efficiency deteriorates due to poor spatial locality and imbalanced load distribution

Engineering Contradiction:
Improveparallel processing throughputVSAvoidresource usage efficiency
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent dynamically determines work-group size by analyzing memory access patterns and spatial locality characteristics of the kernel being executed. Instead of using a fixed or arbitrarily chosen work-group size, the system calculates the actual memory footprint and access behavior to adaptively set the optimal work-group size, thereby improving both productivity and resource efficiency simultaneously

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of work-group size based on calculated spatial locality metrics and memory footprint analysis. By transforming the static work-group size parameter into a dynamic one that adapts to the specific kernel's memory access characteristics, the system resolves the contradiction between throughput and efficiency

Inventive Principle:
Principle #35Parameter changes

2Speed

If work-group size is increased to process more work items simultaneously, then processing speed improves, but load balance between computing units deteriorates

Engineering Contradiction:
Improveprocessing speedVSAvoidload balance
Core Design Contradiction:
SpeedVSStability of the object's composition

Solution Approach 1:

The system dynamically adjusts work-group size to maintain stable load distribution across computing units. By continuously analyzing memory access patterns and adjusting work-group dimensions accordingly, the system ensures that each computing unit receives an appropriate workload, preventing both overload and underutilization while maintaining high processing speed

Inventive Principle:
Principle #15Dynamics

3Loss of energy

If work-group size is reduced to improve spatial locality and memory access efficiency, then resource usage improves, but productivity decreases due to fewer work items processed per work-group

Engineering Contradiction:
Improvememory access efficiencyVSAvoidwork items processed per work-group
Core Design Contradiction:
Loss of energyVSProductivity

Solution Approach 1:

The patent changes the work-group size parameter based on calculated spatial locality values and memory footprint analysis. By transforming this parameter from a fixed value to a dynamically determined one, the system optimizes the balance between memory access efficiency and processing throughput, achieving both improved resource usage and maintained productivity

Inventive Principle:
Principle #35Parameter changes

4Device complexity

If work-group size is arbitrarily set without analysis, then device complexity and implementation simplicity are maintained, but performance optimization deteriorates

Engineering Contradiction:
Improveimplementation simplicityVSAvoiddevice performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The system performs self-service by automatically analyzing its own memory access patterns and determining optimal work-group size without requiring external manual configuration. The kernel itself provides the necessary information about its memory access behavior, and the system uses this information to self-optimize the work-group size, eliminating the need for complex external analysis tools while achieving performance optimization

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10114793B2Method and apparatus for determining a work-group size
Publication Date: 2018.10.30 SAMSUNG ELECTRONICS CO LTD
  • US10114793B2 patent drawing
  • US10114793B2 patent drawing
  • US10114793B2 patent drawing

AI summary

Methods and apparatuses for determining a work-group size are provided. The method of determining a work-group size includes calculating a first value denoting spatial locality of a memory that is shared by one or more work items included in a work-group, calculating a second value denoting footprints of the one or more work items included in the work-group based on the first value, and determining the work-group size based on the first and second values.