Stanford CS149 I Parallel Computing I 2023 I Lecture 8 - Data-Parallel Thinking

19 Sep 2024 (1 minute ago)
Stanford CS149 I Parallel Computing I 2023 I Lecture 8 - Data-Parallel Thinking

Data Parallel Programming Concepts

Data Types for Sequences

Higher-Order Functions for Parallelism

Parallelizing Map and Fold

Data Parallel Primitives

Parallel Summation on GPUs

Analyzing Algorithm Complexity

Optimizing Parallel Scan

  • Optimizing Parallel Scan: An alternative algorithm, attributed to Guy Blelloch, maintains a logarithmic span while reducing the work complexity to O(n) by employing a two-phase approach with an "upsweep" and "downsweep" (combining and splatting tree) to efficiently compute partial sums. rel="noopener noreferrer" target="_blank">(00:28:38)

Practical Considerations for Parallel Scan

Work Efficiency vs. Utilization

Example: Parallel Scan of 1024 Elements

  • A scan of 1024 elements can be completed in 11 cycles by breaking the data into 32 element chunks, performing a scan on each chunk in parallel, scanning the results of each chunk, and then updating each element with the results of the second scan. rel="noopener noreferrer" target="_blank">(00:42:36)

Optimizations in Data Parallel Primitives

Segmented Scan

Sparse Matrix Multiplication

Gather and Scatter Operations

Data Structure for Particle Simulation

Parallelizing Particle Simulation

Creating a Uniform Grid

Libraries for Data Parallel Programming

Overwhelmed by Endless Content?