How to use Caffe with Eclipse C++ especially for the GPU mode?

358 views
Skip to first unread message

hjung

unread,
Feb 13, 2017, 8:26:16 PM2/13/17
to Caffe Users
I installed Caffe on Ubuntu 16.04 with Cuda 8.0 and Cudnn 5.1.

For my project, I want to use Caffe using Eclipse C++. For this purpose, I followed http://tzutalin.blogspot.tw/2015/05/caffe-on-ubuntu-eclipse-cc.html in order to add Caffe include and link folders to the Eclipse environment. But, it seems the procedure in the website doesn't work for the GPU mode.

Further, I noticed that the following commands for CMakeLists.txt find Caffe files automatically.
find_package(Caffe)
include_directories
(${Caffe_INCLUDE_DIRS})
add_definitions
(${Caffe_DEFINITIONS})
target_link_libraries
(caffeTest ${Caffe_LIBRARIES})

But, I have no idea how I can utilize the above commands in Eclipse C++. The reason I want to use Eclipse C++ is that I need to analyze my Caffe C++ code line by line.

To sum up, I would like to know How to use Caffe with Eclipse C++ in the GPU mode. Thanks.

hjung

unread,
Feb 13, 2017, 11:05:41 PM2/13/17
to Caffe Users
I found the way to debug Caffe using both Eclipse C++ and CMake.
Make CMakeLists.txt by utilizing the below codes and follow https://cmake.org/Wiki/Eclipse_CDT4_Generator to use CMake in Eclipse C++. I could debug my own C++ code with Caffe.

2017년 2월 14일 화요일 오전 10시 26분 16초 UTC+9, hjung 님의 말:

Knight

unread,
Oct 30, 2017, 2:24:53 AM10/30/17
to Caffe Users
 I find this works for me with gpu settings.
Reply all
Reply to author
Forward
0 new messages