CUDA Occupancy Calculator on Windows XP

How can I compile my program using the -cubin option in Visual studio 2003?
I want to use the CUDA Occupancy Calculator.

Thanks,

Diego

I’ve been doing it from the command line, using nvcc. You can also specify the nvcc options through Visual Studio (I think by right-clicking on the cuda source file and then choosing appropriate option). The compiler documentation that comes with CUDA describes more options for nvcc.

Paulius

Hi Paulius,

Can you give an example about how I can do it using the command line? I don’t have a copy of the nvcc.pdf file. I tried ithat using Visual Studio but it is not compiling.

Thanks a lot,

Diego

You can add the --keep command to the custom build rule in Visual Studio. That way all temporary files are saved and you can check out the .cubin file.

Jeroen

Thank you Paulius, that one realy saved my day ;)),

adding the -keep to the

(CUDA_BIN_PATH)\nvcc.exe -ccbin "(VCInstallDir)bin" -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I./inc -o CUDA_Image_Processing.obj CUDA_Image_Processing.cu -keep

by:

by right-clicking on the cuda source file whatever.cu

and then choosing : properties - custom build step - general - comand line