Exploit your GPU power with PyCUDA (and friends)
summary
CUDA is NVIDIA's GPU platform (since 2006) and PyCUDA gives direct access with automatic object cleanup, error-to-exception mapping and PyCUDA source module compiles GPU code at runtime. A simple vector add launches one thread per element but shows vector add shows no speed-up due to memory transfer; real gains require high arithmetic intensity and careful kernel tuning (kernel optimizations can reach ~30× in published reductions, Mark Harris gets 30x reduction optimization). Higher-level options: Copperhead compiles a restricted Python subset with @cu (still immature), Theano compiles math expressions to GPU via an env var and excels at linear algebra but not all ops are faster on GPU.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 1:10Topics
- 2:00GPU
- 2:35CPU vs GPU
- 3:20GPU computing
- 4:45CUDA vs OpenCL
- 10:00CUDA Programming Model
- 11:35Memory Spaces
- 12:55khuda
- 14:30sum of vectors
- 16:05Imports
- 17:55Code
- 22:50Medical intensity
- 23:25Practical intensity
- 26:30Cooperation
- 31:00When to use PyCUDA
- 31:40PyCUDA vs CUDA
- 33:40Cons
- 40:30Summary
- 42:05Metrics
- 45:15Highlevel functions
- 47:05Questions
- 53:05Is everything more complicated
- 54:35Nvidia libraries
- 56:35Modern GPUs
related talks
30mCUDA in Your Python: Effective Parallel Programming on the GPU
02h 28mGPU Accelerated Python
35mCUDA in Python- A New Era for GPU Acceleration
35mPython at the Speed of Light: A Complete Tour of the CUDA Ecosystem
33mWhen GPUs Make Python Slower: Patterns and Pitfalls
30mCuPy: A NumPy-compatible Library for GPU
34mAccelerating GPU Algorithms in pure Python
48mGPU Programming in Pure Python
