CoChat

Bandwidth-Optimal Random Shuffling for GPUs

Open access
Mitchell, Rory, Stokes, Daniel, Frank, Eibe, Holmes, Geoffrey · 2022 · ACM Transactions on Parallel Computing

The DOI matches its Crossref record; 69 of the 69 references it cites were found in a registry or an index; 2 of the 22 sources its claims cite were checked for support.

Abstract

Linear-time algorithms that are traditionally used to shuffle data on CPUs, such as the method of Fisher-Yates, are not well suited to implementation on GPUs due to inherent sequential dependencies, and existing parallel shuffling algorithms are unsuitable for GPU architectures because they incur a large number of read/write operations to high latency global memory. To address this, we provide a method of generating pseudo-random permutations in parallel by fusing suitable pseudo-random bijective functions with stream compaction operations. Our algorithm, termed “bijective shuffle” trades increased per-thread arithmetic operations for reduced global memory transactions. It is work-efficient, deterministic, and only requires a single global memory read and write per shuffle input, thus maximising use of global memory bandwidth. To empirically demonstrate the correctness of the algorithm, we develop a statistical test for the quality of pseudo-random permutations based on kernel space embeddings. Experimental results show that the bijective shuffle algorithm outperforms competing algorithms on GPUs, showing improvements of between one and two orders of magnitude and approaching peak device bandwidth.

Overview

CoChat Summary

## TL;DR

The paper introduces a GPU-oriented shuffling algorithm, “bijective shuffle,” that uses pseudo-random bijective functions plus stream compaction to achieve bandwidth-optimal random shuffling with one global memory read and write per input element. It also proposes a kernel-based statistical test for permutation quality and reports GPU speedups of between one and two orders of magnitude over competing shuffle methods.

## Key findings

  • The bijective shuffle is work-efficient and deterministic, and the paper states it requires a single global memory read and write per shuffle input, making it bandwidth-optimal for GPUs.
  • On a Tesla V100-32GB, the optimized Bijective2 version closely matches the throughput of random gather; the paper reports it is equivalent in performance for sizes > 2^21.
  • On a GeForce RTX 2080, throughput for VarPhilox is reported at 3649.39 million items/s for input size 2^17 + 1, versus 95.38 for DartThrowing and 71.17 for SortShuffle.
  • The paper’s statistical testing recommends a 24-round VariablePhilox cipher; it reports that samples with fewer than 20 rounds are unlikely to be uniformly distributed at n = 5, and that the LCG variant “clearly fails” the chi-squared test with a statistic in the region of 500,000.

## Methods

  • The algorithmic design combines pseudo-random bijective functions (notably LCG and a modified Feistel/Philox variant called VariablePhilox) with exclusive scan / stream compaction to map a larger bijection down to arbitrary-length permutations.
  • The paper evaluates throughput on GPUs using arrays of 64-bit keys, with input sizes of the form 2^w + 1 for w = 8 to 29, and reports the average of five trials.
  • For permutation-quality assessment, it uses a chi-squared test for small n and develops an MMD-based test in an RKHS using the Mallows kernel for larger n.

## Limitations

  • The paper states that the implementation’s parameterization differs from standard library shuffle interfaces: it is parameterized by a bijective function and a key of length log(n) k bits, rather than by a generic uniform random bit generator.
  • The proposed GPU algorithm does not operate in-place and requires an output buffer; this is explicitly stated as a limitation relative to in-place shuffles like Fisher-Yates and Rao-Sandelius.
  • Evident from the text: the statistical testing section notes that 21! > 2^64, so any shuffle using a 64-bit integer seed cannot generate all permutations for n ≥ 21; this is a limitation of the seed space, not necessarily of the algorithm itself.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.1145/3505287

Cites

