Skip to content

Commit e03ad73

Browse files
committed
securing starting files
1 parent 76f1e38 commit e03ad73

File tree

950 files changed

+1457924
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

950 files changed

+1457924
-0
lines changed

3rdparty/caffe/.Doxyfile

+2,335
Large diffs are not rendered by default.

3rdparty/caffe/.travis.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
dist: trusty
2+
sudo: required
3+
4+
language: cpp
5+
compiler: gcc
6+
7+
env:
8+
global:
9+
- NUM_THREADS=4
10+
matrix:
11+
# Use a build matrix to test many builds in parallel
12+
# envvar defaults:
13+
# WITH_CMAKE: false
14+
# WITH_PYTHON3: false
15+
# WITH_IO: true
16+
# WITH_CUDA: false
17+
# WITH_CUDNN: false
18+
- BUILD_NAME="default-make"
19+
# - BUILD_NAME="python3-make" WITH_PYTHON3=true
20+
- BUILD_NAME="no-io-make" WITH_IO=false
21+
- BUILD_NAME="cuda-make" WITH_CUDA=true
22+
- BUILD_NAME="cudnn-make" WITH_CUDA=true WITH_CUDNN=true
23+
24+
- BUILD_NAME="default-cmake" WITH_CMAKE=true
25+
- BUILD_NAME="python3-cmake" WITH_CMAKE=true WITH_PYTHON3=true
26+
- BUILD_NAME="no-io-cmake" WITH_CMAKE=true WITH_IO=false
27+
- BUILD_NAME="cuda-cmake" WITH_CMAKE=true WITH_CUDA=true
28+
- BUILD_NAME="cudnn-cmake" WITH_CMAKE=true WITH_CUDA=true WITH_CUDNN=true
29+
30+
cache:
31+
apt: true
32+
directories:
33+
- ~/protobuf3
34+
35+
before_install:
36+
- source ./scripts/travis/defaults.sh
37+
38+
install:
39+
- sudo -E ./scripts/travis/install-deps.sh
40+
- ./scripts/travis/setup-venv.sh ~/venv
41+
- source ~/venv/bin/activate
42+
- ./scripts/travis/install-python-deps.sh
43+
44+
before_script:
45+
- ./scripts/travis/configure.sh
46+
47+
script:
48+
- ./scripts/travis/build.sh
49+
- ./scripts/travis/test.sh
50+
51+
notifications:
52+
# Emails are sent to the committer's git-configured email address by default,
53+
# but only if they have access to the repository. To enable Travis on your
54+
# public fork of Caffe, just go to travis-ci.org and flip the switch on for
55+
# your Caffe fork. To configure your git email address, use:
56+
# git config --global user.email [email protected]
57+
email:
58+
on_success: always
59+
on_failure: always
60+
61+
# IRC notifications disabled by default.
62+
# Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
63+
# irc:
64+
# channels:
65+
# - "chat.freenode.net#caffe"
66+
# template:
67+
# - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"

