Skip to content

Commit

Permalink
[CI] use llvm9 for the gpu tests (#4224)
Browse files Browse the repository at this point in the history
* [CI] use llvm9 for the gpu tests

* Update Docker script to support new nvidia docker
  • Loading branch information
tqchen authored Oct 30, 2019
1 parent b07b195 commit 83385d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ stage('Build') {
echo set\\(USE_CUDA ON\\) >> config.cmake
echo set\\(USE_OPENGL ON\\) >> config.cmake
echo set\\(USE_MICRO ON\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-7\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-9\\) >> config.cmake
echo set\\(USE_NNPACK ON\\) >> config.cmake
echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake
echo set\\(USE_RPC ON\\) >> config.cmake
Expand Down
2 changes: 1 addition & 1 deletion cmake/util/FindANTLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ macro(find_antlr use_antlr)
elseif(NOT ${use_antlr} STREQUAL "OFF")
set(ANTLR4 ${JAVA_PROGRAM} -jar ${use_antlr})
endif()
message(STATUS "ANTLR4="${ANTLR4})
message(STATUS "ANTLR4=${ANTLR4}")
endmacro(find_antlr)
18 changes: 12 additions & 6 deletions docker/bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WORKSPACE="$(pwd)"

# Use nvidia-docker if the container is GPU.
if [[ "${DOCKER_IMAGE_NAME}" == *"gpu"* ]]; then
DOCKER_BINARY="nvidia-docker"
else
DOCKER_BINARY="docker"
fi

if [[ ! -z $CUDA_VISIBLE_DEVICES ]]; then
CUDA_ENV="-e CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"
else
CUDA_ENV=""
fi

if [[ "${DOCKER_IMAGE_NAME}" == *"gpu"* ]]; then
if ! type "nvidia-docker" > /dev/null
then
DOCKER_BINARY="docker"
CUDA_ENV=" --gpus all "${CUDA_ENV}
else
DOCKER_BINARY="nvidia-docker"
fi
else
DOCKER_BINARY="docker"
fi

# Print arguments.
echo "WORKSPACE: ${WORKSPACE}"
echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}"
Expand Down

0 comments on commit 83385d4

Please sign in to comment.