3 ms·
Ask HN: Best GPU (scientific) programming tutorials?
Interested to see what the real hive mind (at least its temporal lobe) would look for a GPU programming tutorial for a (relatively) amateur programmer.
- octopus 16y agoIf you use Mac or Windows search iTunes for CUDA programming, or search Google for "Programming Massiveley Parallel Processors with CUDA" you should find videos and slides for this Stanford course. A good book about CUDA is:"CUDA by Example"
- octopus 16y agoIf you want to program for general GPU devices, you could search for OpenCL (my first comment is valid only for NVIDIA GPU's). However you should bare in mind that coding for OpenCL is, at least now, an order of magnitude more complicated (personal opinion) than CUDA programming. With CUDA if you already know C is straightforward to get started.
- tomrod 16y agoWill look into it. I have experience with python, matlab/octave, R, and an itsy bitsy amount of C#/SQL/Java from another life (figuratively).
- octopus 16y agoI think you could use Python for CUDA programming (I didn't tried that), see PyCUDA at: http://mathema.tician.de/software/pycuda http://mathema.tician.de/software/pycuda even Matlab has some bindings for CUDA: http://developer.nvidia.com/object/matlab_cuda.html http://developer.nvidia.com/object/matlab_cuda.html Bare in mind however that the original CUDA implementation uses C, so if you want the last drop of performance you will use C.
- tomrod 16y agoCan OpenCL be implemented on systems which do not support CUDA? I have a relatively inexpensive HP bought about 3 years ago that, well, just won't run CUDA even with an nvidia card :-)
- octopus 16y agoI don't think so, better check on NVIDIA forums to be sure ...
- manvsmachine 16y agoIf you're still talking about about NVIDIA cards, then no; their OpenCL implementation is based upon the CUDA architecture (technically, CUDA is the device architecture that supports GPGPU programming, not the language itself). That said, videocards are cheap these days, as long as you don't need the high-end: you can snag an entry-level Fermi card (GTS450) for right around $100 these days, or less if you go with something GT200-based.
- manvsmachine 16y agoHere's what I used while doing an undergrad independent study a couple years ago (except for the books; at the time, books on the subject didn't exist yet): Online Tutorials: Dr. Dobbs - CUDA, Supercomputing For the Masses: http://www.drdobbs.com/high-performance-computing/207200659 http://www.drdobbs.com/high-performance-computing/207200659 GTC Video Tutorials / Presentations: http://www.nvidia.com/object/gpu_technology_conference.html http://www.nvidia.com/object/gpu_technology_conference.html University Courses: GaTech ECE4893 - Multicore and GPU Programming for Video Games (not CUDA specific, but covered): http://users.ece.gatech.edu/lanterma/mpg/ http://users.ece.gatech.edu/lanterma/mpg/ UIUC ECE498AL - Applied Parallel Programming: http://courses.engr.illinois.edu/ece498/al/ http://courses.engr.illinois.edu/ece498/al/ Books: Programming Massively Parallel Processors: http://www.amazon.com/Programming-Massively-Parallel-Processors-Hands-/dp/0123814723/ref=sr_1_1?ie=UTF8&qid=1296443374&sr=8-1 http://www.amazon.com/Programming-Massively-Parallel-Process... CUDA By Example: http://www.amazon.com/CUDA-Example-Introduction-General-Purpose-Programming/dp/0131387685/ref=sr_1_2?ie=UTF8&qid=1296443374&sr=8-2 http://www.amazon.com/CUDA-Example-Introduction-General-Purp... If you decide to go the CUDA route, as opposed to OpenCL, then NVIDIA has a lot of solid documentation that will help you get to a "Hello, World" level pretty quickly. This StackOverflow thread should help if you choose to go with an AMD OpenCL solution: http://stackoverflow.com/questions/780978/opencl-books-tutorials http://stackoverflow.com/questions/780978/opencl-books-tutor.... Personally, I would stick with NVIDIA; they seem much more dedicated to advancing the cause and you have support for both API's.
- wladimir 16y agoAs you mentioned scientific, and a lot of scientists use numpy/scipy these days, these links might be interesting to you: Open source Python library that automatically generates linear algebra code for the GPU, pretty awesome, seems to be a bit slanted toward machine learning but is not specific to it: http://deeplearning.net/software/theano/ http://deeplearning.net/software/theano/ Simpler GPU programming with Python (somewhat more low-level, but more friendly than using the plain C API): http://mathema.tician.de/software/pycuda http://mathema.tician.de/software/pycuda