March 2026
Intermediate
534 pages
12h 51m
English
Now that we have set up an appropriate environment, we are ready to start programming with CUDA in Python. Specifically, we will use numba.cuda, a key component of CUDA Python, to write CUDA kernels.
A CUDA kernel is a special function that executes in parallel on the GPU. Numba-CUDA compiles a restricted subset of Python code into CUDA kernels. It is a plugin for the Numba JIT compiler, which was introduced in Chapter 1. As our main working example, we will revisit the Julia set from Chapter 1 and reimplement it to run on the GPU. Along the way, we will get an appreciation for the challenges of parallel programming compared to synchronous programming.
The learning outcomes for this chapter ...
Read now
Unlock full access