Skip to content

Commit c23a43d

Browse files
authored
Merge pull request #219 from deephealthproject/develop
Major fixes and performance improvements for v0.8
2 parents 1468237 + b3e757b commit c23a43d

File tree

334 files changed

+9237
-1651
lines changed

Some content is hidden

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

334 files changed

+9237
-1651
lines changed

.github/workflows/build-cpu-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: |
2222
mkdir build
2323
cd build
24-
cmake -G "Visual Studio 16 2019" -A x64 -T ClangCL -DBUILD_SUPERBUILD=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TARGET=CPU ..
24+
cmake -G "Visual Studio 16 2019" -A x64 -DBUILD_SUPERBUILD=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TARGET=CPU ..
2525
shell: cmd
2626
- name: Build
2727
run: cmake --build build --config Release

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ cmake_minimum_required(VERSION 3.9.2)
99
option(BUILD_SUPERBUILD "Compile using the superbuild system" OFF)
1010
option(BUILD_PROTOBUF "Compile using Protobuf" ON)
1111
option(BUILD_OPENMP "Compile using OpenMP" ON)
12-
option(BUILD_HPC "Compile using agressive flags" OFF)
13-
option(BUILD_TESTS "Compile tests" ON)
12+
option(BUILD_HPC "Compile using agressive flags" ON)
13+
option(BUILD_TESTS "Compile tests (HCP needs to be disabled)" ON) # Disable HCP to pass tests (there are numerical errors)
1414
option(USE_LOCAL_GTEST "Use the local library to avoid problems derived from the 'One Definition Rule'" ON)
1515
option(BUILD_EXAMPLES "Compile examples" ON)
1616
option(BUILD_SHARED_LIBS "Global flag to cause add_library to create shared libraries if on" ON)
@@ -48,7 +48,7 @@ if(BUILD_SUPERBUILD)
4848
add_subdirectory(cmake)
4949
endif()
5050
# This is executed at compilation time: "make"
51-
PROJECT(eddl VERSION 0.7 LANGUAGES CXX)
51+
PROJECT(eddl VERSION 0.8 LANGUAGES CXX)
5252

5353

5454
# SET C++ COMPILER STANDARD
@@ -100,7 +100,7 @@ if(UNIX)
100100
endif()
101101

102102
if(BUILD_HPC)
103-
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -mtune=native") # This does not work on many machines
103+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -mtune=native")
104104
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -msse -mfpmath=sse -ffast-math")
105105
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize")
106106
endif()

Jenkinsfile

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ pipeline {
77
agent {
88
docker {
99
label 'docker'
10-
image 'stal12/ubuntu18-gcc5'
10+
image 'pritt/base'
1111
}
1212
}
1313
stages {
1414
stage('Build') {
1515
steps {
16-
timeout(15) {
17-
echo 'Building..'
18-
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
19-
}
16+
timeout(60) {
17+
echo 'Building..'
18+
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=CPU -DBUILD_SUPERBUILD=ON -DBUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
19+
}
2020
}
2121
}
2222
stage('Test') {
2323
steps {
24-
timeout(15) {
25-
echo 'Testing..'
26-
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
27-
}
24+
timeout(15) {
25+
echo 'Testing..'
26+
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
27+
}
2828
}
2929
}
3030
stage('linux_end') {
@@ -41,18 +41,18 @@ pipeline {
4141
stages {
4242
stage('Build') {
4343
steps {
44-
timeout(15) {
45-
echo 'Building..'
46-
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
47-
}
44+
timeout(60) {
45+
echo 'Building..'
46+
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=CPU -DBUILD_SHARED_LIBS=OFF -DBUILD_SUPERBUILD=ON -DBUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
47+
}
4848
}
4949
}
5050
stage('Test') {
5151
steps {
52-
timeout(15) {
53-
echo 'Testing..'
54-
bat 'cd build && ctest -C Debug -VV'
55-
}
52+
timeout(15) {
53+
echo 'Testing..'
54+
bat 'cd build && ctest -C Debug -VV'
55+
}
5656
}
5757
}
5858
stage('windows_end') {
@@ -66,26 +66,26 @@ pipeline {
6666
agent {
6767
docker {
6868
label 'docker && gpu'
69-
image 'stal12/cuda10-gcc5'
69+
image 'pritt/base-cuda'
7070
args '--gpus 1'
7171
}
7272
}
7373
stages {
7474
stage('Build') {
7575
steps {
76-
timeout(15) {
77-
echo 'Building..'
78-
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TARGET=GPU -D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
79-
}
80-
}
76+
timeout(60) {
77+
echo 'Building..'
78+
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=GPU -DBUILD_TESTS=ON -DBUILD_SUPERBUILD=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
79+
}
80+
}
8181
}
8282
stage('Test') {
8383
steps {
84-
timeout(15) {
85-
echo 'Testing..'
86-
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
87-
}
88-
}
84+
timeout(15) {
85+
echo 'Testing..'
86+
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
87+
}
88+
}
8989
}
9090
stage('linux_gpu_end') {
9191
steps {
@@ -101,18 +101,18 @@ pipeline {
101101
stages {
102102
stage('Build') {
103103
steps {
104-
timeout(15) {
105-
echo 'Building..'
106-
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TARGET=GPU -D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
107-
}
104+
timeout(60) {
105+
echo 'Building..'
106+
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=GPU -DBUILD_TESTS=ON -DBUILD_SUPERBUILD=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
107+
}
108108
}
109109
}
110110
stage('Test') {
111111
steps {
112-
timeout(15) {
113-
echo 'Testing..'
114-
bat 'cd build && ctest -C Debug -VV'
115-
}
112+
timeout(15) {
113+
echo 'Testing..'
114+
bat 'cd build && ctest -C Debug -VV'
115+
}
116116
}
117117
}
118118
stage('windows_gpu_end') {
@@ -122,26 +122,6 @@ pipeline {
122122
}
123123
}
124124
}
125-
stage('documentation') {
126-
when {
127-
branch 'master'
128-
beforeAgent true
129-
}
130-
agent {
131-
label 'windows && eddl_doxygen'
132-
}
133-
stages {
134-
stage('Update documentation') {
135-
steps {
136-
timeout(15) {
137-
bat 'cd docs\\doxygen && doxygen'
138-
bat 'powershell -Command "(gc %EDDL_DOXYGEN_INPUT_COMMANDS%) -replace \'@local_dir\', \'docs\\build\\html\' | Out-File commands_out.txt"'
139-
bat 'winscp /ini:nul /script:commands_out.txt'
140-
}
141-
}
142-
}
143-
}
144-
}
145125
}
146126
}
147127
}

docs/markdown/benchmarks.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,23 @@ Epoch 1
156156
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
157157
```
158158

159+
##### v0.8 improvements
159160

161+
162+
| HPC | Softmax | Loss | Time | Comments |
163+
|-----|---------|-----------|-------|---------------|
164+
| OFF | Old | (old) CE | 0.043 | Epoch1: 0.247 |
165+
| OFF | Old | (new) CE | 0.041 | Epoch1: 0.099 |
166+
| OFF | Old | (old) SCE | 0.040 | Epoch1: 0.347 |
167+
| OFF | Old | (new) SCE | 0.037 | Epoch1: 0.901 |
168+
| OFF | New | (new) CE | 0.037 | Epoch1: 0.900 |
169+
| OFF | New | (new) SCE | 0.036 | Epoch1: 0.903 |
170+
| ON | New | (new) SCE | 0.024 | Epoch1: 0.901 |
171+
172+
> Desktop - Ubuntu 18.04 - AMD Ryzen 7 2700X Eight-Core Processor - 4.3Ghz (16 cores) - 16GB RAM - GeForce GTX 1070 (8GB)
173+
> MNIST MLP (`1_mnist_mlp.cpp`)
174+
175+
160176
### CIFAR10 CONV (`1_cifar_conv.cpp`)
161177

162178
#### GPU

0 commit comments

Comments
 (0)