-
Notifications
You must be signed in to change notification settings - Fork 33
114 lines (92 loc) · 2.91 KB
/
Copy pathpython-app.yml
File metadata and controls
114 lines (92 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: 'tilelens'
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Lint with pre-commit
run: |
cd tilelens
pip install pre-commit
pre-commit run --all-files
- name: Install Dependencies
run: |
cd tilelens
uv sync --extra test
- name: Upgrade Triton to latest from main
run: |
cd tilelens
uv pip install --pre -U triton
uv pip install "git+https://github.com/triton-lang/triton.git#subdirectory=python/triton_kernels"
- name: Run frontend tests
run: |
cd tilelens
npm install
npm run test:frontend
- name: Test with pytest
run: |
cd tilelens
uv run pytest tests -n auto --ignore=tests/end_to_end/test_triton_kernels.py
- name: Install TileLens with NKI extras
run: |
cd tilelens
uv sync --extra test --extra nki
- name: Upgrade Triton to latest from main (NKI)
run: |
cd tilelens
uv pip install --pre -U triton
uv pip install "git+https://github.com/triton-lang/triton.git#subdirectory=python/triton_kernels"
- name: Run full (Triton + NKI) pytest suite
run: |
cd tilelens
uv run pytest tests -m "" -n auto --ignore=tests/end_to_end/test_triton_kernels.py
test-pip-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install with pip
run: pip install ".[test]"
- name: Verify installation
working-directory: ${{ runner.temp }}
run: |
python - <<'PY'
import tilelens
import triton_viz
from tilelens.clients import Sanitizer
from triton_viz.clients import Sanitizer as LegacySanitizer
from tilelens.core.trace import launches
from triton_viz.core.trace import launches as legacy_launches
assert triton_viz.trace is tilelens.trace
assert triton_viz.config is tilelens.config
assert LegacySanitizer is Sanitizer
assert legacy_launches is launches
print(tilelens.__version__)
PY