5.2 Why GPUs speed up data science
Accelerated computing, parallelism and measuring speedups.
Key points
Parallel processing means doing many operations at the same time. GPUs run thousands of operations at once, which suits data science on large tables.
What NVIDIA says (1)
“Accelerated computing is the use of specialized hardware to dramatically speed up work, using parallel processing that bundles frequently occurring tasks.”
A GPU has many cores built for throughput. A column operation applies the same step to every value, which maps well to many cores.
What NVIDIA says (1)
“By contrast, GPUs break complex problems into thousands or millions of separate tasks and work them out at once.”
Benchmarking means measuring run time under the same conditions. The profiler shows fallbacks that can eat the speedup.
What NVIDIA says (2)
“Additionally, you can use Python magic commands like %%time and %%timeit to enable benchmarks of specific code blocks that facilitate direct comparisons of runtime between pandas (CPU) and the cuDF accelerator for pandas (GPU).”
“The profiler will indicate which functions ran on GPU / CPU.”
Key terms
- Graphics processing unit: A processor with thousands of small cores that work on many pieces of a problem at once.
- Accelerated computing: Using specialized hardware such as GPUs to speed up work through parallel processing.
- Parallel processing: Splitting a job into many pieces that run at the same time.
- Benchmarking: Timing the same workload under different setups, such as CPU and GPU, to compare them fairly.
Try it
Sample question
What is accelerated computing?
Show the answer
Answer: Using specialized hardware such as GPUs to speed up work through parallel processing
Parallel processing means doing many operations at the same time. GPUs run thousands of operations at once, which suits data science on large tables.
What NVIDIA says (1)
“Accelerated computing is the use of specialized hardware to dramatically speed up work, using parallel processing that bundles frequently occurring tasks.”
Practice 5.2 (3 questions) Full Foundations of Accelerated Data Science guide
← 5.1 Python for data analysis · 5.3 CPU versus GPU workloads and memory transfers →