Skip to content

Commit c017725

Browse files
authored
chore: support torch2.9, bump the version to 1.0.2 (#781)
1 parent b502a6b commit c017725

File tree

6 files changed

+25
-26
lines changed

6 files changed

+25
-26
lines changed

.github/workflows/nightly-build.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ jobs:
7777
strategy:
7878
matrix:
7979
python: ["3.10", "3.11", "3.12", "3.13"]
80-
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
81-
exclude:
82-
- python: "3.13"
83-
torch: "2.5"
80+
torch: ["2.7", "2.8", "2.9", "pre"]
8481
steps:
8582
- name: Checkout to the tag
8683
uses: actions/checkout@v4
@@ -92,12 +89,12 @@ jobs:
9289
run: git log -1 --oneline
9390
- name: Build wheels
9491
run: |
95-
if [[ "${{ matrix.torch }}" == "2.7" || "${{ matrix.torch }}" == "2.8" ]]; then
92+
if [[ "${{ matrix.torch }}" == "2.7" || "${{ matrix.torch }}" == "2.8" || "${{ matrix.torch }}" == "2.9" ]]; then
9693
cuda_version="12.8"
9794
else
9895
cuda_version="12.4"
9996
fi
100-
if [[ "${{ matrix.torch }}" == "2.9" ]]; then
97+
if [[ "${{ matrix.torch }}" == "pre" ]]; then
10198
bash scripts/build_linux_wheel_torch_nightly.sh ${{ matrix.python }} ${{ matrix.torch }} 12.8
10299
else
103100
bash scripts/build_linux_wheel.sh ${{ matrix.python }} ${{ matrix.torch }} $cuda_version
@@ -122,10 +119,7 @@ jobs:
122119
strategy:
123120
matrix:
124121
python: ["3.10", "3.11", "3.12", "3.13"]
125-
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
126-
exclude:
127-
- python: "3.13"
128-
torch: "2.5"
122+
torch: ["2.7", "2.8", "2.9", "pre"]
129123
steps:
130124
- name: Checkout to the tag
131125
uses: actions/checkout@v4
@@ -144,11 +138,13 @@ jobs:
144138
SET CUDA_VERSION=12.8
145139
) ELSE IF "%TORCH_VERSION%"=="2.8" (
146140
SET CUDA_VERSION=12.8
141+
) ELSE IF "%TORCH_VERSION%"=="2.9" (
142+
SET CUDA_VERSION=12.8
147143
) ELSE (
148144
SET CUDA_VERSION=12.4
149145
)
150146
call C:\Users\muyangl\miniconda3\condabin\activate.bat activate
151-
IF "%TORCH_VERSION%"=="2.9" (
147+
IF "%TORCH_VERSION%"=="pre" (
152148
call scripts\build_windows_wheel_torch_nightly.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%
153149
) ELSE (
154150
call scripts\build_windows_wheel.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%

.github/workflows/release-build.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ jobs:
5151
strategy:
5252
matrix:
5353
python: ["3.10", "3.11", "3.12", "3.13"]
54-
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
55-
exclude:
56-
- python: "3.13"
57-
torch: "2.5"
54+
torch: ["2.7", "2.8", "2.9", "pre"]
5855
steps:
5956
- name: Checkout to the tag
6057
uses: actions/checkout@v4
@@ -66,12 +63,12 @@ jobs:
6663
run: git log -1 --oneline
6764
- name: Build wheels
6865
run: |
69-
if [[ "${{ matrix.torch }}" == "2.7" || "${{ matrix.torch }}" == "2.8" ]]; then
66+
if [[ "${{ matrix.torch }}" == "2.7" || "${{ matrix.torch }}" == "2.8" || "${{ matrix.torch }}" == "2.9" ]]; then
7067
cuda_version="12.8"
7168
else
7269
cuda_version="12.4"
7370
fi
74-
if [[ "${{ matrix.torch }}" == "2.9" ]]; then
71+
if [[ "${{ matrix.torch }}" == "pre" ]]; then
7572
bash scripts/build_linux_wheel_torch_nightly.sh ${{ matrix.python }} ${{ matrix.torch }} 12.8
7673
else
7774
bash scripts/build_linux_wheel.sh ${{ matrix.python }} ${{ matrix.torch }} $cuda_version
@@ -107,10 +104,7 @@ jobs:
107104
strategy:
108105
matrix:
109106
python: ["3.10", "3.11", "3.12", "3.13"]
110-
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
111-
exclude:
112-
- python: "3.13"
113-
torch: "2.5"
107+
torch: ["2.7", "2.8", "2.9", "pre"]
114108
steps:
115109
- name: Checkout to the tag
116110
uses: actions/checkout@v4
@@ -129,11 +123,13 @@ jobs:
129123
SET CUDA_VERSION=12.8
130124
) ELSE IF "%TORCH_VERSION%"=="2.8" (
131125
SET CUDA_VERSION=12.8
126+
) ELSE IF "%TORCH_VERSION%"=="2.9" (
127+
SET CUDA_VERSION=12.8
132128
) ELSE (
133129
SET CUDA_VERSION=12.4
134130
)
135131
call C:\Users\muyangl\miniconda3\condabin\activate.bat activate
136-
IF "%TORCH_VERSION%"=="2.9" (
132+
IF "%TORCH_VERSION%"=="pre" (
137133
call scripts\build_windows_wheel_torch_nightly.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%
138134
) ELSE (
139135
call scripts\build_windows_wheel.cmd %PYTHON_VERSION% %TORCH_VERSION% %CUDA_VERSION%

nunchaku/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.1"
1+
__version__ = "1.0.2"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
requires = [
55
"ninja",
66
"setuptools",
7-
"torch>=2.5",
7+
"torch>=2.7",
88
"wheel",
99
]
1010

scripts/build_linux_wheel.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ elif [ "$TORCH_VERSION" == "2.8" ]; then
2424
TORCHVISION_VERSION="0.23"
2525
TORCHAUDIO_VERSION="2.8"
2626
echo "TORCH_VERSION is 2.8, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
27+
elif [ "$TORCH_VERSION" == "2.9" ]; then
28+
TORCHVISION_VERSION="0.24"
29+
TORCHAUDIO_VERSION="2.9"
30+
echo "TORCH_VERSION is 2.9, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
2731
else
28-
echo "TORCH_VERSION is not 2.5, 2.6, 2.7 or 2.8, no changes to versions."
32+
echo "TORCH_VERSION is not 2.5, 2.6, 2.7, 2.8 or 2.9, no changes to versions."
2933
fi
3034

3135
docker run --rm \

scripts/build_windows_wheel.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ if "%TORCH_VERSION%"=="2.5" (
2222
) else if "%TORCH_VERSION%"=="2.8" (
2323
set TORCHVISION_VERSION=0.23
2424
set TORCHAUDIO_VERSION=2.8
25+
) else if "%TORCH_VERSION%"=="2.9" (
26+
set TORCHVISION_VERSION=0.24
27+
set TORCHAUDIO_VERSION=2.9
2528
) else (
26-
echo TORCH_VERSION is not 2.5, 2.6, 2.7 or 2.8, no changes to versions.
29+
echo TORCH_VERSION is not 2.5, 2.6, 2.7, 2.8 or 2.9, no changes to versions.
2730
)
2831
echo setting TORCHVISION_VERSION to %TORCHVISION_VERSION% and TORCHAUDIO_VERSION to %TORCHAUDIO_VERSION%
2932

0 commit comments

Comments
 (0)