Vector Prior Instances SIMD Instructions for Radix Sort Memory Conflicts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing SIMD instruction sets and vectorized sorting algorithms face conflicts when scattering data, particularly in Radix Sort, due to non-contiguous memory access patterns, leading to inefficiencies and performance drawbacks.

Innovation Solution

Introducing two new SIMD instructions, Vector Prior Instances (VPI) and Vector Last Unique (VLU), which allow for efficient detection of recurring values and handling of conflicts by generating output vectors that mark instances and uniqueness, enabling vectorized algorithms to operate with unit-stride access patterns without replicating arrays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If vectorized radix sort uses indexed accesses (gather/scatter operations) to sort data, then sorting capability is achieved, but memory access conflicts occur and performance deteriorates

Engineering Contradiction:
Improvesorting capabilityVSAvoidmemory access conflicts
Core Design Contradiction:
ProductivityVSObject-generated harmful factors

Solution Approach 1:

The patent segments the sorting process into distinct phases: histogram computation phase and scatter phase. During the histogram phase, data is processed to count occurrences without performing scatter operations. The scatter phase then uses the pre-computed histogram data to distribute elements. This segmentation prevents conflicts by separating the counting logic from the scattering logic, allowing each phase to operate independently without memory access conflicts.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary computation of histogram data (counting occurrences of each value) before performing the scatter operation. This preliminary action stores the distribution information in a histogram array, which is then used to guide the scatter phase. By pre-computing the distribution plan, the actual scatter operation can proceed without conflicts because the destination for each element is predetermined and non-conflicting.

Inventive Principle:
Principle #10Preliminary action

2Object-generated harmful factors

If arrays are replicated to prevent scattering conflicts, then memory access conflicts are avoided, but memory usage and device complexity increase

Engineering Contradiction:
Improvememory access conflictsVSAvoidarray replication overhead
Core Design Contradiction:
Object-generated harmful factorsVSDevice complexity

Solution Approach 1:

The patent creates a logical copy of the distribution information in the histogram array rather than replicating the entire data array. The histogram array stores compact count information that guides the scatter operation, avoiding the need to replicate the full data structure. This copying approach provides the necessary information for conflict-free scattering while using minimal additional memory.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the representation of data from storing actual element values to storing histogram counts. Instead of replicating arrays of element values, the system uses a histogram array that stores frequency counts. This parameter change transforms the problem from managing complex array replications to managing simple count values, reducing device complexity while preventing conflicts.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If non-contiguous (stride) access patterns are used for sorting, then sorting algorithm functionality is achieved, but memory access efficiency decreases

Engineering Contradiction:
Improvesorting algorithm functionalityVSAvoidmemory access efficiency
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The patent segments memory access patterns into two distinct types: contiguous access during the histogram computation phase and contiguous access during the scatter phase (guided by pre-computed histogram data). This segmentation eliminates the need for non-contiguous stride access patterns, as each phase operates on contiguously accessed data, thereby improving memory access efficiency while maintaining sorting functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary histogram computation that transforms the data into a format enabling subsequent contiguous access. By pre-computing the histogram and using it to guide the scatter operation, the system can perform memory access in a contiguous manner during both the histogram phase and the scatter phase, eliminating inefficient stride patterns while achieving the same sorting result.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3254184B1Radix sort method for discovering multiple instances of recurring values within a vector and corresponding computing device and computer program product
Publication Date: 2023.06.07 BARCELONA SUPERCOMPUTING CENT CENT NAT DE SUPERCOMPUTACION
  • EP3254184B1 patent drawingFigure 1
  • EP3254184B1 patent drawingFigure 1a
  • EP3254184B1 patent drawingFigure 2

AI summary

Methods and devices for discovering multiple instances of recurring values within a vector are disclosed. A first method calculates the prior instances of the vector. A second method calculates the last unique instances of the vector.An implementation of these methods as SIMD instructions is proposed.Sequential and parallel CAM implementationsarealso disclosed.The proposed methods can be used to correct conflicting indexes in vector memory indexed operations. Furthermore, an application to a vectorizedsorting algorithmis proposed.