Unverified Commit 83385d42 by Tianqi Chen Committed by GitHub

[CI] use llvm9 for the gpu tests (#4224)

* [CI] use llvm9 for the gpu tests

* Update Docker script to support new nvidia docker
parent b07b1952
...@@ -145,7 +145,7 @@ stage('Build') { ...@@ -145,7 +145,7 @@ stage('Build') {
echo set\\(USE_CUDA ON\\) >> config.cmake echo set\\(USE_CUDA ON\\) >> config.cmake
echo set\\(USE_OPENGL ON\\) >> config.cmake echo set\\(USE_OPENGL ON\\) >> config.cmake
echo set\\(USE_MICRO 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\\(USE_NNPACK ON\\) >> config.cmake
echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake echo set\\(NNPACK_PATH /NNPACK/build/\\) >> config.cmake
echo set\\(USE_RPC ON\\) >> config.cmake echo set\\(USE_RPC ON\\) >> config.cmake
......
...@@ -61,5 +61,5 @@ macro(find_antlr use_antlr) ...@@ -61,5 +61,5 @@ macro(find_antlr use_antlr)
elseif(NOT ${use_antlr} STREQUAL "OFF") elseif(NOT ${use_antlr} STREQUAL "OFF")
set(ANTLR4 ${JAVA_PROGRAM} -jar ${use_antlr}) set(ANTLR4 ${JAVA_PROGRAM} -jar ${use_antlr})
endif() endif()
message(STATUS "ANTLR4="${ANTLR4}) message(STATUS "ANTLR4=${ANTLR4}")
endmacro(find_antlr) endmacro(find_antlr)
...@@ -51,18 +51,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ...@@ -51,18 +51,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WORKSPACE="$(pwd)" WORKSPACE="$(pwd)"
# Use nvidia-docker if the container is GPU. # 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 if [[ ! -z $CUDA_VISIBLE_DEVICES ]]; then
CUDA_ENV="-e CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}" CUDA_ENV="-e CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"
else else
CUDA_ENV="" CUDA_ENV=""
fi 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. # Print arguments.
echo "WORKSPACE: ${WORKSPACE}" echo "WORKSPACE: ${WORKSPACE}"
echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}" echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment