AoSoA Memory Layout for Parallel Processing Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing parallel processing subsystems face inefficiencies in memory access due to sparse memory access patterns in both array of structures (AoS) and structure of arrays (SoA) data organization methods, which are not optimized for different architectures and can lead to performance issues across varying systems.

Innovation Solution

Implementing an array of structures of arrays (AoSoA) data structure where the base address and offset proportional to the number of thread/data lanes are used to efficiently store and retrieve data, allowing for simultaneous access by threads with a unit stride length, thereby improving memory access efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If array of structures (AoS) storage pattern is used, then adjacent fields from a particular structure are efficiently accessed by threads, but memory access pattern becomes sparse where addresses accessed by each thread are separated from neighboring lanes by a distance equal to the size of a structure

Engineering Contradiction:
Improveaccess to adjacent fieldsVSAvoidmemory access efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the data storage into two dimensions: structures are arranged in rows, and fields within structures are arranged in columns. This segmentation allows threads to access adjacent fields efficiently (same row, adjacent columns) while maintaining sequential memory access patterns (same column, consecutive rows). The result is an array of structures of arrays (AoSoA) where each structure is actually an array of field values that can be accessed sequentially.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from traditional one-dimensional linear storage to a two-dimensional matrix-like arrangement. Structures become rows and fields become columns, creating a dimensional transformation that simultaneously optimizes both field accessibility and memory access efficiency. This dimensional change resolves the contradiction by allowing adjacent field access within rows while maintaining sequential access patterns down columns.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Ease of operation

If structure of arrays (SoA) storage pattern is used, then specific fields from adjacent structures are accessed efficiently, but accesses to adjacent fields in a particular structure are separated by a distance proportional to the number of structures

Engineering Contradiction:
Improveaccess to specific fieldsVSAvoidmemory access efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent applies segmentation by organizing data as an array of structures of arrays, where the outer array contains structures and each structure contains an inner array of field values. This dual-level segmentation allows efficient access to specific fields across structures (through the outer array) while maintaining sequential access to adjacent fields within a structure (through the inner array).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a nested structure where each structure contains an embedded array of field values. This nesting allows the system to access specific fields efficiently at the outer level while maintaining sequential access patterns at the inner level. The nested arrangement resolves the contradiction by providing both cross-structure field access and intra-structure field access without the large strides associated with traditional SoA.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Productivity

If programmers write optimized program source using hybrid allocation, then access to adjacent fields and fields in adjacent structures is optimized, but the code requires detailed knowledge of PPS architectural details

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidprogramming complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements self-service by providing a memory management library that automatically handles the complex address calculations and data layout transformations. Instead of requiring programmers to manually optimize memory allocation based on architectural details, the library automatically computes optimal access patterns and manages the AoSoA data structure, making the system self-optimizing without increasing programming complexity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces a memory management library as an intermediary between the programmer and the hardware. This intermediary layer handles the architectural complexity by automatically translating high-level programming operations into optimized low-level memory access patterns. The library acts as a mediator that conceals the complexity of AoSoA management while providing optimized performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If program source code is optimized for a specific PPS architecture, then performance is improved on that architecture, but the code may not run efficiently on systems with different PPS architectures

Engineering Contradiction:
Improveperformance on target architectureVSAvoidportability across architectures
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements universality by creating an architecture-independent memory management library that works across different PPS architectures. The library provides universal functions for memory access that automatically adapt to different architectural details through standardized interfaces. This allows the same codebase to achieve optimized performance on various architectures without requiring architecture-specific optimization, thereby improving both performance and portability simultaneously.

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

Data Source

PatentUS8751771B2Efficient implementation of arrays of structures on SIMT and SIMD architectures
Publication Date: 2014.06.10 NVIDIA CORP
  • US8751771B2 patent drawing
  • US8751771B2 patent drawing
  • US8751771B2 patent drawing

AI summary

One embodiment of the present invention sets forth a technique providing an optimized way to allocate and access memory across a plurality of thread/data lanes. Specifically, the device driver receives an instruction targeted to a memory set up as an array of structures of arrays. The device driver computes an address within the memory using information about the number of thread/data lanes and parameters from the instruction itself. The result is a memory allocation and access approach where the device driver properly computes the target address in the memory. Advantageously, processing efficiency is improved where memory in a parallel processing subsystem is internally stored and accessed as an array of structures of arrays, proportional to the SIMT/SIMD group width (the number of threads or lanes per execution group).