Hi,
I am also using Qt to develop cuda code, but I can not debug my .cu code. I can step into .cu file, but I can not step into the cuda kernels. I also tried run cuda-gdb in terminal, but I can not step into the cuda kernels either. What do I need to change for my .pro file? Thank you very much.
Best,
Wu
[codebox]
Path to opencv install
OPENCV_DIR = /usr/local/opencv
Path to cuda SDK install
CUDA_SDK = /home/wu/NVIDIA_GPU_Computing_SDK/C
Path to cuda toolkit install
CUDA_DIR = /usr/local/cuda
#CUDA_DIR = $$system(which nvcc | sed ‘s,/bin/nvcc$,’)
GPU architecture
CUDA_ARCH = sm_13
PROJECT_DIR = $$system(pwd)
#CONFIG += create_prl
#CONFIG += link_prl
TEMPLATE = app
#TARGET = release_binary
#CONFIG += release
QMAKE_CXXFLAGS_RELEASE =-O3
DESTDIR = …/bin
LIBS += -lcudart -lcutil
LIBS += -lGLEW -lGL -lGLU
LIBS += -lcxcore -lcv -lhighgui -lcvaux -lml
RESOURCES += ressources.qrc
OBJECTS_DIR = $$PROJECT_DIR/Obj
NVCCFLAGS = --compile --host-compilation 'C++' \
--compiler-options -fno-strict-aliasing -use_fast_math
DEPENDPATH += $$PROJECT_DIR/Gui
DEPENDPATH += $$PROJECT_DIR/Motion
DEPENDPATH += $$PROJECT_DIR/Cuda
DEPENDPATH += $$PROJECT_DIR/Core
DEPENDPATH += $$PROJECT_DIR/Media
DEPENDPATH += $$PROJECT_DIR/OpenGL
DEPENDPATH += $$PROJECT_DIR
INCLUDEPATH += $$PROJECT_DIR/Gui
INCLUDEPATH += $$PROJECT_DIR/Motion
INCLUDEPATH += $$PROJECT_DIR/Cuda
INCLUDEPATH += $$PROJECT_DIR/Media
INCLUDEPATH += $$PROJECT_DIR/Core
INCLUDEPATH += $$PROJECT_DIR/OpenGL
INCLUDEPATH += $$PROJECT_DIR
QT += opengl
INCLUDEPATH += $$CUDA_DIR/include
QMAKE_LIBDIR += $$CUDA_DIR/lib64
INCLUDEPATH += $$CUDA_SDK/common/inc/
QMAKE_LIBDIR += $$CUDA_SDK/lib
QMAKE_LIBDIR += $$CUDA_SDK/common/lib
INCLUDEPATH += $$OPENCV_DIR/include
QMAKE_LIBDIR += $$OPENCV_DIR/lib
Input
FORMS += paramsFolki.ui
HEADERS += LIVA.hpp
HEADERS += Logger.hpp
HEADERS += Singleton.hpp
HEADERS += mainwindows.h
HEADERS += paramsFolki.hpp
HEADERS += LiGL2Dwidget.hpp
HEADERS += MediaPlayer.hpp
HEADERS += LkCvWidget.hpp
HEADERS += FolkiOpticalFlow.hpp
HEADERS += OpticalFlow.hpp
HEADERS += endianness.h
HEADERS += FlotRender.hpp
HEADERS += GestionBuffer.hpp
SOURCES += main.cpp
SOURCES += paramsFolki.cpp
SOURCES += LiGL2Dwidget.cpp
SOURCES += MediaPlayer.cpp
SOURCES += LkCvWidget.cpp
SOURCES += FolkiOpticalFlow.cpp
SOURCES += OpticalFlow.cpp
SOURCES += endianness.c
SOURCES += FlotRender.cpp
CUDA_SOURCES += ConvolutionSeparable.cu
CUDA_SOURCES += ConvolutionSeparableFlat.cu
CUDA_SOURCES += ConvolutionSeparableU.cu
CUDA_SOURCES += ConvolutionSeparableFlatU.cu
CUDA_SOURCES += DeriveGradient.cu
CUDA_SOURCES += FolkiOpticalFlowKernels.cu
CUDA_SOURCES += PyramidBurt.cu
CUDA_SOURCES += PyramidHaar.cu
CUDA_SOURCES += DivRot.cu
CUDA_SOURCES += RenderGL.cu
CUDA_SOURCES += Morpho.cu
CUDA_SOURCES += Reduction.cu
CUDA_SOURCES += Propage.cu
HEADERS += ConvolutionSeparableFlat.hpp
HEADERS += ConvolutionSeparable.hpp
HEADERS += ConvolutionSeparableFlatU.hpp
HEADERS += ConvolutionSeparableU.hpp
HEADERS += DeriveGradient.hpp
HEADERS += FolkiOpticalFlowKernels.hpp
HEADERS += LiCuda.hpp
HEADERS += PyramidBurt.hpp
HEADERS += PyramidHaar.hpp
HEADERS += DivRot.hpp
HEADERS += RenderGL.hpp
HEADERS += Morpho.hpp
HEADERS += Reduction.hpp
HEADERS += Propage.hpp
CUDA_INC = $$join(INCLUDEPATH,’ -I’,‘-I’,’ ')
cuda.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o
cuda.commands = $$CUDA_DIR/bin/nvcc -g -G -arch=$$CUDA_ARCH -c $$NVCCFLAGS $$CUDA_INC $$LIBS ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
cuda.dependcy_type = TYPE_C
cuda.depend_command = $$CUDA_DIR/bin/nvcc -g -G -M $$CUDA_INC $$NVCCFLAGS ${QMAKE_FILE_NAME} |sed “s,^.*:,”|sed “s,^ *,” | tr -d ‘\\n’
cuda.input = CUDA_SOURCES
QMAKE_EXTRA_UNIX_COMPILERS += cuda
Qt+= network[/codebox]