This repository contains materials for the tutorial: Deploying and debugging GPU accelerated Python workloads
For the in-person version of this tutorial we will use NVIDIA Brev
| Module | Link |
|---|---|
| 0 - Introduction Slides | introduction-to-gpu-stack |
| 1 - Setup Brev | 1-setup |
| 2 - Setting Up Your GPU Python Environment | 2-environments |
| 3 - Verifying Your Environment with the RAPIDS CLI | 3-rapids-cli-verify-env |
| 4 - Easy GPU Acceleration Wins with RAPIDS Accelerators | 4-acceleration-examples |
| 5 - Monitoring and Debugging GPU Python Workloads | 5-monitoring-and-debugging |
- Covers how to get access to a cloud GPU using NVIDIA Brev.
- Walks through launching a VM (choosing GPU type, provider, and deploying).
- Explains how to connect to the VM via SSH using the
brevCLI on macOS, Linux, and Windows.
- Guides users through installing Python packages for GPU workloads.
- Supports three package managers:
uv/pip,conda, andpixivia config files (pyproject.toml,environment.yaml,pixi.toml) to manage dependencies— pick one and follow that path. - Covers checking for core CUDA libraries and creating isolated, reproducible environments.
- Introduces two commands to validate a GPU environment after setup:
rapids doctorandrapids debug. rapids doctorruns health checks on the driver, CUDA toolkit, GPU compute capability, and NVLink.- Failed checks return actionable messages explaining how to fix the issue.
- Showcases how libraries can register their own checks, using
cumlas an example. rapids debugproduces a full snapshot of driver versions, installed packages, and build tools.rapids debug --jsonoutputs a machine-readable version, useful for bug reports and sharing environment state.
- Shows how to get GPU speedups on existing Python code with zero rewrites.
- Shows how to use the accelerators via command line and in notebooks.
- Discusses built-in
--profileand--line-profileflags show which operations ran on the GPU vs. CPU. - Introduces JupyterLab NVDashboard GPU Accelerators toggle that enables the same zero-code acceleration interactively in notebooks.
- A hands-on diagnostic guide for when GPU code runs but doesn't deliver the expected speedup.
- Covers a progression of tools, each answering a different question about what the GPU is doing.
nvidia-smiandnvtopconfirm driver-level visibility and live GPU utilization.cProfile+SnakeVizidentify CPU-side bottlenecks before any GPU work begins.- Nsight Systems (
nsys) produces a full CPU/GPU timeline showing transfers, kernel launches, and idle gaps. - Uses a real climate data workload (
xarrayEOF analysis) to walk through two common pitfalls:- Moving data back to the CPU before the expensive operation.
- Naively porting a Python loop to the GPU, causing thousands of tiny kernel launches.
- Shows how to identify and fix both issues using profiler output and CUDA timeline traces.