Online course · Data
GPU-Accelerated Python: CuPy, Numba, RAPIDS & CUDA Python
Speed up NumPy, pandas and ML code on GPUs, and prove it with honest benchmarks
Created by TrainSkool Trainer
- Data
- Intermediate
- English
- 25 lessons
- 12h 20m
- 7 assessments
- Certificate
Coming soon Launch price ₹1,999
This course is not open for enrolment yet.
About this course
For Python developers, data analysts and data scientists who already use NumPy and pandas and want their slow jobs to run on an NVIDIA GPU, and to know when a GPU will not help. One running example goes through every chapter: a fictional data team in Pune moving a nightly UPI-style transaction analytics pipeline (synthetic data) from CPU to GPU. You will set up a GPU locally, on WSL2 or on Colab/Kaggle; use CuPy as a NumPy drop-in and manage transfers and memory; write kernels with Numba-CUDA, CuPy RawKernel and CUDA Python (cuda.core); accelerate pandas, scikit-learn and NetworkX code with cuDF, cudf.pandas, cuML and cuGraph; and profile and benchmark honestly with a rupee cost view. Versions are current at the time of writing (CUDA 13.5, CuPy 14, RAPIDS 26.10). You need your own NVIDIA GPU or a cloud/free notebook GPU for the GPU parts; the in-browser exercises run on CPU. Prerequisite: working Python with NumPy and pandas (our Python & Machine Learning course or equivalent). Included: 7 modules of text lessons, slide decks, quick checks, auto-checked Python exercises, chapter projects and quizzes, a graded capstone, a 20-question final exam and a certificate of completion. Lessons are text and slides; trainer videos are coming later. Not affiliated with or endorsed by NVIDIA. CUDA is a trademark of NVIDIA Corporation. What you will be able to do: - You will be able to decide whether a Python workload will benefit from a GPU, using transfer costs, measured step times and arithmetic intensity. - You will be able to set up and verify a GPU Python environment locally, on WSL2, or on Colab or Kaggle, with matching CUDA 12 or 13 packages. - You will be able to port NumPy code to CuPy, keep data resident on the GPU, manage the memory pool and chunk data that does not fit. - You will be able to write and validate custom GPU kernels with Numba-CUDA, CuPy ElementwiseKernel/RawKernel and CUDA Python's cuda.core. - You will be able to use cuda.core streams and events to overlap work, and choose the right layer for a job: CuPy, Numba, RawKernel or cuda.core. - You will be able to accelerate pandas, scikit-learn and NetworkX workflows with cuDF, cudf.pandas, cuML and cuGraph, and check results match the CPU. - You will be able to time GPU code correctly, profile it with Nsight Systems and NVTX, and report speed-up and cost per run in rupees. - You will be able to deliver a GPU-accelerated analytics pipeline with a CPU vs GPU benchmark table measured on your own hardware.
What you'll learn
- Decide whether a Python workload will benefit from a GPU, using transfer costs, measured step times and arithmetic intensity
- Set up and verify a GPU Python environment locally, on WSL2, or on Colab or Kaggle, with matching CUDA 12 or 13 packages
- Write and validate custom GPU kernels with Numba-CUDA, CuPy ElementwiseKernel/RawKernel and CUDA Python's cuda.core
- Port NumPy code to CuPy, keep data resident on the GPU, manage the memory pool and chunk data that does not fit
- Use cuda.core streams and events to overlap work, and choose the right layer for a job: CuPy, Numba, RawKernel or cuda.core
- Accelerate pandas, scikit-learn and NetworkX workflows with cuDF, cudf.pandas, cuML and cuGraph, and check results match the CPU
- Time GPU code correctly, profile it with Nsight Systems and NVTX, and report speed-up and cost per run in rupees
- Deliver a GPU-accelerated analytics pipeline with a CPU vs GPU benchmark table measured on your own hardware
Course content
Chapter 1 · Module 1: When GPUs Help Python, and Getting Set Up
- Code lab: Why GPUs for Python, and When They Don't HelpEvery Python team eventually meets a job that is too slow: a nightly report that grew from forty minutes to three hours, or a simulation that eats a whole afternoon.17 topics · 25 min
- Code lab: The GPU Python Toolkit at the Time of WritingWhen Rohan Deshpande, the team's data engineer, first searched for "Python GPU" he found a dozen libraries, blog posts from different years recommending different packages, and install commands that…16 topics · 25 min
- Code lab: Setting Up: Local GPU, WSL2, Colab and KaggleMost "my GPU code doesn't work" problems are setup problems: an old driver, the wrong CUDA package, a notebook that silently fell back to a CPU runtime, or RAPIDS installed on native Windows where…16 topics · 30 min
- Code lab: The CUDA Execution Model for Python ProgrammersYou can use CuPy and cuDF for a long time without thinking about threads.24 topics · 30 min
Chapter 2 · Module 2: CuPy — NumPy on the GPU
- Code lab: CuPy Arrays as a NumPy Drop-InNumPy is the foundation of scientific and data work in Python, and a large share of the team's code is NumPy: rainfall statistics for a crop-insurance study, feature arrays for models, and the…17 topics · 25 min
- Code lab: Memory and TransfersThe first time Rohan ran txn-nightly's z-score step on the workstation GPU, it was slower than NumPy.17 topics · 30 min
- Code lab: CuPy's Scientific Toolbox and InteroperabilityReal analytics code is rarely just sums and means.16 topics · 25 min
- Code lab: Fusing Operations and Custom Elementwise and Reduction KernelsAfter porting the z-score step to CuPy, Rohan profiled it and saw something odd: one line of Python, a risk score combining four terms, launched eight separate GPU kernels and allocated seven…22 topics · 30 min
Chapter 3 · Module 3: Writing GPU Kernels in Python
- Code lab: Your First Numba-CUDA KernelsSome work does not fit array expressions.17 topics · 30 min
- Code lab: Shared Memory, Atomics and Device Functions in NumbaKernels where every thread works alone are the easy case.15 topics · 30 min
- Code lab: CUDA C Kernels from Python with CuPy RawKernel and RawModuleSometimes the best kernel language is CUDA C itself.16 topics · 30 min
- Code lab: Debugging and Validating GPU KernelsA wrong GPU kernel is worse than a slow one. It runs, it returns numbers, the numbers look plausible, and they go into a report.22 topics · 30 min
Chapter 4 · Module 4: CUDA Python with cuda.core
- Code lab: What CUDA Python Is: cuda.bindings and cuda.coreCuPy and Numba each bring their own view of the GPU: their own memory pools, their own stream handling, their own compilers.17 topics · 25 min
- Code lab: Compiling and Launching Kernels with cuda.core3) compiles and launches CUDA C, but only for CuPy users. Kabir's gpukit package must serve projects that use CuPy, others that use PyTorch, and a reporting tool that uses neither.15 topics · 35 min
- Code lab: Streams, Events, Memory and Choosing the Right Layergpukit can now compile and launch kernels. Three questions remain before Kabir can release it to the rest of the team.23 topics · 35 min
Chapter 5 · Module 5: RAPIDS — cuDF, cudf.pandas, cuML and cuGraph
- Code lab: cuDF DataFrames on the GPUMost of txn-nightly is not array maths; it is DataFrame work. Read Parquet files, fix types, filter, group by merchant, aggregate, join with a merchant master table, compute shares and rates.17 topics · 30 min
- Code lab: cudf.pandas: Accelerating Existing pandas Code1) works, but the team has dozens of pandas scripts written by analysts over several years: monthly reports, reconciliation jobs, one-off notebooks that became monthly tasks.17 topics · 25 min
- Code lab: Machine Learning on the GPU with cuML1, mostly because Meera runs it for many values of k and several random starts to choose a stable segmentation.14 topics · 30 min
- Code lab: Graph Analytics with cuGraph and nx-cugraphPayments form a network.22 topics · 30 min
Chapter 6 · Module 6: Profiling and Benchmarking Honestly
- Code lab: Timing GPU Code CorrectlyAnanya has seen three GPU benchmarks this year that turned out to be wrong.18 topics · 30 min
- Code lab: Profiling with Nsight Systems, NVTX and Library ProfilersA benchmark tells you how long something takes. A profiler tells you why.17 topics · 30 min
- Code lab: Making the Decision: Roofline, Rupees and ReportingAnanya does not buy speed-ups. She buys outcomes: the nightly report ready before the risk reviewers log in at 9:00 IST, at a cost the budget can carry.23 topics · 30 min
Chapter 7 · Module 7: Capstone — Speed Up a Transaction Analytics Pipeline
- Reading: Capstone Brief and ArchitectureYour task is to cut the run time of txn-nightly, the example transaction pipeline: the nightly job that turns a month of UPI-style transactions into merchant risk features, segments and graph…7 topics · 25 min
- Reading: Build Guide: From CPU Baseline to GPU PipelineThis guide takes you from the CPU baseline to a validated, measured GPU pipeline in six milestones.10 topics · 50 min
- Code lab: Deliverables, Benchmark Table and Grading Rubric (100 Points)Submit a link to your txn-gpu-capstone repository (public, or shared with your grader) containing:11 topics · 25 min
Assessments and certificate
- Module 1 quiz: When GPUs Help Python, and Getting Set Up8 questions · 15 min · pass mark 70%
- Module 2 quiz: CuPy — NumPy on the GPU8 questions · 15 min · pass mark 70%
- Module 3 quiz: Writing GPU Kernels in Python8 questions · 15 min · pass mark 70%
- Module 4 quiz: CUDA Python with cuda.core7 questions · 15 min · pass mark 70%
- Module 5 quiz: RAPIDS — cuDF, cudf.pandas, cuML and cuGraph8 questions · 15 min · pass mark 70%
- Module 6 quiz: Profiling and Benchmarking Honestly8 questions · 15 min · pass mark 70%
- GPU-Accelerated Python: CuPy, Numba, RAPIDS & CUDA Python — final assessment20 questions · 40 min · pass mark 70%