YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Other Parallel Computing Platforms - Intro to Parallel Programming

Get Embed Code
2 Languages

Showing Revision 4 created 05/24/2016 by Udacity Robot.

  1. It's important to remember that CUDA isn't just a specific language
  2. or a set of extensions to the CC++ language.
  3. CUDA is the whole GPU computing architecture.
  4. So let's talk about some other platforms that support CUDA.
  5. First we'll talk about other languages that support CUDA, then we'll talk about cross-platform solutions.
  6. So the lightweight version of targeting CUDA is simply to wrap CUDA C++ into the other language,
  7. so that you can transfer data to the GPU and call a CUDA C++ kernel from within the other language.
  8. And a great example of this is PyCUDA, which allows Python programs to call CUDA C++ kernels,
  9. and even to construct them programmatically from within Python.
  10. At a deeper level, an increasing number of languages are directly targeting the CUDA architecture.
  11. So fans of Python will also want to check out Copperhead.
  12. Copperhead is a data parallel subset of Python, that uses a library of data parallel
  13. functions such as map, produce, filter, scan and sort.
  14. When a Copperhead function is called, the runtime generates thrust code
  15. and calls it from the Python interpreter.
  16. Memory is managed by the Python garbage collector and lazily transferred to and from the GPU.
  17. So, a cool thing about Copperhead programs is that they interoperate
  18. with Python programs, using packages like numpy or matplotlib.
  19. This makes it easier to write entire applicatons and not just kernels.
  20. Cuda Fortran is a product form the Portland group That does exactly what it sounds like.
  21. It integrates CUDA constructs such as thread blocks
  22. and shared memory directly into the FORTRAN language.
  23. More on the research front, Halide is a brand new language specifically designed for image processing.
  24. This makes it a DSL or Domain Specific Language. And it's a really cool example of this.
  25. Halide targets GPUs as well as multi-core CPUs, on both desktops and on mobile devices.
  26. And many of the parallel optimization patterns we've discussed,
  27. such as tiling, are particularly easy to express and optimize in Halide.
  28. And that makes it possible to get very high-performance image processing code.
  29. Finally, the widely used Matlab platform supports CUDA both
  30. for wrapping CUDA kernels as well as directly targeting CUDA with Matlab code in core functions.
  31. So let's talk about Matlab a little further.