Skip to content

Commit 132547f

Browse files
committed
small fixes
1 parent ab5da54 commit 132547f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

py/torch_tensorrt/dynamo/_engine_caching.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import torch
1010
from torch._inductor.codecache import FxGraphCachePickler
11-
from torch.fx.experimental.proxy_tensor import maybe_disable_fake_tensor_mode
11+
from torch.fx.experimental.proxy_tensor import unset_fake_temporarily
1212

1313
_LOGGER: logging.Logger = logging.getLogger(__name__)
1414

@@ -34,7 +34,7 @@ def get_hash(gm: torch.fx.GraphModule) -> str:
3434
str: hash value of the GraphModule
3535
"""
3636
# parameters are set to 0
37-
with maybe_disable_fake_tensor_mode():
37+
with unset_fake_temporarily():
3838
new_gm = copy.deepcopy(gm)
3939
for name, param in new_gm.named_parameters():
4040
param.data.zero_()

py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple
77

88
import numpy as np
9+
import tensorrt as trt
910
import torch
1011
import torch.fx
1112
from torch.fx.node import _get_qualified_name
@@ -30,7 +31,6 @@
3031
from torch_tensorrt.fx.observer import Observer
3132
from torch_tensorrt.logging import TRT_LOGGER
3233

33-
import tensorrt as trt
3434
from packaging import version
3535

3636
_LOGGER: logging.Logger = logging.getLogger(__name__)
@@ -499,7 +499,7 @@ def run(
499499
self._output_names = output_names
500500
self.weight_name_map = weight_name_map
501501
_LOGGER.info(
502-
"Hit the cached TRT engine. It is loaded and skip recompilation."
502+
"Found the cached engine that corresponds to this graph. It is directly loaded."
503503
)
504504
# TODO: refit the engine here or outside (within convert_module)?
505505
return TRTInterpreterResult(

0 commit comments

Comments
 (0)