mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Update ruff to 0.13.1 (#163744)"
This reverts commit 3dd89a079f2b0c1d39351f98ff5d5ca882523152. Reverted https://github.com/pytorch/pytorch/pull/163744 on behalf of https://github.com/malfet due to Broke lint, see https://github.com/pytorch/pytorch/actions/runs/18016220484/job/51261729375 looks like a landrace with PR that updated min-version to 3.10 ([comment](https://github.com/pytorch/pytorch/pull/163744#issuecomment-3335534084))
This commit is contained in:
@ -1453,7 +1453,7 @@ init_command = [
|
|||||||
'--dry-run={{DRYRUN}}',
|
'--dry-run={{DRYRUN}}',
|
||||||
'usort==1.0.8.post1',
|
'usort==1.0.8.post1',
|
||||||
'isort==6.0.1',
|
'isort==6.0.1',
|
||||||
'ruff==0.13.1', # sync with RUFF
|
'ruff==0.12.9', # sync with RUFF
|
||||||
]
|
]
|
||||||
is_formatter = true
|
is_formatter = true
|
||||||
|
|
||||||
@ -1587,7 +1587,7 @@ init_command = [
|
|||||||
'python3',
|
'python3',
|
||||||
'tools/linter/adapters/pip_init.py',
|
'tools/linter/adapters/pip_init.py',
|
||||||
'--dry-run={{DRYRUN}}',
|
'--dry-run={{DRYRUN}}',
|
||||||
'ruff==0.13.1', # sync with PYFMT
|
'ruff==0.12.9', # sync with PYFMT
|
||||||
]
|
]
|
||||||
is_formatter = true
|
is_formatter = true
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@ ignore = [
|
|||||||
"SIM117",
|
"SIM117",
|
||||||
"SIM118",
|
"SIM118",
|
||||||
"UP007", # keep-runtime-typing
|
"UP007", # keep-runtime-typing
|
||||||
|
"UP038", # Was removed from newer versions, results in slower code
|
||||||
"UP045", # keep-runtime-typing
|
"UP045", # keep-runtime-typing
|
||||||
"TC006",
|
"TC006",
|
||||||
# TODO: Remove Python-3.10 specific suppressions
|
# TODO: Remove Python-3.10 specific suppressions
|
||||||
|
@ -507,7 +507,7 @@ def autograd_cache_key(
|
|||||||
TOut = TypeVar("TOut", bound=OutputCode)
|
TOut = TypeVar("TOut", bound=OutputCode)
|
||||||
|
|
||||||
|
|
||||||
class InductorOutput(ABC, Generic[TOut]):
|
class InductorOutput(Generic[TOut], ABC):
|
||||||
"""
|
"""
|
||||||
Class representing a single inductor output
|
Class representing a single inductor output
|
||||||
"""
|
"""
|
||||||
|
@ -17,7 +17,7 @@ from torch._inductor.autoheuristic.learnedheuristic_interface import (
|
|||||||
class MMRankingA100(LearnedHeuristicDecision):
|
class MMRankingA100(LearnedHeuristicDecision):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.choices: list[Choice] = []
|
self.choices: List[Choice] = []
|
||||||
self.fill_choices()
|
self.fill_choices()
|
||||||
|
|
||||||
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
||||||
@ -238,7 +238,7 @@ class MMRankingA100(LearnedHeuristicDecision):
|
|||||||
def get_name(self) -> str:
|
def get_name(self) -> str:
|
||||||
return 'mm'
|
return 'mm'
|
||||||
|
|
||||||
def get_best_choices(self, context: AHContext) -> Optional[list[tuple[float, int]]]:
|
def get_best_choices(self, context: AHContext) -> Optional[List[tuple[float, int]]]:
|
||||||
if context.get_value('arith_intensity') <= 52.6245059967041:
|
if context.get_value('arith_intensity') <= 52.6245059967041:
|
||||||
if context.get_value('n') <= 34.0:
|
if context.get_value('n') <= 34.0:
|
||||||
if context.get_value('n') <= 18.0:
|
if context.get_value('n') <= 18.0:
|
||||||
|
@ -17,7 +17,7 @@ from torch._inductor.autoheuristic.learnedheuristic_interface import (
|
|||||||
class MMRankingH100(LearnedHeuristicDecision):
|
class MMRankingH100(LearnedHeuristicDecision):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.choices: list[Choice] = []
|
self.choices: List[Choice] = []
|
||||||
self.fill_choices()
|
self.fill_choices()
|
||||||
|
|
||||||
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
||||||
@ -242,7 +242,7 @@ class MMRankingH100(LearnedHeuristicDecision):
|
|||||||
def get_name(self) -> str:
|
def get_name(self) -> str:
|
||||||
return 'mm'
|
return 'mm'
|
||||||
|
|
||||||
def get_best_choices(self, context: AHContext) -> Optional[list[tuple[float, int]]]:
|
def get_best_choices(self, context: AHContext) -> Optional[List[tuple[float, int]]]:
|
||||||
if context.get_value('arith_intensity') <= 29.89772129058838:
|
if context.get_value('arith_intensity') <= 29.89772129058838:
|
||||||
if context.get_value('n') <= 34.0:
|
if context.get_value('n') <= 34.0:
|
||||||
if context.get_value('n') <= 18.0:
|
if context.get_value('n') <= 18.0:
|
||||||
|
@ -17,7 +17,7 @@ from torch._inductor.autoheuristic.learnedheuristic_interface import (
|
|||||||
class MixedMMA100(LearnedHeuristicDecision):
|
class MixedMMA100(LearnedHeuristicDecision):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.choices: list[Choice] = []
|
self.choices: List[Choice] = []
|
||||||
self.fill_choices()
|
self.fill_choices()
|
||||||
|
|
||||||
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
||||||
@ -62,7 +62,7 @@ class MixedMMA100(LearnedHeuristicDecision):
|
|||||||
def get_name(self) -> str:
|
def get_name(self) -> str:
|
||||||
return 'mixed_mm'
|
return 'mixed_mm'
|
||||||
|
|
||||||
def get_best_choices(self, context: AHContext) -> Optional[list[tuple[float, int]]]:
|
def get_best_choices(self, context: AHContext) -> Optional[List[tuple[float, int]]]:
|
||||||
if str(context.get_value('1LEQmLEQ16')) != 'True':
|
if str(context.get_value('1LEQmLEQ16')) != 'True':
|
||||||
if context.get_value('m') <= 32.5:
|
if context.get_value('m') <= 32.5:
|
||||||
if context.get_value('n') <= 6976.0:
|
if context.get_value('n') <= 6976.0:
|
||||||
|
@ -17,7 +17,7 @@ from torch._inductor.autoheuristic.learnedheuristic_interface import (
|
|||||||
class MixedMMH100(LearnedHeuristicDecision):
|
class MixedMMH100(LearnedHeuristicDecision):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.choices: list[Choice] = []
|
self.choices: List[Choice] = []
|
||||||
self.fill_choices()
|
self.fill_choices()
|
||||||
|
|
||||||
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
def check_precondition(self, metadata: AHMetadata, context: AHContext,) -> bool:
|
||||||
@ -61,7 +61,7 @@ class MixedMMH100(LearnedHeuristicDecision):
|
|||||||
def get_name(self) -> str:
|
def get_name(self) -> str:
|
||||||
return 'mixed_mm'
|
return 'mixed_mm'
|
||||||
|
|
||||||
def get_best_choices(self, context: AHContext) -> Optional[list[tuple[float, int]]]:
|
def get_best_choices(self, context: AHContext) -> Optional[List[tuple[float, int]]]:
|
||||||
if context.get_value('arith_intensity') <= 15.988086223602295:
|
if context.get_value('arith_intensity') <= 15.988086223602295:
|
||||||
if context.get_value('n') <= 25280.0:
|
if context.get_value('n') <= 25280.0:
|
||||||
if context.get_value('n') <= 1344.0:
|
if context.get_value('n') <= 1344.0:
|
||||||
|
@ -2048,7 +2048,7 @@ _T1 = TypeVar("_T1")
|
|||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class StatelessSymbolicContext(SymbolicContext, Generic[_P1, _T1]):
|
class StatelessSymbolicContext(Generic[_P1, _T1], SymbolicContext):
|
||||||
"""
|
"""
|
||||||
Create symbols in ``create_symbolic_sizes_strides_storage_offset`` via
|
Create symbols in ``create_symbolic_sizes_strides_storage_offset`` via
|
||||||
a symbolic_context determination as given by ``DimDynamic`` and ``DimConstraint``.
|
a symbolic_context determination as given by ``DimDynamic`` and ``DimConstraint``.
|
||||||
|
Reference in New Issue
Block a user