本文主要是介绍cuda-gdb fatal: All CUDA devices are used for display and cannot be used while debugging.问题解决,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在用cuda-gdb调试cuda程序时,会报错:
fatal: All CUDA devices are used for display and cannot be used while debugging. (error code = CUDBG_ERROR_ALL_DEVICES_WATCHDOGGED(0x18)
(cuda-gdb) [Thread 0x7fffb1b51700 (LWP 16435) exited]
[Thread 0x7fffb6352700 (LWP 16434) exited]
[Thread 0x7fffb9354700 (LWP 16432) exited]
[Thread 0x7fffb9b55700 (LWP 16431) exited]
[Thread 0x7fffbe356700 (LWP 16430) exited]
[Thread 0x7fffbeb57700 (LWP 16429) exited]
[Thread 0x7ffff7f71a40 (LWP 16427) exited]
解决方法:在.bashrc文件中添加
export CUDA_DEBUGGER_SOFTWARE_PREEMPTION=1
然后source ~/.bashrc即可。
这篇关于cuda-gdb fatal: All CUDA devices are used for display and cannot be used while debugging.问题解决的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!