Skip to Content
GPU-Accelerated Computing with Python 3 and CUDA
book

GPU-Accelerated Computing with Python 3 and CUDA

by Niels Cautaerts, Hossein Ghorbanfekr
March 2026
Intermediate
534 pages
12h 51m
English
Packt Publishing

Overview

Accelerate your Python code on the GPU using CUDA, Numba, and modern libraries to solve real-world problems faster and more efficiently.

Key Features

  • Build a solid foundation in CUDA with Python, from kernel design to execution and debugging
  • Optimize GPU performance with efficient memory access, CUDA streams, and multi-GPU scaling
  • Use JAX, CuPy, RAPIDS, and Numba to accelerate numerical computing and machine learning
  • Create practical GPU applications, from PDE solvers to image processing and transformers

Book Description

Writing high-performance Python code doesn’t have to mean switching to C++. This book shows you how to accelerate Python applications using NVIDIA’s CUDA platform and a modern ecosystem of Python tools and libraries. Aimed at researchers, engineers, and data scientists, it offers a practical yet deep understanding of GPU programming and how to fully exploit modern GPU hardware.

You’ll begin with the fundamentals of CUDA programming in Python using Numba-CUDA, learning how GPUs work and how to write, execute, and debug custom GPU kernels. Building on this foundation, the book explores memory access optimization, asynchronous execution with CUDA streams, and multi-GPU scaling using Dask-CUDA. Performance analysis and tuning are emphasized throughout, using NVIDIA Nsight profilers.

You’ll also learn to use high-level GPU libraries such as JAX, CuPy, and RAPIDS to accelerate numerical Python workflows with minimal code changes. These techniques are applied to real-world examples, including PDE solvers, image processing, physical simulations, and transformer models.

Written by experienced GPU practitioners, this hands-on guide emphasizes reproducible workflows using Python 3.10+, CUDA 12.3+, and tools like the Pixi package manager. By the end, you’ll have future-ready skills for building scalable GPU applications in Python.

What you will learn

  • Understand GPU execution, parallelism, and the CUDA programming model
  • Write, launch, and debug custom CUDA kernels in Python with CUDA
  • Profile GPU code with NVIDIA Nsight and optimize memory access
  • Use CUDA streams and async execution to overlap compute and transfers
  • Apply JAX, CuPy, and RAPIDS to numerical computing and machine learning
  • Scale GPU workloads across devices using Dask and multi-GPU strategies
  • Accelerate PDE solvers, simulations, and image processing on the GPU
  • Build, train, and run a transformer model from scratch on the GPU

Who this book is for

Python developers, (data) scientists, engineers, and researchers looking to accelerate numerical computations without switching to low-level languages. This book is ideal for those with experience in scientific Python (NumPy, Pandas, SciPy) and a basic understanding of computing fundamentals who want deeper control over performance in GPU environments.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GPU Programming with C++ and CUDA

GPU Programming with C++ and CUDA

Paulo Motta
Deep Learning with Python, Third Edition

Deep Learning with Python, Third Edition

Matthew Watson, Francois Chollet
Data Structures & Algorithms in Python

Data Structures & Algorithms in Python

John Canning, Alan Broder, Robert Lafore

Publisher Resources

ISBN: 9781803245423