Skip to content

Commit

Permalink
fix: typing issue in Python 3.9 and earlier (#3431)
Browse files Browse the repository at this point in the history
  • Loading branch information
zewenli98 authored Mar 7, 2025
1 parent 187d676 commit 232cdc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py/torch_tensorrt/dynamo/conversion/_ConverterRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def __contains__(self, key: Target | Node) -> bool:
def get_all_converters_with_target(
self, key: Target, return_registry_info: bool = False
) -> Tuple[
List[Any], Dict[str, int] | None
Union[List[Any], Dict[str, int], None]
]: # TODO: Narrow to ConverterImplSignature this when we can remove FX converters
"""Get all converters across all registries for the target
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def forward(a, b, c=0, d=0):

self.refit_state.set_state(RefitFlag.NEEDS_RECOMPILE)

def _get_total_dynamic_shapes(self) -> dict[str, Any] | None:
def _get_total_dynamic_shapes(self) -> Union[dict[str, Any], None]:
if not self.arg_dynamic_shapes and not self.kwarg_dynamic_shapes:
return None
total_dynamic_shape = {}
Expand Down

0 comments on commit 232cdc9

Please sign in to comment.