Caffe: boost dependency

Created on 15 Sep 2016  路  4Comments  路  Source: BVLC/caffe

Could you please get rid of the Boost from the list of the dependencies?
There are not so many places in the code where it's actually necessary - C++11 should cover most of that.

I believe this way the library will be more attractive for the developers community and potential deployment.

Most helpful comment

The problematic aspect of the Boost dependency is that Caffe exposes Boost as part of its public API, instead of just being an internal implementation detail. This makes code using Caffe also depend on Boost. I'm currently integrating Caffe into a fairly large code base, and are facing problems related to Boost header version mismatches between Caffe and the rest of the code base. These types of problems are making Caffe adoption on Windows a hassle.

Could it be possible to revisit this issue of replacing some/most of Boost with C++11 now?

C++11 is widely supported on most platforms now. My impression is that the subset of C++11 used by Caffe have been supported GCC since 4.8.1 (May 2013), clang since 3.3 (June 2013), MSVC since 2013 (June 2013) & CUDA since 7 (March 2015).

All 4 comments

There was a PR by @bhack about this. See: https://github.com/BVLC/caffe/pull/2537.

See https://github.com/BVLC/caffe/pull/2537#issuecomment-161238108. If you are interested in a pure c++11 solution Take a look at https://github.com/tiny-dnn/tiny-dnn

@akosenkov
Well for deployment, boost is header only, so not really an issue. And most Linux distributions already deliver the right boost packages.
Given that the Python frontend heavily relies on Boost is also a reason not to get rid of it.

The problematic aspect of the Boost dependency is that Caffe exposes Boost as part of its public API, instead of just being an internal implementation detail. This makes code using Caffe also depend on Boost. I'm currently integrating Caffe into a fairly large code base, and are facing problems related to Boost header version mismatches between Caffe and the rest of the code base. These types of problems are making Caffe adoption on Windows a hassle.

Could it be possible to revisit this issue of replacing some/most of Boost with C++11 now?

C++11 is widely supported on most platforms now. My impression is that the subset of C++11 used by Caffe have been supported GCC since 4.8.1 (May 2013), clang since 3.3 (June 2013), MSVC since 2013 (June 2013) & CUDA since 7 (March 2015).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weather319 picture weather319  路  3Comments

OpenHero picture OpenHero  路  3Comments

kelvinxu picture kelvinxu  路  3Comments

sdemyanov picture sdemyanov  路  3Comments

prathmeshrmadhu picture prathmeshrmadhu  路  3Comments