3rdparty/caffe/CMakeLists.txt

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
cmake_minimum_required(VERSION 2.8.7)
2+
if(POLICY CMP0046)
3+
cmake_policy(SET CMP0046 NEW)
4+
endif()
5+
if(POLICY CMP0054)
6+
cmake_policy(SET CMP0054 NEW)
7+
endif()
8+
9+
# ---[ Caffe project
10+
project(Caffe C CXX)
11+
12+
# ---[ Caffe version
13+
set(CAFFE_TARGET_VERSION "1.0.0" CACHE STRING "Caffe logical version")
14+
set(CAFFE_TARGET_SOVERSION "1.0.0" CACHE STRING "Caffe soname version")
15+
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})
16+
17+
# ---[ Using cmake scripts and modules
18+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
19+
20+
include(ExternalProject)
21+
include(GNUInstallDirs)
22+
23+
include(cmake/Utils.cmake)
24+
include(cmake/Targets.cmake)
25+
include(cmake/Misc.cmake)
26+
include(cmake/Summary.cmake)
27+
include(cmake/ConfigGen.cmake)
28+
29+
# ---[ Options
30+
caffe_option(CPU_ONLY "Build Caffe without CUDA support" OFF) # TODO: rename to USE_CUDA
31+
caffe_option(USE_CUDNN "Build Caffe with cuDNN library support" ON IF NOT CPU_ONLY)
32+
caffe_option(USE_NCCL "Build Caffe with NCCL library support" OFF)
33+
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" ON)
34+
caffe_option(BUILD_python "Build Python wrapper" ON)
35+
set(python_version "2" CACHE STRING "Specify which Python version to use")
36+
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
37+
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
38+
caffe_option(BUILD_python_layer "Build the Caffe Python layer" ON)
39+
caffe_option(USE_OPENCV "Build with OpenCV support" ON)
40+
caffe_option(USE_LEVELDB "Build with levelDB" ON)
41+
caffe_option(USE_LMDB "Build with lmdb" ON)
42+
caffe_option(ALLOW_LMDB_NOLOCK "Allow MDB_NOLOCK when reading LMDB files (only if necessary)" OFF)
43+
caffe_option(USE_OPENMP "Link with OpenMP (when your BLAS wants OpenMP and you get linker errors)" OFF)
44+
45+
# This code is taken from https://github.com/sh1r0/caffe-android-lib
46+
caffe_option(USE_HDF5 "Build with hdf5" ON)
47+
48+
# ---[ Dependencies
49+
include(cmake/Dependencies.cmake)
50+
51+
# ---[ Flags
52+
if(UNIX OR APPLE)
53+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -std=c++11")
54+
endif()
55+
56+
caffe_set_caffe_link()
57+
58+
if(USE_libstdcpp)
59+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
60+
message("-- Warning: forcing libstdc++ (controlled by USE_libstdcpp option in cmake)")
61+
endif()
62+
63+
# ---[ Warnings
64+
caffe_warnings_disable(CMAKE_CXX_FLAGS -Wno-sign-compare -Wno-uninitialized)
65+
66+
# ---[ Config generation
67+
configure_file(cmake/Templates/caffe_config.h.in "${PROJECT_BINARY_DIR}/caffe_config.h")
68+
69+
# ---[ Includes
70+
set(Caffe_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
71+
set(Caffe_SRC_DIR ${PROJECT_SOURCE_DIR}/src)
72+
include_directories(${PROJECT_BINARY_DIR})
73+
74+
# ---[ Includes & defines for CUDA
75+
76+
# cuda_compile() does not have per-call dependencies or include pathes
77+
# (cuda_compile() has per-call flags, but we set them here too for clarity)
78+
#
79+
# list(REMOVE_ITEM ...) invocations remove PRIVATE and PUBLIC keywords from collected definitions and include pathes
80+
if(HAVE_CUDA)
81+
# pass include pathes to cuda_include_directories()
82+
set(Caffe_ALL_INCLUDE_DIRS ${Caffe_INCLUDE_DIRS})
83+
list(REMOVE_ITEM Caffe_ALL_INCLUDE_DIRS PRIVATE PUBLIC)
84+
cuda_include_directories(${Caffe_INCLUDE_DIR} ${Caffe_SRC_DIR} ${Caffe_ALL_INCLUDE_DIRS})
85+
86+
# add definitions to nvcc flags directly
87+
if(Caffe_DEFINITIONS)
88+
set(Caffe_ALL_DEFINITIONS ${Caffe_DEFINITIONS})
89+
list(REMOVE_ITEM Caffe_ALL_DEFINITIONS PRIVATE PUBLIC)
90+
list(APPEND CUDA_NVCC_FLAGS ${Caffe_ALL_DEFINITIONS})
91+
endif()
92+
endif()
93+
94+
# ---[ Subdirectories
95+
add_subdirectory(src/gtest)
96+
add_subdirectory(src/caffe)
97+
add_subdirectory(tools)
98+
add_subdirectory(examples)
99+
add_subdirectory(python)
100+
add_subdirectory(matlab)
101+
add_subdirectory(docs)
102+
103+
# ---[ Linter target
104+
add_custom_target(lint COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
105+
106+
# ---[ pytest target
107+
if(BUILD_python)
108+
add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )
109+
add_dependencies(pytest pycaffe)
110+
endif()
111+
112+
# ---[ uninstall target
113+
configure_file(
114+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake.in
115+
${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake
116+
IMMEDIATE @ONLY)
117+
118+
add_custom_target(uninstall
119+
COMMAND ${CMAKE_COMMAND} -P
120+
${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake)
121+
122+
# ---[ Configuration summary
123+
caffe_print_configuration_summary()
124+
125+
# ---[ Export configs generation
126+
caffe_generate_export_configs()
127+

3rdparty/caffe/CONTRIBUTING.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing
2+
3+
Below you will find a collection of guidelines for submitting issues as well as contributing code to the Caffe repository.
4+
Please read those before starting an issue or a pull request.
5+
6+
## Issues
7+
8+
Specific Caffe design and development issues, bugs, and feature requests are maintained by GitHub Issues.
9+
10+
*Please do not post installation, build, usage, or modeling questions, or other requests for help to Issues.*
11+
Use the [caffe-users list](https://groups.google.com/forum/#!forum/caffe-users) instead.
12+
This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
13+
See the chapter [caffe-users](#caffe-users) below for guidance on posting to the users list.
14+
15+
When reporting an issue, it's most helpful to provide the following information, where applicable:
16+
* How does the problem look like and what steps reproduce it?
17+
* Can you reproduce it using the latest [master](https://github.com/BVLC/caffe/tree/master), compiled with the `DEBUG` make option?
18+
* What hardware and software are you running? In particular:
19+
* GPU make and model, if relevant,
20+
* operating system/distribution,
21+
* compiler; please also post which version (for example, with GCC run `gcc --version` to check),
22+
* CUDA version, if applicable (run `nvcc --version` to check),
23+
* cuDNN version, if applicable (version number is stored in `cudnn.h`, look for lines containing `CUDNN_MAJOR`, `CUDNN_MINOR` and `CUDNN_PATCHLEVEL`),
24+
* BLAS library,
25+
* Python version, if relevant,
26+
* MATLAB version, if relevant.
27+
* **What have you already tried** to solve the problem? How did it fail? Are there any other issues related to yours?
28+
* If this is not a build-related issue, does your installation pass `make runtest`?
29+
* If the bug is a crash, provide the backtrace (usually printed by Caffe; always obtainable with `gdb`).
30+
* If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.
31+
32+
If only a small portion of the code/log is relevant to your issue, you may paste it directly into the post, preferably using Markdown syntax for code block: triple backtick ( \`\`\` ) to open/close a block.
33+
In other cases (multiple files, or long files), please **attach** them to the post - this greatly improves readability.
34+
35+
If the problem arises during a complex operation (e.g. large script using pycaffe, long network prototxt), please reduce the example to the minimal size that still causes the error.
36+
Also, minimize influence of external modules, data etc. - this way it will be easier for others to understand and reproduce your issue, and eventually help you.
37+
Sometimes you will find the root cause yourself in the process.
38+
39+
Try to give your issue a title that is succinct and specific. The devs will rename issues as needed to keep track of them.
40+
41+
## Caffe-users
42+
43+
Before you post to the [caffe-users list](https://groups.google.com/forum/#!forum/caffe-users), make sure you look for existing solutions.
44+
The Caffe community has encountered and found solutions to countless problems - benefit from the collective experience.
45+
Recommended places to look:
46+
* the [users list](https://groups.google.com/forum/#!forum/caffe-users) itself,
47+
* [`caffe`](https://stackoverflow.com/questions/tagged/caffe) tag on StackOverflow,
48+
* [GitHub issues](https://github.com/BVLC/caffe/issues) tracker (some problems have been answered there),
49+
* the public [wiki](https://github.com/BVLC/caffe/wiki),
50+
* the official [documentation](http://caffe.berkeleyvision.org/).
51+
52+
Found a post/issue with your exact problem, but with no answer?
53+
Don't just leave a "me too" message - provide the details of your case.
54+
Problems with more available information are easier to solve and attract good attention.
55+
56+
When posting to the list, make sure you provide as much relevant information as possible - recommendations for an issue report (see above) are a good starting point.
57+
*Please make it very clear which version of Caffe you are using, especially if it is a fork not maintained by BVLC.*
58+
59+
Formatting recommendations hold: paste short logs/code fragments into the post (use fixed-width text for them), **attach** long logs or multiple files.
60+
61+
## Pull Requests
62+
63+
Caffe welcomes all contributions.
64+
65+
See the [contributing guide](http://caffe.berkeleyvision.org/development.html) for details.
66+
67+
Briefly: read commit by commit, a PR should tell a clean, compelling story of _one_ improvement to Caffe. In particular:
68+
69+
* A PR should do one clear thing that obviously improves Caffe, and nothing more. Making many smaller PRs is better than making one large PR; review effort is superlinear in the amount of code involved.
70+
* Similarly, each commit should be a small, atomic change representing one step in development. PRs should be made of many commits where appropriate.
71+
* Please do rewrite PR history to be clean rather than chronological. Within-PR bugfixes, style cleanups, reversions, etc. should be squashed and should not appear in merged PR history.
72+
* Anything nonobvious from the code should be explained in comments, commit messages, or the PR description, as appropriate.

3rdparty/caffe/CONTRIBUTORS.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributors
2+
3+
Caffe is developed by a core set of BAIR members and the open-source community.
4+
5+
We thank all of our [contributors](https://github.com/BVLC/caffe/graphs/contributors)!
6+
7+
**For the detailed history of contributions** of a given file, try
8+
9+
git blame file
10+
11+
to see line-by-line credits and
12+
13+
git log --follow file
14+
15+
to see the change log even across renames and rewrites.
16+
17+
Please refer to the [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements) on the Caffe site for further details.
18+
19+
**Copyright** is held by the original contributor according to the versioning history; see LICENSE.

3rdparty/caffe/INSTALL.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Installation
2+
3+
See http://caffe.berkeleyvision.org/installation.html for the latest
4+
installation instructions.
5+
6+
Check the users group in case you need help:
7+
https://groups.google.com/forum/#!forum/caffe-users

3rdparty/caffe/LICENSE

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
COPYRIGHT
2+
3+
All contributions by the University of California:
4+
Copyright (c) 2014-2017 The Regents of the University of California (Regents)
5+
All rights reserved.
6+
7+
All other contributions:
8+
Copyright (c) 2014-2017, the respective contributors
9+
All rights reserved.
10+
11+
Caffe uses a shared copyright model: each contributor holds copyright over
12+
their contributions to Caffe. The project versioning records all such
13+
contribution and copyright details. If a contributor wants to further mark
14+
their specific copyright on a particular contribution, they should indicate
15+
their copyright solely in the commit message of the change when it is
16+
committed.
17+
18+
LICENSE
19+
20+
Redistribution and use in source and binary forms, with or without
21+
modification, are permitted provided that the following conditions are met:
22+
23+
1. Redistributions of source code must retain the above copyright notice, this
24+
list of conditions and the following disclaimer.
25+
2. Redistributions in binary form must reproduce the above copyright notice,
26+
this list of conditions and the following disclaimer in the documentation
27+
and/or other materials provided with the distribution.
28+
29+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
33+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39+
40+
CONTRIBUTION AGREEMENT
41+
42+
By contributing to the BVLC/caffe repository through pull-request, comment,
43+
or otherwise, the contributor releases their content to the
44+
license and copyright terms herein.

0 commit comments

Comments
 (0)