Skip to content

Commit

Permalink
Implemented basic pipeline for Refitting (#2886)
Browse files Browse the repository at this point in the history
  • Loading branch information
cehongwang committed Jul 9, 2024
1 parent fb899ac commit 1fa5141
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 12 additions & 0 deletions py/torch_tensorrt/dynamo/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ def compile(

if kwarg_inputs is None:
kwarg_inputs = {}

if "refit" in kwargs.keys():
warnings.warn(
"Refit is deprecated. Please use make_refitable=True if you want to enable refitting of the engine.",
DeprecationWarning,
stacklevel=2,
)
if make_refitable:
raise ValueError("Use flag make_refitable only. Flag refit is deprecated.")
else:
make_refitable = kwargs["refit"]

engine_capability = EngineCapability._from(engine_capability)

if torch_executed_modules is not None and torch_executed_modules:
Expand Down
8 changes: 0 additions & 8 deletions py/torch_tensorrt/dynamo/_refit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
from typing import Any, Sequence, Tuple

import numpy as np
<<<<<<< HEAD
=======
import tensorrt as trt
>>>>>>> 9f46d3940 (Implemented basic pipeline for Refitting (#2886))
import torch
from torch.export import ExportedProgram
from torch_tensorrt._enums import dtype
Expand Down Expand Up @@ -46,11 +43,6 @@
)
from torch_tensorrt.logging import TRT_LOGGER

<<<<<<< HEAD
import tensorrt as trt

=======
>>>>>>> 9f46d3940 (Implemented basic pipeline for Refitting (#2886))
logger = logging.getLogger(__name__)


Expand Down

0 comments on commit 1fa5141

Please sign in to comment.