Skip to content

Commit

Permalink
move import package
Browse files Browse the repository at this point in the history
  • Loading branch information
zewenli98 committed Apr 18, 2024
1 parent ad0283f commit 3ad29da
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions py/torch_tensorrt/_compile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import collections.abc
import logging
from enum import Enum
from typing import Any, Callable, List, Optional, Sequence, Set
Expand Down Expand Up @@ -240,8 +241,6 @@ def compile(
return compiled_fx_module
elif target_ir == _IRType.dynamo:
# Prepare torch and torchtrt inputs
import collections.abc

from torch_tensorrt.dynamo.utils import prepare_inputs

if not isinstance(input_list, collections.abc.Sequence):
Expand Down Expand Up @@ -345,13 +344,7 @@ def convert_method_to_trt_engine(
"convert_method_to_trt_engine call is not supported for ir=fx"
)
elif target_ir == _IRType.dynamo:
<<<<<<< HEAD
return dynamo_convert_module_to_trt_engine( # type: ignore[no-any-return]
module,
=======
# Prepare torch and torchtrt inputs
import collections.abc

from torch_tensorrt.dynamo.utils import prepare_inputs

if not isinstance(inputs, collections.abc.Sequence):
Expand All @@ -361,9 +354,8 @@ def convert_method_to_trt_engine(
torchtrt_inputs = prepare_inputs(inputs)
exp_program = torch_tensorrt.dynamo.trace(module, torchtrt_inputs, **kwargs)

return torch_tensorrt.dynamo.convert_module_to_trt_engine( # type: ignore[no-any-return]
return dynamo_convert_module_to_trt_engine( # type: ignore[no-any-return]
exp_program,
>>>>>>> 51ee9efc56e3ad13d4c76099c2e332f778d0c976
inputs=inputs,
enabled_precisions=enabled_precisions_set,
**kwargs,
Expand Down

0 comments on commit 3ad29da

Please sign in to comment.