views:

511

answers:

2

I want to start learning how to program in CUDA, not just the language, but program-design -- things like -- from what I've heard -- writing kernels without conditionals so that all the threads run the same instructions and there's minimal synchronization overhead.

And from what I've heard, the python wrapper is a lot more intuitive to use and code with than the C library.

So assuming that the languages I already know/don't know aren't a barrier, which language is it best to start learning CUDA in?

Which one gives you the best idea of the DO's and DONTs in CUDA and the easiest learning curve?

+2  A: 

Given that languages aren't a barrier, I would say that sticking to C/C++ would leave more resources available to help you. There are more potential pitfalls but if you take a look in the CUDA Best Practices Guide (provided with the CUDA toolkit on the NVIDIA website) then you'll be on the right track.

You could also consider looking at the open-source project "Thrust" which is a STL/Boost style template library built on top of CUDA C++. It works well in many cases and you can just call more complex kernels as you learn more.

Tom
+1  A: 

You can go through the Best Practices Guide and also through the THRUST template. For Python binding, look at Copperhead talked about in these slides by Michael Garland

vivekv80