Skip to content

Commit dbda7d1

Browse files
Di Xu (SWE)facebook-github-bot
authored andcommitted
Fix dynamic shape missing Symbol errors (#16390)
Summary: More context in https://fb.workplace.com/groups/pytorch.edge.users/permalink/1941980700005547/ Differential Revision: D89754133
1 parent daf93a1 commit dbda7d1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

exir/program/_program.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ def get_shape_env(gm):
149149
if shape_env is None:
150150
return {}
151151
range_constraints = {
152-
k: v
153-
for k, v in shape_env.var_to_range.items()
154-
if k not in shape_env.replacements
152+
shape_env.replacements.get(k, k): v for k, v in shape_env.var_to_range.items()
155153
}
156154
# Only when we have an unbacked symint, and it's used as constructor inputs,
157155
# runtime_var_to_range will make a difference compated to var_to_range.

0 commit comments

Comments
 (0)