Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Update Python version in CI due to Python 3.8 EOL #3109

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions ci/jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ run_cuda = "bash ci/bash.sh mlcaidev/ci-cu121:4d61e5d -e GPU cuda-12.1 -e MLC_CI
run_rocm = "bash ci/bash.sh mlcaidev/ci-rocm57:4d61e5d -e GPU rocm-5.7 -e MLC_CI_SETUP_DEPS 1"

pkg_cpu = "bash ci/bash.sh mlcaidev/package-rocm61:254d630 -e GPU cpu -e MLC_CI_SETUP_DEPS 1"
pkg_cuda = "bash ci/bash.sh mlcaidev/package-cu122:254d630 -e GPU cuda-12.2 -e MLC_CI_SETUP_DEPS 1"
pkg_cuda = "bash ci/bash.sh mlcaidev/package-cu124:827547a -e GPU cuda-12.4 -e MLC_CI_SETUP_DEPS 1"
pkg_rocm = "bash ci/bash.sh mlcaidev/package-rocm61:254d630 -e GPU rocm-6.1 -e MLC_CI_SETUP_DEPS 1"


Expand Down 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-cu124
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
2 changes: 1 addition & 1 deletion ci/task/test_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly-cu124
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH
fi

Expand Down
Loading