File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed
Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 2020
2121- repo : https://github.com/astral-sh/ruff-pre-commit
2222 # Ruff version.
23- rev : v0.13.1
23+ rev : v0.13.3
2424 hooks :
2525 # Run the linter.
2626 - id : ruff
4444 - tomli
4545
4646- repo : https://github.com/RobertCraigie/pyright-python
47- rev : v1.1.405
47+ rev : v1.1.406
4848 hooks :
4949 - id : pyright
5050 language : system
Original file line number Diff line number Diff line change 2626import dataclasses
2727import functools
2828import gc
29- import importlib
29+ import importlib . util
3030import json
3131import logging
3232import os
3939from typing import Any
4040from typing import Callable
4141
42- if TYPE_CHECKING :
43- from tritonbench .utils .triton_op import BenchmarkOperator
44- from tritonbench .utils .triton_op import BenchmarkOperatorMetrics
45-
4642import torch
4743from torch .utils ._pytree import tree_leaves
4844from torch .utils ._pytree import tree_map
4945
5046from helion ._utils import counters
5147
48+ if TYPE_CHECKING :
49+ from tritonbench .utils .triton_op import BenchmarkOperator
50+ from tritonbench .utils .triton_op import BenchmarkOperatorMetrics
51+
5252try :
5353 from tritonbench .utils .env_utils import get_nvidia_gpu_model
5454 from tritonbench .utils .env_utils import is_cuda
@@ -572,12 +572,8 @@ def get_system_memory_gb() -> float:
572572def check_and_setup_tritonbench () -> None :
573573 """Check if tritonbench is installed and install it from GitHub if not."""
574574 # Check if tritonbench is already installed
575- try :
576- import tritonbench # pyright: ignore[reportMissingImports]
577-
575+ if importlib .util .find_spec ("tritonbench" ) is not None :
578576 return # Already installed
579- except ImportError :
580- pass
581577
582578 print ("Tritonbench not found. Installing..." , file = sys .stderr )
583579
Original file line number Diff line number Diff line change 99if [ " $ACTION " = " install" ];
1010then
1111 set -ex
12- pip install ruff==0.13.1 pyright==1.1.405
12+ pip install ruff==0.13.3 pyright==1.1.406
1313 exit 0
1414fi
1515
You can’t perform that action at this time.
0 commit comments