Heterogeneous Memory Consistency via Scoped Event Ordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory consistency models for heterogeneous computing systems are not robustly defined, making it challenging for programmers to understand how programs will execute, especially on devices with heterogeneous components, due to ambiguity in memory access ordering and conflicts.

Innovation Solution

The implementation of a memory consistency model called Sequential Consistency for Heterogeneous-Race-Free (SC for HRF) that includes an optimizer analyzing program code to determine valid event orderings based on properties like scope order, scope inclusion, and scope transitivity, allowing for improved performance and energy efficiency by enabling local synchronizations instead of global memory access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If existing memory consistency models are used in heterogeneous systems, then programming simplicity is maintained, but execution predictability and reliability deteriorate due to ambiguity in memory access ordering

Engineering Contradiction:
Improveprogramming simplicityVSAvoidexecution predictability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces scope-based memory consistency where different scopes (e.g., thread scopes, hardware component scopes) have different consistency guarantees. Each scope can be configured independently with its own ordering rules, allowing programmers to select appropriate consistency levels for different parts of their code without requiring global consistency throughout the entire system.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The memory consistency model is segmented into multiple independent scopes rather than treating all memory accesses as a single unified order. This segmentation allows different hardware components and thread groups to have independent memory ordering guarantees, reducing ambiguity while maintaining programming simplicity through scoped synchronization primitives.

Inventive Principle:
Principle #1Segmentation

2Reliability

If global memory access is used for synchronization, then consistency across all threads is ensured, but energy consumption and performance deteriorate due to unnecessary wide memory traffic

Engineering Contradiction:
Improveconsistency guaranteeVSAvoidenergy consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent enables local synchronization within specific scopes rather than requiring global synchronization. Threads within the same scope can synchronize using narrower memory transactions that only affect their local memory region, reducing the bandwidth and energy consumption compared to global memory accesses while maintaining consistency guarantees for threads in that scope.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

Instead of performing complete global memory synchronization when only local scope consistency is needed, the system performs partial synchronization limited to the relevant scope. This partial action approach reduces excessive memory traffic and energy consumption while providing sufficient consistency guarantees for the specific threading context.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If strict memory ordering is enforced, then execution correctness is ensured, but performance deteriorates due to limited parallelism and increased latency

Engineering Contradiction:
Improveexecution correctnessVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies different memory ordering strictness to different scopes. Critical sections requiring strong consistency can use strict ordering, while less critical operations can use relaxed ordering within their scopes. This selective enforcement maintains execution correctness where needed while allowing performance optimization elsewhere.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The memory consistency model dynamically adapts the ordering requirements based on the operational context and scope. The system can adjust memory ordering guarantees at runtime based on synchronization events and scope boundaries, allowing flexible performance tuning while maintaining correctness through the scoped consistency model.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9361118B2Method for memory consistency among heterogeneous computer components
Publication Date: 2016.06.07 ADVANCED MICRO DEVICES INC
  • US9361118B2 patent drawing
  • US9361118B2 patent drawing
  • US9361118B2 patent drawing

AI summary

A method, computer program product, and system is described that determines the correctness of using memory operations in a computing device with heterogeneous computer components. Embodiments include an optimizer based on the characteristics of a Sequential Consistency for Heterogeneous-Race-Free (SC for HRF) model that analyzes a program and determines the correctness of the ordering of events in the program. HRF models include combinations of the properties: scope order, scope inclusion, and scope transitivity. The optimizer can determine when a program is heterogeneous-race-free in accordance with an SC for HRF memory consistency model. For example, the optimizer can analyze a portion of program code, respect the properties of the SC for HRF model, and determine whether a value produced by a store memory event will be a candidate for a value observed by a load memory event. In addition, the optimizer can determine whether reordering of events is possible.