Skip to content

Commit 1c27ccf

Browse files
authored
[CI] Drop redundant cmake/ninja install from the Linux wheel CUDA sidecar (#19761)
This pr is the follow-up pr of #19754. It removes the redundant `pip install -U pip cmake ninja` (since those are already installed in docker) and the unused python_bin variable, and update the comment to match: the image provides the build tools, and PATH only needs the bundled CPython (for the configure) plus the CUDA toolchain (for nvcc). Also fixs a stale comment in the Windows sidecar: it claimed the conda 13.0.2 pin matched the Linux hook, but the Linux side is now CUDA 13.1 (from the image). The win-64 nvidia channel still caps at 13.0.x, so Windows stays on 13.0.2 -- slightly behind Linux but harmless, since the sidecar has no device code and links the CUDA runtime by soname only. The Windows pip install is kept: that build uses the Ninja generator and runs on a runner without the prebuilt CUDA image.
1 parent 07fe3fe commit 1c27ccf

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

ci/scripts/package/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ and `[tool.scikit-build]`). This directory holds the few helper scripts that flo
2323
invokes:
2424

2525
- `manylinux_build_libtvm_runtime_cuda.sh` — run by the `build_cuda_runtime` CI
26-
stage; builds the `libtvm_runtime_cuda.so` sidecar inside the manylinux container.
26+
stage; builds the `libtvm_runtime_cuda.so` sidecar inside the prebuilt
27+
`quay.io/manylinux_cuda` image (CUDA toolkit preinstalled).
2728
- `windows_build_libtvm_runtime_cuda.bat` — the Windows equivalent (run with
28-
`shell: cmd`), building `tvm_runtime_cuda.dll`.
29+
`shell: cmd`); installs the CUDA toolkit via conda and builds
30+
`tvm_runtime_cuda.dll`.
2931
- `build-environment.yaml` — conda environment for building the wheel.

ci/scripts/package/manylinux_build_libtvm_runtime_cuda.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ set -euxo pipefail
2727

2828
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
2929
build_dir="${repo_root}/build-wheel-cuda"
30-
python_bin="/opt/python/cp310-cp310/bin/python"
3130
parallel="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)"
3231

3332
# Build the CUDA runtime sidecar with CUDA on and LLVM off, so it does not need
34-
# the LLVM prefix; the main CPU wheel links LLVM statically. pip-install
35-
# cmake/ninja rather than relying on whatever the image ships.
33+
# the LLVM prefix; the main CPU wheel links LLVM statically. The manylinux CUDA
34+
# image already ships cmake and make, and the build uses the default Makefiles
35+
# generator (no Ninja), so no build tools are installed here. Put the bundled
36+
# CPython and CUDA toolchain on PATH for the CMake configure and nvcc.
3637
export PATH="/opt/python/cp310-cp310/bin:/usr/local/cuda/bin:${PATH}"
37-
"${python_bin}" -m pip install -U pip cmake ninja
3838
nvcc --version
3939

4040
rm -rf "${build_dir}"

ci/scripts/package/windows_build_libtvm_runtime_cuda.bat

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ set "conda_exe=conda"
3636
where conda >nul 2>nul || set "conda_exe=%CONDA%\Scripts\conda.exe"
3737

3838
rem Install the pinned CUDA toolkit via conda from the nvidia channel, mirroring the
39-
rem LLVM-via-conda install used elsewhere. The win-64 channel caps at 13.0.x, matching
40-
rem the Linux hook's CUDA 13.0.2. The nvidia CDN occasionally returns a transient
41-
rem HTTP 5xx, so retry once; a half-finished first attempt can leave the prefix
42-
rem partially populated, so wipe it before retrying.
39+
rem LLVM-via-conda install used elsewhere. The win-64 channel caps at 13.0.x, so this
40+
rem pins 13.0.2 -- slightly behind the Linux image's CUDA 13.1, which is harmless: the
41+
rem sidecar has no device code and links the CUDA runtime by soname only. The nvidia
42+
rem CDN occasionally returns a transient HTTP 5xx, so retry once; a half-finished first
43+
rem attempt can leave the prefix partially populated, so wipe it before retrying.
4344
if not exist "%cuda_prefix%\Library\bin\nvcc.exe" (
4445
call "%conda_exe%" create -q -p "%cuda_prefix%" -c nvidia/label/cuda-13.0.2 cuda-toolkit -y
4546
if errorlevel 1 (

0 commit comments

Comments
 (0)