1. An evaluation of fast segmented sorting implementations on GPUs.
- Author
-
Schmid, Rafael F., Pisani, Flávia, Cáceres, Edson N., and Borin, Edson
- Subjects
- *
GRAPHICS processing units , *SUFFIXES & prefixes (Grammar) , *ALGORITHMS - Abstract
Many real-world problems require a sorting operation as part of their efficient solution. Some examples of this are real-time plasma diagnostic, image re-ranking, and suffix array construction. These problems usually involve a large amount of data, so their solutions need a particular application of the sorting procedure, consisting of sorting several arrays in matrix rows or array segments, an operation called segmented sorting. Previous studies showed that a merge sort-based strategy and a strategy called fix sort executed this operation on GPUs with good performance for different array sizes. In this work, we compare the fastest segmented sorting GPU implementations on seven different GPU models with various input data scenarios, including scenarios with varying numbers of segments, segment sizes, and considering segments of the same and different sizes. We first performed algorithm analysis to explain how the number of segments affects each implementation's performance. Then, we perform an S-curve analysis and observe that, even though each strategy might be the fastest option for a subset of the sorting scenarios, some approaches may cause very high slowdowns on specific scenarios. We also compare the strategies using heat maps, show that their performance depends on the array size and number of segments, and propose a recommendation map to support selecting the best overall implementation based on the size and number of segments. Our experimental results show that choosing a strategy based on our recommendation map leads to the best strategy on 47.57% of the cases and a maximum slowdown of less than 1.5 times in 93.58% of the cases. Moreover, on average, the recommended strategy is only 1.11 × worse than the optimum one. Finally, we evaluated how each strategy behaves when sorting arrays with different and equal segment sizes and showed that the fix sort-based approaches take roughly the same time to sort arrays with equal or different segment sizes, while the approach proposed by Hou et al. usually takes longer to sort arrays with different segment sizes than arrays with equal segment sizes. • The best segmented sorting strategy depends on the size and shape of the array. • Strategies recommended by our map are on average only 1.11x slower than the optimum. • Segments being equally sized or not has little impact on FC and FT's performance. [ABSTRACT FROM AUTHOR]
- Published
- 2022
- Full Text
- View/download PDF