Skip to content

Commit

Permalink
Revert D53296779: Some minor type stub improvements (#118529)
Browse files Browse the repository at this point in the history
Differential Revision:
D53296779

Original commit changeset: 95799914350e

Original Phabricator Diff: D53296779

fbshipit-source-id: 18022511a4f8f27a41836109c0477db44e64721d
  • Loading branch information
Jie Hua authored and facebook-github-bot committed Feb 1, 2024
1 parent a005ea8 commit ec35e3f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2066,18 +2066,18 @@ def defake(x):
size: "torch._prims_common.ShapeType"
stride: "torch._prims_common.StrideType"
if x._has_symbolic_sizes_strides:
size = []
for s in x.size():
if isinstance(s, torch.SymInt):
size.append(s.node.shape_env.size_hint(s.node.expr))
else:
size.append(s)
stride = []
for s in x.stride():
if isinstance(s, torch.SymInt):
stride.append(s.node.shape_env.size_hint(s.node.expr))
else:
stride.append(s)
size = [
s.node.shape_env.size_hint(s.node.expr)
if isinstance(s, torch.SymInt)
else s
for s in x.size()
]
stride = [
s.node.shape_env.size_hint(s.node.expr)
if isinstance(s, torch.SymInt)
else s
for s in x.stride()
]
else:
size = x.size()
stride = x.stride()
Expand Down

0 comments on commit ec35e3f

Please sign in to comment.