我的GPU设备是GTX 1080Ti,IDE和CUDA版本分别是Visual Studio 2013和6.5,并且已经安装了Nsight 4.5插件。但是,当我启动CUDA调试时,IDE报告:
A CUDA context was created on a GPU that is not currently debuggable. Breakpoints will be disabled.
Adapter: GeForce GTX 1080 Ti
谁可以帮助我?
补充
实际上,我是基于基于CMake的project构建了该应用程序。为了适应环境,我在CMakeLists.txt
中修改了一些代码。特别是以下代码段:
if (CUDA_VERSION_MAJOR GREATER 8)
list(APPEND CUDA_NVCC_FLAGS "-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50")
else()
list(APPEND CUDA_NVCC_FLAGS "-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50")
endif()
我已将其修改为
list(APPEND CUDA_NVCC_FLAGS "-arch;compute_20")
原因是如果我配置了旧项目,则总是发生"invalid device function"
的运行时错误。结果,它会有所作为吗?