This is an automated email from the ASF dual-hosted git repository.
areusch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/ci-docker-staging by this push:
new c2939b4 i wish we could have nice things
c2939b4 is described below
commit c2939b4619749a65c5e7e28b0eb03228e74ed3cb
Author: Andrew Reusch <[email protected]>
AuthorDate: Thu Aug 12 14:43:21 2021 -0700
i wish we could have nice things
---
Jenkinsfile | 18 ------------------
docker/bash.sh | 33 ++++++++++++++-------------------
2 files changed, 14 insertions(+), 37 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 3a58b03..357594c 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -108,9 +108,6 @@ def cancel_previous_build() {
cancel_previous_build()
stage("Sanity Check") {
- environment {
- CI = 'true'
- }
timeout(time: max_time, unit: 'MINUTES') {
node('CPU') {
ws(per_exec_ws("tvm/sanity")) {
@@ -163,9 +160,6 @@ def unpack_lib(name, libs) {
}
stage('Build') {
- environment {
- CI = 'true'
- }
parallel 'BUILD: GPU': {
node('GPUBUILD') {
ws(per_exec_ws("tvm/build-gpu")) {
@@ -250,9 +244,6 @@ stage('Build') {
}
stage('Unit Test') {
- environment {
- CI = 'true'
- }
parallel 'python3: GPU': {
node('TensorCore') {
ws(per_exec_ws("tvm/ut-python-gpu")) {
@@ -312,9 +303,6 @@ stage('Unit Test') {
}
stage('Integration Test') {
- environment {
- CI = 'true'
- }
parallel 'topi: GPU': {
node('GPU') {
ws(per_exec_ws("tvm/topi-python-gpu")) {
@@ -371,9 +359,6 @@ stage('Integration Test') {
/*
stage('Build packages') {
- environment {
- CI = 'true'
- }
parallel 'conda CPU': {
node('CPU') {
sh "${docker_run} tlcpack/conda-cpu ./conda/build_cpu.sh
@@ -391,9 +376,6 @@ stage('Build packages') {
*/
stage('Deploy') {
- environment {
- CI = 'true'
- }
node('doc') {
ws(per_exec_ws("tvm/deploy-docs")) {
if (env.BRANCH_NAME == "main") {
diff --git a/docker/bash.sh b/docker/bash.sh
index 26d285e..5d1c146 100755
--- a/docker/bash.sh
+++ b/docker/bash.sh
@@ -281,28 +281,23 @@ DOCKER_ENV+=( --env CI_BUILD_HOME="${REPO_MOUNT_POINT}"
)
# Choose CPUs on which this container will execute.
-if [ -n "${CI+x}" -a -z "${CPUSET_CPUS}" ]; then
- if [ -n "${CI_NUM_EXECUTORS-}" ]; then
- if [ -n "${CI_CPUSET_LOWER_BOUND-}" -a -n "${CI_CPUSET_UPPER_BOUND-}"
]; then
- TOTAL_CPUS=$(expr "${CI_CPUSET_UPPER_BOUND}" -
"${CI_CPUSET_LOWER_BOUND}" + 1) || /bin/true
- if [ "${TOTAL_CPUS}" -lt 1 ]; then
- echo "ERROR: computed TOTAL_CPUS=${TOTAL_CPUS} based on
CI_CPUSET_{UPPER,LOWER}_BOUND!"
- exit 2
- fi
- else
- TOTAL_CPUS=$(nproc)
- CI_CPUSET_LOWER_BOUND=0
+if [ -n "${CI_NUM_EXECUTORS+x}" -a -z "${CPUSET_CPUS}" ]; then
+ if [ -n "${CI_CPUSET_LOWER_BOUND-}" -a -n "${CI_CPUSET_UPPER_BOUND-}" ];
then
+ TOTAL_CPUS=$(expr "${CI_CPUSET_UPPER_BOUND}" -
"${CI_CPUSET_LOWER_BOUND}" + 1) || /bin/true
+ if [ "${TOTAL_CPUS}" -lt 1 ]; then
+ echo "ERROR: computed TOTAL_CPUS=${TOTAL_CPUS} based on
CI_CPUSET_{UPPER,LOWER}_BOUND!"
+ exit 2
fi
- CPUS_PER_EXECUTOR=$(expr "${TOTAL_CPUS}" / "${CI_NUM_EXECUTORS}")
- # NOTE: Expr exit status varies by the computed value (good and bad!).
- CPUSET_CPUS_LOWER_BOUND=$(expr "${CI_CPUSET_LOWER_BOUND}" + \(
"${CPUS_PER_EXECUTOR}" '*' "${EXECUTOR_NUMBER}" \) ) || /bin/true
- CPUSET_CPUS_UPPER_BOUND=$(expr "${CPUSET_CPUS_LOWER_BOUND}" +
"${CPUS_PER_EXECUTOR}" - 1) || /bin/true
- CPUSET_CPUS="${CPUSET_CPUS_LOWER_BOUND}-${CPUSET_CPUS_UPPER_BOUND}"
- echo "COMPUTE TOTAL_CPUS=${TOTAL_CPUS}
CPUS_PER_EXECUTOR=${CPUS_PER_EXECUTOR}
CPUSET_CPUS_LOWER_BOUND=${CPUSET_CPUS_LOWER_BOUND}
CPUSET_CPUS_UPPER_BOUND=${CPUSET_CPUS_UPPER_BOUND}"
else
- echo "WARNING: CI_NUM_EXECUTORS environment variable not set."
- echo "No CPU parallism will be used in this CI build, so it may be
quite slow."
+ TOTAL_CPUS=$(nproc)
+ CI_CPUSET_LOWER_BOUND=0
fi
+ CPUS_PER_EXECUTOR=$(expr "${TOTAL_CPUS}" / "${CI_NUM_EXECUTORS}")
+ # NOTE: Expr exit status varies by the computed value (good and bad!).
+ CPUSET_CPUS_LOWER_BOUND=$(expr "${CI_CPUSET_LOWER_BOUND}" + \(
"${CPUS_PER_EXECUTOR}" '*' "${EXECUTOR_NUMBER}" \) ) || /bin/true
+ CPUSET_CPUS_UPPER_BOUND=$(expr "${CPUSET_CPUS_LOWER_BOUND}" +
"${CPUS_PER_EXECUTOR}" - 1) || /bin/true
+ CPUSET_CPUS="${CPUSET_CPUS_LOWER_BOUND}-${CPUSET_CPUS_UPPER_BOUND}"
+ echo "COMPUTE TOTAL_CPUS=${TOTAL_CPUS}
CPUS_PER_EXECUTOR=${CPUS_PER_EXECUTOR}
CPUSET_CPUS_LOWER_BOUND=${CPUSET_CPUS_LOWER_BOUND}
CPUSET_CPUS_UPPER_BOUND=${CPUSET_CPUS_UPPER_BOUND}"
fi
if [ -n "${CPUSET_CPUS}" ]; then