Skip to content
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

Improve CK-Caffe installation paths #2

Closed
psyhtest opened this issue Aug 20, 2016 · 3 comments
Closed

Improve CK-Caffe installation paths #2

psyhtest opened this issue Aug 20, 2016 · 3 comments

Comments

@psyhtest
Copy link
Member

I have installed several variants of Caffe on an Odroid XU3 board with the following paths under ~/CK_TOOLS/:

lib-caffe-bvlc-master-trunk-gcc-5.4.0-lib.openblas-0.2.18-12ab180-linux-32/
lib-caffe-bvlc-opencl-trunk-gcc-5.4.0-lib.openblas-0.2.18-12ab180-lib.viennacl-1.7.1-77e9049-lib.clblas-2.4-03d7e7e-linux-32/
lib-caffe-bvlc-opencl-trunk-gcc-5.4.0-lib.openblas-0.2.18-12ab180-lib.viennacl-1.7.1-77e9049-linux-32/
lib-caffe-bvlc-opencl-trunk-llvm-3.8.0-2ubuntu4-lib.openblas-0.2.18-12ab180-lib.viennacl-1.7.1-77e9049-lib.clblast-mali-overlay-641bb07-linux-32/
lib-caffe-bvlc-opencl-trunk-llvm-3.8.0-2ubuntu4-lib.openblas-0.2.18-12ab180-lib.viennacl-1.7.1-77e9049-linux-32/

I suggest two improvements to how installation paths are generated:

  • Include a Git revision of Caffe used (instead of trunk).
  • Remove Git revisions from fixed releases of libraries (e.g. OpenBLAS 0.2.18, ViennaCL 1.7.1, clBLAS 2.4), but not from development branches (e.g. lib.clblast-mali-overlay-641bb07).
@gfursin
Copy link
Contributor

gfursin commented Sep 8, 2016

There is a problem implementing that (at least with my knowledge). When installing a package, I first prepare a path, then make git clone, and only then get revision. Changing the order may complicate things. In a longer term, I would prefer to move GIT URL + branch info to the package meta, so that CK could handle that. Then we can have more flexibility to implement above naming convention.
By the way, anyone knows how to get a git hash of the remote repo?

@psyhtest
Copy link
Member Author

psyhtest commented Sep 9, 2016

I would prefer to move GIT URL + branch info to the package meta,

Agree. We already have URLs and branches in CK-Caffe packages' metadata e.g. in ck-caffe/package/lib-caffe-bvlc-opencl-clblast/.cm/meta.json:

  "customize": {
    "extra_dir": "",
    "install_env": {
      "CAFFE_BRANCH": "opencl",
      "CAFFE_URL": "https://github.com/BVLC/caffe"
    },

This can be naturally generalised to VCS (version control system) parameters e.g.:

    "vcs_params": {
      "branch": "opencl",
      "url": "https://github.com/BVLC/caffe",
      "type": "git"
    },

(The latter to handle other types of VCSs.)

By the way, anyone knows how to get a git hash of the remote repo?

The required Git command is:

$ git ls-remote ${CAFFE_URL} ${CAFFE_BRANCH}

or to get a standard short hash (i.e. hash characters 1-7):

$ git ls-remote ${CAFFE_URL} ${CAFFE_BRANCH} | cut -c1-7

For example, to get the latest commit at the OpenCL branch of the official Caffe repository:

$ git ls-remote https://github.com/BVLC/caffe opencl
b0fc44c23848de41ebe5adc7c67244e7f6d77cac        refs/heads/opencl
$ git ls-remote https://github.com/BVLC/caffe opencl | cut -c1-7
b0fc44c

@psyhtest
Copy link
Member Author

Handing of installation paths has been changed since this ticket was created, hence closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants