Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add library versioning and mark version 1.0.0-rc3 #3311
Conversation
|
/cc @CDLuminate for concerns w.r.t. debian packaging /cc @Nerei for thoughts about the header file approach from #1667 |
|
Well, that seems fine to me, and I'd be glad to import the officially versioned Caffe into the Debian package, with a terse version string like Thank you for working on versioning it :-) By the way, |
ronghanghu
added focus build
labels
Nov 10, 2015
|
@ronghanghu given your matcaffe contributions do you know how to mark the version in MATLAB? |
|
Hi, @shelhamer, I think for matlab we could simply do |
|
Thanks @lukeyeager! This + the simple matcaffe version extension by @ronghanghu looks like all the infrastructure needed to declare a version. |
|
I think we can merge this PR first, and I will create another PR for matcaffe. |
|
Rebased after [my] conflicting change from #3127. Any comments on the "for discussion" points above? I agree the matlab versioning can come later. |
|
I think it's great, but for the future I would like to raise awareness on the possibility of creating some kind of config file for caffe (for instance caffe/config.h). This file would store all the relevant configuration variables that were used to build caffe. This file could look like this:
|
ronghanghu
added the
ready for review
label
Nov 11, 2015
|
Hi, I have a question regarding proposed changes. In CMakeLists.txt you are setting CAFFE_TARGET_VERSION and CAFFE_TARGET_SOVERSION. And then add_definitions is passing CAFFE_TARGET_VERSION.So it is like there is a versioning for caffe binary and separate one for caffe lib. This is fine, but in Makefile I can see only DYNAMIC_VERSION_{MAJOR|MINOR|REVISION} and then we have: which is corressponding to setting vesion of caffe binary to same version as library is set to. Which seems like binary of caffe and library got the same version eg. its versioning is consistent. Please explain what Do I miss? |
Nerei
commented
Nov 17, 2015
|
@lukeyeager Delay with my thoughts was due to my vacations. Sorry. For me hardcoding caffe version in headers is preferable than in build scripts. Most libraries use such way (at least from my own experience).
@flx42 I find such header useful, and it is generated already and stored in binary folder. See |
|
Yes, I know it's easy to generate this header with autotools/cmake. But it will be more painful with the handwritten Makefile, unfortunately. I think the use case I described should be a good motivating example, if you don't have a configuration file, using the C++ API can be dangerous when you have ifdefs in the header. It's also easier to check the version. |
|
With both build systems, the version reported with the CLI tool or with pycaffe should be Are you seeing a bug, or are you just having trouble reading though the code? Either is potentially helpful feedback. |
|
@Nerei thanks for the response! I agree it's relatively easy to parse the header file with CMake. I'll let the caffe devs weigh in on which approach they'd prefer. |
|
I observed potential issue , so I wanted to let you know about that. So I understand that regardless the build is created using Makefile or CMakeLists.txt , the result in terms of versioning should be the same. Let's consider example that build version is 1.2.0 , and caffe lib version is 1.0.0. Now : B) MakeFile So as You can see CAFFE_VERSION when using Makefiles would set to 1.0.0 , and when using CMakeLists.txt CAFFE_VERSION would be set to 1.2.0 Unless I misunderstood something in Makefiles, there is a discrepancy here. Please correct me If necessery |
|
Dear All, My +1 from release engineering point of view:
Apologies if my +1 cent intervention looks odd, hope to be in community's service. With respect, |
|
@jczaja I'm assuming the This would be equivalent: # ---[ Caffe version
set(CAFFE_VERSION_MAJOR "1")
set(CAFFE_VERSION_MINOR "0")
set(CAFFE_VERSION_REVISION "0")
set(CAFFE_TARGET_VERSION "${CAFFE_VERSION_MAJOR}.${CAFFE_VERSION_MINOR}.${CAFFE_VERSION_REVISION}")
set(CAFFE_TARGET_SOVERSION "${CAFFE_VERSION_MAJOR}.${CAFFE_VERSION_MINOR}")
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION}) |
lukeyeager
referenced
this pull request
Nov 18, 2015
Open
Request - switch to CMake as the only build system #3351
|
@cbalint13 I agree. I've created a new issue at #3351 since it's not necessarily related to this PR. |
lukeyeager
referenced
this pull request
Dec 3, 2015
Closed
Which layer headers to include, depending on Caffe's version? #3409
That's fine with me. What would the tag be? I'd suggest |
|
Any update to this ? Currently I'm trying to help debian to update cuda to 7.5, and my local test shows that cuda 7.5 works So do you have any plan on next release of Caffe ? If the next release date is not far from now, I'd like to wait for the new release and then upload the new release. Thanks in advance. |
This was referenced Dec 11, 2015
|
Any chance that this could be merged. Would be nice to have version information for #3518. |
shelhamer
and 1 other
commented on an outdated diff
Jan 22, 2016
| @@ -211,6 +215,9 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(SolveOverloads, Solve, 0, 1); | ||
| BOOST_PYTHON_MODULE(_caffe) { | ||
| // below, we prepend an underscore to methods that will be replaced | ||
| // in Python | ||
| + | ||
| + bp::scope().attr("CAFFE_VERSION") = STRINGIZE2(CAFFE_VERSION); |
shelhamer
Owner
|
shelhamer
commented on an outdated diff
Jan 22, 2016
| @@ -1,5 +1,6 @@ | ||
| from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver | ||
| from ._caffe import set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver, layer_type_list | ||
| +from ._caffe import CAFFE_VERSION as __version__ |
shelhamer
Owner
|
longjon
and 1 other
commented on an outdated diff
Jan 22, 2016
| @@ -63,6 +64,10 @@ class __Registerer_##func { \ | ||
| __Registerer_##func g_registerer_##func; \ | ||
| } | ||
| +// Hack to convert macro to string | ||
| +#define STRINGIZE(m) #m | ||
| +#define STRINGIZE2(m) STRINGIZE(m) |
longjon
Contributor
|
longjon
and 1 other
commented on an outdated diff
Jan 22, 2016
| @@ -25,6 +25,10 @@ | ||
| #define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x)) | ||
| #endif | ||
| +// Hack to convert macro to string | ||
| +#define STRINGIZE(m) #m | ||
| +#define STRINGIZE2(m) STRINGIZE(m) |
longjon
Contributor
|
|
I've updated this PR with your latest suggestions. Any thoughts on the version ( |
|
@lukeyeager Although this will establish a version number, we have to come up with a policy for changing it. Releases can set the major and minor versions but the patch version needs to be automated given the rate of change of Caffe development. I'd like to highlight For the current
While the tagged release is a good shorthand version, it seems to me that the As a follow-up the build should parse the number of commits from |
Done.
|
longjon
and 1 other
commented on an outdated diff
Jan 23, 2016
| @@ -15,6 +15,7 @@ | ||
| #include <fstream> // NOLINT | ||
| #include "caffe/caffe.hpp" | ||
| +#include "caffe/common.hpp" |
longjon
Contributor
|
longjon
commented on an outdated diff
Jan 23, 2016
|
@lukeyeager Just to check: should it be Thanks for the quick turnaround! |
|
Oh wait, sorry I misread your previous comment. You said you want MAJOR.MINOR.PATCH for the SONAME, not MAJOR or MAJOR.MINOR? Gimme a minute, I'll have to rethink the symlinks ... |
I was going with Semantic Versioning conventions (http://semver.org/), but we seem to be throwing that out the window. I can do whatever you like. |
Let's go with
MAJOR.MINOR.PATCH does look like the mode for library versions so let's go with that. |
|
Alright, I've updated it so that there's only one symlink and the SONAME is MAJOR.MINOR.PATCH:
|
|
Thanks for the versioning @lukeyeager! p.s. #486 needs a version header for close. |
shelhamer
added a commit
that referenced
this pull request
Jan 23, 2016
|
|
shelhamer |
19ee69d
|
shelhamer
merged commit 19ee69d
into
BVLC:master
Jan 23, 2016
1 check passed
shelhamer
referenced
this pull request
Jan 23, 2016
Closed
`caffe --version` should print the version/git hash #2969
shelhamer
changed the title from
Mark version 1.0.0 to Add library versioning and mark version 1.0.0-rc3
Jan 23, 2016
lukeyeager
deleted the
lukeyeager:bvlc/versioning branch
Jan 23, 2016
seanbell
referenced
this pull request
Jan 25, 2016
Open
Is there a more recent tag that I could use to sync the project #3595
Nerei
commented
Jan 25, 2016
|
shelhamer wrote:
@shelhamer @lukeyeager How about auto generation of caffe_version.h from cmake? |
|
Perhaps the commit should be tagged, to make it easier to find releases (e.g. #3595)? |
This was referenced Jan 26, 2016
shelhamer
added a commit
to shelhamer/caffe
that referenced
this pull request
Feb 20, 2016
|
|
shelhamer |
b46133a
|
shelhamer
referenced
this pull request
Feb 20, 2016
Merged
Fix Library Install name on OS X for @rpath Linking #3696
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Mar 17, 2016
|
|
shelhamer + zouxiaochuan |
bfcef89
|
stas-sl
added a commit
to stas-sl/caffe
that referenced
this pull request
Apr 2, 2016
|
|
shelhamer + stas-sl |
6b115c0
|
SvenTwo
added a commit
to SvenTwo/caffe
that referenced
this pull request
Apr 6, 2016
|
|
shelhamer + SvenTwo |
beed648
|
This was referenced Apr 8, 2016
fxbit
added a commit
to Yodigram/caffe
that referenced
this pull request
Sep 1, 2016
|
|
shelhamer + fxbit |
d392667
|
lukeyeager
referenced
this pull request
in NVIDIA/DIGITS
Oct 17, 2016
Closed
Compiling cpp code for inference using a manually written makefile #1170
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Oct 24, 2016
|
|
shelhamer + zouxiaochuan |
3035da6
|
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Oct 24, 2016
|
|
shelhamer + zouxiaochuan |
835d985
|
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Feb 15, 2017
|
|
shelhamer + zouxiaochuan |
271b62d
|
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Feb 15, 2017
|
|
shelhamer + zouxiaochuan |
f6fe18e
|
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Feb 15, 2017
|
|
shelhamer + zouxiaochuan |
62a238c
|
zouxiaochuan
added a commit
to zouxiaochuan/caffe
that referenced
this pull request
Feb 15, 2017
|
|
shelhamer + zouxiaochuan |
338ac3e
|
ssahu
added a commit
to ssahu/caffe
that referenced
this pull request
May 13, 2017
|
|
shelhamer + ssahu |
ef488ed
|
lukeyeager commentedNov 10, 2015
Close #486, Close #2969, Close #3015, Close #3409
Originally NVIDIA#39 and NVIDIA#46
Included
Adds versioning to:
libcaffe.so)caffe --version)caffe.__version__)TODO
For discussion
libcaffe.MAJORinstead oflibcaffe.MAJOR.MINOR.