@@ -12,30 +12,61 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- test_cuda126_a10g :
15
+ test :
16
16
name : test-cuda12.6-py${{ matrix.python-version }}-a10g
17
+
18
+ container :
19
+ image : pytorch/almalinux-builder:cuda12.6
20
+ options : --gpus all
21
+
22
+ runs-on : linux.g5.4xlarge.nvidia.gpu
23
+
17
24
strategy :
18
- fail-fast : true
19
25
matrix :
20
26
python-version : ["3.10", "3.12"]
21
- include :
22
- - name : A10G
23
- runs-on : linux.g5.4xlarge.nvidia.gpu
24
- torch-spec : ' --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126'
25
- gpu-arch-type : " cuda"
26
- gpu-arch-version : " 12.6"
27
- uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
28
- with :
29
- timeout : 60
30
- runner : ${{ matrix.runs-on }}
31
- gpu-arch-type : ${{ matrix.gpu-arch-type }}
32
- gpu-arch-version : ${{ matrix.gpu-arch-version }}
33
- submodules : recursive
34
- script : |
35
- conda create -n venv python=${{ matrix.python-version }} -y
36
- conda activate venv
37
- python -m pip install --upgrade pip
38
- pip install ${{ matrix.torch-spec }}
39
- ./.github/scripts/install_triton.sh
40
- pip install -r requirements.txt
41
- python -m unittest discover -s test/ -p "*.py" -v -t .
27
+
28
+ defaults :
29
+ run :
30
+ shell : bash -l {0}
31
+
32
+ steps :
33
+ - name : Check out code
34
+ uses : actions/checkout@v4
35
+
36
+ - name : Set up Miniconda
37
+ uses : conda-incubator/setup-miniconda@v3
38
+ with :
39
+ activate-environment : torch27
40
+ python-version : ${{ matrix.python-version }}
41
+ channels : defaults,pytorch,conda-forge
42
+
43
+ - name : Cache dependencies
44
+ uses : actions/cache@v4
45
+ with :
46
+ path : |
47
+ ~/.conda/pkgs
48
+ ~/.cache/pip
49
+ key : ${{ runner.os }}-deps-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}
50
+ restore-keys : |
51
+ ${{ runner.os }}-deps-
52
+
53
+ - name : Install CUDA
54
+ run : |
55
+ conda install nvidia/label/cuda-12.6.3::cuda-toolkit
56
+
57
+ - name : Install PyTorch
58
+ run : |
59
+ pip3 install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126
60
+
61
+ - name : Install Triton
62
+ if : steps.cache.outputs.cache-hit != 'true'
63
+ run : |
64
+ ./.github/scripts/install_triton.sh
65
+
66
+ - name : Install Requirements
67
+ run : |
68
+ pip install -r requirements.txt
69
+
70
+ - name : Run Tests
71
+ run : |
72
+ python -m unittest discover -s test/ -p "*.py" -v -t .
0 commit comments