Advertisement
Guest User

Untitled

a guest
Jun 1st, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. ## Refer to http://caffe.berkeleyvision.org/installation.html
  2. # Contributions simplifying and improving our build system are welcome!
  3.  
  4. # cuDNN acceleration switch (uncomment to build with cuDNN).
  5. # USE_CUDNN := 1
  6.  
  7. # CPU-only switch (uncomment to build without GPU support).
  8. CPU_ONLY := 1
  9.  
  10. # uncomment to disable IO dependencies and corresponding data layers
  11. # USE_OPENCV := 0
  12. # USE_LEVELDB := 0
  13. # USE_LMDB := 0
  14.  
  15. # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
  16. # You should not set this flag if you will be reading LMDBs with any
  17. # possibility of simultaneous read and write
  18. # ALLOW_LMDB_NOLOCK := 1
  19.  
  20. # Uncomment if you're using OpenCV 3
  21. OPENCV_VERSION := 3
  22.  
  23. # To customize your choice of compiler, uncomment and set the following.
  24. # N.B. the default for Linux is g++ and the default for OSX is clang++
  25. # CUSTOM_CXX := g++
  26.  
  27. # CUDA directory contains bin/ and lib/ directories that we need.
  28. CUDA_DIR := /usr/local/cuda
  29. # On Ubuntu 14.04, if cuda tools are installed via
  30. # "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
  31. # CUDA_DIR := /usr
  32.  
  33. # CUDA architecture setting: going with all of them.
  34. # For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
  35. # For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
  36. CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
  37. -gencode arch=compute_20,code=sm_21 \
  38. -gencode arch=compute_30,code=sm_30 \
  39. -gencode arch=compute_35,code=sm_35 \
  40. -gencode arch=compute_50,code=sm_50 \
  41. -gencode arch=compute_52,code=sm_52 \
  42. -gencode arch=compute_60,code=sm_60 \
  43. -gencode arch=compute_61,code=sm_61 \
  44. -gencode arch=compute_61,code=compute_61
  45.  
  46. # BLAS choice:
  47. # atlas for ATLAS (default)
  48. # mkl for MKL
  49. # open for OpenBlas
  50. BLAS := open
  51. # Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
  52. # Leave commented to accept the defaults for your choice of BLAS
  53. # (which should work)!
  54. BLAS_INCLUDE := ~/Develop/OpenBLAS/include
  55. BLAS_LIB := ~/Develop/OpenBLAS/lib
  56.  
  57. # Homebrew puts openblas in a directory that is not on the standard search path
  58. # BLAS_INCLUDE := $(shell brew --prefix openblas)/include
  59. # BLAS_LIB := $(shell brew --prefix openblas)/lib
  60.  
  61. # This is required only if you will compile the matlab interface.
  62. # MATLAB directory should contain the mex binary in /bin.
  63. MATLAB_INCLUDE := ./MATLAB/R2014a/toolbox/distcomp/gpu/extern/include
  64.  
  65. MATLAB_DIR := /usr/local/MATLAB/R2014a
  66. # MATLAB_DIR := /Applications/MATLAB_R2012b.app
  67.  
  68. # NOTE: this is required only if you will compile the python interface.
  69. # We need to be able to find Python.h and numpy/arrayobject.h.
  70. PYTHON_INCLUDE := /usr/include/python2.7 \
  71. /usr/lib/python2.7/dist-packages/numpy/core/include
  72. # Anaconda Python distribution is quite popular. Include path:
  73. # Verify anaconda location, sometimes it's in root.
  74. # ANACONDA_HOME := $(HOME)/anaconda
  75. # PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
  76. # $(ANACONDA_HOME)/include/python2.7 \
  77. # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include
  78.  
  79. # Uncomment to use Python 3 (default is Python 2)
  80. # PYTHON_LIBRARIES := boost_python3 python3.5m
  81. # PYTHON_INCLUDE := /usr/include/python3.5m \
  82. # /usr/lib/python3.5/dist-packages/numpy/core/include
  83.  
  84. # We need to be able to find libpythonX.X.so or .dylib.
  85. PYTHON_LIB := /usr/lib
  86. # PYTHON_LIB := $(ANACONDA_HOME)/lib
  87.  
  88. # Homebrew installs numpy in a non standard path (keg only)
  89. # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
  90. # PYTHON_LIB += $(shell brew --prefix numpy)/lib
  91.  
  92. # Uncomment to support layers written in Python (will link against Python libs)
  93. # WITH_PYTHON_LAYER := 1
  94.  
  95. # Whatever else you find you need goes here.
  96. #INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
  97. INCLUDE_DIRS := $(PYTHON_INCLUDE) $(MATLAB_INCLUDE) /usr/local/include
  98. LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
  99.  
  100. # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
  101. # INCLUDE_DIRS += $(shell brew --prefix)/include
  102. # LIBRARY_DIRS += $(shell brew --prefix)/lib
  103.  
  104. # NCCL acceleration switch (uncomment to build with NCCL)
  105. # https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
  106. # USE_NCCL := 1
  107.  
  108. # Uncomment to use `pkg-config` to specify OpenCV library paths.
  109. # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
  110. # USE_PKG_CONFIG := 1
  111.  
  112. # N.B. both build and distribute dirs are cleared on `make clean`
  113. BUILD_DIR := build
  114. DISTRIBUTE_DIR := distribute
  115.  
  116. # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
  117. # DEBUG := 1
  118.  
  119. # The ID of the GPU that 'make runtest' will use to run unit tests.
  120. TEST_GPUID := 0
  121.  
  122. # enable pretty build (comment to see full commands)
  123. Q ?= @
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement