Hands-On GPU Computing with Python
Explore the capabilities of GPUs for solving high performance
computational problems
Avimanyu Bandyopadhyay
BIRMINGHAM - MUMBAI
Hands-On GPU Computing with Python
Copyright 2019 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Pavan Ramchandani
Acquisition Editor: Heramb Bhavsar
Content Development Editor: Shubham Bhattacharya
Technical Editor: Rudolph Almeida
Copy Editor: Safis Editing
Project Coordinator: Nusaiba Ansari
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Graphics: Jisha Chirayil
Production Coordinator: Arvindkumar Gupta
First published: May 2019
Production reference: 1130519
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78934-107-2
www.packtpub.com
I dedicate this book to my late maternal grandfather, Shri Sudhir Kumar Halder.
He was a great human being at heart and an amazing trigonometrician. I wouldn't have been able to write this book without his constant encouragement in the early days of my life, especially in mathematics, which is the foundation of computing.
I extend my love and thanks to my mother, Smt Uma Bandyopadhyay, who has been so constantly supportive throughout my journey of life, and also now as a researcher. I also extend my love and thanks to my father, Shri Amitava Bandyopadhyay, for being so supportive while
I was writing this book, and for my new lab, which was very helpful during the book's development. I'm forever indebted to my alma mater, PVP Siddhartha Institute of Technology.
I would especially like to thank Christel Pilz, a loving grandma who has always been by my side to encourage and support me so selflessly during all my creative endeavors, especially when deploying the AMD Radeon VII GPU at my lab, which contributed to the book.
I would also like to thank my fellow tech enthusiasts, Siddhant Pati and Amlan Madhab Panigrahi, for being so supportive throughout my journey in PhD research. I would also like to thank my researcher friend from Peru, Antony Brayan Campos Salazar.
Finally, I extend my sincere gratitude and thanks to my PhD mentor and advisor, Professor
Dr. Dipankar Chaudhuri, for being so continuously supportive throughout the development of this book and all of my research endeavors. I'm really very grateful to him for providing a flexible framework for writing this book while pursuing my PhD.
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Avimanyu Bandyopadhyay is currently pursuing a PhD degree in Bioinformatics based on applied GPU computing in Computational Biology at Heritage Institute of Technology, Kolkata, India. Since 2014, he developed a keen interest in GPU computing, and used CUDA for his master's thesis. He has experience as a systems administrator as well, particularly on the Linux platform.
Avimanyu is also a scientific writer, technology communicator, and a passionate gamer. He has published technical writing on open source computing and has actively participated in NVIDIA's GPU computing conferences since 2016. A big-time Linux fan, he strongly believes in the significance of Linux and an open source approach in scientific research. Deep learning with GPUs is his new passion!
I'm very thankful to Professor Rumpa Hazra, Teacher and Master's thesis mentor for her kind guidance, Mainak Bhattacharjee, Technical Assistant at my academic laboratory for his creative microbiology inputs and Argha Mandal, my co-researcher. Thank you Jithu Nair, Yumlembam Rupert Anand, Nilanjan Mukherjee, and Rakhi Chatterjee, for your constant support while I was building my own GPU Computing Laboratory. I would also like to thank Shubham Bhattacharya, my content editor, and the entire team at Packt, for providing the opportunity to create this book and bring the author out of me.
About the reviewer
Amlan Madhab Panigrahi is a BTech graduate who has just recently ventured into the IT industry. An experienced gaming/tech blogger by heart, he also happens to be a GPU computing and machine learning enthusiast. He loves and promotes community-driven learning by organizing technical events and workshops. Cosplaying as popular gaming characters also happens to be one of his interests.
When not gaming or developing something, you will find him sampling wonderful delicacies or traveling. This technical nerd is currently working at Accenture as an Application Development Associate.
I am thankful for Mr. Avimanyu's innovative and authentic work in educating the community about GPU computing and its advantages. The author has put a lot of effort and care into making the content simple and understandable. It was purely due to him that I was able to delve into the world of GPU computing. I would like to thank both him and Packt for making me a part of such an amazing project.
Next page