Skip to content

Commit

Permalink
[PT FE] Return dynamic shape when static shape exist in graph (#20289)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvafin authored Oct 10, 2023
1 parent 60b8237 commit d07b2cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def _get_known_type_for_value(self, pt_type):

def get_shape_for_value(self, value: torch.Value):
if value.isCompleteTensor():
ps = PartialShape(value.type().sizes())
# We avoid static shapes, they don't generalize on other inputs
ps = PartialShape([-1] * len(value.type().sizes()))
return ps
else:
# TODO: Recognize types that we can represent as a nested constructs with objects from DecoderType
Expand Down

0 comments on commit d07b2cc

Please sign in to comment.