debug cuda程序貌似并没有想象中那么容易。
我的环境是ubuntu16.04, cuda_toolkit 8.0 ,显卡驱动为nvidia-367,debug提示:
|
|
查阅CUDA-GDB发现:
Debugging a CUDA GPU involves pausing that GPU. When the graphics desktop manager is running on the same GPU, then debugging that GPU freezes the GUI and makes the desktop unusable。
解决办法
如果不用图形界面的话,可以直接停止X11 server通过停止lightdm服务;
如果要用图形界面的话,需要使用cuda software preemption.