This chapter will help us to explore the Graphics Processing Unit (GPU) programming techniques through the Python language. The continuous evolution of GPUs is revealing how these architectures can bring great benefits to performing complex calculations.
GPUs certainly cannot replace CPUs. However, they are a well-structured and heterogeneous code that is able to exploit the strengths of both types of processors that can, in fact, bring considerable advantages.
We will examine the main development environments for heterogeneous programming, namely, the PyCUDA and Numba environments for Compute Unified Device Architecture (CUDA) and PyOpenCL environments, which are for Open Computing Language (OpenCL) frameworks in their Python version.
In this chapter, we will cover the following recipes:
- Understanding...