Book Image

Hands-On GPU Computing with Python

By : Avimanyu Bandyopadhyay
Book Image

Hands-On GPU Computing with Python

By: Avimanyu Bandyopadhyay

Overview of this book

GPUs are proving to be excellent general purpose-parallel computing solutions for high-performance tasks such as deep learning and scientific computing. This book will be your guide to getting started with GPU computing. It begins by introducing GPU computing and explaining the GPU architecture and programming models. You will learn, by example, how to perform GPU programming with Python, and look at using integrations such as PyCUDA, PyOpenCL, CuPy, and Numba with Anaconda for various tasks such as machine learning and data mining. In addition to this, you will get to grips with GPU workflows, management, and deployment using modern containerization solutions. Toward the end of the book, you will get familiar with the principles of distributed computing for training machine learning models and enhancing efficiency and performance. By the end of this book, you will be able to set up a GPU ecosystem for running complex applications and data models that demand great processing capabilities, and be able to efficiently manage memory to compute your application effectively and quickly.
Table of Contents (17 chapters)
Free Chapter
1
Section 1: Computing with GPUs Introduction, Fundamental Concepts, and Hardware
5
Section 2: Hands-On Development with GPU Programming
11
Section 3: Containerization and Machine Learning with GPU-Powered Python

Preface

This book aims to be your guide to getting started with GPU computing. It will start by introducing GPU computing and explaining the architecture and programming models for GPUs. You will also be briefed about the minimum system requirements to get ready for some hands-on experience with GPU computing.

You will learn to how to set up an IDE and learn GPU programming with Python, along with its integrations, including PyCUDA, PyOpenCL, and Anaconda, for performing machine learning for data mining tasks. You will also learn how to port NVIDIA CUDA code to AMD ROCm HIP code that has been tested on the all-new AMD Radeon VII GPU with Linux!

Going further, the book will explain GPU workflows, management, and deployment. You will learn how to use the Anaconda platform to conveniently enhance your existing CPU-based applications with GPU code through CuPy and Numba. Steps to set up container platforms, such as Docker and Kubernetes, have been included. You will also learn to deploy your GPU code on Google Colaboratory (featuring a free-to-use AI inference accelerator – the NVIDIA Tesla T4!) and introduce AI principles to your normal GPU workflow.

During the course of the book, you will learn the principles behind GPU-supported machine learning platforms, such as TensorFlow and PyTorch, to help you bring efficiency and performance to your AI applications.

Toward the end of the book, you will learn about efficiently deploying GPU-supported deep learning libraries by setting up and using the Python-based DeepChem scientific library as a hands-on example in medicinal drug design. To enable easier understanding, a comprehensive illustration of various scientific concepts for DeepChem has been included.