Hands-On GPU programming with CUDA C and Python 3 -: A practical guide to learning effective parallel computing to improve the performance of your apps

by Dr. Brian Tuomanen

0 ratings • 0 reviews • 0 shelved
Book cover for Hands-On GPU programming with CUDA C and Python 3 -

Bookhype may earn a small commission from qualifying purchases. Full disclosure.

Updated to cover the latest Python 3 features, custom TensorFlow modules, and ray tracing, this second edition is your guide to building GPU-accelerated high-performing applications

Key Features

* Get to grips with graphics processing unit (GPU) programming tools such as PyCUDA, scikit-cuda, and Nsight
* Explore CUDA libraries such as cuBLAS, cuFFT, and cuSolver

Book Description

GPUs are designed for maximum throughput but are subject to low-level subtleties. In contrast, Python is a high-level language that places emphasis on ease-of-use over speed. This updated second edition follows a practical approach to teaching you efficient GPU programming techniques with the latest version of Python and CUDA.
You'll start by learning how to apply Amdahl's Law, use a code profiler to identify bottlenecks in your Python code, and set up a GPU programming environment. In the chapters that follow, you'll understand how to query the GPU's features and set up an environment on the Microsoft Azure cloud, and on a NVIDIA Jetson Nano board. Next, you'll get hands-on with launching code directly onto the GPU and writing GPU kernels and device functions in CUDA C. You'll later get to grips with profiling GPU code, and testing and debugging your code using Nsight IDE. The book will then delve into well-known NVIDIA libraries, such as cuFFT and cuBLAS. From developing a custom TensorFlow module in CUDA to adding gradient outputs to a TensorFlow module, you'll gradually build on your skills. Finally, you'll learn ray tracing in CUDA, and how to develop a simple ray tracer from scratch.
By the end of this book, you'll be able to apply GPU programming to solve problems related to data science and high-performance computing.

What you will learn

* Launch GPU code directly from Python
* Write effective and efficient GPU kernels and device functions
* Develop a custom TensorFlow module in CUDA
* Explore advanced GPU hardware features, such as warp shuffling
* Profile your Python code to determine bottlenecks using the CPython module
* Develop a simple ray tracer from scratch in CUDA

Who This Book Is For

This book is for developers and data scientists who want to learn the basics of effective GPU programming to improve performance using Python code. Familiarity with mathematics and physics concepts, along with some experience with Python programming and any C-based programming language will be helpful.
  • ISBN13 9781839219092
  • Publish Date 22 October 2021
  • Publish Status Out of Print
  • Out of Print 8 October 2021
  • Publish Country GB
  • Imprint Packt Publishing Limited
  • Edition 2nd edition
  • Format eBook
  • Pages 341
  • Language English