|
44 | 44 | # manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
|
45 | 45 | os: [ubuntu-20.04]
|
46 | 46 | python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
47 |
| - torch-version: ['1.12.1', '1.13.1', '2.0.1', '2.1.2', '2.2.0'] |
| 47 | + torch-version: ['1.12.1', '1.13.1', '2.0.1', '2.1.2', '2.2.0', '2.3.0.dev20240126'] |
48 | 48 | cuda-version: ['11.8.0', '12.2.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.
|
|
71 | 71 | python-version: '3.7'
|
72 | 72 | - torch-version: '2.2.0'
|
73 | 73 | python-version: '3.7'
|
| 74 | + - torch-version: '2.3.0.dev20240126' |
| 75 | + python-version: '3.7' |
74 | 76 | # Pytorch <= 2.0 only supports CUDA <= 11.8
|
75 | 77 | - torch-version: '1.12.1'
|
76 | 78 | cuda-version: '12.2.2'
|
@@ -133,9 +135,19 @@ jobs:
|
133 | 135 | # We want to figure out the CUDA version to download pytorch
|
134 | 136 | # 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
|
135 | 137 | # This code is ugly, maybe there's a better way to do this.
|
136 |
| - export TORCH_CUDA_VERSION=$(python -c "import os; minv = {'1.12': 113, '1.13': 116, '2.0': 117, '2.1': 118, '2.2': 118}[os.environ['MATRIX_TORCH_VERSION']]; maxv = {'1.12': 116, '1.13': 117, '2.0': 118, '2.1': 121, '2.2': 121}[os.environ['MATRIX_TORCH_VERSION']]; print(max(min(int(os.environ['MATRIX_CUDA_VERSION']), maxv), minv))") |
| 138 | + export TORCH_CUDA_VERSION=$(python -c "from os import environ as env; \ |
| 139 | + minv = {'1.12': 113, '1.13': 116, '2.0': 117, '2.1': 118, '2.2': 118, '2.3': 118}[env['MATRIX_TORCH_VERSION']]; \ |
| 140 | + maxv = {'1.12': 116, '1.13': 117, '2.0': 118, '2.1': 121, '2.2': 121, '2.3': 121}[env['MATRIX_TORCH_VERSION']]; \ |
| 141 | + print(max(min(int(env['MATRIX_CUDA_VERSION']), maxv), minv))" \ |
| 142 | + ) |
137 | 143 | if [[ ${{ matrix.torch-version }} == *"dev"* ]]; then
|
138 |
| - pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION} |
| 144 | + if [[ ${MATRIX_TORCH_VERSION} == "2.2" ]]; then |
| 145 | + # --no-deps because we can't install old versions of pytorch-triton |
| 146 | + pip install typing-extensions jinja2 |
| 147 | + pip install --no-cache-dir --no-deps --pre https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION}/torch-${{ matrix.torch-version }}%2Bcu${TORCH_CUDA_VERSION}-cp${MATRIX_PYTHON_VERSION}-cp${MATRIX_PYTHON_VERSION}-linux_x86_64.whl |
| 148 | + else |
| 149 | + pip install --no-cache-dir --pre torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/nightly/cu${TORCH_CUDA_VERSION} |
| 150 | + fi |
139 | 151 | else
|
140 | 152 | pip install --no-cache-dir torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/cu${TORCH_CUDA_VERSION}
|
141 | 153 | fi
|
|
0 commit comments