Skip to content

Commit

Permalink
Merge pull request #2 from jeffoverflow/cuda_arch
Browse files Browse the repository at this point in the history
modify ci configs about cuda arch in jenkins ci
  • Loading branch information
XuanYang-cn committed Jul 21, 2020
2 parents f052dd0 + bf6ec88 commit b031cc6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
6 changes: 5 additions & 1 deletion ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ pipeline {
container("milvus-${BINARY_VERSION}-build-env") {
script {
try{
load "${env.WORKSPACE}/ci/jenkins/step/build.groovy"
if (isNightlyTest || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") {
load "${env.WORKSPACE}/ci/jenkins/step/nightlyBuild.groovy"
else {
load "${env.WORKSPACE}/ci/jenkins/step/build.groovy"
}
} catch (Exception e) {
containerLog "milvus-${BINARY_VERSION}-build-env"
throw e
Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/step/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ timeout(time: 120, unit: 'MINUTES') {
def checkResult = sh(script: "./check_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache", returnStatus: true)

if ("${BINARY_VERSION}" == "gpu") {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u -s \"-gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_75,code=sm_75\" \""
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u\""
} else {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -u\""
}
Expand Down
14 changes: 14 additions & 0 deletions ci/jenkins/step/nightlyBuild.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
timeout(time: 120, unit: 'MINUTES') {
dir ("ci/scripts") {
withCredentials([usernamePassword(credentialsId: "${params.JFROG_CREDENTIALS_ID}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
def checkResult = sh(script: "./check_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache", returnStatus: true)

if ("${BINARY_VERSION}" == "gpu") {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -g -u -s \"-gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_75,code=sm_75\" \""
} else {
sh "/bin/bash --login -c \". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -j4 -i ${env.MILVUS_INSTALL_PREFIX} --with_fiu --coverage -l -u\""
}
sh "./update_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache -u ${USERNAME} -p ${PASSWORD}"
}
}
}
6 changes: 3 additions & 3 deletions ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SCRIPTS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

MILVUS_CORE_DIR="${SCRIPTS_DIR}/../../core"
CORE_BUILD_DIR="${MILVUS_CORE_DIR}/cmake_build"
CUDA_ARCH="DEFAULT"

HELP="
Usage:
Expand All @@ -23,11 +22,11 @@ Usage:
Install directory used by install.
-t [BUILD_TYPE] or --build_type=[BUILD_TYPE]
Build type (default: Release)
-s [CUDA_ARCH] Building for the cuda architecture
-j[N] or --jobs=[N] Allow N jobs at once; infinite jobs with no arg.
-l Run cpplint & check clang-format
-n No make and make install step
-g Building for the architecture of the GPU in the system
-s [CUDA_ARCH] Building for the cuda architecture
--with_mkl Build with MKL (default: OFF)
--with_fiu Build with FIU (default: OFF)
-c or --coverage Build Code Coverage
Expand All @@ -40,7 +39,7 @@ Usage:
Use \"$0 --help\" for more information about a given command.
"

ARGS=`getopt -o "i:t:j::lngcupvh" -l "install_prefix::,build_type::,jobs::,with_mkl,with_fiu,coverage,tests,privileges,help" -n "$0" -- "$@"`
ARGS=`getopt -o "i:t:s:j::lngcupvh" -l "install_prefix::,build_type::,jobs::,with_mkl,with_fiu,coverage,tests,privileges,help" -n "$0" -- "$@"`

eval set -- "${ARGS}"

Expand Down Expand Up @@ -93,6 +92,7 @@ BUILD_UNITTEST=${BUILD_UNITTEST:="OFF"}
BUILD_COVERAGE=${BUILD_COVERAGE:="OFF"}
COMPILE_BUILD=${COMPILE_BUILD:="ON"}
GPU_VERSION=${GPU_VERSION:="OFF"}
CUDA_ARCH=${CUDA_ARCH:="DEFAULT"}
RUN_CPPLINT=${RUN_CPPLINT:="OFF"}
WITH_MKL=${WITH_MKL:="OFF"}
FIU_ENABLE=${FIU_ENABLE:="OFF"}
Expand Down

0 comments on commit b031cc6

Please sign in to comment.