Skip to content

Commit

Permalink
Merge pull request #219 from deephealthproject/develop
Browse files Browse the repository at this point in the history
Major fixes and performance improvements for v0.8
  • Loading branch information
salvacarrion authored Nov 12, 2020
2 parents 1468237 + b3e757b commit c23a43d
Show file tree
Hide file tree
Showing 334 changed files with 9,237 additions and 1,651 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-cpu-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -T ClangCL -DBUILD_SUPERBUILD=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TARGET=CPU ..
cmake -G "Visual Studio 16 2019" -A x64 -DBUILD_SUPERBUILD=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TARGET=CPU ..
shell: cmd
- name: Build
run: cmake --build build --config Release
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ cmake_minimum_required(VERSION 3.9.2)
option(BUILD_SUPERBUILD "Compile using the superbuild system" OFF)
option(BUILD_PROTOBUF "Compile using Protobuf" ON)
option(BUILD_OPENMP "Compile using OpenMP" ON)
option(BUILD_HPC "Compile using agressive flags" OFF)
option(BUILD_TESTS "Compile tests" ON)
option(BUILD_HPC "Compile using agressive flags" ON)
option(BUILD_TESTS "Compile tests (HCP needs to be disabled)" ON) # Disable HCP to pass tests (there are numerical errors)
option(USE_LOCAL_GTEST "Use the local library to avoid problems derived from the 'One Definition Rule'" ON)
option(BUILD_EXAMPLES "Compile examples" ON)
option(BUILD_SHARED_LIBS "Global flag to cause add_library to create shared libraries if on" ON)
Expand Down Expand Up @@ -48,7 +48,7 @@ if(BUILD_SUPERBUILD)
add_subdirectory(cmake)
endif()
# This is executed at compilation time: "make"
PROJECT(eddl VERSION 0.7 LANGUAGES CXX)
PROJECT(eddl VERSION 0.8 LANGUAGES CXX)


# SET C++ COMPILER STANDARD
Expand Down Expand Up @@ -100,7 +100,7 @@ if(UNIX)
endif()

if(BUILD_HPC)
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -mtune=native") # This does not work on many machines
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -mtune=native")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -msse -mfpmath=sse -ffast-math")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize")
endif()
Expand Down
92 changes: 36 additions & 56 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ pipeline {
agent {
docker {
label 'docker'
image 'stal12/ubuntu18-gcc5'
image 'pritt/base'
}
}
stages {
stage('Build') {
steps {
timeout(15) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
timeout(60) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=CPU -DBUILD_SUPERBUILD=ON -DBUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
}
}
stage('Test') {
steps {
timeout(15) {
echo 'Testing..'
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
}
timeout(15) {
echo 'Testing..'
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
}
}
}
stage('linux_end') {
Expand All @@ -41,18 +41,18 @@ pipeline {
stages {
stage('Build') {
steps {
timeout(15) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
timeout(60) {
echo 'Building..'
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]]
}
}
}
stage('Test') {
steps {
timeout(15) {
echo 'Testing..'
bat 'cd build && ctest -C Debug -VV'
}
timeout(15) {
echo 'Testing..'
bat 'cd build && ctest -C Debug -VV'
}
}
}
stage('windows_end') {
Expand All @@ -66,26 +66,26 @@ pipeline {
agent {
docker {
label 'docker && gpu'
image 'stal12/cuda10-gcc5'
image 'pritt/base-cuda'
args '--gpus 1'
}
}
stages {
stage('Build') {
steps {
timeout(15) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TARGET=GPU -D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
}
timeout(60) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=GPU -DBUILD_TESTS=ON -DBUILD_SUPERBUILD=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
}
}
stage('Test') {
steps {
timeout(15) {
echo 'Testing..'
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
}
}
timeout(15) {
echo 'Testing..'
ctest arguments: '-C Debug -VV', installation: 'InSearchPath', workingDir: 'build'
}
}
}
stage('linux_gpu_end') {
steps {
Expand All @@ -101,18 +101,18 @@ pipeline {
stages {
stage('Build') {
steps {
timeout(15) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-D BUILD_TARGET=GPU -D BUILD_TESTS=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
timeout(60) {
echo 'Building..'
cmakeBuild buildDir: 'build', cmakeArgs: '-DBUILD_TARGET=GPU -DBUILD_TESTS=ON -DBUILD_SUPERBUILD=ON', installation: 'InSearchPath', sourceDir: '.', cleanBuild: true, steps: [[withCmake: true]]
}
}
}
stage('Test') {
steps {
timeout(15) {
echo 'Testing..'
bat 'cd build && ctest -C Debug -VV'
}
timeout(15) {
echo 'Testing..'
bat 'cd build && ctest -C Debug -VV'
}
}
}
stage('windows_gpu_end') {
Expand All @@ -122,26 +122,6 @@ pipeline {
}
}
}
stage('documentation') {
when {
branch 'master'
beforeAgent true
}
agent {
label 'windows && eddl_doxygen'
}
stages {
stage('Update documentation') {
steps {
timeout(15) {
bat 'cd docs\\doxygen && doxygen'
bat 'powershell -Command "(gc %EDDL_DOXYGEN_INPUT_COMMANDS%) -replace \'@local_dir\', \'docs\\build\\html\' | Out-File commands_out.txt"'
bat 'winscp /ini:nul /script:commands_out.txt'
}
}
}
}
}
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions docs/markdown/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,23 @@ Epoch 1
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
```

##### v0.8 improvements


| HPC | Softmax | Loss | Time | Comments |
|-----|---------|-----------|-------|---------------|
| OFF | Old | (old) CE | 0.043 | Epoch1: 0.247 |
| OFF | Old | (new) CE | 0.041 | Epoch1: 0.099 |
| OFF | Old | (old) SCE | 0.040 | Epoch1: 0.347 |
| OFF | Old | (new) SCE | 0.037 | Epoch1: 0.901 |
| OFF | New | (new) CE | 0.037 | Epoch1: 0.900 |
| OFF | New | (new) SCE | 0.036 | Epoch1: 0.903 |
| ON | New | (new) SCE | 0.024 | Epoch1: 0.901 |

> Desktop - Ubuntu 18.04 - AMD Ryzen 7 2700X Eight-Core Processor - 4.3Ghz (16 cores) - 16GB RAM - GeForce GTX 1070 (8GB)
> MNIST MLP (`1_mnist_mlp.cpp`)

### CIFAR10 CONV (`1_cifar_conv.cpp`)

#### GPU
Expand Down
Loading

0 comments on commit c23a43d

Please sign in to comment.