From 428d620005901bd6496383210df8cd60e771359a Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Fri, 19 Jan 2024 07:23:17 -0800 Subject: [PATCH 1/5] [CI] update image tag to 20240119-070113-614a7a9e3 --- ci/jenkins/docker-images.ini | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini index c2c118a79795..4a4948f218c3 100644 --- a/ci/jenkins/docker-images.ini +++ b/ci/jenkins/docker-images.ini @@ -17,13 +17,13 @@ # This data file is read during when Jenkins runs job to determine docker images. [jenkins] -ci_arm: tlcpack/ci-arm:20240105-165030-51bdaec6 -ci_cortexm: tlcpack/ci-cortexm:20240105-165030-51bdaec6 -ci_cpu: tlcpack/ci-cpu:20240105-165030-51bdaec6 -ci_gpu: tlcpack/ci-gpu:20240105-165030-51bdaec6 -ci_hexagon: tlcpack/ci-hexagon:20240105-165030-51bdaec6 -ci_i386: tlcpack/ci-i386:20240105-165030-51bdaec6 -ci_lint: tlcpack/ci-lint:20240105-165030-51bdaec6 -ci_minimal: tlcpack/ci-minimal:20240105-165030-51bdaec6 -ci_riscv: tlcpack/ci-riscv:20240105-165030-51bdaec6 -ci_wasm: tlcpack/ci-wasm:20240105-165030-51bdaec6 +ci_arm: tlcpack/ci-arm:20240119-070113-614a7a9e3 +ci_cortexm: tlcpack/ci-cortexm:20240119-070113-614a7a9e3 +ci_cpu: tlcpack/ci-cpu:20240119-070113-614a7a9e3 +ci_gpu: tlcpack/ci-gpu:20240119-070113-614a7a9e3 +ci_hexagon: tlcpack/ci-hexagon:20240119-070113-614a7a9e3 +ci_i386: tlcpack/ci-i386:20240119-070113-614a7a9e3 +ci_lint: tlcpack/ci-lint:20240119-070113-614a7a9e3 +ci_minimal: tlcpack/ci-minimal:20240119-070113-614a7a9e3 +ci_riscv: tlcpack/ci-riscv:20240119-070113-614a7a9e3 +ci_wasm: tlcpack/ci-wasm:20240119-070113-614a7a9e3 From 7f25768346538f8d029de22576ed92a7a6d95d39 Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Fri, 19 Jan 2024 20:58:04 -0800 Subject: [PATCH 2/5] Add sccache region --- ci/jenkins/generated/arm_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/cortexm_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/cpu_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/docker_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/gpu_jenkinsfile.groovy | 7 +++++-- ci/jenkins/generated/hexagon_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/i386_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/lint_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/minimal_cross_isa_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/minimal_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/riscv_jenkinsfile.groovy | 5 ++++- ci/jenkins/generated/wasm_jenkinsfile.groovy | 5 ++++- ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 | 2 +- ci/jenkins/templates/utils/Build.groovy.j2 | 5 ++++- ci/jenkins/unity_jenkinsfile.groovy | 2 +- tests/scripts/task_build.py | 3 +++ 16 files changed, 58 insertions(+), 16 deletions(-) diff --git a/ci/jenkins/generated/arm_jenkinsfile.groovy b/ci/jenkins/generated/arm_jenkinsfile.groovy index 80b2e59a812c..199619bed0d8 100644 --- a/ci/jenkins/generated/arm_jenkinsfile.groovy +++ b/ci/jenkins/generated/arm_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/cortexm_jenkinsfile.groovy b/ci/jenkins/generated/cortexm_jenkinsfile.groovy index c7b452723089..8f2c3ace05ea 100644 --- a/ci/jenkins/generated/cortexm_jenkinsfile.groovy +++ b/ci/jenkins/generated/cortexm_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/cpu_jenkinsfile.groovy b/ci/jenkins/generated/cpu_jenkinsfile.groovy index f26a69109f63..8e90daa6d2b7 100644 --- a/ci/jenkins/generated/cpu_jenkinsfile.groovy +++ b/ci/jenkins/generated/cpu_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/docker_jenkinsfile.groovy b/ci/jenkins/generated/docker_jenkinsfile.groovy index 2aa6a173620e..dbef6d2cae54 100644 --- a/ci/jenkins/generated/docker_jenkinsfile.groovy +++ b/ci/jenkins/generated/docker_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/gpu_jenkinsfile.groovy b/ci/jenkins/generated/gpu_jenkinsfile.groovy index 7454bb0d90c0..95448b779815 100644 --- a/ci/jenkins/generated/gpu_jenkinsfile.groovy +++ b/ci/jenkins/generated/gpu_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } @@ -631,7 +634,7 @@ def shard_run_unittest_GPU_1_of_3(node_type='GPU-SPOT', on_demand=false) { make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) sh ( - script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", + script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --cmake-target opencl-cpptest --build-dir build", label: 'Make OpenCL cpp unit tests', ) sh ( diff --git a/ci/jenkins/generated/hexagon_jenkinsfile.groovy b/ci/jenkins/generated/hexagon_jenkinsfile.groovy index e63f6fb14b19..9f1e13fb8a56 100644 --- a/ci/jenkins/generated/hexagon_jenkinsfile.groovy +++ b/ci/jenkins/generated/hexagon_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/i386_jenkinsfile.groovy b/ci/jenkins/generated/i386_jenkinsfile.groovy index c6eeba186115..cd0e43ee520b 100644 --- a/ci/jenkins/generated/i386_jenkinsfile.groovy +++ b/ci/jenkins/generated/i386_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/lint_jenkinsfile.groovy b/ci/jenkins/generated/lint_jenkinsfile.groovy index 64cda41994a3..80dc952187d7 100644 --- a/ci/jenkins/generated/lint_jenkinsfile.groovy +++ b/ci/jenkins/generated/lint_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/minimal_cross_isa_jenkinsfile.groovy b/ci/jenkins/generated/minimal_cross_isa_jenkinsfile.groovy index 6a878b21ee50..5a7b85c762dc 100644 --- a/ci/jenkins/generated/minimal_cross_isa_jenkinsfile.groovy +++ b/ci/jenkins/generated/minimal_cross_isa_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/minimal_jenkinsfile.groovy b/ci/jenkins/generated/minimal_jenkinsfile.groovy index cdca556bd038..fb649ea1b6d7 100644 --- a/ci/jenkins/generated/minimal_jenkinsfile.groovy +++ b/ci/jenkins/generated/minimal_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/riscv_jenkinsfile.groovy b/ci/jenkins/generated/riscv_jenkinsfile.groovy index d378a7a5999a..26f6aad9466c 100644 --- a/ci/jenkins/generated/riscv_jenkinsfile.groovy +++ b/ci/jenkins/generated/riscv_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/generated/wasm_jenkinsfile.groovy b/ci/jenkins/generated/wasm_jenkinsfile.groovy index 1dea6599d0bc..7deb5898efcb 100644 --- a/ci/jenkins/generated/wasm_jenkinsfile.groovy +++ b/ci/jenkins/generated/wasm_jenkinsfile.groovy @@ -493,10 +493,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -510,6 +512,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -519,7 +522,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 index fe05e601727f..65c06b0088de 100644 --- a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 +++ b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 @@ -65,7 +65,7 @@ make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) sh ( - script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", + script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --cmake-target opencl-cpptest --build-dir build", label: 'Make OpenCL cpp unit tests', ) sh ( diff --git a/ci/jenkins/templates/utils/Build.groovy.j2 b/ci/jenkins/templates/utils/Build.groovy.j2 index 14de5faa3034..311222747410 100644 --- a/ci/jenkins/templates/utils/Build.groovy.j2 +++ b/ci/jenkins/templates/utils/Build.groovy.j2 @@ -25,10 +25,12 @@ def make_standalone_crt(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target standalone_crt \ --build-dir build ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target crttest \ --build-dir build """, @@ -42,6 +44,7 @@ def make_cpp_tests(image, build_dir) { set -eux ${docker_run} ${image} python3 ./tests/scripts/task_build.py \ --sccache-bucket tvm-sccache-prod \ + --sccache-region us-west-2 \ --cmake-target cpptest \ --build-dir ${build_dir} """, @@ -51,7 +54,7 @@ def make_cpp_tests(image, build_dir) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --build-dir ${path}", + script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2 --build-dir ${path}", label: 'Run cmake build', ) } diff --git a/ci/jenkins/unity_jenkinsfile.groovy b/ci/jenkins/unity_jenkinsfile.groovy index c36abd19cd14..1f0a4c53e2e9 100644 --- a/ci/jenkins/unity_jenkinsfile.groovy +++ b/ci/jenkins/unity_jenkinsfile.groovy @@ -290,7 +290,7 @@ def fsim_test(image) { def cmake_build(image, path, make_flag) { sh ( - script: "${docker_run} ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod", + script: "${docker_run} ${image} ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --sccache-region us-west-2", label: 'Run cmake build', ) } diff --git a/tests/scripts/task_build.py b/tests/scripts/task_build.py index 06d1e65a9602..f9cf2ffe0f8c 100755 --- a/tests/scripts/task_build.py +++ b/tests/scripts/task_build.py @@ -34,6 +34,7 @@ parser = argparse.ArgumentParser(description="List pytest nodeids for a folder") parser.add_argument("--sccache-bucket", required=False, help="sccache bucket name") + parser.add_argument("--sccache-region", required=False, help="sccache region") parser.add_argument("--build-dir", default="build", help="build folder") parser.add_argument("--cmake-target", help="optional build target") args = parser.parse_args() @@ -48,7 +49,9 @@ if use_sccache: if args.sccache_bucket: env["SCCACHE_BUCKET"] = args.sccache_bucket + env["SCCACHE_REGION"] = args.sccache_region logging.info(f"Using sccache bucket: {args.sccache_bucket}") + logging.info(f"Using sccache region: {args.sccache_region}") else: logging.info(f"No sccache bucket set, using local cache") env["CXX"] = "/opt/sccache/c++" From 482229c3d743a07a7b7c62f0c6fb8fe351f764fb Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Tue, 23 Jan 2024 14:43:53 -0800 Subject: [PATCH 3/5] add default sccache region --- tests/scripts/task_build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/scripts/task_build.py b/tests/scripts/task_build.py index f9cf2ffe0f8c..d06c05f70df4 100755 --- a/tests/scripts/task_build.py +++ b/tests/scripts/task_build.py @@ -49,9 +49,12 @@ if use_sccache: if args.sccache_bucket: env["SCCACHE_BUCKET"] = args.sccache_bucket - env["SCCACHE_REGION"] = args.sccache_region + env["SCCACHE_REGION"] = "us-west-2" + if args.sccache_region: + env["SCCACHE_REGION"] = args.sccache_region + logging.info(f"Using sccache bucket: {args.sccache_bucket}") - logging.info(f"Using sccache region: {args.sccache_region}") + logging.info(f"Using sccache region: {env['SCCACHE_REGION']}") else: logging.info(f"No sccache bucket set, using local cache") env["CXX"] = "/opt/sccache/c++" From 6bbeb7290b8aa5ef88301cf16cec1cc541e9bd55 Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Fri, 26 Jan 2024 16:23:28 -0800 Subject: [PATCH 4/5] Use local cache if no aws credential found for sccache bucket --- tests/scripts/task_build.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/scripts/task_build.py b/tests/scripts/task_build.py index d06c05f70df4..21560b4b1416 100755 --- a/tests/scripts/task_build.py +++ b/tests/scripts/task_build.py @@ -47,12 +47,9 @@ build_dir = build_dir.relative_to(REPO_ROOT) if use_sccache: - if args.sccache_bucket: + if args.sccache_bucket and "AWS_ACCESS_KEY_ID" in os.environ: env["SCCACHE_BUCKET"] = args.sccache_bucket - env["SCCACHE_REGION"] = "us-west-2" - if args.sccache_region: - env["SCCACHE_REGION"] = args.sccache_region - + env["SCCACHE_REGION"] = args.sccache_region if args.sccache_region else "us-west-2" logging.info(f"Using sccache bucket: {args.sccache_bucket}") logging.info(f"Using sccache region: {env['SCCACHE_REGION']}") else: From 54ad4516b7f58778c53c39bb243ad2ebfe440e0c Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Fri, 26 Jan 2024 19:31:19 -0800 Subject: [PATCH 5/5] Use newer images 20240126-070121-8ade9c30e --- ci/jenkins/docker-images.ini | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini index 4a4948f218c3..ac30cbf97355 100644 --- a/ci/jenkins/docker-images.ini +++ b/ci/jenkins/docker-images.ini @@ -17,13 +17,13 @@ # This data file is read during when Jenkins runs job to determine docker images. [jenkins] -ci_arm: tlcpack/ci-arm:20240119-070113-614a7a9e3 -ci_cortexm: tlcpack/ci-cortexm:20240119-070113-614a7a9e3 -ci_cpu: tlcpack/ci-cpu:20240119-070113-614a7a9e3 -ci_gpu: tlcpack/ci-gpu:20240119-070113-614a7a9e3 -ci_hexagon: tlcpack/ci-hexagon:20240119-070113-614a7a9e3 -ci_i386: tlcpack/ci-i386:20240119-070113-614a7a9e3 -ci_lint: tlcpack/ci-lint:20240119-070113-614a7a9e3 -ci_minimal: tlcpack/ci-minimal:20240119-070113-614a7a9e3 -ci_riscv: tlcpack/ci-riscv:20240119-070113-614a7a9e3 -ci_wasm: tlcpack/ci-wasm:20240119-070113-614a7a9e3 +ci_arm: tlcpack/ci-arm:20240126-070121-8ade9c30e +ci_cortexm: tlcpack/ci-cortexm:20240126-070121-8ade9c30e +ci_cpu: tlcpack/ci-cpu:20240126-070121-8ade9c30e +ci_gpu: tlcpack/ci-gpu:20240126-070121-8ade9c30e +ci_hexagon: tlcpack/ci-hexagon:20240126-070121-8ade9c30e +ci_i386: tlcpack/ci-i386:20240126-070121-8ade9c30e +ci_lint: tlcpack/ci-lint:20240126-070121-8ade9c30e +ci_minimal: tlcpack/ci-minimal:20240126-070121-8ade9c30e +ci_riscv: tlcpack/ci-riscv:20240126-070121-8ade9c30e +ci_wasm: tlcpack/ci-wasm:20240126-070121-8ade9c30e