mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
goodbye old brewery
This commit is contained in:
14
Makefile
14
Makefile
@ -3,19 +3,19 @@
|
||||
all:
|
||||
@mkdir -p build && cd build && cmake .. && make
|
||||
|
||||
android:
|
||||
@python brewtool/build_android.py build
|
||||
#android:
|
||||
# @python brewtool/build_android.py build
|
||||
|
||||
clean:
|
||||
@rm -r build/
|
||||
|
||||
test:
|
||||
@python brewtool/build.py test
|
||||
#test:
|
||||
# @python brewtool/build.py test
|
||||
|
||||
lint:
|
||||
@find caffe2 -type f -exec python brewtool/cpplint.py {} \;
|
||||
#lint:
|
||||
# @find caffe2 -type f -exec python brewtool/cpplint.py {} \;
|
||||
|
||||
linecount:
|
||||
@cloc --read-lang-def=brewtool/caffe.cloc caffe2 || \
|
||||
@cloc --read-lang-def=caffe.cloc caffe2 || \
|
||||
echo "Cloc is not available on the machine. You can install cloc with " && \
|
||||
echo " sudo apt-get install cloc"
|
||||
|
53
caffe.cloc
Normal file
53
caffe.cloc
Normal file
@ -0,0 +1,53 @@
|
||||
Bourne Shell
|
||||
filter remove_matches ^\s*#
|
||||
filter remove_inline #.*$
|
||||
extension sh
|
||||
script_exe sh
|
||||
C
|
||||
filter remove_matches ^\s*//
|
||||
filter call_regexp_common C
|
||||
filter remove_inline //.*$
|
||||
extension c
|
||||
extension ec
|
||||
extension pgc
|
||||
C++
|
||||
filter remove_matches ^\s*//
|
||||
filter remove_inline //.*$
|
||||
filter call_regexp_common C
|
||||
extension C
|
||||
extension cc
|
||||
extension cpp
|
||||
extension cxx
|
||||
extension pcc
|
||||
C/C++ Header
|
||||
filter remove_matches ^\s*//
|
||||
filter call_regexp_common C
|
||||
filter remove_inline //.*$
|
||||
extension H
|
||||
extension h
|
||||
extension hh
|
||||
extension hpp
|
||||
CUDA
|
||||
filter remove_matches ^\s*//
|
||||
filter remove_inline //.*$
|
||||
filter call_regexp_common C
|
||||
extension cu
|
||||
Python
|
||||
filter remove_matches ^\s*#
|
||||
filter docstring_to_C
|
||||
filter call_regexp_common C
|
||||
filter remove_inline #.*$
|
||||
extension py
|
||||
make
|
||||
filter remove_matches ^\s*#
|
||||
filter remove_inline #.*$
|
||||
extension Gnumakefile
|
||||
extension Makefile
|
||||
extension am
|
||||
extension gnumakefile
|
||||
extension makefile
|
||||
filename Gnumakefile
|
||||
filename Makefile
|
||||
filename gnumakefile
|
||||
filename makefile
|
||||
script_exe make
|
@ -1,6 +0,0 @@
|
||||
# Build file for the old caffe protocol buffers.
|
||||
|
||||
proto_library(
|
||||
name = 'caffe_proto',
|
||||
srcs = ['caffe.proto'],
|
||||
)
|
129
caffe2/BREW
129
caffe2/BREW
@ -1,129 +0,0 @@
|
||||
cc_library(
|
||||
name = "core",
|
||||
srcs = Glob(["core/*.cc", "utils/*.cc"],
|
||||
excludes=["*gpu*", "*cudnn*", "*test*"]),
|
||||
hdrs=Glob(["core/*.h", "utils/*.h"]),
|
||||
deps = [
|
||||
"//caffe2/proto:caffe2_proto",
|
||||
"//third_party:glog",
|
||||
"//third_party:gflags",
|
||||
"//third_party:eigen",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name="core_gpu_cu",
|
||||
srcs=Glob(["core/*.cu", "utils/*.cu"]),
|
||||
deps=[
|
||||
":core",
|
||||
"//third_party:cuda",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "core_gpu",
|
||||
srcs = Glob(["core/*_gpu.cc", "utils/*_gpu.cc"]),
|
||||
deps = [
|
||||
":core",
|
||||
":core_gpu_cu",
|
||||
"//third_party:cnmem",
|
||||
"//third_party:cub",
|
||||
"//third_party:cuda",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "core_cudnn",
|
||||
srcs = Glob(["core/*_cudnn.cc"]),
|
||||
deps = [
|
||||
":core_gpu",
|
||||
"//third_party:cudnn",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "core_test",
|
||||
srcs = Glob(["core/*_test.cc", "utils/*_test.cc"],
|
||||
excludes=["*gpu_test*", "*cudnn_test*"]),
|
||||
deps = [
|
||||
":core",
|
||||
"//caffe2/operators:core_ops",
|
||||
"//third_party:gtest",
|
||||
"//caffe2/test:caffe2_gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "core_gpu_test",
|
||||
srcs = Glob([
|
||||
"core/*_gpu_test.cc",
|
||||
"core/*_cudnn_test.cc",
|
||||
"utils/*_gpu_test.cc",
|
||||
]),
|
||||
deps = [
|
||||
":core_gpu",
|
||||
":core_cudnn",
|
||||
"//third_party:gtest",
|
||||
"//caffe2/test:caffe2_gtest_main",
|
||||
],
|
||||
test_flags = [
|
||||
"--caffe2_cuda_memory_pool cnmem",
|
||||
"--caffe2_cuda_memory_pool cub",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "all_available_cpu_ops",
|
||||
srcs = [],
|
||||
# core_ops should always be available. Otherwise, we have a problem.
|
||||
deps = [
|
||||
"//caffe2/db:db",
|
||||
"//caffe2/operators:core_ops",
|
||||
],
|
||||
optional_deps = [
|
||||
"//caffe2/image:image_ops",
|
||||
"//caffe2/mpi:mpi_ops",
|
||||
"//caffe2/queue:queue_ops",
|
||||
"//caffe2/sgd:sgd_ops",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "all_available_ops",
|
||||
srcs = [],
|
||||
deps = [
|
||||
":all_available_cpu_ops",
|
||||
],
|
||||
optional_deps = [
|
||||
"//caffe2/operators:core_ops_gpu",
|
||||
"//caffe2/operators:core_ops_cudnn",
|
||||
"//caffe2/contrib/nccl:nccl_ops",
|
||||
"//caffe2/cuda_rtc:rtc_ops",
|
||||
"//caffe2/db:db_gpu",
|
||||
"//caffe2/image:image_ops_gpu",
|
||||
"//caffe2/mpi:mpi_ops_gpu",
|
||||
"//caffe2/queue:queue_ops_gpu",
|
||||
"//caffe2/sgd:sgd_ops_gpu",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "caffe2_core",
|
||||
srcs = [],
|
||||
deps = [
|
||||
"//caffe2/operators:core_ops",
|
||||
],
|
||||
build_shared = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "caffe2",
|
||||
srcs = [],
|
||||
deps = [
|
||||
"all_available_ops",
|
||||
],
|
||||
build_shared=True,
|
||||
)
|
@ -1,8 +0,0 @@
|
||||
# A lazy catch-all binary target generator.
|
||||
for src in Glob(["*.cc"]):
|
||||
cc_binary(
|
||||
name=src[:-3],
|
||||
srcs=[src],
|
||||
deps=["//caffe2:caffe2"],
|
||||
)
|
||||
|
@ -1,4 +0,0 @@
|
||||
filegroup(
|
||||
name="dockerfile",
|
||||
srcs=Glob(["*"]),
|
||||
)
|
@ -1,10 +0,0 @@
|
||||
cc_library(
|
||||
name = "nccl_ops",
|
||||
srcs = Glob(["*.cc"]),
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:core_gpu",
|
||||
"//third_party:nccl",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,10 +0,0 @@
|
||||
cc_library(
|
||||
name = "nccl_ops",
|
||||
srcs = Glob(["*_gpu.cc"]),
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:core_gpu",
|
||||
"//third_party:nervana_c_interface",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,11 +0,0 @@
|
||||
cc_library(
|
||||
name = "rtc_ops",
|
||||
srcs = Glob(["*.cc"]),
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:core_gpu",
|
||||
"//third_party:cuda",
|
||||
"//third_party:nvrtc",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,94 +0,0 @@
|
||||
# This folder contains database implementations that has third third_party
|
||||
# dependencies.
|
||||
|
||||
cc_library(
|
||||
name = "rocksdb",
|
||||
srcs = [
|
||||
"rocksdb.cc",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
"//third_party:rocksdb",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "leveldb",
|
||||
srcs = [
|
||||
"leveldb.cc",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
"//third_party:leveldb",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "lmdb",
|
||||
srcs = [
|
||||
"lmdb.cc",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
"//third_party:lmdb",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "zmqdb",
|
||||
srcs = [
|
||||
"zmqdb.cc",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
"//third_party:libzmq",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "db",
|
||||
srcs = [
|
||||
"create_db_op.cc",
|
||||
"protodb.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"create_db_op.h",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
],
|
||||
optional_deps = [
|
||||
":leveldb",
|
||||
":lmdb",
|
||||
":rocksdb",
|
||||
":zmqdb",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "db_gpu",
|
||||
srcs = [
|
||||
"create_db_op_gpu.cc",
|
||||
],
|
||||
deps = [
|
||||
":db",
|
||||
"//caffe2:core",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "db_test",
|
||||
srcs = Glob(["*_test.cc"]),
|
||||
deps = [
|
||||
":db",
|
||||
"//third_party:gtest",
|
||||
"//caffe2/test:caffe2_gtest_main",
|
||||
],
|
||||
)
|
||||
|
@ -1,40 +0,0 @@
|
||||
cc_library(
|
||||
name = "image_ops",
|
||||
srcs = [
|
||||
"image_input_op.cc",
|
||||
],
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe/proto:caffe_proto",
|
||||
"//caffe2:core",
|
||||
"//caffe2/operators:core_ops",
|
||||
"//third_party:opencv",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name = "image_ops_gpu_cu",
|
||||
srcs = Glob(["*.cu"]),
|
||||
hdrs = [
|
||||
"transform_gpu.h",
|
||||
],
|
||||
deps = [
|
||||
":image_ops",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "image_ops_gpu",
|
||||
srcs = [
|
||||
"image_input_op_gpu.cc",
|
||||
],
|
||||
deps = [
|
||||
":image_ops",
|
||||
":image_ops_gpu_cu",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,69 +0,0 @@
|
||||
cc_library(
|
||||
name = "mpi_common",
|
||||
srcs = [
|
||||
"mpi_common.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"mpi_common.h",
|
||||
],
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
]
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "mpi_ops",
|
||||
srcs = [
|
||||
"mpi_ops.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"mpi_ops.h",
|
||||
],
|
||||
deps = [
|
||||
":mpi_common",
|
||||
"//caffe2:core",
|
||||
"//third_party:openmpi",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "mpi_ops_gpu",
|
||||
srcs = [
|
||||
"mpi_ops_gpu.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"mpi_ops.h",
|
||||
],
|
||||
deps = [
|
||||
":mpi_common",
|
||||
"//caffe2:core_gpu",
|
||||
"//caffe2/operators:operators_headers",
|
||||
"//third_party:openmpi",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
mpi_test(
|
||||
name = "mpi_test",
|
||||
srcs = [
|
||||
"mpi_test.cc",
|
||||
],
|
||||
deps = [
|
||||
":mpi_ops",
|
||||
"//caffe2:all_available_ops",
|
||||
"//third_party:gtest",
|
||||
]
|
||||
)
|
||||
|
||||
mpi_test(
|
||||
name = "mpi_gpu_test",
|
||||
srcs = [
|
||||
"mpi_gpu_test.cc",
|
||||
],
|
||||
deps = [
|
||||
":mpi_ops",
|
||||
"//caffe2:all_available_ops",
|
||||
"//third_party:gtest",
|
||||
]
|
||||
)
|
@ -1,58 +0,0 @@
|
||||
cc_headers(
|
||||
name = "operators_headers",
|
||||
srcs = Glob(["*.h"]),
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "core_ops",
|
||||
srcs = Glob(["*.cc"], excludes=["*gpu*", "*test*", "*cudnn*"]),
|
||||
deps = [
|
||||
":operators_headers",
|
||||
"//caffe2:core",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name = "core_ops_gpu_cu",
|
||||
srcs = Glob(["*.cu"]),
|
||||
deps = [
|
||||
":operators_headers",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "core_ops_gpu",
|
||||
srcs = Glob(["*_gpu.cc"]),
|
||||
deps = [
|
||||
":core_ops_gpu_cu",
|
||||
":operators_headers",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "core_ops_cudnn",
|
||||
srcs = Glob(["*_cudnn.cc"]),
|
||||
deps = [
|
||||
":operators_headers",
|
||||
"//caffe2:core_cudnn",
|
||||
"//caffe2:core_gpu",
|
||||
"//third_party:cudnn",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "core_ops_test",
|
||||
srcs = Glob(["*_test.cc"]),
|
||||
deps = [
|
||||
":core_ops",
|
||||
":core_ops_gpu",
|
||||
":core_ops_cudnn",
|
||||
"//caffe2/test:caffe2_gtest_main",
|
||||
]
|
||||
)
|
@ -1,6 +0,0 @@
|
||||
# Build file for the caffe2 protocol buffers.
|
||||
|
||||
proto_library(
|
||||
name = 'caffe2_proto',
|
||||
srcs = Glob(['*.proto']),
|
||||
)
|
@ -1,43 +0,0 @@
|
||||
python_cc_extension(
|
||||
name="caffe2_pybind11_state",
|
||||
srcs=["pybind_state.cc"],
|
||||
hdrs=Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:all_available_cpu_ops",
|
||||
"//caffe2:core",
|
||||
],
|
||||
)
|
||||
|
||||
python_cc_extension(
|
||||
name="caffe2_pybind11_state_gpu",
|
||||
srcs=["pybind_state.cc", "pybind_state_gpu.cc"],
|
||||
hdrs=Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:all_available_ops",
|
||||
"//caffe2:core",
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name="pycaffe2",
|
||||
srcs=Glob(["*.py"], excludes=["*_test.py"]),
|
||||
deps=[
|
||||
":caffe2_pybind11_state",
|
||||
"//caffe/proto:caffe_proto",
|
||||
"//caffe2/proto:caffe2_proto",
|
||||
"//caffe2/python/mint:mint",
|
||||
],
|
||||
optional_deps=[
|
||||
":caffe2_pybind11_state_gpu",
|
||||
],
|
||||
)
|
||||
|
||||
for src in Glob(["*_test.py", "*/*_test.py"]):
|
||||
py_test(
|
||||
name=src[:-3],
|
||||
srcs=[src],
|
||||
deps=[
|
||||
":pycaffe2",
|
||||
],
|
||||
)
|
||||
|
@ -1,8 +0,0 @@
|
||||
py_library(
|
||||
name = "mint",
|
||||
srcs = [
|
||||
"app.py",
|
||||
"static/css/simple-sidebar.css",
|
||||
"templates/index.html",
|
||||
],
|
||||
)
|
@ -1,24 +0,0 @@
|
||||
cc_library(
|
||||
name = "queue_ops",
|
||||
srcs = [
|
||||
"queue_ops.cc",
|
||||
],
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe/proto:caffe_proto",
|
||||
"//caffe2:core",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "queue_ops_gpu",
|
||||
srcs = [
|
||||
"queue_ops_gpu.cc",
|
||||
],
|
||||
deps = [
|
||||
":queue_ops",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,30 +0,0 @@
|
||||
cc_library(
|
||||
name = "sgd_ops",
|
||||
srcs = Glob(["*.cc"], excludes=["*gpu*"]),
|
||||
hdrs = Glob(["*.h"]),
|
||||
deps = [
|
||||
"//caffe2:core",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name = "sgd_ops_gpu_cu",
|
||||
srcs = Glob(["*.cu"]),
|
||||
deps = [
|
||||
":sgd_ops",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "sgd_ops_gpu",
|
||||
srcs = Glob(["*_gpu.cc"]),
|
||||
deps = [
|
||||
":sgd_ops",
|
||||
":sgd_ops_gpu_cu",
|
||||
"//caffe2:core_gpu",
|
||||
],
|
||||
whole_archive = True,
|
||||
)
|
@ -1,19 +0,0 @@
|
||||
cc_library(
|
||||
name = "caffe2_gtest_main",
|
||||
srcs = ["caffe2_gtest_main.cc"],
|
||||
deps = [
|
||||
"//third_party:gtest",
|
||||
"//caffe2:core",
|
||||
],
|
||||
)
|
||||
|
||||
# Do NOT rely on this target. This is here only to test that the gtest main
|
||||
# binary works. Use the cc_library target above.
|
||||
cc_test(
|
||||
name = "caffe2_gtest_main_binary",
|
||||
srcs = ["caffe2_gtest_main.cc"],
|
||||
deps = [
|
||||
"//third_party:gtest",
|
||||
"//caffe2:core",
|
||||
],
|
||||
)
|
521
third_party/BREW
vendored
521
third_party/BREW
vendored
@ -1,521 +0,0 @@
|
||||
# Subfolders in the third_party folder are used to help install things more
|
||||
# easily and you should pre-install them on your machine.
|
||||
|
||||
###############################################################################
|
||||
# BLAS
|
||||
# This section is intended to be the central location that hosts all possible
|
||||
# BLAS backends. Note that all these are only linking flags, so if one of the
|
||||
# libraries is not used, don't bother installing it - Caffe2 will still build
|
||||
# normally.
|
||||
##############################################################################
|
||||
|
||||
# A catch-all target: all the targets should link to this instead of ther
|
||||
# specific libraries below.
|
||||
cc_library(
|
||||
name = "blas",
|
||||
srcs = [],
|
||||
deps = [":" + Brewery.Env.Config.BLAS_BACKEND],
|
||||
)
|
||||
|
||||
# Atlas
|
||||
cc_thirdparty_target(
|
||||
name = "atlas",
|
||||
cc_obj_files = [ "-lcblas -latlas" ],
|
||||
)
|
||||
|
||||
# Eigen
|
||||
# Current eigen version: 3.3 beta 1
|
||||
if Brewery.Env.Config.USE_SYSTEM_EIGEN:
|
||||
# If we are using system eigen, this is just a dummy placeholder that does
|
||||
# nothing. Also, Eigen is a header-only library so there is no cc_obj_files.
|
||||
cc_thirdparty_target(
|
||||
name = "eigen",
|
||||
cc_obj_files = [],
|
||||
)
|
||||
else:
|
||||
# We need to copy over the code included in Caffe.
|
||||
shell_script(
|
||||
name = "eigen",
|
||||
srcs = ["BREW"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/eigen/Eigen $DST/",
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/eigen/unsupported $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
# Intel MKL.
|
||||
cc_thirdparty_target(
|
||||
name = "mkl",
|
||||
cc_obj_files = [ "-lmkl_rt" ],
|
||||
)
|
||||
|
||||
# OpenBLAS
|
||||
cc_thirdparty_target(
|
||||
name = "openblas",
|
||||
cc_obj_files = [ "-lopenblas" ],
|
||||
)
|
||||
|
||||
# TODO: add the OS X veclib/Accelerate framework backend.
|
||||
|
||||
|
||||
###############################################################################
|
||||
# CUDA
|
||||
# This section includes all cuda-related dependencies.
|
||||
##############################################################################
|
||||
|
||||
if Brewery.Env.Config.LINK_CUDA_STATIC:
|
||||
cc_thirdparty_target(
|
||||
name = "cuda",
|
||||
cc_obj_files = [
|
||||
"-lcublas_static",
|
||||
"-lcurand_static",
|
||||
"-lcudart_static",
|
||||
"-lculibos",
|
||||
"-ldl",
|
||||
] +
|
||||
(["-lrt"] if Brewery.Env.NEED_LIBRT else [])
|
||||
)
|
||||
else:
|
||||
cc_thirdparty_target(
|
||||
name = "cuda",
|
||||
cc_obj_files = [
|
||||
"-lcublas",
|
||||
"-lcurand",
|
||||
"-lcudart",
|
||||
"-lculibos",
|
||||
"-ldl",
|
||||
] +
|
||||
(["-lrt"] if Brewery.Env.NEED_LIBRT else [])
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "cudnn",
|
||||
deps = [":cuda"],
|
||||
cc_obj_files = ["-lcudnn_static"],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "nvrtc",
|
||||
deps = [
|
||||
":cuda",
|
||||
],
|
||||
cc_obj_files = [
|
||||
"-lnvrtc",
|
||||
"-lcuda",
|
||||
],
|
||||
)
|
||||
|
||||
shell_script(
|
||||
name = "cnmem_header",
|
||||
srcs = ["cnmem/include/cnmem.h"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp $CAFFE2_SRCDIR/$CAFFE2_CWD/cnmem/include/cnmem.h $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "cnmem",
|
||||
srcs = [
|
||||
"cnmem/src/cnmem.cpp",
|
||||
],
|
||||
deps = [
|
||||
":cnmem_header",
|
||||
":cuda",
|
||||
]
|
||||
)
|
||||
|
||||
shell_script(
|
||||
name = "nccl_header",
|
||||
srcs = ["nccl/src/nccl.h"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp $CAFFE2_SRCDIR/$CAFFE2_CWD/nccl/src/nccl.h $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name = "nccl",
|
||||
srcs = Glob(["nccl/src/*.cu"]),
|
||||
deps = [
|
||||
":nccl_header",
|
||||
":cuda",
|
||||
],
|
||||
compiler_flags=[
|
||||
"-Wno-switch", # NCCL does not follow strict switch enum check.
|
||||
"-DNCCL_MAJOR=1 -DNCCL_MINOR=2 -DNCCL_PATCH=3",
|
||||
"-DCUDA_MAJOR=__CUDACC_VER_MAJOR__ -DCUDA_MINOR=__CUDACC_VER_MINOR__",
|
||||
],
|
||||
)
|
||||
|
||||
shell_script(
|
||||
name = "cub",
|
||||
srcs = Glob(["cub/cub/*.h", "cub/cub/*/*.h", "cub/cub/*/*/*.h"]),
|
||||
commands = [
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/cub/cub $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Protobuf
|
||||
# This section includes all protobuf-related dependencies.
|
||||
# Current protobuf version: 3.0.0
|
||||
##############################################################################
|
||||
|
||||
if Brewery.Env.Config.USE_SYSTEM_PROTOBUF:
|
||||
# Use system-installed protobuf.
|
||||
cc_thirdparty_target(
|
||||
name = "protobuf_lite",
|
||||
cc_obj_files=["-lprotobuf-lite"],
|
||||
)
|
||||
cc_thirdparty_target(
|
||||
name = "protobuf",
|
||||
cc_obj_files=["-lprotobuf"],
|
||||
)
|
||||
cc_thirdparty_target(
|
||||
name = "protoc",
|
||||
cc_obj_files=[],
|
||||
)
|
||||
else:
|
||||
# Use custom protobuf.
|
||||
shell_script(
|
||||
name = "protobuf_headers",
|
||||
srcs = Glob([
|
||||
"BREW",
|
||||
"protobuf/src/google/protobuf/*.h",
|
||||
"protobuf/src/google/protobuf/*/*.h",
|
||||
"protobuf/src/google/protobuf/*/*/*.h",
|
||||
"protobuf/src/google/protobuf/*/*/*/*.h",
|
||||
]),
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"rsync -am --include='*.h' -f 'hide,! */' $CAFFE2_SRCDIR/$CAFFE2_CWD/protobuf/src/google $DST",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "protobuf_lite",
|
||||
srcs = [
|
||||
"protobuf/src/google/protobuf/arena.cc",
|
||||
"protobuf/src/google/protobuf/arenastring.cc",
|
||||
"protobuf/src/google/protobuf/extension_set.cc",
|
||||
"protobuf/src/google/protobuf/generated_message_util.cc",
|
||||
"protobuf/src/google/protobuf/io/coded_stream.cc",
|
||||
"protobuf/src/google/protobuf/io/zero_copy_stream.cc",
|
||||
"protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
|
||||
"protobuf/src/google/protobuf/message_lite.cc",
|
||||
"protobuf/src/google/protobuf/repeated_field.cc",
|
||||
"protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
|
||||
"protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
|
||||
"protobuf/src/google/protobuf/stubs/bytestream.cc",
|
||||
"protobuf/src/google/protobuf/stubs/common.cc",
|
||||
"protobuf/src/google/protobuf/stubs/int128.cc",
|
||||
"protobuf/src/google/protobuf/stubs/once.cc",
|
||||
"protobuf/src/google/protobuf/stubs/status.cc",
|
||||
"protobuf/src/google/protobuf/stubs/statusor.cc",
|
||||
"protobuf/src/google/protobuf/stubs/stringpiece.cc",
|
||||
"protobuf/src/google/protobuf/stubs/stringprintf.cc",
|
||||
"protobuf/src/google/protobuf/stubs/structurally_valid.cc",
|
||||
"protobuf/src/google/protobuf/stubs/strutil.cc",
|
||||
"protobuf/src/google/protobuf/stubs/time.cc",
|
||||
"protobuf/src/google/protobuf/wire_format_lite.cc",
|
||||
],
|
||||
deps = [
|
||||
":protobuf_headers",
|
||||
]
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "protobuf",
|
||||
srcs = [
|
||||
"protobuf/src/google/protobuf/any.cc",
|
||||
"protobuf/src/google/protobuf/any.pb.cc",
|
||||
"protobuf/src/google/protobuf/api.pb.cc",
|
||||
"protobuf/src/google/protobuf/compiler/importer.cc",
|
||||
"protobuf/src/google/protobuf/compiler/parser.cc",
|
||||
"protobuf/src/google/protobuf/descriptor.cc",
|
||||
"protobuf/src/google/protobuf/descriptor.pb.cc",
|
||||
"protobuf/src/google/protobuf/descriptor_database.cc",
|
||||
"protobuf/src/google/protobuf/duration.pb.cc",
|
||||
"protobuf/src/google/protobuf/dynamic_message.cc",
|
||||
"protobuf/src/google/protobuf/empty.pb.cc",
|
||||
"protobuf/src/google/protobuf/extension_set_heavy.cc",
|
||||
"protobuf/src/google/protobuf/field_mask.pb.cc",
|
||||
"protobuf/src/google/protobuf/generated_message_reflection.cc",
|
||||
"protobuf/src/google/protobuf/io/gzip_stream.cc",
|
||||
"protobuf/src/google/protobuf/io/printer.cc",
|
||||
"protobuf/src/google/protobuf/io/strtod.cc",
|
||||
"protobuf/src/google/protobuf/io/tokenizer.cc",
|
||||
"protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
|
||||
"protobuf/src/google/protobuf/map_field.cc",
|
||||
"protobuf/src/google/protobuf/message.cc",
|
||||
"protobuf/src/google/protobuf/reflection_ops.cc",
|
||||
"protobuf/src/google/protobuf/service.cc",
|
||||
"protobuf/src/google/protobuf/source_context.pb.cc",
|
||||
"protobuf/src/google/protobuf/struct.pb.cc",
|
||||
"protobuf/src/google/protobuf/stubs/mathlimits.cc",
|
||||
"protobuf/src/google/protobuf/stubs/substitute.cc",
|
||||
"protobuf/src/google/protobuf/text_format.cc",
|
||||
"protobuf/src/google/protobuf/timestamp.pb.cc",
|
||||
"protobuf/src/google/protobuf/type.pb.cc",
|
||||
"protobuf/src/google/protobuf/unknown_field_set.cc",
|
||||
"protobuf/src/google/protobuf/util/field_comparator.cc",
|
||||
"protobuf/src/google/protobuf/util/field_mask_util.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/datapiece.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/error_listener.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/json_escaping.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/object_writer.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/type_info.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc",
|
||||
"protobuf/src/google/protobuf/util/internal/utility.cc",
|
||||
"protobuf/src/google/protobuf/util/json_util.cc",
|
||||
"protobuf/src/google/protobuf/util/message_differencer.cc",
|
||||
"protobuf/src/google/protobuf/util/time_util.cc",
|
||||
"protobuf/src/google/protobuf/util/type_resolver_util.cc",
|
||||
"protobuf/src/google/protobuf/wire_format.cc",
|
||||
"protobuf/src/google/protobuf/wrappers.pb.cc",
|
||||
],
|
||||
deps = [":protobuf_lite"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "protoc_lib",
|
||||
srcs = [
|
||||
"protobuf/src/google/protobuf/compiler/code_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/command_line_interface.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
|
||||
"protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
|
||||
"protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_context.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_enum.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_extension.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_file.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_helpers.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_map_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message_builder.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_message_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_service.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_string_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_enum.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_extension.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_file.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_map_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_message.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/js/js_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
|
||||
"protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
|
||||
"protobuf/src/google/protobuf/compiler/plugin.cc",
|
||||
"protobuf/src/google/protobuf/compiler/plugin.pb.cc",
|
||||
"protobuf/src/google/protobuf/compiler/python/python_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc",
|
||||
"protobuf/src/google/protobuf/compiler/subprocess.cc",
|
||||
"protobuf/src/google/protobuf/compiler/zip_writer.cc",
|
||||
],
|
||||
deps = [":protobuf"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "protoc",
|
||||
srcs = ["protobuf/src/google/protobuf/compiler/main.cc"],
|
||||
deps = [":protoc_lib"],
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Google googletest
|
||||
# Current version: release-1.8.0
|
||||
##############################################################################
|
||||
|
||||
shell_script(
|
||||
name = "gtest_hdrs",
|
||||
srcs = ["BREW"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/googletest/googletest/include/gtest $DST/",
|
||||
# The following is so that gtest-all.cc can find the related cc files.
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/googletest/googletest/src $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name="gtest",
|
||||
srcs=[
|
||||
"googletest/googletest/src/gtest-all.cc",
|
||||
],
|
||||
deps=["gtest_hdrs"],
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Nervana
|
||||
##############################################################################
|
||||
|
||||
shell_script(
|
||||
name = "nervana_header",
|
||||
srcs = ["nervanagpu/nervanagpu/kernels/C_interface/nervana_c_api.h"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp $CAFFE2_SRCDIR/$CAFFE2_CWD/nervanagpu/nervanagpu/kernels/C_interface/nervana_c_api.h $DST/",
|
||||
],
|
||||
)
|
||||
|
||||
cuda_library(
|
||||
name = "nervana_c_interface",
|
||||
srcs = ["nervanagpu/nervanagpu/kernels/C_interface/nervana_c_api.cu"],
|
||||
deps = [
|
||||
":nervana_header",
|
||||
":cuda",
|
||||
],
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Other libraries
|
||||
# This section includes all other libraries in alphabet order.
|
||||
##############################################################################
|
||||
|
||||
cc_thirdparty_target(
|
||||
name="gflags",
|
||||
cc_obj_files = ["-lgflags"] if Brewery.Env.Config.USE_GFLAGS else [],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name="glog",
|
||||
cc_obj_files = ["-lglog"] if Brewery.Env.Config.USE_GLOG else [],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "leveldb",
|
||||
deps = [":snappy"],
|
||||
cc_obj_files = [ "-lleveldb" ],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "libz",
|
||||
cc_obj_files = [ "-lz" ],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "libbz2",
|
||||
cc_obj_files = [ "-lbz2" ],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "rocksdb",
|
||||
deps = [":libz", ":libbz2", ":snappy"],
|
||||
cc_obj_files = [ "-lrocksdb" ],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "lmdb",
|
||||
cc_obj_files = ["-llmdb"],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "libzmq",
|
||||
cc_obj_files = [ "-lzmq" ],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name="opencv",
|
||||
cc_obj_files=[
|
||||
"-lopencv_core",
|
||||
"-lopencv_highgui",
|
||||
"-lopencv_imgproc",
|
||||
],
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name="openmpi",
|
||||
cc_obj_files = ['-l' + s for s in Brewery.Env.MPI_LIBS]
|
||||
)
|
||||
|
||||
cc_thirdparty_target(
|
||||
name = "snappy",
|
||||
cc_obj_files = ["-lsnappy"],
|
||||
)
|
||||
|
||||
shell_script(
|
||||
name = "pybind11",
|
||||
srcs = ["BREW"],
|
||||
commands=[
|
||||
"DST=$CAFFE2_GENDIR/third_party/include/",
|
||||
"mkdir -p $DST",
|
||||
"cp -r $CAFFE2_SRCDIR/$CAFFE2_CWD/pybind11/include/pybind11 $DST/",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user