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