Skip to content

Commit 9583c56

Browse files
authored
add support for python 3.12 (#153)
1 parent 2066c21 commit 9583c56

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
4444
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
4545
os: [ubuntu-20.04]
46-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
46+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
4747
torch-version: ['1.12.1', '1.13.1', '2.0.1', '2.1.2', '2.2.0']
4848
cuda-version: ['11.8.0', '12.2.2']
4949
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
@@ -52,6 +52,15 @@ jobs:
5252
# when building without C++11 ABI and using it on nvcr images.
5353
cxx11_abi: ['FALSE', 'TRUE']
5454
exclude:
55+
# Pytorch < 2.2 does not support Python 3.12
56+
- torch-version: '1.12.1'
57+
python-version: '3.12'
58+
- torch-version: '1.13.1'
59+
python-version: '3.12'
60+
- torch-version: '2.0.1'
61+
python-version: '3.12'
62+
- torch-version: '2.1.2'
63+
python-version: '3.12'
5564
# Pytorch <= 1.12 does not support Python 3.11
5665
- torch-version: '1.12.1'
5766
python-version: '3.11'
@@ -119,6 +128,8 @@ jobs:
119128
# If we don't install before installing Pytorch, we get error for torch 2.0.1
120129
# ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
121130
pip install lit
131+
# For some reason torch 2.2.0 on python 3.12 errors saying no setuptools
132+
pip install setuptools
122133
# We want to figure out the CUDA version to download pytorch
123134
# 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
124135
# This code is ugly, maybe there's a better way to do this.

0 commit comments

Comments
 (0)