Unverified Commit cc9f1d6d authored by Muyang Li's avatar Muyang Li Committed by GitHub
Browse files

chore: support torch2.8 wheels (#590)

parent be8a7ba2
...@@ -77,7 +77,7 @@ jobs: ...@@ -77,7 +77,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python: ["3.10", "3.11", "3.12"] python: ["3.10", "3.11", "3.12"]
torch: ["2.5", "2.6", "2.7", "2.8"] torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
steps: steps:
- name: Checkout to the tag - name: Checkout to the tag
uses: actions/checkout@v4 uses: actions/checkout@v4
...@@ -89,13 +89,13 @@ jobs: ...@@ -89,13 +89,13 @@ jobs:
run: git log -1 --oneline run: git log -1 --oneline
- name: Build wheels - name: Build wheels
run: | run: |
if [[ "${{ matrix.torch }}" == "2.7" ]]; then if [[ "${{ matrix.torch }}" == "2.7" || "${{ matrix.torch }}" == "2.8" ]]; then
cuda_version="12.8" cuda_version="12.8"
else else
cuda_version="12.4" cuda_version="12.4"
fi fi
if [[ "${{ matrix.torch }}" == "2.8" ]]; then if [[ "${{ matrix.torch }}" == "2.9" ]]; then
bash scripts/build_linux_wheel_torch2.8.sh ${{ matrix.python }} ${{ matrix.torch }} 12.8 bash scripts/build_linux_wheel_torch_nightly.sh ${{ matrix.python }} ${{ matrix.torch }} 12.8
else else
bash scripts/build_linux_wheel.sh ${{ matrix.python }} ${{ matrix.torch }} $cuda_version bash scripts/build_linux_wheel.sh ${{ matrix.python }} ${{ matrix.torch }} $cuda_version
fi fi
...@@ -119,7 +119,7 @@ jobs: ...@@ -119,7 +119,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python: ["3.10", "3.11", "3.12"] python: ["3.10", "3.11", "3.12"]
torch: ["2.5", "2.6", "2.7", "2.8"] torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
steps: steps:
- name: Checkout to the tag - name: Checkout to the tag
uses: actions/checkout@v4 uses: actions/checkout@v4
...@@ -134,14 +134,14 @@ jobs: ...@@ -134,14 +134,14 @@ jobs:
run: | run: |
SET TORCH_VERSION=${{ matrix.torch }} SET TORCH_VERSION=${{ matrix.torch }}
SET PYTHON_VERSION=${{ matrix.python }} SET PYTHON_VERSION=${{ matrix.python }}
IF "%TORCH_VERSION%"=="2.7" ( IF "%TORCH_VERSION%"=="2.7" OR "%TORCH_VERSION%"=="2.8" (
SET CUDA_VERSION=12.8 SET CUDA_VERSION=12.8
) ELSE ( ) ELSE (
SET CUDA_VERSION=12.4 SET CUDA_VERSION=12.4
) )
call C:\Users\muyangl\miniconda3\condabin\activate.bat activate call C:\Users\muyangl\miniconda3\condabin\activate.bat activate
IF "%TORCH_VERSION%"=="2.8" ( IF "%TORCH_VERSION%"=="2.9" (
call scripts\build_windows_wheel_torch2.8.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION% call scripts\build_windows_wheel_torch_nightly.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%
) ELSE ( ) ELSE (
call scripts\build_windows_wheel.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION% call scripts\build_windows_wheel.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%
) )
......
...@@ -20,8 +20,12 @@ elif [ "$TORCH_VERSION" == "2.7" ]; then ...@@ -20,8 +20,12 @@ elif [ "$TORCH_VERSION" == "2.7" ]; then
TORCHVISION_VERSION="0.22" TORCHVISION_VERSION="0.22"
TORCHAUDIO_VERSION="2.7" TORCHAUDIO_VERSION="2.7"
echo "TORCH_VERSION is 2.7, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION" echo "TORCH_VERSION is 2.7, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
elif [ "$TORCH_VERSION" == "2.8" ]; then
TORCHVISION_VERSION="0.23"
TORCHAUDIO_VERSION="2.8"
echo "TORCH_VERSION is 2.8, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
else else
echo "TORCH_VERSION is not 2.5, 2.6 or 2.7, no changes to versions." echo "TORCH_VERSION is not 2.5, 2.6, 2.7 or 2.8, no changes to versions."
fi fi
docker run --rm \ docker run --rm \
......
...@@ -7,13 +7,13 @@ CUDA_VERSION=$3 ...@@ -7,13 +7,13 @@ CUDA_VERSION=$3
MAX_JOBS=${4:-} # optional MAX_JOBS=${4:-} # optional
PYTHON_ROOT_PATH=/opt/python/cp${PYTHON_VERSION//.}-cp${PYTHON_VERSION//.} PYTHON_ROOT_PATH=/opt/python/cp${PYTHON_VERSION//.}-cp${PYTHON_VERSION//.}
if [ "$TORCH_VERSION" == "2.8" ]; then # if [ "$TORCH_VERSION" == "2.9" ]; then
TORCHVISION_VERSION="0.23" # TORCHVISION_VERSION="0.24"
TORCHAUDIO_VERSION="2.8" # TORCHAUDIO_VERSION="2.9"
echo "TORCH_VERSION is 2.8, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION" # echo "TORCH_VERSION is 2.8, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
else # else
echo "TORCH_VERSION is not 2.8, no changes to versions." # echo "TORCH_VERSION is not 2.8, no changes to versions."
fi # fi
docker run --rm \ docker run --rm \
-v "$(pwd)":/nunchaku \ -v "$(pwd)":/nunchaku \
......
...@@ -19,8 +19,11 @@ if "%TORCH_VERSION%"=="2.5" ( ...@@ -19,8 +19,11 @@ if "%TORCH_VERSION%"=="2.5" (
) else if "%TORCH_VERSION%"=="2.7" ( ) else if "%TORCH_VERSION%"=="2.7" (
set TORCHVISION_VERSION=0.22 set TORCHVISION_VERSION=0.22
set TORCHAUDIO_VERSION=2.7 set TORCHAUDIO_VERSION=2.7
) else if "%TORCH_VERSION%"=="2.8" (
set TORCHVISION_VERSION=0.23
set TORCHAUDIO_VERSION=2.8
) else ( ) else (
echo TORCH_VERSION is not 2.5, 2.6 or 2.7, no changes to versions. echo TORCH_VERSION is not 2.5, 2.6, 2.7 or 2.8, no changes to versions.
) )
echo setting TORCHVISION_VERSION to %TORCHVISION_VERSION% and TORCHAUDIO_VERSION to %TORCHAUDIO_VERSION% echo setting TORCHVISION_VERSION to %TORCHVISION_VERSION% and TORCHAUDIO_VERSION to %TORCHAUDIO_VERSION%
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment