Any one know how to integrate and debug the entire source code of Caffe in Nsight?
Thanks!

that's my printscreen which use Nsignt for debuging caffe's cu code.
Basiclly, you need a eclipse project file( nsight project file) and NVCC nsight makefile to make it works.
Thank u very much. As you mentioned , File -> New -> Makefile Project with Existing Code works well for me now. See here: http://www.pittnuts.com/2015/06/build-and-debug-caffe-in-nsight/
Closing!!!
I followed this page: http://www.pittnuts.com/2015/06/build-and-debug-caffe-in-nsight/
However, I met some problems, such as:
1.layers[i]->Forward(bottom_vecs[i],top_vecs[i]); which says: Method 'Forward' could not be resolved.

2.AddressBook reflection= new :: google::protobuf::internal::GeneratedMessageReflection(...)
saying: The type 'gooogle::protobuf::internal::GeneratedMessageReflection' must implement the inherited pure virtual method 'google::protobuf::Reflection::SetUInt64"

Anybody knows why and how to solve these problems? Your answer would be much appreciated!
Just ignore those 'errors', you can still debug it line by line though it complains blabla...
You might set breakpoints at the lines you wanna debug, if it still cannot hit your breakpoints, use 'step into' to let nsight to find it based on Makefile configuration. -Wei
thank you very much! @wenwei202 It did work!
Can any one tell me or show me how to use Nsight to trace code in caffe...
I follow http://www.pittnuts.com/2015/06/build-and-debug-caffe-in-nsight/.
But I don't known how to open the source file of the executive binary you want to debug (generally, there is a main function);
If I the mnist for example.
How can I run it and trace it?
Thanks for your watching..
@ymcasky
you can use caffe.cpp to debug. caffe.cpp is the main tool to train and test.
You need to create your debug application first, by "Run -> Debug Configuration -> C/C++ Application"
in the Arguments tab, input content like:
train -solver examples/mnist/lenet_solver.prototxt
Then click debug to start.
-Wei
Thanks! it work!
I follow the link here.
http://suanfazu.com/t/eclipse-caffe/13450.
I'm wrong just do New->Makefile Project with Existing Code.
Do you have python version to debug?
Can you give me an example to trace python code?
2016-06-08 11:36 GMT+08:00 Wei Wen [email protected]:
@ymcasky https://github.com/ymcasky
you can use caffe.cpp to debug. caffe.cpp is the main tool to train and
test.
You need to create your debug application first, by "Run -> Debug
Configuration -> C/C++ Application"
in the Arguments tab, input content like:
train -solver examples/mnist/lenet_solver.prototxt
Then click debug to start.
-Wei—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BVLC/caffe/issues/2657#issuecomment-224478918, or mute
the thread
https://github.com/notifications/unsubscribe/AF8MCKCebGtX69L04jSksqE7KCrBLy0Bks5qJjjJgaJpZM4FN0Bf
.
Hi, I followed the instruction in http://www.pittnuts.com/2015/06/build-and-debug-caffe-in-nsight/.
After that, when I selected some cuda or cudnn related fucntion and use open declaration command, nsight just told me that selected text cannot be mapped to a symbol name.
Also, when I debug the program, the breakpoint did not work. How can I solve these problems? Thanks.
@wenwei202 @pustar @ymcasky @pluskid
@CTTC nsight is not so perfect to find all symbols, but generally is OK to debug. Some suggestions:
1) make sure you opened DEBUG := 1 in Makefile.config
2) set breakpoints at all lines where it will jump to functions in other files
@wenwei202 Thanks for your quick reply. So I set a few breakpoints. And the program only stopped at the breakpoint in the cudnn_conv_layer.cpp. It won't stop at .cu files. And I actually test several times, and the program will make the computer not respond anymore every time so that I have to force restart the ubuntu. I am using GPU mode and openned USE_CUDNN=1 when built caffe.
Just as addition: For me the solution was to put the breakpoints in the ".cu" files instead of the ".cpp" files, since the latter where not hit
Most helpful comment
Just ignore those 'errors', you can still debug it line by line though it complains blabla...
You might set breakpoints at the lines you wanna debug, if it still cannot hit your breakpoints, use 'step into' to let nsight to find it based on Makefile configuration. -Wei