Skip to main content
QUICK REVIEW

[Paper Review] LightScan: Faster Scan Primitive on CUDA Compatible Manycore Processors

Yongchao Liu, Srinivas Aluru|arXiv (Cornell University)|Apr 17, 2016
Parallel Computing and Optimization TechniquesComputer Science11 references4 citations
TL;DR

LightScan is a high-performance parallel scan primitive for CUDA-compatible GPUs that accelerates inclusive scan using warp shuffle instructions for fast intra-block computation and leverages globally coherent L2 cache with PTX assembly for lightweight inter-block communication. It achieves up to 2.4× speedup over leading GPU libraries and up to 257.3× speedup over Intel TBB on Xeon Phi, demonstrating superior performance across multiple data types and problem sizes on a Tesla K40c GPU.

ABSTRACT

Scan (or prefix sum) is a fundamental and widely used primitive in parallel computing. In this paper, we present LightScan, a faster parallel scan primitive for CUDA-enabled GPUs, which investigates a hybrid model combining intra-block computation and inter-block communication to perform a scan. Our algorithm employs warp shuffle functions to implement fast intra-block computation and takes advantage of globally coherent L2 cache and the associated parallel thread execution (PTX) assembly instructions to realize lightweight inter-block communication. Performance evaluation using a single Tesla K40c GPU shows that LightScan outperforms existing GPU algorithms and implementations, and yields a speedup of up to 2.1, 2.4, 1.5 and 1.2 over the leading CUDPP, Thrust, ModernGPU and CUB implementations running on the same GPU, respectively. Furthermore, LightScan runs up to 8.9 and 257.3 times faster than Intel TBB running on 16 CPU cores and an Intel Xeon Phi 5110P coprocessor, respectively. Source code of LightScan is available at http://cupbb.sourceforge.net.

Motivation & Objective

  • To design a faster parallel scan primitive for CUDA-enabled GPUs that outperforms existing GPU and CPU-based implementations.
  • To reduce inter-block communication overhead by exploiting global L2 cache coherence and PTX assembly instructions.
  • To minimize thread block re-indexing overhead through deterministic cyclic block distribution, avoiding atomic operations.
  • To maximize register usage per streaming multiprocessor to reduce the number of inter-block communications.
  • To enable efficient, generic, and reusable scan computation via CUDA C++ template classes for scalar data types.

Proposed method

  • Uses a hybrid intra-block and inter-block computation model, partitioning input arrays into non-overlapping data blocks assigned to thread blocks.
  • Employs warp shuffle functions to accelerate local scan computation within each thread block, reducing reliance on global memory for intermediate results.
  • Utilizes coalesced global memory accesses for input and output arrays, ensuring exactly N memory operations per array.
  • Leverages globally coherent L2 cache and PTX-level parallel thread execution instructions to enable lightweight, high-bandwidth inter-block communication.
  • Cyclically distributes data blocks across a fixed number of thread blocks in a deterministic fashion to avoid atomic operation bottlenecks in thread block re-indexing.
  • Implements a template-based CUDA C++ design to support generic instantiation with primitive scalar data types such as Int32, Int64, Float, and Double.

Experimental results

Research questions

  • RQ1Can a hybrid intra-block and inter-block scan model achieve better performance on modern CUDA GPUs by optimizing memory access and communication patterns?
  • RQ2How does the use of warp shuffle functions and L2 cache coherence impact the performance of parallel scan compared to traditional atomic or recursive inter-block communication?
  • RQ3To what extent can register saturation and deterministic block distribution reduce inter-block communication and improve scalability on GPU architectures with compute capability 3.0 or higher?
  • RQ4How does LightScan compare in performance to highly optimized GPU libraries like CUB, Thrust, and CUDPP across different data types and problem sizes?
  • RQ5Can LightScan achieve significant speedups over CPU-based parallel libraries like Intel TBB, especially on manycore accelerators such as the Xeon Phi?

Key findings

  • LightScan achieves a maximum speedup of 2.4× over NVIDIA Thrust, 2.1× over CUDPP, 1.5× over ModernGPU, and 1.2× over CUB on a Tesla K40c GPU.
  • On average, LightScan outperforms CUDPP, Thrust, ModernGPU, and CUB by 2.0×, 2.1×, 1.5×, and 1.2× respectively, across all tested data types.
  • LightScan achieves an average speedup of 8.4× and a maximum of 8.9× over Intel TBB running on 16 CPU cores, with peak performance of 3.1 GEPS for Int32.
  • On the Intel Xeon Phi 5110P coprocessor, LightScan achieves an average speedup of 80.8× and a maximum of 257.3× over TBB, highlighting its superiority on manycore accelerators.
  • LightScan attains a peak performance of 25.5 GEPS for 32-bit integers, 12.8 GEPS for 64-bit integers, 25.7 GEPS for single-precision floats, and 13.0 GEPS for double-precision floats on the Tesla K40c.
  • The performance advantage of LightScan is most pronounced on the Xeon Phi, where TBB's performance degrades significantly, indicating that GPU-optimized algorithms are essential for manycore accelerators.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.