Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a3a45856 authored by hhakim's avatar hhakim
Browse files

Optimize gpu_mod use: don't compile the lib if already installed on the system.

parent f6e5b689
No related branches found
No related tags found
No related merge requests found
Pipeline #833801 skipped
...@@ -302,8 +302,11 @@ pages: ...@@ -302,8 +302,11 @@ pages:
stage: pkg_rev stage: pkg_rev
before_script: before_script:
- VERSION=$(echo $CI_COMMIT_SHA | sed -e 's/^\(.\{8\}\).*/\1/') - VERSION=$(echo $CI_COMMIT_SHA | sed -e 's/^\(.\{8\}\).*/\1/')
- if [[ -n "$USE_GPU_MOD" ]]; then GPU_MOD_SHA=$(git submodule foreach git log --oneline -n1 | sed -e 's/ .*//' | tail -1); fi
- echo GPU_MOD_SHA=$GPU_MOD_SHA
- if [[ -n "$USE_GPU_MOD" ]]; then cd gpu_mod; if [[ ! -d build ]]; then mkdir build; fi; cd build; fi - if [[ -n "$USE_GPU_MOD" ]]; then cd gpu_mod; if [[ ! -d build ]]; then mkdir build; fi; cd build; fi
- if [[ -n "$USE_GPU_MOD" ]]; then cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..; make; fi # don't build the lib if already installed
- if [[ -n "$USE_GPU_MOD" ]]; then cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..;L="/usr/local/lib/libgm-$GPU_MOD_SHA.so"; echo LIB=$L; if [[ -r "$L" ]]; then cp "$L" ./libgm.so; else make;fi;fi
- if [[ -n "$USE_GPU_MOD" ]]; then cd ../..; fi - if [[ -n "$USE_GPU_MOD" ]]; then cd ../..; fi
artifacts: artifacts:
expire_in: '1 week' expire_in: '1 week'
...@@ -328,8 +331,11 @@ pkg_linux_purepy_rev: ...@@ -328,8 +331,11 @@ pkg_linux_purepy_rev:
extends: .pkg_purepy extends: .pkg_purepy
before_script: before_script:
- VERSION=$CI_COMMIT_TAG - VERSION=$CI_COMMIT_TAG
- if [[ -n "$USE_GPU_MOD" ]]; then GPU_MOD_SHA=$(git submodule foreach git log --oneline -n1 | sed -e 's/ .*//' | tail -1); fi
- echo GPU_MOD_SHA=$GPU_MOD_SHA
- if [[ -n "$USE_GPU_MOD" ]]; then cd gpu_mod; if [[ ! -d build ]]; then mkdir build; fi; cd build; fi - if [[ -n "$USE_GPU_MOD" ]]; then cd gpu_mod; if [[ ! -d build ]]; then mkdir build; fi; cd build; fi
- if [[ -n "$USE_GPU_MOD" ]]; then cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..; make; fi # don't build the lib if already installed
- if [[ -n "$USE_GPU_MOD" ]]; then cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..;L="/usr/local/lib/libgm-$GPU_MOD_SHA.so"; echo LIB=$L; if [[ -r "$L" ]]; then cp "$L" ./libgm.so; else make;fi;fi
- if [[ -n "$USE_GPU_MOD" ]]; then cd ../..; fi - if [[ -n "$USE_GPU_MOD" ]]; then cd ../..; fi
artifacts: artifacts:
expire_in: '50 yrs' expire_in: '50 yrs'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment