From b18e298e55fd7a501a255f8ec4ca116a6fca5ab2 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 3 Feb 2026 10:57:42 -0800 Subject: [PATCH 1/2] Remove unused imports --- backend/compiler.py | 3 +-- backend/driver.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/compiler.py b/backend/compiler.py index 405cb616..f5ae3370 100644 --- a/backend/compiler.py +++ b/backend/compiler.py @@ -1,4 +1,3 @@ -from importlib.metadata import metadata import tempfile import functools import hashlib @@ -110,7 +109,7 @@ def make_ttir(mod, metadata, options): @staticmethod def make_ttgir(mod, metadata, options): pm = ir.pass_manager(mod.context) - dump_enabled = pm.enable_debug() + pm.enable_debug() threads_per_warp = 1 metadata["warp_size"] = threads_per_warp num_ctas = 1 diff --git a/backend/driver.py b/backend/driver.py index abd08114..06de9ee8 100644 --- a/backend/driver.py +++ b/backend/driver.py @@ -1,12 +1,10 @@ import functools import triton import os -import subprocess import tempfile import time import platform import importlib -from pathlib import Path from triton.runtime.build import compile_module_from_src from triton.backends.driver import DriverBase From 702f652f60ad8a366927a0d5084edf06e84a07a8 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 3 Feb 2026 11:00:14 -0800 Subject: [PATCH 2/2] Update `ruff` This enables additional lints that will catch unused imports and variables (see previous commit). --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dde23523..8413f91f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,9 +18,9 @@ repos: - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.1 + rev: v0.15.0 hooks: - - id: ruff + - id: ruff-check files: '(^python|^third_party/proton|^third_party/amd|^third_party/nvidia|^test)/.*' args: ["--fix", "--exit-non-zero-on-fix"] exclude: |