There's more...

The CUDA programming model (and consequently PyCUDA, which is a Python wrapper) is implemented through specific extensions to the standard library of the C language. These extensions have been created just like function calls in the standard C library, allowing a simple approach to a heterogeneous programming model that includes the host and device code. The management of the two logical parts is done by the nvcc compiler.

Here is a brief description of how this works:

  1. Separate device code from the host code.
  2. Invoke a default compiler (for example, GCC) to compile the host code.
  3. Build the device code in binary form (.cubin objects) or in assembly form (PTX objects):

PyCUDA execution model

All the preceding steps are performed by PyCUDA during execution, with an increase in the application loading time compared to a CUDA application.

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

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