To summarize, this chapter gave an introduction to the Python programming language and how it is used in various domains for a vast range of applications. It is lightweight but slow compared to the C or C++ languages. So, if it can leverage the advantages of the parallel computing capability of the GPU then it will be very useful. PyCUDA is a Python wrapper that allows the Python code to take advantage of Nvidia CUDA APIs. The advantage of PyCUDA over other parallel processing modules available in Python is explained in detail. PyCUDA uses an Nvidia CUDA runtime API and Python interpreter. Anaconda, which is a famous Python distribution, comes with many useful Python libraries and IDEs installed, along with the CUDA toolkit. The detailed steps to install PyCUDA on Windows and Ubuntu operating systems are discussed in this chapter.
We will see how to use PyCUDA to accelerate...