I am writting a DLL with MSVC8. I recently switched from cuda 2.0 to 2.3 and since then I cannot run in debug mode properly : the values of the variable in the debugger are completely wrong. I already met that trouble before, it was due to some options that were different in the C++ and NVCC compilers. Now I tried many options, I didn’t find the solution. Here are the command lines :
and me. How can i make dll project which include *.cu files arn reference to cuda.dll ?
In Cuda Wizard for MVS there is only CUDAwinAPP. May be is other Cuda wizard exists?
Actually I don’t use the CUDA wizard. I create a DLL with MSVC and then add to the project the various cpp, h, and cu files. You have to set the build rules to CUDA build rules for .cu files in not set automatically, and excude from build the kernel files.
I created a DLL using with MSVC. I works fine from a MFC test application (also compiled in MSVC). Now the same DLL shows strange behaviour when called from a QT test application, compiled with MinGW. In short, the GPU seems to keep some values from one call to another. I am not using any particular initialization of the GPU (I just call cudaSetDevice). Should I ?
I created a DLL using with MSVC. I works fine from a MFC test application (also compiled in MSVC). Now the same DLL shows strange behaviour when called from a QT test application, compiled with MinGW. In short, the GPU seems to keep some values from one call to another. I am not using any particular initialization of the GPU (I just call cudaSetDevice). Should I ?
OK i done it.
dll from MVS2008 (used getcudaparam memcpy and cufft) worked in Qt (windows with mingw).
the point: i use emulation mode (have no CUDA videocerd on laptop) in comand line
nvcc -deviceemu -I"$(CUDA_INC_PATH)" -c -o $(ConfigurationName)\dll.obj dll.dll
and linc to “cufftemu.lib”
after compilation i load my dll in *.pro file in Qt project
and use my function in main.cpp.
You can try to use my we.dll
add in pro file destination of dll, and put dll in dir where is .exe.
OK i done it.
dll from MVS2008 (used getcudaparam memcpy and cufft) worked in Qt (windows with mingw).
the point: i use emulation mode (have no CUDA videocerd on laptop) in comand line
nvcc -deviceemu -I"$(CUDA_INC_PATH)" -c -o $(ConfigurationName)\dll.obj dll.dll
and linc to “cufftemu.lib”
after compilation i load my dll in *.pro file in Qt project
and use my function in main.cpp.
You can try to use my we.dll
add in pro file destination of dll, and put dll in dir where is .exe.
A few questions though : why do you need to include cudaruntime and cufft header file in you project ? I they are called only from the DLL, they should be included only in the DLL project …?
I already had troubles between QT and MSVC code in the past, due to compiler specific coding for std::string type. I had to remove all use of strings in the communication between the application and the DLL.
A few questions though : why do you need to include cudaruntime and cufft header file in you project ? I they are called only from the DLL, they should be included only in the DLL project …?
I already had troubles between QT and MSVC code in the past, due to compiler specific coding for std::string type. I had to remove all use of strings in the communication between the application and the DLL.