I’m trying to configure CUDA6.0 with my Visual Studio 2010. I created a project using CUDA 6.0 runtime. When compiling, do I need to change/add any options? Since my CUDA code runs slower than the series version, is there any chance that the code is not executed in parallel (say, the GPU becomes a slow CPU…), regardless other possibilities e.g. double precision, overhead, etc.?
Make sure you can build and run the sample projects correctly. If you study the sample projects, you will see the various build customizations for CUDA.
When starting a new project, you should select the build customizations for CUDA, and also add the cudart.lib library to your linker specification. For basic functionality, that is all that is required.
If you are running a Debug project, the -G switch will get added to the compile specification. This can often make CUDA code run significantly slower. The Release project should not have this switch added.