69 of 69 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Fig. 1 Parallel random gather - Threads read from non-contiguous memory locations and write to contiguous memory locations.
Fig. 1 Parallel random gather - Threads read from non-contiguous memory locations and write to contiguous memory locations.From the PDF
Fig. 2 Feistel Network construction - Successive rounds of the function 𝐹 are applied to the input, each time with a unique key.
Fig. 2 Feistel Network construction - Successive rounds of the function 𝐹 are applied to the input, each time with a unique key.From the PDF
Fig. 3 Philox cipher - Bijective function 𝐵 𝑘 is added to the standard Feistel cipher
Fig. 3 Philox cipher - Bijective function 𝐵 𝑘 is added to the standard Feistel cipherFrom the PDF
Fig. 5 Shuffle compaction - Dashed boxes represent dummy elements used to extend the sequence to a power of two. The bijective function is evaluated for each thread, yielding 𝑊 . We flag any 𝑊 > 4 , then the scan of these flags provides the destination address for each 𝑋 [ 𝑊 𝑖 ] , where 𝑊 𝑖 ≤ 4 .
Fig. 5 Shuffle compaction - Dashed boxes represent dummy elements used to extend the sequence to a power of two. The bijective function is evaluated for each thread, yielding 𝑊 . We flag any 𝑊 > 4 , then the scan of these flags provides the destination address for each 𝑋 [ 𝑊 𝑖 ] , where 𝑊 𝑖 ≤ 4 .From the PDF
Fig. 8 ˆ MMD 2 ( 𝑝, Π ) | statistic, 𝑛 = 100 , | Π | = 100,000
Fig. 8 ˆ MMD 2 ( 𝑝, Π ) | statistic, 𝑛 = 100 , | Π | = 100,000From the PDF
Fig. 10 GPU kernel fusion for bijective shuffle - increasing kernel fusion decreases memory transactions and approaches the gather throughput upper bound.
Fig. 10 GPU kernel fusion for bijective shuffle - increasing kernel fusion decreases memory transactions and approaches the gather throughput upper bound.From the PDF
Fig. 11 GPU shuffling algorithms - Tesla V100
Fig. 11 GPU shuffling algorithms - Tesla V100From the PDF
Fig. 13 CPU shuffling algorithms - 2x Intel Xeon E5-2698
Fig. 13 CPU shuffling algorithms - 2x Intel Xeon E5-2698From the PDF
Fig. 14 GPU shuffling algorithms runtime - Tesla V100
Fig. 14 GPU shuffling algorithms runtime - Tesla V100From the PDF

Verification

Claims the paper makes

2 Valid · 2 Not valid · 15 Not checked · 58 Own results and interpretations

44 more claims

Create a free account to see all 77 claims and to verify the 1 reference still open.

See all claims — free account
  • Probably not a substantial claim. 15
  • It may state two separate claims as one. 20

Create a free account to see these claims.

Citations

Cites

Show all 69 references

Research works printed but not linked: 5

  1. [41] Duane Merrill. 2015. Cub. NVIDIA Research (2015). -
  2. [42] Duane Merrill and Michael Garland. 2016. Single-pass parallel prefix scan with decoupled look-back. NVIDIA, Tech. Rep. NVR-2016-002 (2016). -
  3. [51] William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery. 2007. Numerical Recipes 3rd Edition: The Art of Scientific Computing (3 ed.). Cambridge University Press, New York, NY, USA. - · doi:10.5555/6771
  4. [61] Bjarne Stroustrup. 2013. The C++ programming language . Pearson Education. - · doi:10.5555/2543987
  5. [63] RAPIDS Development Team. 2018. RAPIDS: Collection of Libraries for End to End GPU Data Science . https://rapids.ai

Cited by

See all 6

Metadata

Authors
Mitchell, R., Stokes, D., Frank, E., & Holmes, G.
Affiliations
University of Waikato (NZ)
Venue
ACM Transactions on Parallel Computing
Published
2022-01-31
Volume
9
Issue
1
Pages
1-20
ISSN
  • 2329-4949 (ISSN-L)
  • 2329-4957
OpenAlex
W3167411928
Cited by
6
References
61
Citations by year
2025: 2 · 2024: 2 · 2023: 1 · 2022: 1
FWCI
1.15
Type
journal article
Language
en
Open access
Locations
  • ACM Transactions on Parallel Computing (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • Research Commons (University of Waikato) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Hardware and Architecture › Parallel Computing and Optimization Techniques
  • Physical Sciences › Computer Science › Computer Graphics and Computer-Aided Design › Computer Graphics and Visualization Techniques
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › Graph Theory and Algorithms
Keywords
random shuffling, GPU memory bandwidth, pseudorandom permutations, Fisher-Yates shuffle, global memory access, parallel algorithms

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.