Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable direct call to fx.compile() #1344

Merged
merged 3 commits into from
Sep 10, 2022
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
2 changes: 1 addition & 1 deletion examples/fx/lower_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import torch
import torchvision
from torch_tensorrt.fx.lower import compile
from torch_tensorrt.fx import compile
from torch_tensorrt.fx.utils import LowerPrecision


Expand Down
3 changes: 1 addition & 2 deletions py/torch_tensorrt/_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from enum import Enum

import torch_tensorrt.fx
import torch_tensorrt.fx.lower
from torch_tensorrt.fx.utils import LowerPrecision


Expand Down Expand Up @@ -140,7 +139,7 @@ def compile(
else:
raise ValueError(f"Precision {enabled_precisions} not supported on FX")

return torch_tensorrt.fx.lower.compile(
return torch_tensorrt.fx.compile(
module,
inputs,
lower_precision=lower_precision,
Expand Down
1 change: 1 addition & 0 deletions py/torch_tensorrt/fx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
from .input_tensor_spec import generate_input_specs, InputTensorSpec # noqa
from .lower_setting import LowerSetting # noqa
from .trt_module import TRTModule # noqa
from .lower import compile # usort: skip #noqa

logging.basicConfig(level=logging.INFO)