working on emulation mode

I am using visual studio.

where should I add the -deviceemu option when compiling to work in emulation mode??

is that the only thing it is necessary ??

thanks

In Visual Studio, you can choose the mode in a drop down menu. Its in the standard toolbox.

You would have to type the flags only when you are compiling from the command prompt.

Cheers

Akshay

Is this always counting? I’m not so experienced with VS but I don’t think that if you start a new project from scratch you will be able to tell the compiler that it has to compile in emulation mode…

You should use the template project in the project folder of the CUDA sdk, it is pre-configured and helpful.
You can also check here for a VS build rule. Both allow you to use the device emulation mode simply.

simply switching to emu mode wont work because I am not using a project from the sdk. I just added a .cu file to another project.

. You should use the template project in the project folder of the CUDA sdk, it is pre-configured and helpful.
You can also check here for a VS build rule. Both allow you to use the device emulation mode simply.

I added the custom building rule from the other posting; however, it brings a bunch of other errors that I may end up wasting much time on fixing.

I see that the template project is able to run on emulation mode. However, I have transfer all those setting to my project, but it still can not run on simulation mode.

Does anyone know the exact steps allow the project run on simulation mode using visual ??

YES !

I made it

I just set the .cu to use an individual building rule (and the rest of the project use c++ rule) and i added -deviceemu at the end like this

$(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"$(CUDA_INC_PATH)" -I./ -I…/…/common/inc -o $(ConfigurationName)\bodysystemcuda_cu.obj …/…/fast_algorithms.cu -deviceemu

may not be clean but it works
thanks everyone