mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
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 Pull Request resolved: https://github.com/pytorch/pytorch/pull/160255 Approved by: https://github.com/bobrenjc93
This commit is contained in:
parent
9a0f7a3bb0
commit
fea7e9dd37
|
|
@ -514,6 +514,8 @@ def _compute_stride(old_shape, old_stride, new_shape, size_oblivious=False):
|
|||
def _view_has_unbacked_input(a, shape):
|
||||
from torch.fx.experimental.symbolic_shapes import has_hint
|
||||
|
||||
shape = utils.extract_shape_from_varargs(shape, validate=False)
|
||||
|
||||
return (
|
||||
any(not has_hint(s) for s in a.size())
|
||||
or any(not has_hint(s) for s in a.stride())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user