nsight 使用caffe。
2015-08-18 11:30
387 查看
http://www.pittnuts.com/2015/06/build-and-debug-caffe-in-nsight/ 参考博客
不用配置,直接在nsight中导入原有工程caffe-master就可以了。。
Posted on June
29, 2015 by weiwen.web
For those who want to debug and dig into the source code of Caffe, it may be better to build
and debug it in a graphic IDE. This post records my success of building and debugging Caffe in Nvidia’s Eclipse Nsight.
I detoured far far away before figuring out this extremely simple solution:
Environment: Ubuntu 14.04
To build:
1. Follow Caffe
Installation tutorial to install all prerequisites;
2. git clone Caffe to $CAFFE_ROOT;
git clone https://github.com/BVLC/caffe.git $CAFFE_ROOT
3. cp Makefile.config.example Makefile.config and configure your parameters (ex. turn debug
mode by uncommenting DEBUG := 1);
4. run “nsight” in the terimal to launch Nsignt IDE;
5. in Nsight, File -> New -> Makefile Project with Existing Code, and browse $CAFFE_ROOT
6. Just build and all is done!!!
To debug
1. make sure you turned on DEBUG :=
1 when you built Caffe;
2. open the source file of the executive binary you want to debug (generally, there is a
main function);
3. click “Debug”!! (You may add a Debug Configuration for every executive program).
Fix includes and symbols unfound problem:
1. include all header folders in Properties -> General -> Paths and Symbols. Use following command to find the default header search paths and add them into the Includes tab
cpp -x c++ -Wp,-v # for cpp
cpp -x c -Wp,-v # for c
Archived (just for backup)
1. Follow Caffe
Installation tutorial to install all prerequisites;
2. run “nsight” in the terimal to launch Nsignt IDE
3. new a Cuda c/c++ project in Nsight
4. git clone Caffe under Nsight project ($CAFFE_ROOT), and refresh the project folder in Nsight
git clone https://github.com/BVLC/caffe.git
5. configure “include path” of the compiler (During building, if any header file is unfound, just use “locate/find” command to check where it is and include its location in the build configuration)
6.generate caffe.pb.h manually
protoc src/caffe/proto/caffe.proto –cpp_out=.
mkdir include/caffe/proto
#mv src/caffe/proto/caffe.pb.h include/caffe/proto (unnecessary if you included $CAFFE_ROOT/src )
7. For following error, check if and where you install python, and include /usr/include/python2.7, in my case
../caffe/python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
8. fatal error: src/caffe/proto/caffe.pb.h: No such file or directory (Fix it by including $CAFFE_ROOT)
9. ../caffe/matlab/+caffe/private/caffe_.cpp:16:17: fatal error: mex.h: No such file or directory
ensure you installed matlab, “locate” and include the path of mex.h (in my case, /usr/local/MATLAB/R2014b/extern/include)
(Just for backup)…
--------------------------------------------------
加载工程 之后, 把脚本命令 放到 nsight 配置设置中去.如果在Linux下 编译好的话,在这里可以直接运行
配置文件 主要配置 程序运行的入口函数 和 配置参数 如下图所示:
不用配置,直接在nsight中导入原有工程caffe-master就可以了。。
Build and Debug Caffe in Eclipse Nsight
Posted on June29, 2015 by weiwen.web
For those who want to debug and dig into the source code of Caffe, it may be better to build
and debug it in a graphic IDE. This post records my success of building and debugging Caffe in Nvidia’s Eclipse Nsight.
I detoured far far away before figuring out this extremely simple solution:
Environment: Ubuntu 14.04
To build:
1. Follow Caffe
Installation tutorial to install all prerequisites;
2. git clone Caffe to $CAFFE_ROOT;
git clone https://github.com/BVLC/caffe.git $CAFFE_ROOT
3. cp Makefile.config.example Makefile.config and configure your parameters (ex. turn debug
mode by uncommenting DEBUG := 1);
4. run “nsight” in the terimal to launch Nsignt IDE;
5. in Nsight, File -> New -> Makefile Project with Existing Code, and browse $CAFFE_ROOT
6. Just build and all is done!!!
To debug
1. make sure you turned on DEBUG :=
1 when you built Caffe;
2. open the source file of the executive binary you want to debug (generally, there is a
main function);
3. click “Debug”!! (You may add a Debug Configuration for every executive program).
Fix includes and symbols unfound problem:
1. include all header folders in Properties -> General -> Paths and Symbols. Use following command to find the default header search paths and add them into the Includes tab
cpp -x c++ -Wp,-v # for cpp
cpp -x c -Wp,-v # for c
Archived (just for backup)
1. Follow Caffe
Installation tutorial to install all prerequisites;
2. run “nsight” in the terimal to launch Nsignt IDE
3. new a Cuda c/c++ project in Nsight
4. git clone Caffe under Nsight project ($CAFFE_ROOT), and refresh the project folder in Nsight
git clone https://github.com/BVLC/caffe.git
5. configure “include path” of the compiler (During building, if any header file is unfound, just use “locate/find” command to check where it is and include its location in the build configuration)
6.generate caffe.pb.h manually
protoc src/caffe/proto/caffe.proto –cpp_out=.
mkdir include/caffe/proto
#mv src/caffe/proto/caffe.pb.h include/caffe/proto (unnecessary if you included $CAFFE_ROOT/src )
7. For following error, check if and where you install python, and include /usr/include/python2.7, in my case
../caffe/python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
8. fatal error: src/caffe/proto/caffe.pb.h: No such file or directory (Fix it by including $CAFFE_ROOT)
9. ../caffe/matlab/+caffe/private/caffe_.cpp:16:17: fatal error: mex.h: No such file or directory
ensure you installed matlab, “locate” and include the path of mex.h (in my case, /usr/local/MATLAB/R2014b/extern/include)
(Just for backup)…
--------------------------------------------------
加载工程 之后, 把脚本命令 放到 nsight 配置设置中去.如果在Linux下 编译好的话,在这里可以直接运行
配置文件 主要配置 程序运行的入口函数 和 配置参数 如下图所示:
相关文章推荐
- MonoDevelop中文乱码
- 剑指offer 39_二叉树的深度
- Html5文件
- js验证码
- js中==和===的区别
- html切换面板
- js 开启video全屏模式
- 手风琴JS特效源码
- JQuery实现数字滚动增加的效果
- 问题:table 可否实现对角线;结果:HTML 斜线 表头
- The difference between film faced plywood and wood I joist beam
- jQuery效果总结
- jQuery实战——jQuery本质是一个javascript函数
- js实现动态删除表格行和列
- json和XML
- Jquery动画第二部分
- jQuery实现的漂亮表单效果代码
- 常用css总结
- jQuery操作dom
- View注入框架:Butterknife简单使用