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 12, 2024
1 parent 1969d9a commit f41efbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion thunder/executors/torch_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def make_compiled(
region_trace = TraceCtx(None)
region_trace.args = sorted_unique_inputs
region_trace.kwargs = {}
region_trace.names = set([a.name for a in region_trace.args])
region_trace.names = {a.name for a in region_trace.args}
with tracectx(region_trace):
for a in sorted_unique_inputs:
prims.unpack_trivial(a, name=a.name)
Expand Down
6 changes: 4 additions & 2 deletions thunder/tests/test_torch_compile_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@ def fn(a):
jfn = thunder.jit(fn, executors=(thunder.executors.torch_compile.torch_compile_ex,))
assert_close(jfn(a), fn(a))


@pytest.mark.skipif(not is_inductor_supported(), reason="inductor unsupported")
@requiresCUDA
@pytest.mark.skipif(not device_supports_bf16(torch.device("cuda")), reason="bf16 is not supported")
def test_litgpt_fabric_for_callable():
from typing import Any, Callable, Optional, Tuple, Union, List, Dict
from typing import Any, Optional, Tuple, Union, List, Dict
from collections.abc import Callable
from litgpt.model import Config, GPT
import torch.nn as nn

def jit(fn: Callable, executors: List[str]) -> Any:
def jit(fn: Callable, executors: list[str]) -> Any:
assert executors is not None
return thunder.jit(fn, executors=executors)

Expand Down

0 comments on commit f41efbb

Please sign in to comment.