Run emu mode - CUDA How to run emu:
Hi People,

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[b] enable the "emu - debug" mode in Visual studio[/b] to step into kernels and see the details. I am getting an exception somewhere in the program due to kernel execution.

[u]Step wise instruction[/u] will be really useful.

Thanks in advance.

Regards,
Shyam B

[size="2"](My environment is Windows 7, I7 Processor and is GPU enabled, CUDA 4.0)[/size]
Hi People,



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.



Regards,

Shyam B



(My environment is Windows 7, I7 Processor and is GPU enabled, CUDA 4.0)

#1
Posted 12/18/2011 03:01 AM   
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.
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 cuda-memcheck instead to see if an out-of-bounds memory access causes the exception.

Always check return codes of CUDA calls for errors. Do not use __syncthreads() in conditional code unless the condition is guaranteed to evaluate identically for all threads of each block. Run your program under cuda-memcheck to detect stray memory accesses. If your kernel dies for larger problem sizes, it might exceed the runtime limit and trigger the watchdog timer.

#2
Posted 12/19/2011 12:05 PM   
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.
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" –deviceemu --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.

#3
Posted 12/29/2011 07:46 AM   
Scroll To Top