Heterogeneous Computing

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 heterogeneous computing
  • Understanding the GPU architecture
  • Understanding GPU programming
  • Dealing with PyCUDA
  • Heterogeneous programming with PyCUDA
  • Implementing memory management with PyCUDA
  • Introducing PyOpenCL
  • Building applications with PyOpenCL
  • Element-wise expressions with PyOpenCL
  • Evaluating PyOpenCL applications
  • GPU programming with Numba

Let's start with understanding heterogeneous computing in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.136.165