Skip to content

Commit d801f17

Browse files
laithsakkafacebook-github-bot
authored andcommitted
extract shape in _view_has_unbacked_input (#160255)
Summary: We were getting DDE on reshape still!! i looked deeper and found an issue in _view_has_unbacked_input namely when input is [[,,]] it need to be normalized to [..] Test Plan: existing tests. Rollback Plan: Differential Revision: D79951119
1 parent db78943 commit d801f17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torch/_subclasses/fake_impls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,8 @@ def maybe_guard_or_true(x):
514514
def _view_has_unbacked_input(a, shape):
515515
from torch.fx.experimental.symbolic_shapes import has_hint
516516

517+
shape = utils.extract_shape_from_varargs(shape, validate=False)
518+
517519
return (
518520
any(not has_hint(s) for s in a.size())
519521
or any(not has_hint(s) for s in a.stride())

0 commit comments

Comments
 (0)