Compiling options for VS2010


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.?

Many thanks,

Probably you should review carefully the instructions in the getting started document:

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.

Thank you very much. I tried to switch of -G flag and it did indeed work faster than before - still much slower than the sequential version. I’ll try to locate the problem before further discussion.

Does your test code use or ? If , what GPU?