Skip to content

Commit 3eb1141

Browse files
authored
Fix TypeError in MutableTorchTensorRTModule on Python 3.9 (#3094)
1 parent 4aa6e79 commit 3eb1141

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

py/torch_tensorrt/dynamo/runtime/_MutableTorchTensorRTModule.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
from copy import deepcopy
33
from enum import Enum, auto
4-
from typing import Any, Collection, Dict, Iterator, List, Optional, Set, Tuple, Union
4+
from typing import Any, Collection, Dict, Iterator, List, Optional, Set, Union
55

66
import numpy as np
77
import torch
@@ -57,9 +57,9 @@ def __init__(
5757
disable_tf32: bool = _defaults.DISABLE_TF32,
5858
assume_dynamic_shape_support: bool = _defaults.ASSUME_DYNAMIC_SHAPE_SUPPORT,
5959
sparse_weights: bool = _defaults.SPARSE_WEIGHTS,
60-
enabled_precisions: (
61-
Set[torch.dtype | dtype] | Tuple[torch.dtype | dtype]
62-
) = _defaults.ENABLED_PRECISIONS,
60+
enabled_precisions: Set[
61+
Union[torch.dtype, dtype]
62+
] = _defaults.ENABLED_PRECISIONS,
6363
engine_capability: EngineCapability = _defaults.ENGINE_CAPABILITY,
6464
make_refitable: bool = _defaults.MAKE_REFITABLE,
6565
debug: bool = _defaults.DEBUG,

0 commit comments

Comments
 (0)