From 2afaa1f95c0c710be32f24a62ee6802bb398ee5d Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 4 Nov 2026 09:30:00 -0500 Subject: [PATCH] [COMPAT] Pin Triton to 3.8 Triton 3.9.0 is out, and `triton>=3.8.0` now installs it. TileLens has only been tested on 3.8: the eager clients patch private interpreter APIs, and the IR clients being added on top of main support 3.8 only. Until 3.9 is supported, cap the dependency below 3.9. CI installed `--pre -U triton` and triton_kernels from Triton's main branch, so it was running against whatever Triton was newest. Install Triton 3.8.0 and triton_kernels at v3.8.0 instead, and set UV_NO_SYNC so `uv run` does not re-sync the environment and undo the pin. The workflow changes are the same as the ones the IR stack already carries. --- .github/workflows/benchmark.yml | 12 ++++++++---- .github/workflows/python-app.yml | 16 ++++++++++------ pyproject.toml | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 45d6b1312..4efd0d5c2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -16,6 +16,10 @@ concurrency: jobs: benchmark: runs-on: ubuntu-latest + env: + # Keep `uv run` from re-syncing the environment to the lockfile, which + # would undo the Triton 3.8 pin installed with `uv pip install`. + UV_NO_SYNC: "1" steps: - name: Checkout PR branch @@ -44,15 +48,15 @@ jobs: run: | cd main-branch uv sync --extra test - uv pip install --pre -U triton - uv pip install "git+https://github.com/triton-lang/triton.git#subdirectory=python/triton_kernels" + uv pip install triton==3.8.0 + uv pip install "git+https://github.com/triton-lang/triton.git@v3.8.0#subdirectory=python/triton_kernels" - name: Install PR dependencies run: | cd pr-branch uv sync --extra test - uv pip install --pre -U triton - uv pip install "git+https://github.com/triton-lang/triton.git#subdirectory=python/triton_kernels" + uv pip install triton==3.8.0 + uv pip install "git+https://github.com/triton-lang/triton.git@v3.8.0#subdirectory=python/triton_kernels" - name: Run interleaved A/B benchmarks run: | diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index dc6026a8e..d13e1fac0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,6 +21,10 @@ concurrency: jobs: build: runs-on: ubuntu-latest + env: + # Keep `uv run` from re-syncing the environment to the lockfile, which + # would undo the Triton 3.8 pin installed with `uv pip install`. + UV_NO_SYNC: "1" steps: - uses: actions/checkout@v3 @@ -48,11 +52,11 @@ jobs: cd tilelens uv sync --extra test - - name: Upgrade Triton to latest from main + - name: Install Triton 3.8 run: | cd tilelens - uv pip install --pre -U triton - uv pip install "git+https://github.com/triton-lang/triton.git#subdirectory=python/triton_kernels" + uv pip install triton==3.8.0 + uv pip install "git+https://github.com/triton-lang/triton.git@v3.8.0#subdirectory=python/triton_kernels" - name: Run frontend tests run: | @@ -71,11 +75,11 @@ jobs: cd tilelens uv sync --extra test --extra nki - - name: Upgrade Triton to latest from main (NKI) + - name: Install Triton 3.8 (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" + uv pip install triton==3.8.0 + uv pip install "git+https://github.com/triton-lang/triton.git@v3.8.0#subdirectory=python/triton_kernels" - name: Run full (Triton + NKI) pytest suite run: | diff --git a/pyproject.toml b/pyproject.toml index cd498f0f5..c58c73527 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ ] dependencies = [ "setuptools", - "triton>=3.8.0", + "triton>=3.8.0,<3.9", "pyarrow", "pre-commit", "z3-solver==4.15.3.0",