@@ -33,12 +33,15 @@ jobs:
33
33
- name : Check out code
34
34
uses : actions/checkout@v4
35
35
36
- - name : Set up Miniconda
37
- uses : conda-incubator /setup-miniconda@v3
36
+ - name : Install uv
37
+ uses : astral-sh /setup-uv@v6
38
38
with :
39
- activate-environment : torch27
40
39
python-version : ${{ matrix.python-version }}
41
- channels : defaults,pytorch,conda-forge
40
+ enable-cache : true
41
+
42
+ - name : Create virtual environment
43
+ run : |
44
+ uv venv --python ${{ matrix.python-version }}
42
45
43
46
- name : Get current month
44
47
id : date
@@ -48,37 +51,44 @@ jobs:
48
51
uses : actions/cache@v4
49
52
with :
50
53
path : |
51
- ~/.conda/pkgs
52
- ~/.cache/pip
54
+ ~/.cache/uv
55
+ ~/.venv
53
56
key : ${{ runner.os }}-deps-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}-${{ steps.date.outputs.month }}
54
57
restore-keys : |
55
58
${{ runner.os }}-deps-
56
59
57
60
- name : Install PyTorch
58
61
run : |
59
- pip3 install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126
62
+ source .venv/bin/activate
63
+ uv pip install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126
60
64
61
65
- name : Install Triton
62
66
if : steps.cache.outputs.cache-hit != 'true'
63
67
run : |
68
+ set -x
69
+ source .venv/bin/activate
64
70
apt-get update
65
71
apt-get install -y git
72
+ apt-get install -y gcc-13 g++-13 zlib1g-dev
73
+ export CC=gcc-13
74
+ export CXX=g++-13
66
75
mkdir -p /tmp/$USER
67
76
cd /tmp/$USER
68
- pip uninstall -y triton pytorch-triton || true
77
+ uv pip uninstall triton pytorch-triton || true
69
78
rm -rf triton/ || true
70
79
git clone https://github.com/triton-lang/triton.git
71
80
cd triton/
72
- conda install -y -c conda-forge gcc_linux-64=13 gxx_linux-64=13 gcc=13 gxx=13
73
- pip install -r python/requirements.txt
74
- MAX_JOBS=$(nproc) TRITON_PARALLEL_LINK_JOBS=2 pip install .
81
+ uv pip install -r python/requirements.txt
82
+ MAX_JOBS=$(nproc) TRITON_PARALLEL_LINK_JOBS=2 uv pip install .
75
83
cd /tmp/$USER
76
84
rm -rf triton/
77
85
78
86
- name : Install Requirements
79
87
run : |
80
- pip install -r requirements.txt
88
+ source .venv/bin/activate
89
+ uv pip install -r requirements.txt
81
90
82
91
- name : Run Tests
83
92
run : |
84
- python -m unittest discover -s test/ -p "*.py" -v -t .
93
+ source .venv/bin/activate
94
+ pytest
0 commit comments