Skip to content

Commit 382a4d7

Browse files
authored
ci: select 2_28 manylinux builder for new torch+cuda versions (#1000)
torch 2.6 + cu126 and later torch versions uses manylinux_2_28 instead of manylinux_2014 and we have to select manylinux_2_28 docker images for new versions. Ref: https://dev-discuss.pytorch.org/t/pytorch-linux-wheels-switching-to-new-wheel-build-platform-manylinux-2-28-on-november-12-2024/2581 cc @abcdabcd987 @zhyncs
1 parent 592b110 commit 382a4d7

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.github/workflows/release_wheel.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,25 @@ jobs:
4646
with:
4747
submodules: true
4848

49+
- name: Set torch and cuda version value
50+
id: set_torch_and_cuda_version
51+
run: |
52+
IFS='.' read -r major minor <<< "${{ matrix.torch }}"
53+
version_value=$((major * 100 + minor))
54+
echo "TORCH_VERSION=$version_value" >> $GITHUB_OUTPUT
55+
IFS='.' read -r major minor <<< "${{ matrix.cuda }}"
56+
version_value=$((major * 100 + minor))
57+
echo "CUDA_VERSION=$version_value" >> $GITHUB_OUTPUT
58+
4959
- name: Build wheel
60+
env:
61+
TORCH_VERSION: ${{ steps.set_torch_and_cuda_version.outputs.TORCH_VERSION }}
62+
CUDA_VERSION: ${{ steps.set_torch_and_cuda_version.outputs.CUDA_VERSION }}
63+
BUILDER_IMAGE: ${{ ((steps.set_torch_and_cuda_version.outputs.TORCH_VERSION == 206 && steps.set_torch_and_cuda_version.outputs.CUDA_VERSION >= 1206) || steps.set_torch_and_cuda_version.outputs.TORCH_VERSION > 206) && 'pytorch/manylinux2_28-builder:cuda' || 'pytorch/manylinux-builder:cuda' }}${{ matrix.cuda }}
5064
run: |
65+
echo "TORCH_VERSION: $TORCH_VERSION"
66+
echo "CUDA_VERSION: $CUDA_VERSION"
67+
echo "BUILDER_IMAGE: $BUILDER_IMAGE"
5168
chown -R $CI_UID:$CI_GID "$GITHUB_WORKSPACE"
5269
docker run --rm -t \
5370
-v "$CI_RUNNER_CACHE_DIR":/ci-cache \
@@ -59,7 +76,7 @@ jobs:
5976
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
6077
-e MAX_JOBS=128 \
6178
--user $CI_UID:$CI_GID \
62-
pytorch/manylinux-builder:cuda${{ matrix.cuda }} \
79+
$BUILDER_IMAGE \
6380
bash /app/scripts/run-ci-build-wheel.sh
6481
timeout-minutes: 120
6582
- run: du -h dist/*

.github/workflows/release_wheel_sglang.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,25 @@ jobs:
3131
with:
3232
submodules: true
3333

34+
- name: Set torch and cuda version value
35+
id: set_torch_and_cuda_version
36+
run: |
37+
IFS='.' read -r major minor <<< "${{ matrix.torch }}"
38+
version_value=$((major * 100 + minor))
39+
echo "TORCH_VERSION=$version_value" >> $GITHUB_OUTPUT
40+
IFS='.' read -r major minor <<< "${{ matrix.cuda }}"
41+
version_value=$((major * 100 + minor))
42+
echo "CUDA_VERSION=$version_value" >> $GITHUB_OUTPUT
43+
3444
- name: Build wheel
45+
env:
46+
TORCH_VERSION: ${{ steps.set_torch_and_cuda_version.outputs.TORCH_VERSION }}
47+
CUDA_VERSION: ${{ steps.set_torch_and_cuda_version.outputs.CUDA_VERSION }}
48+
BUILDER_IMAGE: ${{ ((steps.set_torch_and_cuda_version.outputs.TORCH_VERSION == 206 && steps.set_torch_and_cuda_version.outputs.CUDA_VERSION >= 1206) || steps.set_torch_and_cuda_version.outputs.TORCH_VERSION > 206) && 'pytorch/manylinux2_28-builder:cuda' || 'pytorch/manylinux-builder:cuda' }}${{ matrix.cuda }}
3549
run: |
50+
echo "TORCH_VERSION: $TORCH_VERSION"
51+
echo "CUDA_VERSION: $CUDA_VERSION"
52+
echo "BUILDER_IMAGE: $BUILDER_IMAGE"
3653
chown -R $CI_UID:$CI_GID "$GITHUB_WORKSPACE"
3754
docker run --rm -t \
3855
-v "$CI_RUNNER_CACHE_DIR":/ci-cache \
@@ -45,7 +62,7 @@ jobs:
4562
-e TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" \
4663
-e MAX_JOBS=128 \
4764
--user $CI_UID:$CI_GID \
48-
pytorch/manylinux-builder:cuda${{ matrix.cuda }} \
65+
$BUILDER_IMAGE \
4966
bash /app/scripts/run-ci-build-wheel.sh
5067
timeout-minutes: 120
5168
- run: du -h dist/*

0 commit comments

Comments
 (0)