-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caffe OpenCL support #2610
Caffe OpenCL support #2610
Conversation
@@ -29,11 +31,11 @@ include(cmake/Dependencies.cmake) | |||
|
|||
# ---[ Flags | |||
if(UNIX OR APPLE) | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall") | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -std=c++11") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty for the big contribution 👍 .
Would -std=c++0x work? I think travis runs GCC 4.6 and only GCC 4.7 and later support -std=c++11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: it's trivial to install a newer toolchain on Travis, see krasin/CuraEngine@976b373
@naibaf7 Great effort! @shelhamer What is your opinion? |
@bhack |
@naibaf7 Take and adapt c++11 and g++ version changes in Makefile CmakeList and travis_install.sh that you see at https://github.com/BVLC/caffe/pull/2537/files |
Remove libboost-python1.54-dev. It is for my pull request. |
When this will build fine we want to extend Travis build matrix for switching opencl on and off and test different vendors (nvidia, intel, amd)? |
@bhack |
@naibaf7 Ok let this build correctly first :) . |
Remember also to run make lint locally before pushing. |
@naibaf7 Thank you for the nice work. |
Travis is still stalled on test compilation fail. |
@naibaf7 Do you see any prospective in this opencv/opencv#4072 for interacting with opencv accelerated image transformation routines on training? |
@bhack |
Yes as opencl data transformation layer. Here an old not opencl related discussion #569. Other transformations PRs are still open if you check around. |
I can't get Travis CI to build correctly. Any help appreciated. Issue is that it builds correctly on all our test systems (including Fedora 21, 22 and Ubuntu 13.04, 14.04). But not on Travis (Ubuntu 12.04?). |
The first error on the first build I see on the Travis build matrix it is in linking phase:
|
@bhack Also note that the CUDA builds have further issues with CHECK of glog, as mentioned above. If g++ is 4.8.1 (buggy) with the Ubuntu PPA, then that's bad. g++ 4.8.2 or higher is required. |
There is also g++-4.9 in the same ppa |
@bhack |
Finally :) I'm a little bit worried that with this and PR on dependencies modularization we will income in a sort of preprocessor abuse syndrome. |
Yes but don't worry. I already have plans going on for the complete device abstraction. That will just about remove most ugly preprocessor macros. And most of the additional code in the layers as well. But some of it is not avoidable if you want to keep the dependencies low for CUDA and CPU_ONLY users and keep OpenCL users from having to install CUDA. If anyone has time to look into fixing CMAKE and Travis to do the OpenCL builds as well, that would be cool. |
What do you need in Cmake? Surely also @Nerei could give us some support if he is available. |
I don't think a lot of changes in cmake required for OpenCL. For instance, OpenCV only provides opencl headers in 3rdparty subfolder, and uses OpenCL via dlopen/LoadLibrary(). |
" We believe that AMD has an "unofficial" (not, at least yet, integrated into the main Caffe build) OpenCL version of Caffe available, targeting the company's CPUs, GPUs and integrated APUs". We belive? Are we on X-Files? |
@bhack |
Yes. And I agree with you. But I noted in particular the specific word "I believe". It is almost quite ironic after all the comments and developments in this thread. |
Please send me a message at shelhamer@imaginarynumber.net so that we can better coordinate the efforts of the BVLC, AMD, Intel, NVIDIA, and yourself. We appreciate your continued OpenCL development and would like to promote this to an official branch. It would still be a work-in-progress branch and not for imminent merge but it should help focus the work. Drop a line when you have the chance! @bhack |
@shelhamer Other than believe I want to see some sign of life. Seems really that your team at BVLC is out of band to manage contributions. There are some "scaling up" interesting notes in the interview but I hope that it is not too late with all of this new frameworks offers. |
There is now also HcCaffe as part of AMD's GPUOpen initiative. It is written in C++ AMP which can be compiled with HCC to run on top of OpenCL or AMD's HSA stack. |
@olesalscheider |
@naibaf7 |
@olesalscheider |
Closing this PR, branch is now officially available here: |
@naibaf7 |
@Grillnov |
DISCONTINUED, now available as official Caffe branch here: https://github.com/BVLC/caffe/tree/opencl
Technical Report
Available on arXiv:
http://arxiv.org/abs/1509.03371