▶Book Description
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 will start with introducing GPU computing and explain the architecture and programming models for GPUs. You will learn, by example, how to perform GPU programming with Python, and you’ll look at using integrations such as PyCUDA, PyOpenCL, CuPy and Numba with Anaconda for various tasks such as machine learning and data mining. Going further, you will get to grips with GPU work flows, 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.
▶What You Will Learn
- Utilize Python libraries and frameworks for GPU acceleration
- Set up a GPU-enabled programmable machine learning environment on your system with Anaconda
- Deploy your machine learning system on cloud containers with illustrated examples
- Explore PyCUDA and PyOpenCL and compare them with platforms such as CUDA, OpenCL and ROCm.
- Perform data mining tasks with machine learning models on GPUs
- Extend your knowledge of GPU computing in scientific applications
▶Key Features
- Understand effective synchronization strategies for faster processing using GPUs
- Write parallel processing scripts with PyCuda and PyOpenCL
- Learn to use the CUDA libraries like CuDNN for deep learning on GPUs
▶Who This Book Is For
Data Scientist, Machine Learning enthusiasts and professionals who wants to get started with GPU computation and perform the complex tasks with low-latency. Intermediate knowledge of Python programming is assumed.
▶What this book covers
- Chapter 1, Introduction to GPU Computing, covers the diverse impact of GPUs beyond the gaming industry. Conventional CPU models and accelerated GPU models are compared. A brief history and some fundamental concepts are discussed.
- Chapter 2, Designing a GPU Computing Strategy, focuses on computer hardware-related discussions. You will gain knowledge on how to get started with GPU computing-friendly hardware. The impact on GPU performance will also be discussed, with a comparison of air and liquid cooling.
- Chapter 3, Setting Up a GPU Computing Platform with NVIDIA and AMD, focuses on leading GPU manufacturers NVIDIA and AMD, with a comparison of their readily available programmable models. The differences in computing on both platforms will be highlighted.
- Chapter 4, Fundamentals of GPU Programming, introduces GPU programming and three different platforms, namely CUDA, ROCm, and Anaconda. NVIDIA and AMD GPUs will be revisited here to explore the practical usage of GPUs with a selection of computer hardware platforms.
- Chapter 5, Setting Up Your Environment for GPU Programming, offers a brief guide on choosing the most suitable IDE for GPU computing with Python. PyCharm will be discussed in detail, and its effectiveness as a GPU-programmable platform will also be illustrated.
- Chapter 6, Working with CUDA and PyCUDA, teaches you how to install and configure the PyCharm IDE with PyCUDA. You will be able to develop your own code through Python after learning about how to make use of NVIDIA's CUDA API within Python code.
- Chapter 7, Working with ROCm and PyOpenCL, introduces you to the open source world of GPU computing! You will learn about ROCm, and a CUDA converter called HIPify, to easily port GPU code for both NVIDIA and AMD GPUs. With PyOpenCL, you will be able to develop your own code through Python, after learning about how to make use of the OpenCL API within Python code.
- Chapter 8, Working with Anaconda, CuPy, and Numba for GPUs, teaches you how to use Anaconda specifically with GPUs. This chapter will introduce you to writing pure Python code with CuPy, a GPU implementation such as NumPy, and another library called Numba for CUDA and ROCm.
- Chapter 9, Containerization on GPU-Enabled Platforms, introduces you to the concept of containerization and shows you how open and closed environments work as local or cloud containers. You will learn about Virtualenv and Google Colab with hands-on exercises.
- Chapter 10, Accelerated Machine Learning on GPUs, is a hands-on guide to installing, configuring, and testing your first GPU-accelerated machine learning program. Besides Tensorflow and PyTorch, we will explore nueral networks to get understand GPU-enabled deep learning better.
- Chapter 11, GPU Acceleration for Scientific Applications Using DeepChem, is where a Pythonbased and GPU-enabled deep learning library known as DeepChem will be discussed in detail, with a comprehensive but simple introduction to the various scientific concepts behind it.
- Appendix A, discusses various use cases wherein machine learning and Python work in tandem to enhance the data processing and analysis procedures.