Skip to content

Commit 4cbad77

Browse files
committed
rename to dynamo.convert_module_to_trt_engine
1 parent 010e9ae commit 4cbad77

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def convert_method_to_trt_engine(
319319
"convert_method_to_trt_engine call is not supported for ir=fx"
320320
)
321321
elif target_ir == _IRType.dynamo:
322-
return torch_tensorrt.dynamo.convert_method_to_trt_engine( # type: ignore[no-any-return]
322+
return torch_tensorrt.dynamo.convert_module_to_trt_engine( # type: ignore[no-any-return]
323323
module,
324324
inputs=inputs,
325325
method_name=method_name,

py/torch_tensorrt/dynamo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
logger = logging.getLogger(__name__)
88

99
if version.parse(sanitized_torch_version()) >= version.parse("2.1.dev"):
10-
from ._compiler import compile, convert_method_to_trt_engine
10+
from ._compiler import compile, convert_module_to_trt_engine
1111
from ._exporter import export
1212
from ._settings import CompilationSettings
1313
from ._SourceIR import SourceIR

py/torch_tensorrt/dynamo/_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def compile_module(
448448
return partitioned_module
449449

450450

451-
def convert_method_to_trt_engine(
451+
def convert_module_to_trt_engine(
452452
module: torch.fx.GraphModule,
453453
method_name: str = "forward",
454454
inputs: Optional[Sequence[Input | torch.Tensor]] = None,

tests/py/dynamo/runtime/test_convert_method_to_trt_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def forward(self, a, b):
2121
symbolic_traced_gm = torch.fx.symbolic_trace(model)
2222

2323
# Convert to TensorRT engine
24-
trt_engine_str = torch_tensorrt.dynamo.convert_method_to_trt_engine(
24+
trt_engine_str = torch_tensorrt.dynamo.convert_module_to_trt_engine(
2525
symbolic_traced_gm, "forward", inputs=[input_data_0, input_data_1]
2626
)
2727

0 commit comments

Comments
 (0)