Skip to content

Commit

Permalink
[CI] Update Python version in CI due to Python 3.8 EOL
Browse files Browse the repository at this point in the history
This PR updates the CI for Python version bump, as Python 3.8 reaches
its end of life.
  • Loading branch information
MasterJH5574 committed Jan 25, 2025
1 parent 00f5303 commit a50d6f3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
48 changes: 24 additions & 24 deletions ci/jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ stage('Build') {
ws(per_exec_ws('mlc-llm-build-cuda')) {
init_git(true)
sh(script: "ls -alh", label: 'Show work directory')
sh(script: "${pkg_cuda} conda env export --name py38", label: 'Checkout version')
sh(script: "${pkg_cuda} -j 8 -v \$HOME/.ccache /ccache conda run -n py38 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
sh(script: "${pkg_cuda} -j 8 conda run -n py38 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
sh(script: "${pkg_cuda} -j 1 conda run -n py38 ./ci/task/build_clean.sh", label: 'Clean up after build')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cuda} -j 8 -v \$HOME/.ccache /ccache conda run -n py310 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
sh(script: "${pkg_cuda} -j 8 conda run -n py310 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
sh(script: "${pkg_cuda} -j 1 conda run -n py310 ./ci/task/build_clean.sh", label: 'Clean up after build')
sh(script: "ls -alh ./wheels/", label: 'Build artifact')
pack_lib('mlc_wheel_cuda', 'wheels/*.whl')
}
Expand All @@ -137,10 +137,10 @@ stage('Build') {
// ws(per_exec_ws('mlc-llm-build-rocm')) {
// init_git(true)
// sh(script: "ls -alh", label: 'Show work directory')
// sh(script: "${pkg_rocm} conda env export --name py38", label: 'Checkout version')
// sh(script: "${pkg_rocm} -j 8 conda run -n py38 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
// sh(script: "${pkg_rocm} -j 8 conda run -n py38 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
// sh(script: "${pkg_rocm} -j 1 conda run -n py38 ./ci/task/build_clean.sh", label: 'Clean up after build')
// sh(script: "${pkg_rocm} conda env export --name py310", label: 'Checkout version')
// sh(script: "${pkg_rocm} -j 8 conda run -n py310 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
// sh(script: "${pkg_rocm} -j 8 conda run -n py310 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
// sh(script: "${pkg_rocm} -j 1 conda run -n py310 ./ci/task/build_clean.sh", label: 'Clean up after build')
// sh(script: "ls -alh ./wheels/", label: 'Build artifact')
// pack_lib('mlc_wheel_rocm', 'wheels/*.whl')
// }
Expand All @@ -165,10 +165,10 @@ stage('Build') {
ws(per_exec_ws('mlc-llm-build-vulkan')) {
init_git(true)
sh(script: "ls -alh", label: 'Show work directory')
sh(script: "${pkg_cpu} conda env export --name py38", label: 'Checkout version')
sh(script: "${pkg_cpu} -j 8 conda run -n py38 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
sh(script: "${pkg_cpu} -j 8 conda run -n py38 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
sh(script: "${pkg_cpu} -j 1 conda run -n py38 ./ci/task/build_clean.sh", label: 'Clean up after build')
sh(script: "${pkg_cpu} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cpu} -j 8 conda run -n py310 ./ci/task/build_lib.sh", label: 'Build MLC LLM runtime')
sh(script: "${pkg_cpu} -j 8 conda run -n py310 ./ci/task/build_wheel.sh", label: 'Build MLC LLM wheel')
sh(script: "${pkg_cpu} -j 1 conda run -n py310 ./ci/task/build_clean.sh", label: 'Clean up after build')
sh(script: "ls -alh ./wheels/", label: 'Build artifact')
pack_lib('mlc_wheel_vulkan', 'wheels/*.whl')
}
Expand All @@ -185,8 +185,8 @@ stage('Unittest') {
init_git(false)
sh(script: "ls -alh", label: 'Show work directory')
unpack_lib('mlc_wheel_cuda', 'wheels/*.whl')
sh(script: "${run_cuda} conda env export --name ci-unittest", label: 'Checkout version')
sh(script: "${run_cuda} conda run -n ci-unittest ./ci/task/test_unittest.sh", label: 'Testing')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cuda} conda run -n py310 ./ci/task/test_unittest.sh", label: 'Testing')
}
}
}
Expand All @@ -201,8 +201,8 @@ stage('Model Compilation') {
init_git(false)
sh(script: "ls -alh", label: 'Show work directory')
unpack_lib('mlc_wheel_cuda', 'wheels/*.whl')
sh(script: "${run_cuda} conda env export --name ci-unittest", label: 'Checkout version')
sh(script: "${run_cuda} -j 4 conda run -n ci-unittest ./ci/task/test_model_compile.sh", label: 'Testing')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cuda} -j 4 conda run -n py310 ./ci/task/test_model_compile.sh", label: 'Testing')
}
}
},
Expand All @@ -212,8 +212,8 @@ stage('Model Compilation') {
// init_git(false)
// sh(script: "ls -alh", label: 'Show work directory')
// unpack_lib('mlc_wheel_rocm', 'wheels/*.whl')
// sh(script: "${run_rocm} conda env export --name ci-unittest", label: 'Checkout version')
// sh(script: "${run_rocm} -j 4 conda run -n ci-unittest ./ci/task/test_model_compile.sh", label: 'Testing')
// sh(script: "${run_rocm} conda env export --name py310", label: 'Checkout version')
// sh(script: "${run_rocm} -j 4 conda run -n py310 ./ci/task/test_model_compile.sh", label: 'Testing')
// }
// }
// },
Expand All @@ -234,8 +234,8 @@ stage('Model Compilation') {
init_git(false)
sh(script: "ls -alh", label: 'Show work directory')
unpack_lib('mlc_wheel_vulkan', 'wheels/*.whl')
sh(script: "${run_cpu} conda env export --name ci-unittest", label: 'Checkout version')
// sh(script: "${run_cpu} -j 4 conda run -n ci-unittest ./ci/task/test_model_compile.sh", label: 'Testing')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
// sh(script: "${pkg_cuda} -j 4 conda run -n py310 ./ci/task/test_model_compile.sh", label: 'Testing')
}
}
},
Expand All @@ -245,8 +245,8 @@ stage('Model Compilation') {
init_git(true)
sh(script: "ls -alh", label: 'Show work directory')
unpack_lib('mlc_wheel_vulkan', 'wheels/*.whl')
sh(script: "${run_cpu} conda env export --name ci-unittest", label: 'Checkout version')
sh(script: "${run_cpu} -j 8 -e GPU wasm conda run -n ci-unittest ./ci/task/test_model_compile.sh", label: 'Testing')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cuda} -j 8 -e GPU wasm conda run -n py310 ./ci/task/test_model_compile.sh", label: 'Testing')
}
}
},
Expand All @@ -267,8 +267,8 @@ stage('Model Compilation') {
init_git(false)
sh(script: "ls -alh", label: 'Show work directory')
unpack_lib('mlc_wheel_vulkan', 'wheels/*.whl')
sh(script: "${run_cpu} conda env export --name ci-unittest", label: 'Checkout version')
sh(script: "${run_cpu} -j 4 -e GPU android conda run -n ci-unittest ./ci/task/test_model_compile.sh", label: 'Testing')
sh(script: "${pkg_cuda} conda env export --name py310", label: 'Checkout version')
sh(script: "${pkg_cuda} -j 4 -e GPU android conda run -n py310 ./ci/task/test_model_compile.sh", label: 'Testing')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/task/pylint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export PYTHONPATH="./python":${PYTHONPATH:-""}
if [[ -n ${MLC_CI_SETUP_DEPS:-} ]]; then
echo "MLC_CI_SETUP_DEPS=1 start setup deps"
# TVM Unity is a dependency to this testing
pip install --quiet --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --quiet --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --quiet --pre -U cuda-python
fi

Expand Down
10 changes: 5 additions & 5 deletions ci/task/test_model_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ pip install --force-reinstall wheels/*.whl

if [[ ${GPU} == cuda* ]]; then
TARGET=cuda
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu123
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH
elif [[ ${GPU} == rocm* ]]; then
TARGET=rocm
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-rocm57
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-rocm57
elif [[ ${GPU} == metal ]]; then
TARGET=metal
pip install --pre -U --force-reinstall -f https://mlc.ai/wheels mlc-ai-nightly-cpu
elif [[ ${GPU} == wasm* ]]; then
TARGET=wasm
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
export TVM_SOURCE_DIR=$(dirname $(python -c 'import tvm; print(tvm.__file__)'))
export TVM_HOME=${TVM_SOURCE_DIR}
export MLC_LLM_SOURCE_DIR=$(pwd)
Expand All @@ -30,11 +30,11 @@ elif [[ ${GPU} == ios ]]; then
pip install --pre -U --force-reinstall -f https://mlc.ai/wheels mlc-ai-nightly-cpu
elif [[ ${GPU} == android* ]]; then
TARGET=android
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
source /android_env_vars.sh
else
TARGET=vulkan
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cpu
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cpu
fi

python tests/python/integration/test_model_compile.py $TARGET $NUM_THREADS
4 changes: 2 additions & 2 deletions ci/task/test_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ if [[ -n ${MLC_CI_SETUP_DEPS:-} ]]; then
# Install dependency
pip install --force-reinstall wheels/*.whl
pip install --quiet pytest
pip install --pre -U --no-index -f https://mlc.ai/wheels mlc-ai-nightly-cu123
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu123
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
fi

# run all tests that are categorized as "unittest"
Expand Down

0 comments on commit a50d6f3

Please sign in to comment.