Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 28, 2024
1 parent f9fede7 commit 1069c05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion thunder/core/jit_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ class JITSharpEdgeError(RuntimeError):
def _general_jit_sharp_edge(desc: str, value: Any, /) -> Any | INTERPRETER_SIGNALS:
sharp_edges: SHARP_EDGES_OPTIONS = get_jit_ctx().sharp_edges

s: str = f"{desc} This is currently considered a sharp edge even with interpretation=INTERPRETATION_OPTIONS.TRANSLATE_PYTHON. For cases in which we are overly strict, please file an issue. Thank you!"
s: str = (
f"{desc} This is currently considered a sharp edge even with interpretation=INTERPRETATION_OPTIONS.TRANSLATE_PYTHON. For cases in which we are overly strict, please file an issue. Thank you!"
)

if sharp_edges is SHARP_EDGES_OPTIONS.ERROR:
return do_raise(JITSharpEdgeError(s))
Expand Down
9 changes: 3 additions & 6 deletions thunder/torch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3156,18 +3156,15 @@ def amin(a, /, dim=None, keepdim: bool = False):

# NOTE: Using name `torch_max` to avoid conflict with Python's `max`
@overload
def torch_max(a: TensorLike, /) -> TensorLike:
...
def torch_max(a: TensorLike, /) -> TensorLike: ...


@overload
def torch_max(a: TensorLike, /, dim: NumberLike, keepdim: bool = False) -> tuple[TensorLike, TensorLike]:
...
def torch_max(a: TensorLike, /, dim: NumberLike, keepdim: bool = False) -> tuple[TensorLike, TensorLike]: ...


@overload
def torch_max(a: TensorLike, b: TensorLike, /) -> TensorLike:
...
def torch_max(a: TensorLike, b: TensorLike, /) -> TensorLike: ...


@torchsymbol(torch.max, is_method=True, method_name="max", id="torch.max")
Expand Down

0 comments on commit 1069c05

Please sign in to comment.