GPU Radix Sort via Parallel Prefix Sum Offsets

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional sorting algorithms are predominantly serial in execution, making them inefficient on parallel graphics processing units (GPUs), leading to suboptimal performance when sorting data generated by GPUs, as they require CPU intervention, which introduces inefficiency and reduces overall application performance.

Innovation Solution

A radix sort method is implemented using parallel processing architecture, where thread groups are associated with sort keys, and prefix sum operations are performed to reorder data based on radix symbol occurrences, enabling efficient sorting within the GPU architecture.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional sorting algorithms are used on GPU, then parallel processing capability is utilized, but sorting performance deteriorates due to serial execution nature of conventional algorithms

Engineering Contradiction:
Improvesorting performanceVSAvoidalgorithm complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The sort key is divided into multiple sub-keys, with each thread in a thread group responsible for processing a different sub-key. This segmentation allows parallel processing of different portions of the sorting task simultaneously, resolving the contradiction between utilizing parallel GPU capabilities and maintaining sorting performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimensional approach by organizing threads into thread groups where each thread handles a specific sub-key dimension. The prefix sum operation is performed across this new dimension of sub-key processing, enabling efficient parallel sorting that leverages GPU architecture without requiring complex algorithmic transformations.

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

2Measurement precision

If CPU performs sorting operations, then sorting accuracy is maintained, but overall application performance deteriorates due to CPU-GPU data transfer overhead and CPU bottleneck

Engineering Contradiction:
Improvesorting accuracyVSAvoidapplication performance
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The GPU performs sorting operations independently using its own parallel processing capabilities. Thread groups on the GPU execute prefix sum operations and data reordering directly on GPU memory without requiring data transfer to CPU, enabling the GPU to serve its own sorting needs and eliminating CPU-GPU communication overhead.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Thread groups perform preliminary prefix sum calculations on sub-key values before final data reordering. This preliminary organization of data by sub-key groups enables efficient parallel sorting while maintaining accuracy, allowing the GPU to complete sorting operations independently without CPU intervention.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If GPU performs work-inefficient processing steps, then parallel architecture is utilized, but processor utilization deteriorates leading to reduced performance

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidprocessor utilization
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

Different threads within a thread group perform different local operations on different sub-keys of sort keys. Each thread is specialized for processing its assigned sub-key, creating local quality variations that enable efficient parallel processing while maintaining high processor utilization across the entire GPU.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS7624107B1Radix sort algorithm for graphics processing units
Publication Date: 2009.11.24 NVIDIA CORP
  • US7624107B1 patent drawing
  • US7624107B1 patent drawing
  • US7624107B1 patent drawing

AI summary

One embodiment of the present invention sets forth a technique for efficiently performing a radix sort operation on a graphics processing unit (GPU). The radix sort operation is conducted on an input list of data using one or more passes of a series of three processing phases. In each processing phase, thread groups are each associated with one segment of input data. In the first phase, occurrences of each radix symbol are counted and stored in a list of counters. In the second phase, the list of counters is processed by a parallel prefix sum operation to generate a list of offsets. In the third phase, the list of offsets is used to perform re-ordering on the list of data, according to the current radix symbol. To maintain sort stability, the one or more passes proceed from least significant data to most significant data in the sort key.