[英]How to debug host code in mixed cuda C++ program?
My work platforms are VS2010 and Nsight 3.1. 我的工作平台是VS2010和Nsight 3.1。
With Nsight, breakpoints can be set in cuda kernel and the debugger works well. 使用Nsight,可以在cuda内核中设置断点,并且调试器运行良好。 If the breakpoints are set in host code, Nsight just ignores them.
如果断点在主机代码中设置,则Nsight只会忽略它们。
I don't know if it is possible to set breakpoints in host code and use the debugger provided by VS2010. 我不知道是否可以在主机代码中设置断点并使用VS2010提供的调试器。 I tried, but the program stops when it meets the first cudaMalloc function.
我试过了,但程序在遇到第一个cudaMalloc函数时停止了。 Could someone please tell me how to debug host code in a mixed cuda and c++ program?
有人可以告诉我如何在混合cuda和c ++程序中调试主机代码吗?
Thanks a lot. 非常感谢。
I'm afraid you could not debug both CUDA and c++ program in on VS. 我担心你无法在VS上调试CUDA和c ++程序。 Here is a workaround.
这是一个解决方法。 Hope it could help you
希望它可以帮到你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.