@@ -102,7 +102,7 @@ jobs:
102102 matrix :
103103 os : [ubuntu-22.04, ubuntu-22.04-arm, windows-2025, macos-15]
104104 # Test with the oldest supported torch version, the newest two stable/RC.
105- torch_version : ["2.2.2 ", "2.7.1", "2.8.0"]
105+ torch_version : ["2.3.1 ", "2.7.1", "2.8.0"]
106106 include :
107107 - os : ubuntu-22.04
108108 arch : x86_64
@@ -118,7 +118,7 @@ jobs:
118118 arch : arm64
119119 exclude :
120120 - os : ubuntu-22.04-arm
121- torch_version : " 2.2.2 "
121+ torch_version : " 2.3.1 "
122122
123123 runs-on : ${{ matrix.runner || matrix.os }}
124124 env :
@@ -144,13 +144,14 @@ jobs:
144144
145145 - name : Install dependencies
146146 run : |
147- pip install torch==${{ matrix.torch_version }} --index-url https://download.pytorch.org/whl/${{ (matrix.torch_version == '2.8.0' && 'test/ cpu') || 'cpu' }}
147+ pip install torch==${{ matrix.torch_version }} --index-url https://download.pytorch.org/whl/cpu
148148 pip install -e ".[test]"
149149 pip install pytest-cov
150150
151- # We need to downgrade to numpy<2 for torch<2.3 compatibility.
151+ # We need to downgrade to numpy<2 for torch<2.4.1 compatibility on Windows
152+ # See: https://github.com/pytorch/pytorch/issues/131668
152153 - name : Downgrade NumPy
153- if : startsWith(matrix.torch_version, '2.2 .')
154+ if : startsWith(matrix.os, 'windows') && startsWith(matrix. torch_version, '2.3 .')
154155 run : pip install "numpy<2"
155156
156157 - name : Show installed packages
@@ -345,7 +346,7 @@ jobs:
345346 cuda_version : ["11.8.0", "12.6.3", "12.8.1", "12.9.1"]
346347 include :
347348 - cuda_version : " 11.8.0"
348- torch_version : " 2.2.2 "
349+ torch_version : " 2.3.1 "
349350 pypi_index : " https://download.pytorch.org/whl/cu118"
350351 - cuda_version : " 12.6.3"
351352 torch_version : " 2.6.0"
@@ -374,7 +375,7 @@ jobs:
374375 gpu : T4
375376 runner : CUDA-Windows-x64
376377 cuda_version : " 11.8.0"
377- torch_version : " 2.2.0 "
378+ torch_version : " 2.3.1 "
378379 pypi_index : " https://download.pytorch.org/whl/cu118"
379380 - os : windows-2025
380381 arch : x86_64
@@ -430,12 +431,6 @@ jobs:
430431 pip install --pre torch~=${{ matrix.torch_version }}.dev0 --index-url ${{ matrix.pypi_index }}
431432 pip install -e ".[test]"
432433 pip install pytest-cov
433-
434- # We need to downgrade to numpy<2 for torch<2.3 compatibility.
435- - name : Downgrade NumPy
436- if : startsWith(matrix.torch_version, '2.2.')
437- run : pip install "numpy<2"
438-
439434 - name : Show installed packages
440435 run : pip list
441436
0 commit comments