Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GPU Computing for Data Science


Published on

When working with big data or complex algorithms, we often look to parallelize our code to optimize runtime. By taking advantage of a GPUs 1000+ cores, a data scientist can quickly scale out solutions inexpensively and sometime more quickly than using traditional CPU cluster computing. In this webinar, we will present ways to incorporate GPU computing to complete computationally intensive tasks in both Python and R.

See the full presentation here: 👉

Learn more about the Domino data science platform:

Published in: Data & Analytics
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @
    Are you sure you want to  Yes  No
    Your message goes here
  • Very Nice, If you want more good Presenations on same topic visit, Its a wonderful website for latest Presentations and Research
    Are you sure you want to  Yes  No
    Your message goes here
  • Should you ever require the services of a hacker, i implore you to try your very best to hire only professionals. will increase your chances of getting your job completed. i was able to hire the services of an elite, asides the fact that i was provided a permanent solution to the service he rendered me but he gave a very efficient customer experience. he carried me along with every process and didnt leave me in the him via email/phone CYBERHACKPROS@GMAIL.COM or +1 916 378 4978 Tell him i reffered you.He will help you
    Are you sure you want to  Yes  No
    Your message goes here
  • Please read my testimony, it can bring solution to the problems you are facing in life. I met this spell caster Dr Mojo online and read the testimonies of many persons witnessing how he has help them solve problems of any kind such as fibroid without surgery, Infertility, cure of diabetes, breast cancer, weak erection, regulation of menstruation and pains, stroke, HIV / AIDS, successful interview and work examination, political achievement, recovery of lost money, quick sales in business or commerce, choice of good marriage partner, power to bring your ex back, stopping your man or woman having affair outside your relationship or marriage, power to win pool, lottery, visa approval, reduction of sagging breast, gun protecting spiritual ring, promotion at work etc ... I contacted him through his WhatsApp instant messenger with the phone number +27797427509.I was absolutely desperate to have my husband back. Life without my husband was a pain for me and my children. I wanted a drastic change and I thought that only magic can be the only solution because he was so cruel towards me. After discussing my problem with Dr Mojo, he gave me hope that my marriage shall be restored. He gave me confidence that he will make my husband to come home and he did It! It was a great miracle, He never asked for money before helping me, all he requested for was some few items i had to purchase, and i provided these items immediately, he performed the spell and my marriage was restored immediately. His help is invaluable! I do not know what I could have done without Dr Mojo, he does his job well, his powers are so real and effective, I think he is the best caster I can count on when it comes spells, although at first I never believed in magic until I had to try, I think there are many who are depressed, desperate and want this spell to return their happiness, so I have to use this medium to reach all those who are facing one problem or the other. Contact him immediately and I can guarantee that your problems are solved. You can also contact him via emailaddress; website;, for quick response call him or message him through Whatsapp instant messenger with his number+27797427509. Good luck, i hope you find your heart desires.
    Are you sure you want to  Yes  No
    Your message goes here
  • For data visualization,data analytics,data intelligence and ERP Tools, online training with job placements, register at
    Are you sure you want to  Yes  No
    Your message goes here

