@@ -43,37 +43,43 @@ jobs:
43
43
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
44
44
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
45
45
os : [ubuntu-20.04]
46
- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ', '3.12 ']
47
- torch-version : ['2.0.1 ', '2.1 .2', '2.2.2 ', '2.3 .1', '2.4.0 ']
48
- cuda-version : ['11.8.0', '12.2 .2']
46
+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12 ', '3.13 ']
47
+ torch-version : ['2.1.2 ', '2.2 .2', '2.3.1', '2.4.0 ', '2.5 .1', '2.6.0.dev20241010 ']
48
+ cuda-version : ['11.8.0', '12.3 .2']
49
49
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
50
50
# Pytorch wheels currently don't use it, but nvcr images have Pytorch compiled with C++11 ABI.
51
51
# Without this we get import error (undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs)
52
52
# when building without C++11 ABI and using it on nvcr images.
53
53
cxx11_abi : ['FALSE', 'TRUE']
54
54
exclude :
55
+ # see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
55
56
# Pytorch < 2.2 does not support Python 3.12
56
- - torch-version : ' 2.0.1'
57
- python-version : ' 3.12'
58
57
- torch-version : ' 2.1.2'
59
58
python-version : ' 3.12'
60
- # Pytorch <= 2.0 only supports CUDA <= 11.8
61
- - torch-version : ' 2.0.1'
62
- cuda-version : ' 12.2.2'
59
+ # Pytorch < 2.5 does not support Python 3.13
60
+ - torch-version : ' 2.1.2'
61
+ python-version : ' 3.13'
62
+ - torch-version : ' 2.2.2'
63
+ python-version : ' 3.13'
64
+ - torch-version : ' 2.3.1'
65
+ python-version : ' 3.13'
66
+ - torch-version : ' 2.4.0'
67
+ python-version : ' 3.13'
63
68
64
69
steps :
65
70
- name : Checkout
66
- uses : actions/checkout@v3
71
+ uses : actions/checkout@v4
67
72
68
73
- name : Set up Python
69
- uses : actions/setup-python@v4
74
+ uses : actions/setup-python@v5
70
75
with :
71
76
python-version : ${{ matrix.python-version }}
72
77
73
78
- name : Set CUDA and PyTorch versions
74
79
run : |
75
80
echo "MATRIX_CUDA_VERSION=$(echo ${{ matrix.cuda-version }} | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
76
81
echo "MATRIX_TORCH_VERSION=$(echo ${{ matrix.torch-version }} | awk -F \. {'print $1 "." $2'})" >> $GITHUB_ENV
82
+ echo "WHEEL_CUDA_VERSION=$(echo ${{ matrix.cuda-version }} | awk -F \. {'print $1'})" >> $GITHUB_ENV
77
83
78
84
- name : Free up disk space
79
85
if : ${{ runner.os == 'Linux' }}
@@ -92,33 +98,31 @@ jobs:
92
98
93
99
- name : Install CUDA ${{ matrix.cuda-version }}
94
100
if : ${{ matrix.cuda-version != 'cpu' }}
95
- uses : Jimver/cuda-toolkit@v0.2.14
101
+ uses : Jimver/cuda-toolkit@v0.2.19
96
102
id : cuda-toolkit
97
103
with :
98
104
cuda : ${{ matrix.cuda-version }}
99
105
linux-local-args : ' ["--toolkit"]'
100
106
# default method is "local", and we're hitting some error with caching for CUDA 11.8 and 12.1
101
107
# method: ${{ (matrix.cuda-version == '11.8.0' || matrix.cuda-version == '12.1.0') && 'network' || 'local' }}
102
108
method : ' network'
103
- # We need the cuda libraries (e.g. cuSparse, cuSolver) for compiling PyTorch extensions,
104
- # not just nvcc
105
- # sub-packages: '["nvcc"]'
109
+ sub-packages : ' ["nvcc"]'
106
110
107
111
- name : Install PyTorch ${{ matrix.torch-version }}+cu${{ matrix.cuda-version }}
108
112
run : |
109
113
pip install --upgrade pip
110
- # If we don't install before installing Pytorch, we get error for torch 2.0.1
111
- # ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
112
- pip install lit
113
114
# For some reason torch 2.2.0 on python 3.12 errors saying no setuptools
114
- pip install setuptools
115
+ pip install setuptools==68.0.0
116
+ # With python 3.13 and torch 2.5.1, unless we update typing-extensions, we get error
117
+ # AttributeError: attribute '__default__' of 'typing.ParamSpec' objects is not writable
118
+ pip install typing-extensions==4.12.2
115
119
# We want to figure out the CUDA version to download pytorch
116
120
# e.g. we can have system CUDA version being 11.7 but if torch==1.12 then we need to download the wheel from cu116
117
121
# This code is ugly, maybe there's a better way to do this.
118
122
export TORCH_CUDA_VERSION=$(python -c "from os import environ as env; \
119
- minv = {'2.0 ': 117 , '2.1 ': 118, '2.2 ': 118, '2.3 ': 118, '2.4 ': 118}[env['MATRIX_TORCH_VERSION']]; \
120
- maxv = {'2.0 ': 118 , '2.1 ': 121, '2.2 ': 121, '2.3 ': 121 , '2.4 ': 124}[env['MATRIX_TORCH_VERSION']]; \
121
- print(max(min( int(env['MATRIX_CUDA_VERSION']), maxv), minv) )" \
123
+ minv = {'2.1 ': 118 , '2.2 ': 118, '2.3': 118, '2.4 ': 118, '2.5 ': 118, '2.6 ': 118}[env['MATRIX_TORCH_VERSION']]; \
124
+ maxv = {'2.1 ': 121 , '2.2 ': 121, '2.3 ': 121, '2.4 ': 124 , '2.5': 124, '2.6 ': 124}[env['MATRIX_TORCH_VERSION']]; \
125
+ print(minv if int(env['MATRIX_CUDA_VERSION']) < 120 else maxv )" \
122
126
)
123
127
if [[ ${{ matrix.torch-version }} == *"dev"* ]]; then
124
128
pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION}
@@ -144,7 +148,7 @@ jobs:
144
148
export LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
145
149
# Limit MAX_JOBS otherwise the github runner goes OOM
146
150
MAX_JOBS=2 MAMBA_FORCE_BUILD="TRUE" MAMBA_FORCE_CXX11_ABI=${{ matrix.cxx11_abi}} python setup.py bdist_wheel --dist-dir=dist
147
- tmpname=cu${MATRIX_CUDA_VERSION }torch${MATRIX_TORCH_VERSION}cxx11abi${{ matrix.cxx11_abi }}
151
+ tmpname=cu${WHEEL_CUDA_VERSION }torch${MATRIX_TORCH_VERSION}cxx11abi${{ matrix.cxx11_abi }}
148
152
wheel_name=$(ls dist/*whl | xargs -n 1 basename | sed "s/-/+$tmpname-/2")
149
153
ls dist/*whl |xargs -I {} mv {} dist/${wheel_name}
150
154
echo "wheel_name=${wheel_name}" >> $GITHUB_ENV
@@ -183,9 +187,9 @@ jobs:
183
187
runs-on : ubuntu-latest
184
188
185
189
steps :
186
- - uses : actions/checkout@v3
190
+ - uses : actions/checkout@v4
187
191
188
- - uses : actions/setup-python@v4
192
+ - uses : actions/setup-python@v5
189
193
with :
190
194
python-version : ' 3.10'
191
195
0 commit comments