Skip to content

Commit 16b504b

Browse files
committed
Release v0.92
New features include: - Full support for convolutional and pooling layers - GPU acceleration of local Elemental GEMM operations - Improved network and data reader support -- Alexnet -- VGG -- CIFAR-10 - Added a suite of regularizers, objective functions, and metrics, including: -- Batch normaalization -- Drop-out -- L2 - Dramatically improves the performance of inter-model communication - Added suite of image prepossessing routines Merge branch 'develop' to create release v0.92.
2 parents 1a90840 + 0bb74e1 commit 16b504b

File tree

325 files changed

+44627
-11101
lines changed

Some content is hidden

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

325 files changed

+44627
-11101
lines changed

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This will run on Travis' 'new' container-based infrastructure
2+
sudo: false
3+
# The Trusty beta Build Environment
4+
dist: trusty
5+
6+
language: cpp
7+
8+
# Blacklist
9+
branches:
10+
except:
11+
- develop
12+
- gh-pages
13+
14+
# Environment variables (Set the gh-pages repo dir to html to match with doxygen)
15+
env:
16+
global:
17+
- GH_REPO_NAME: html
18+
- DOXYFILE: $TRAVIS_BUILD_DIR/doc/Doxyfile
19+
- GH_REPO_REF: github.com:LLNL/lbann.git
20+
- DOXYCONFIG: $TRAVIS_BUILD_DIR/doc/Doxyfile.in
21+
- SCRIPT_DIR: code_docs
22+
23+
# Install dependencies
24+
addons:
25+
apt:
26+
packages:
27+
- doxygen
28+
- doxygen-doc
29+
- doxygen-latex
30+
- doxygen-gui
31+
- graphviz
32+
33+
# Build your code e.g. by calling make
34+
script:
35+
- cp $DOXYCONFIG $DOXYFILE
36+
- chmod +x config/config-doxygen.sh
37+
- ./config/config-doxygen.sh
38+
39+
# Generate and deploy documentation
40+
after_success:
41+
- cd $TRAVIS_BUILD_DIR
42+
- chmod +x config/publish-doxygen.sh
43+
- ./config/publish-doxygen.sh
44+
45+
before_install:
46+
- openssl aes-256-cbc -K $encrypted_b9b32342f7d0_key -iv $encrypted_b9b32342f7d0_iv
47+
-in config/travisci_rsa.enc -out config/travisci_rsa -d
48+
- chmod 0600 config/travisci_rsa
49+
- cp config/travisci_rsa ~/.ssh/id_rsa

CMakeLists.txt

Lines changed: 93 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,31 @@ cmake_minimum_required(VERSION 2.8.12)
33
#set(LBANN_MAJOR_VERSION 0)
44
#set(LBANN_MINOR_VERSION 91)
55

6-
# Get the git version so that we can embed it into the executable
7-
execute_process(COMMAND git describe --abbrev=7 --dirty --always --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
8-
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_VERSION=\\\"${GIT_VERSION}\\\"" )
6+
# Check to see if we are in a git repo
7+
execute_process(COMMAND git rev-parse --is-inside-work-tree OUTPUT_VARIABLE GIT_REPO OUTPUT_STRIP_TRAILING_WHITESPACE)
8+
9+
if(GIT_REPO)
10+
# Get the git version so that we can embed it into the executable
11+
execute_process(COMMAND git --git-dir ${LBANN_HOME}/.git describe --abbrev=7 --dirty --always --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
12+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_VERSION=\\\"${GIT_VERSION}\\\"" )
13+
else()
14+
if(LBANN_VER)
15+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_VERSION=\\\"${LBANN_VER}\\\"" )
16+
else()
17+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_VERSION=\\\"v0.UKWN\\\"" )
18+
endif()
19+
endif()
920

1021
################################################################
1122
# Options
1223
################################################################
1324

14-
option(WITH_CUDA "Include Nvidia CUDA" ON)
15-
option(WITH_CUDNN "Include Nvidia cuDNN" ON)
16-
option(WITH_TBINF "Include Tensorboard interface" ON)
17-
option(VERBOSE "Verbose output" OFF)
25+
option(WITH_CUDA "Include Nvidia CUDA" ON)
26+
option(WITH_CUDNN "Include Nvidia cuDNN" ON)
27+
option(WITH_CNPY "Include cnpy" ON)
28+
option(WITH_TBINF "Include Tensorboard interface" ON)
29+
option(WITH_VTUNE "Link the Intel VTune profiling library" OFF)
30+
option(VERBOSE "Verbose output" OFF)
1831
if(NOT MAKE_NUM_PROCESSES)
1932
set(MAKE_NUM_PROCESSES 1)
2033
endif()
@@ -32,6 +45,30 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
3245
# Initialize C++ flags
3346
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11")
3447

48+
# Disable all optimization in debug for better viewing under debuggers (cmake already adds -g)
49+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DLBANN_DEBUG")
50+
51+
# Enable parallel random matrix generation
52+
if(NOT SEQ_INIT)
53+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_PARALLEL_RANDOM_MATRICES")
54+
endif()
55+
56+
# Special handling if we're compiling with Clang's address sanitizer
57+
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CXX_VERSION)
58+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
59+
if(NOT (CXX_VERSION VERSION_GREATER 3.5 OR CXX_VERSION VERSION_EQUAL 3.5))
60+
message(FATAL_ERROR "LBANN & Elemental requires clang Version >= 3.5")
61+
endif()
62+
if(CMAKE_BUILD_TYPE MATCHES Debug)
63+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize-recover=address")
64+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer -fsanitize-recover=address")
65+
else()
66+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
67+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
68+
endif()
69+
endif()
70+
71+
3572
# Set verbose output (should be 0 or 1)
3673
if(VERBOSE)
3774
set(VERBOSE 1)
@@ -63,6 +100,7 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
63100
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
64101

65102
# Add build and install directories to RPATH
103+
set(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR};${CMAKE_INSTALL_RPATH}")
66104
set(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR};${CMAKE_INSTALL_RPATH}")
67105
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_RPATH}")
68106
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR};${CMAKE_INSTALL_RPATH}")
@@ -74,22 +112,37 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR};${CMAKE
74112
# Required dependencies
75113
include(OpenMP)
76114
include(MPI)
77-
include(Elemental)
78115
include(OpenCV)
116+
include(protobuf)
117+
include(LbannProto)
79118

80119
# Optional dependencies
81120
if(WITH_CUDA)
82121
include(CUDA)
83122
endif()
123+
124+
if(ELEMENTAL_USE_CUBLAS)
125+
set(EL_CUBLAS_FLAGS "-DEL_USE_CUBLAS -I${CUDA_INCLUDE_DIRS}")
126+
endif()
127+
84128
if(CUDA_FOUND)
85129
include(CUB)
86130
if(WITH_CUDNN)
87131
include(cuDNN)
88132
endif()
89133
endif()
134+
135+
include(Elemental)
136+
90137
if(WITH_TBINF)
91138
include(TBinf)
92139
endif()
140+
if(WITH_VTUNE)
141+
include(VTune)
142+
endif()
143+
if(WITH_CNPY)
144+
include(cnpy)
145+
endif()
93146
include(Doxygen)
94147

95148
################################################################
@@ -107,7 +160,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
107160
message(FATAL_ERROR "LBANN & Elemental requires icpc Version >= 16.0")
108161
endif()
109162
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
110-
message(FATAL_ERROR "Unsupported compiler: Clang")
163+
if(NOT (CXX_VERSION VERSION_GREATER 3.5 OR CXX_VERSION VERSION_EQUAL 3.5))
164+
message(FATAL_ERROR "LBANN & Elemental requires clang Version >= 3.5")
165+
endif()
166+
if(CMAKE_BUILD_TYPE MATCHES Debug)
167+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize-recover=address")
168+
else()
169+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
170+
endif()
111171
else()
112172
message(FATAL_ERROR "Unsupported compiler: Unknown compiler vendor")
113173
endif()
@@ -152,9 +212,15 @@ endif()
152212
if(LBANN_BUILT_CUB)
153213
add_dependencies(src project_CUB)
154214
endif()
215+
if(LBANN_BUILT_CNPY)
216+
add_dependencies(src project_CNPY)
217+
endif()
155218
if(LBANN_HAS_TBINF)
156219
add_dependencies(src TBinf)
157220
endif()
221+
if(LBANN_BUILT_LBANN_PROTO)
222+
add_dependencies(src LbannProto)
223+
endif()
158224

159225
# Build LBANN library
160226
add_library(lbann ${LIBRARY_TYPE} $<TARGET_OBJECTS:src>)
@@ -163,15 +229,29 @@ add_library(lbann ${LIBRARY_TYPE} $<TARGET_OBJECTS:src>)
163229
target_link_libraries(lbann ${MPI_CXX_LIBRARIES})
164230
target_link_libraries(lbann ${Elemental_LIBRARIES})
165231
target_link_libraries(lbann ${OpenCV_LIBRARIES})
232+
target_link_libraries(lbann ${PROTOBUF_LIBRARIES})
233+
target_link_libraries(lbann ${CNPY_LIBRARIES})
234+
235+
message("main CMakeFiles XXX LbannProto_LIBRARIES: ${LbannProto_LIBRARIES}")
236+
# target_link_libraries(lbann ${LbannProto_LIBRARIES})
237+
166238
if(LBANN_HAS_CUDA)
167239
target_link_libraries(lbann ${CUDA_LIBRARIES})
240+
target_link_libraries(lbann ${cuBLAS_LIBRARIES})
168241
endif()
169242
if(LBANN_HAS_CUDNN)
170243
target_link_libraries(lbann ${cuDNN_LIBRARIES})
171244
endif()
245+
if(LBANN_HAS_VTUNE)
246+
target_link_libraries(lbann ${VTUNE_STATIC_LIB})
247+
target_link_libraries(lbann dl)
248+
endif()
172249
if(LBANN_HAS_TBINF)
173250
target_link_libraries(lbann TBinf)
174251
endif()
252+
if(LBANN_HAS_LBANN_PROTO)
253+
target_link_libraries(lbann LbannProto)
254+
endif()
175255

176256
################################################################
177257
# Install LBANN
@@ -222,6 +302,10 @@ message(" LBANN_HAS_ELEMENTAL: ${LBANN_HAS_ELEMENTAL}")
222302
message(" LBANN_HAS_OPENCV: ${LBANN_HAS_OPENCV}")
223303
message(" LBANN_HAS_CUDA: ${LBANN_HAS_CUDA}")
224304
message(" LBANN_HAS_CUDNN: ${LBANN_HAS_CUDNN}")
305+
message(" ELEMENTAL_USE_CUBLAS: ${ELEMENTAL_USE_CUBLAS}")
225306
message(" LBANN_HAS_PROTOBUF: ${LBANN_HAS_PROTOBUF}")
307+
message(" LBANN_HAS_CNPY: ${LBANN_HAS_CNPY}")
226308
message(" LBANN_HAS_TBINF: ${LBANN_HAS_TBINF}")
309+
message(" LBANN_HAS_VTUNE: ${LBANN_HAS_VTUNE}")
227310
message(" LBANN_HAS_DOXYGEN: ${LBANN_HAS_DOXYGEN}")
311+
message(" LBANN_HAS_LBANN_PROTO:${LBANN_HAS_LBANN_PROTO}")

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
# LBANN: Livermore Big Artificial Neural Network Toolkit
2+
3+
## Building LBANN with Spack [for Users]
4+
5+
spack install lbann
6+
7+
## Building LBANN with Spack [for Developers]
8+
9+
### Using spack setup
10+
11+
http://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=spack%20diy#build-system-configuration-support
12+
13+
cd lbann
14+
spack setup lbann@local %[email protected] ^mvapich2
15+
mkdir spack-build; cd spack-build
16+
../spconfig.py ..
17+
make
18+
make install
19+
20+
### Using spack diy
21+
spack diy lbann@local %[email protected]
22+
spack diy lbann@local %[email protected]
223

324
## Using LBANN on LLNL LC clusters
425

build/.keep

Lines changed: 0 additions & 1 deletion
This file was deleted.

cmake/CUDA.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ if(CUDA_FOUND)
99
# Include CUDA header files
1010
include_directories(${CUDA_INCLUDE_DIRS})
1111

12+
set(cuBLAS_LIBRARIES ${CUDA_TOOLKIT_ROOT_DIR}/lib64/${CMAKE_SHARED_LIBRARY_PREFIX}cublas${CMAKE_SHARED_LIBRARY_SUFFIX})
13+
1214
# Add preprocessor flag for CUDA
1315
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__LIB_CUDA")
1416

cmake/Doxygen.cmake

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ if(DOXYGEN_FOUND)
66
# Status message
77
message(STATUS "Found Doxygen (version ${DOXYGEN_VERSION}): ${DOXYGEN_EXECUTABLE}")
88

9+
# Doxygen options
10+
if(NOT DOXYGEN_OUTPUT_DIR)
11+
set(DOXYGEN_OUTPUT_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR})
12+
endif()
13+
914
# Configure Doxygen configuration file
15+
set(DOXYFILE ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/Doxyfile)
1016
configure_file(${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
11-
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/Doxyfile @ONLY)
17+
${DOXYFILE} @ONLY)
1218

13-
# Generate documentation with Doxygen
14-
set(DOXYGEN_COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/Doxyfile)
15-
install(CODE "execute_process(COMMAND ${DOXYGEN_COMMAND} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR})")
19+
# Generate documentation
20+
add_custom_target(doc
21+
${DOXYGEN_EXECUTABLE} ${DOXYFILE}
22+
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}
23+
COMMENT "Generating API documentation with Doxygen" VERBATIM
24+
)
1625

1726
# LBANN has access to Doxygen
1827
set(LBANN_HAS_DOXYGEN TRUE)

0 commit comments

Comments
 (0)