GPU Computing for Data Science

  1. 1. GPU Computing for Data Science John Joo Data Science Evangelist @ Domino Data Lab
  2. 2. Outline • Why use GPUs? • Example applications in data science • Programming your GPU
  3. 3. Case Study: Monte Carlo Simulations • Simulate behavior when randomness is a key component • Average the results of many simulations • Make predictions
  4. 4. Little Information in One “Noisy Simulation” Price(t+1) = Price(t) e InterestRate•dt + noise
  5. 5. Many “Noisy Simulations” ➡ Actionable Information Price(t+1) = Price(t) e InterestRate•dt + noise
  6. 6. Monte Carlo Simulations Are Often Slow • Lots of simulation data is required to create valid models • Generating lots of data takes time • CPU works sequentially
  7. 7. CPUs designed for sequential, complex tasks Source: Mythbusters
  8. 8. GPUs designed for parallel, low level tasks Source: Mythbusters
  9. 9. GPUs designed for parallel, low level tasks Source: Mythbusters
  10. 10. Applications of GPU Computing in Data Science • Matrix Manipulation • Numerical Analysis • Sorting • FFT • String matching • Monte Carlo simulations • Machine learning • Search Algorithms for GPU Acceleration • Inherently parallel • Matrix operations • High FLoat-point Operations Per Sec (FLOPS)
  11. 11. GPUs Make Deep Learning Accessible Google Datacenter Stanford AI Lab # of machines 1,000 3 # of CPUs or GPUs 2,000 CPUs 12 GPUs Cores 16,000 18,432 Power used 600 kW 4 kW Cost $5,000,000 $33,000 Adam Coates, Brody Huval,Tao Wang, David Wu, Bryan Catanzaro, Ng Andrew ; JMLR W&CP 28 (3) : 1337–1345, 2013
  12. 12. CPU vs GPU Architecture: Structured for Different Purposes CPU 4-8 High Performance Cores GPU 100s-1000s of bare bones cores
  13. 13. Both CPU and GPU are required CPU GPU Compute intensive functions Everything else General Purpose GPU Computing (GPGPU) Heterogeneous Computing
  14. 14. Getting Started: Hardware • Need a computer with GPU • GPU should not be operating your display Spin up a GPU/CPU computer with 1 click. 8 CPU cores, 15 GB RAM 1,536 GPU cores, 4GB RAM
  15. 15. Getting Started: Hardware ✔
  16. 16. Programming CPU • Sequential • Write code top to bottom • Can do complex tasks • Independent Programming GPU • Parallel • Multi-threaded - race conditions • Low level tasks • Dependent on CPU Getting Started: Software
  17. 17. Talking to your GPU CUDA and OpenCL are GPU computing frameworks
  18. 18. Choosing How to Interface with GPU: Simplicity vs Flexibility Application specific libraries General purpose GPU libraries Custom CUDA/ OpenCL code Flexibility Simplicity Low Low High High
  19. 19. Application Specific Libraries Python • Theano - Symbolic math • TensorFlow - ML • Lasagne - NN • Pylearn2 - ML • mxnet - NN • ABSsysbio - Systems Bio R • cudaBayesreg - fMRI • mxnet - NN • rpud -SVM • rgpu - bioinformatics Tutorial on using Theano, Lasagne, and no-learn:
  20. 20. General Purpose GPU Libraries • Python and R wrappers for basic matrix and linear algebra operations • scikit-cuda • cudamat • gputools • HiPLARM • Drop-in library
  21. 21. Drop-in Library Credit: NVIDIA Also works for Python!
  22. 22. Custom CUDA/OpenCL Code 1. Allocate memory on the GPU 2. Transfer data from CPU to GPU 3. Launch the kernel to operate on the CPU cores 4. Transfer results back to CPU
  23. 23. Example of using Python and CUDA: Monte Carlo Simulations • Using PyCuda to interface Python and CUDA • Simulating 3 million paths, 100 time steps each
  24. 24. Python Code for CPU Python/PyCUDA Code for GPU 8 more lines of code
  25. 25. Python Code for CPU Python/PyCUDA Code for CPU 1. Allocate memory on the GPU
  26. 26. Python Code for CPU Python/PyCUDA Code for CPU 2. Transfer data from CPU to GPU
  27. 27. Python Code for CPU Python/PyCUDA Code for CPU 3. Launch the kernel to operate on the CPU cores
  28. 28. Python Code for CPU Python/PyCUDA Code for CPU 4. Transfer results back to CPU
  29. 29. Python Code for CPU 26 sec Python/PyCUDA Code for CPU 8 more lines of code 1.5 sec 17x speed up
  30. 30. Some sample Jupyter notebooks • • Monte Carlo example using PyCUDA • PyCUDA example compiling CUDA C for kernel instructions • Scikit-cuda example of matrix multiplication • Calculating a distance matrix using rpud
  31. 31. More resources • NVIDIA • • Berkeley GPU workshop • gpuWorkshop.html • Duke Statistics on GPU (Python) • CUDAPython.html • Andreas Klockner’s webpage (Python) • • Summary of GPU libraries •
  32. 32. More resources • Walk through of CUDA programming in R • programming-with-gpus-and-r.html • List of libraries for GPU computing in R • HighPerformanceComputing.html • Matrix computations in Machine Learning • talk_dhillon.pdf
  33. 33. Questions?
  34. 34.