Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.13.1
rev: v0.13.3
hooks:
# Run the linter.
- id: ruff
Expand All @@ -44,7 +44,7 @@ repos:
- tomli

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.405
rev: v1.1.406
hooks:
- id: pyright
language: system
16 changes: 6 additions & 10 deletions benchmarks/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import dataclasses
import functools
import gc
import importlib
import importlib.util
import json
import logging
import os
Expand All @@ -39,16 +39,16 @@
from typing import Any
from typing import Callable

if TYPE_CHECKING:
from tritonbench.utils.triton_op import BenchmarkOperator
from tritonbench.utils.triton_op import BenchmarkOperatorMetrics

import torch
from torch.utils._pytree import tree_leaves
from torch.utils._pytree import tree_map

from helion._utils import counters

if TYPE_CHECKING:
from tritonbench.utils.triton_op import BenchmarkOperator
from tritonbench.utils.triton_op import BenchmarkOperatorMetrics

try:
from tritonbench.utils.env_utils import get_nvidia_gpu_model
from tritonbench.utils.env_utils import is_cuda
Expand Down Expand Up @@ -572,12 +572,8 @@ def get_system_memory_gb() -> float:
def check_and_setup_tritonbench() -> None:
"""Check if tritonbench is installed and install it from GitHub if not."""
# Check if tritonbench is already installed
try:
import tritonbench # pyright: ignore[reportMissingImports]

if importlib.util.find_spec("tritonbench") is not None:
return # Already installed
except ImportError:
pass

print("Tritonbench not found. Installing...", file=sys.stderr)

Expand Down
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
if [ "$ACTION" = "install" ];
then
set -ex
pip install ruff==0.13.1 pyright==1.1.405
pip install ruff==0.13.3 pyright==1.1.406
exit 0
fi

Expand Down
Loading