Skip to content

Commit 5ad4da4

Browse files
authored
Fix dynamic shape missing Symbol errors
Differential Revision: D89754133 Pull Request resolved: pytorch#16390
1 parent 31ec75e commit 5ad4da4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎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)