GPU Radix Sort via Parallel Prefix Sum Offsets
Find Innovative SolutionsGenerate 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 efficiently, enabling effective sorting within the GPU architecture.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional sorting algorithms are used on GPU, then parallel processing capability is utilized, but sorting efficiency deteriorates due to serial execution nature of conventional algorithms
Solution Approach 1:
The sorting algorithm is divided into multiple independent passes, where each pass processes a specific portion of the sorting task. Each pass can be executed independently on different thread groups, enabling parallel execution while maintaining sorting correctness through the cumulative effect of all passes.
Solution Approach 2:
The algorithm transforms the traditional single-dimension sorting approach into a multi-dimensional process by introducing multiple passes and thread group dimensions. Data is sorted through combinations of pass index, thread group ID, and element index, effectively utilizing the parallel processing dimensions of GPU architecture.
2Productivity
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
Solution Approach 1:
The GPU performs sorting operations autonomously using its own parallel processing capabilities, eliminating the need for CPU intervention in the sorting process. The algorithm is designed to be self-sufficient on GPU hardware, avoiding data transfer overhead and CPU bottlenecks while maintaining sorting accuracy.
3Ease of operation
If GPU performs work-inefficient processing steps, then certain operations can be executed, but processor utilization deteriorates leading to reduced overall system performance
Solution Approach 1:
The algorithm changes key parameters including thread organization (thread groups with multiple threads), data representation (using prefix sum offsets), and processing structure (multi-pass approach). These parameter changes transform operations that would be work-inefficient into highly parallelizable tasks that fully utilize GPU processor resources.
Data Source
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.


