I am new to CUDA and have successfully running programs/ executing kernels using VS 2010. However, I am finding it difficult to step inside kernels executed on the device (GPU). Can someone please tell me how to enable the “emu - debug” mode in Visual studio to step into kernels and see the details. I am getting an exception somewhere in the program due to kernel execution.
Step wise instruction will be really useful.
Thanks in advance.
(My environment is Windows 7, I7 Processor and is GPU enabled, CUDA 4.0)
If you are using any halfway recent CUDA version, there is no emulation mode anymore (it was abandoned with CUDA 3.1 or so).
Try running your program with [font=“Courier New”]cuda-memcheck[/font] instead to see if an out-of-bounds memory access causes the exception.
EMU mode is supported by earlier version CUDA 2.3
In console command you have to simply add -deviceemu option.
like “(CUDA_BIN_PATH)\nvcc.exe" [b]â€“deviceemu [/b] --use_fast_math -ccbin "(VCInstallDir)bin” -c -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MD -I"(CUDA_INC_PATH)" -I./ -I./kernel -I./inc -I../inc -o (ConfigurationName)\cuSVMPredictKernel.obj cuSVMPredictKernel.cu
but it works only with VS 2008 express edition.