Reader small image

You're reading from  Hands-On GPU Programming with Python and CUDA

Product typeBook
Published inNov 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781788993913
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Dr. Brian Tuomanen
Dr. Brian Tuomanen
author image
Dr. Brian Tuomanen

Dr. Brian Tuomanen has been working with CUDA and General-Purpose GPU Programming since 2014. He received his Bachelor of Science in Electrical Engineering from the University of Washington in Seattle, and briefly worked as a Software Engineer before switching to Mathematics for Graduate School. He completed his Ph.D. in Mathematics at the University of Missouri in Columbia, where he first encountered GPU programming as a means for studying scientific problems. Dr. Tuomanen has spoken at the US Army Research Lab about General Purpose GPU programming, and has recently lead GPU integration and development at a Maryland based start-up company. He currently lives and works in the Seattle area.
Read more about Dr. Brian Tuomanen

Right arrow

Chapter 1, Why GPU Programming?

  1. The first two for loops iterate over every pixel, whose outputs are invariant to each other; we can thus parallelize over these two for loops. The third for loop calculates the final value of a particular pixel, which is intrinsically recursive.
  2. Amdahl's Law doesn't account for the time it takes to transfer memory between the GPU and the host.
  3. 512 x 512 amounts to 262,144 pixels. This means that the first GPU can only calculate the outputs of half of the pixels at once, while the second GPU can calculate all of the pixels at once; this means the second GPU will be about twice as fast as the first here. The third GPU has more than sufficient cores to calculate all pixels at once, but as we saw in problem 1, the extra cores will be of no use to us here. So the second and third GPUs will be equally fast for this problem.
  4. One issue with generically...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On GPU Programming with Python and CUDA
Published in: Nov 2018Publisher: PacktISBN-13: 9781788993913

Author (1)

author image
Dr. Brian Tuomanen

Dr. Brian Tuomanen has been working with CUDA and General-Purpose GPU Programming since 2014. He received his Bachelor of Science in Electrical Engineering from the University of Washington in Seattle, and briefly worked as a Software Engineer before switching to Mathematics for Graduate School. He completed his Ph.D. in Mathematics at the University of Missouri in Columbia, where he first encountered GPU programming as a means for studying scientific problems. Dr. Tuomanen has spoken at the US Army Research Lab about General Purpose GPU programming, and has recently lead GPU integration and development at a Maryland based start-up company. He currently lives and works in the Seattle area.
Read more about Dr. Brian Tuomanen