Thursday, June 26, 2008

CUDA Hello World

CUDA is an API to Nvidia's GPU's. It allows programmers access to a parallel machine that will run faster than cpu's for particular kinds of projects. In this 3 part tutorial will first setup Visual Studio to work with Cuda. If you are not using Visual Studio you can skip to Part 2

Step 1 is to download a new template type for Visual Studio. This will setup the compiler and other settings and get you ready to write code. To do this download following wizard

Step 2 is optional, but I like to do it. This will set up syntax highlighting for your .cu (cuda) files.
In Visual Studio go to Tools->Text Editor->File Extensions and add .cu extensions to the list of cpp files.

Step 3, download the cuda SDK and driver if you have a cuda enabled card. Simply go to nvidia's webside and download what you need:

That's it, now you ready to create your first project. Continue To Part 2