Skip to content

Commit b460e5f

Browse files
authored
Use workflow matrix to deduplicate code (#168)
1 parent 3a8ce9b commit b460e5f

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
test_cuda126_py310_a10g:
16-
name: test-cuda12.6-py3.10-a10g
15+
test_cuda126_a10g:
16+
name: test-cuda12.6-py${{ matrix.python-version }}-a10g
1717
strategy:
1818
fail-fast: true
1919
matrix:
20+
python-version: ["3.10", "3.12"]
2021
include:
2122
- name: A10G
2223
runs-on: linux.g5.4xlarge.nvidia.gpu
@@ -31,33 +32,7 @@ jobs:
3132
gpu-arch-version: ${{ matrix.gpu-arch-version }}
3233
submodules: recursive
3334
script: |
34-
conda create -n venv python=3.10 -y
35-
conda activate venv
36-
python -m pip install --upgrade pip
37-
pip install ${{ matrix.torch-spec }}
38-
./.github/scripts/install_triton.sh
39-
pip install -r requirements.txt
40-
python -m unittest discover -s test/ -p "*.py" -v -t .
41-
test_cuda126_py312_a10g:
42-
name: test-cuda12.6-py3.12-a10g
43-
strategy:
44-
fail-fast: true
45-
matrix:
46-
include:
47-
- name: A10G
48-
runs-on: linux.g5.4xlarge.nvidia.gpu
49-
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cu126'
50-
gpu-arch-type: "cuda"
51-
gpu-arch-version: "12.6"
52-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
53-
with:
54-
timeout: 60
55-
runner: ${{ matrix.runs-on }}
56-
gpu-arch-type: ${{ matrix.gpu-arch-type }}
57-
gpu-arch-version: ${{ matrix.gpu-arch-version }}
58-
submodules: recursive
59-
script: |
60-
conda create -n venv python=3.12 -y
35+
conda create -n venv python=${{ matrix.python-version }} -y
6136
conda activate venv
6237
python -m pip install --upgrade pip
6338
pip install ${{ matrix.torch-spec }}

0 commit comments

Comments
 (0)