tree: 1d78ca0965dec073038413322d912b985d024fc3
  1. src/
  2. Cargo.toml
  3. README.md
gpu/conveyor-sort/README.md

(WIP) conveyor-sort GPU integer sorter

conveyor-sort is a WebGPU-backed 64-bit integer based on the merge sort algorithm impemented Modern GPU by Sean Baxter. It has the following focus areas, in this order:

  • portability
  • understandability
  • performance

Current compatibility:

  • [x] AMD GCN
  • [x] Arm Bifrost
  • [x] Intel Gen10
  • [x] Nvidia Turing

Note: The shader is early in development since features of WGSL are still in flux and not all of them supported yet in wgpu. For example, some functions could be simplfied once pointers become more flexible.

Preliminary benchmarks (results in million elements per second)

AMD Ryzen 4700u, 7 CUs, 3200MHz DDR4

Uniform random

u64 array sizeparallel pdqsort (CPU)conveyor-sort (GPU)
102443.39N/A
40968.13N/A
65536238.23N/A
1048576253.39N/A
16777216171.22N/A

Pre-sorted chunks

u64 array sizeparallel pdqsort (CPU)conveyor-sort (GPU)
1024152.84N/A
409679.69N/A
65536203.97N/A
1048576239.24N/A
16777216154.24N/A

Samsung Exynos 9810, 18 CUs, 1800MHz LPDDR4X

Uniform random

u64 array sizeparallel pdqsort (CPU)conveyor-sort (GPU)
102417.1911.99
40961.3031.68
655363.0275.11
10485769.3776.96
1677721637.7964.24

Pre-sorted chunks

u64 array sizeparallel pdqsort (CPU)conveyor-sort (GPU)
102423.2712.27
40966.3731.39
6553621.9177.31
104857625.0176.67
1677721639.8263.51