Shared Memory Access via Dual Code Version Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing OpenCL frameworks face inefficiencies in shared memory access, particularly when the work group size is small or the shared local memory is limited, leading to suboptimal performance in computations like matrix multiplication, as they rely on cache-based shared memory without fully utilizing register-based memory access.

Innovation Solution

A new framework compiles two versions of executable binary code: one for register-based shared local memory and another for cache-based shared local memory, allowing the runtime code to choose the optimal version based on work group size and hardware capabilities, thereby improving shared memory access efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If cache-based shared local memory is used, then compatibility with existing OpenCL frameworks is maintained, but shared memory access performance deteriorates when work group size is small or shared local memory is limited

Engineering Contradiction:
ImprovecompatibilityVSAvoidshared memory access performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the memory access parameter by providing two versions of executable binary code: one version accesses shared local memory through cache while another version accesses it through registers. The system dynamically selects between these versions based on runtime parameters such as work group size and shared local memory size, thereby optimizing performance for different scenarios while maintaining compatibility

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces dynamic selection between two code versions at runtime based on work group size and hardware capabilities. This dynamic approach allows the system to adapt to different execution contexts, choosing the optimal memory access method (cache-based or register-based) for each specific scenario rather than using a fixed approach

Inventive Principle:
Principle #15Dynamics

2Productivity

If register-based shared local memory access is implemented, then shared memory access performance improves, but device complexity increases due to need for multiple code versions

Engineering Contradiction:
Improveshared memory access performanceVSAvoidcode compilation and execution complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by compiling two versions of executable binary code in advance during the compilation phase. One version is optimized for cache-based access while the other is optimized for register-based access. This pre-compilation approach eliminates the need for complex runtime compilation decisions, reducing execution-time complexity while maintaining performance benefits

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary selection mechanism that chooses between two pre-compiled code versions based on runtime parameters. This intermediary layer (the version selection logic) simplifies the overall system by providing a straightforward decision-based approach rather than requiring complex dynamic code generation or interpretation, thereby managing device complexity effectively

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11068401B2Method and apparatus to improve shared memory efficiency
Publication Date: 2021.07.20 INTEL CORP
  • US11068401B2 patent drawing
  • US11068401B2 patent drawing
  • US11068401B2 patent drawing

AI summary

Methods and apparatus to improve shared memory efficiency are described. In an embodiment, a first version of a code to access one or more registers as shared local memory is compiled. A second version of the same code is also compiled to access a cache as the shared local memory. The first version of the code is executed in response to comparison of a work group size of the code with a threshold value. Other embodiments are also disclosed and claimed.