@@ -47,64 +47,11 @@ jobs:
4747 shell : bash -l {0}
4848
4949 steps :
50- - name : Check out code
51- uses : actions/checkout@v4
52-
53- - name : Install uv
54- uses : astral-sh/setup-uv@v6
55- with :
56- python-version : ${{ matrix.python-version }}
57- enable-cache : true
58-
59- - name : Create virtual environment
60- run : |
61- uv venv --python ${{ matrix.python-version }}
62-
63- - name : Get current month
64- id : date
65- run : echo "month=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
66-
67- - name : Cache dependencies
68- id : cache
69- uses : actions/cache@v4
50+ - uses : .github/workflows/build.yml
7051 with :
71- path : |
72- ~/.cache/uv
73- ~/.venv
74- key : ${{ matrix.python-version }}-${{ matrix.runtime-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}-${{ steps.date.outputs.month }}
75-
76- - name : Install PyTorch
77- run : |
78- source .venv/bin/activate
79- uv pip install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.runtime-version }}
80-
81- - name : Install Triton
82- if : steps.cache.outputs.cache-hit != 'true'
83- run : |
84- set -x
85- source .venv/bin/activate
86- apt-get update
87- apt-get install -y git
88- apt-get install -y clang-14 clang++-14 zlib1g-dev
89- export CC=clang-14
90- export CXX=clang++-14
91- mkdir -p /tmp/$USER
92- cd /tmp/$USER
93- uv pip uninstall triton pytorch-triton || true
94- rm -rf triton/ || true
95- git clone https://github.com/triton-lang/triton.git
96- cd triton/
97- uv pip install -r python/requirements.txt
98- MAX_JOBS=$(nproc) TRITON_PARALLEL_LINK_JOBS=2 uv pip install .
99- cd /tmp/$USER
100- rm -rf triton/
101- python -c "import triton; print(f'Triton version: {triton.__version__}')"
102-
103- - name : Install Requirements
104- run : |
105- source .venv/bin/activate
106- uv pip install -r requirements.txt
107- uv pip install pytest-timeout
52+ python-version : ${{ matrix.runtime-version }}
53+ runtime-version : ${{ matrix.runtime-version }}
54+ should-cache : true
10855
10956 - name : Run Tests
11057 run : |
0 commit comments