Skip to content

Commit 3ad29da

Browse files
committed
move import package
1 parent ad0283f commit 3ad29da

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import collections.abc
34
import logging
45
from enum import Enum
56
from typing import Any, Callable, List, Optional, Sequence, Set
@@ -240,8 +241,6 @@ def compile(
240241
return compiled_fx_module
241242
elif target_ir == _IRType.dynamo:
242243
# Prepare torch and torchtrt inputs
243-
import collections.abc
244-
245244
from torch_tensorrt.dynamo.utils import prepare_inputs
246245

247246
if not isinstance(input_list, collections.abc.Sequence):
@@ -345,13 +344,7 @@ def convert_method_to_trt_engine(
345344
"convert_method_to_trt_engine call is not supported for ir=fx"
346345
)
347346
elif target_ir == _IRType.dynamo:
348-
<<<<<<< HEAD
349-
return dynamo_convert_module_to_trt_engine( # type: ignore[no-any-return]
350-
module,
351-
=======
352347
# Prepare torch and torchtrt inputs
353-
import collections.abc
354-
355348
from torch_tensorrt.dynamo.utils import prepare_inputs
356349

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

364-
return torch_tensorrt.dynamo.convert_module_to_trt_engine( # type: ignore[no-any-return]
357+
return dynamo_convert_module_to_trt_engine( # type: ignore[no-any-return]
365358
exp_program,
366-
>>>>>>> 51ee9efc56e3ad13d4c76099c2e332f778d0c976
367359
inputs=inputs,
368360
enabled_precisions=enabled_precisions_set,
369361
**kwargs,

0 commit comments

Comments
 (0)