-
Book Overview & Buying
-
Table Of Contents
GPU-Accelerated Computing with Python 3 and CUDA
By :
In this chapter, we explored the practical implementation of solving the heat equation on a GPU. We began by reviewing the fundamentals of the heat transfer equation and its solution using the finite difference methods through spatial and temporal discretization. Then, we demonstrated how to initialize a 2D system and implemented a CPU-based solver to simulate its evolution over multiple time steps.
We then transitioned to GPU computing by implementing the solver with Numba CUDA, first naively and then using shared memory to minimize global memory accesses and to leverage cached data within each block. Finally, we profiled our GPU kernels and discussed strategies for identifying bottlenecks and ways to alleviate them.
In the next chapter, we will shift our attention to a different practical application of GPU computing: image processing.