Skip to content

Commit c6de202

Browse files
authored
[CI] Pin py3.10 and one py3.12 on pytorch2.9 (#858)
1 parent 8ff3234 commit c6de202

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/matrix.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"image": "nvidia/cuda:12.8.1-devel-ubuntu24.04",
88
"runtime-version": "cu128",
99
"container-options": "--gpus all",
10+
"pytorch-version": "pytorch-2.9",
1011
"alias": "a10g"
1112
},
1213
{
@@ -16,6 +17,7 @@
1617
"image": "nvidia/cuda:12.8.1-devel-ubuntu24.04",
1718
"runtime-version": "cu128",
1819
"container-options": "--gpus all",
20+
"pytorch-version": "pytorch-nightly",
1921
"alias": "a10g"
2022
},
2123
{
@@ -25,6 +27,7 @@
2527
"image": "nvidia/cuda:12.8.1-devel-ubuntu24.04",
2628
"runtime-version": "cu128",
2729
"container-options": "--gpus all",
30+
"pytorch-version": "pytorch-2.9",
2831
"alias": "a10g-dtype-asserts",
2932
"dtype-asserts": true,
3033
"expecttest-accept": true
@@ -36,6 +39,7 @@
3639
"image": "nvidia/cuda:12.8.1-devel-ubuntu24.04",
3740
"runtime-version": "cu128",
3841
"container-options": "--gpus all",
42+
"pytorch-version": "pytorch-nightly",
3943
"alias": "a10g-ref-eager"
4044
},
4145
{
@@ -45,6 +49,7 @@
4549
"image": "nvidia/cuda:12.8.1-devel-ubuntu24.04",
4650
"runtime-version": "cu128",
4751
"container-options": "--gpus all",
52+
"pytorch-version": "pytorch-nightly",
4853
"alias": "h100"
4954
},
5055
{
@@ -54,6 +59,7 @@
5459
"image": "nvidia/cuda:13.0.1-devel-ubuntu24.04",
5560
"runtime-version": "cu130",
5661
"container-options": "--gpus all",
62+
"pytorch-version": "pytorch-nightly",
5763
"alias": "b200"
5864
},
5965
{
@@ -63,6 +69,7 @@
6369
"image": "rocm/dev-ubuntu-24.04:7.0-complete",
6470
"runtime-version": "rocm7.0",
6571
"container-options": "--device=/dev/kfd --device=/dev/dri",
72+
"pytorch-version": "pytorch-nightly",
6673
"alias": "mi325x"
6774
}
6875
]

.github/workflows/test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: false
3434
matrix: ${{ fromJSON(needs.load-matrix.outputs.matrix) }}
3535

36-
name: test-${{ matrix.runtime-version }}-py${{ matrix.python-version }}-${{ matrix.alias }}
36+
name: test-${{ matrix.runtime-version }}-py${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ matrix.alias }}
3737

3838
container:
3939
image: ${{ matrix.image }}
@@ -83,15 +83,21 @@ jobs:
8383
path: |
8484
~/.cache/uv
8585
~/.venv
86-
key: ${{ matrix.python-version }}-${{ matrix.runtime-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}-${{ steps.date.outputs.month }}
86+
key: ${{ matrix.python-version }}-${{ matrix.runtime-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}-${{ steps.date.outputs.month }}
8787

8888
- name: Install PyTorch
8989
run: |
9090
source .venv/bin/activate
91-
uv pip install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.runtime-version }}
91+
if [[ "${{ matrix.pytorch-version }}" == "pytorch-2.9" ]]; then
92+
# Install stable 2.9 from test channel
93+
uv pip install -U "torch==2.9.*" --index-url https://download.pytorch.org/whl/test/${{ matrix.runtime-version }}
94+
else
95+
# Default to nightly
96+
uv pip install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.runtime-version }}
97+
fi
9298
9399
- name: Install Triton
94-
if: steps.cache.outputs.cache-hit != 'true'
100+
if: steps.cache.outputs.cache-hit != 'true' && matrix.pytorch-version != 'pytorch-2.9'
95101
run: |
96102
set -x
97103
source .venv/bin/activate

0 commit comments

Comments
 (0)