Skip to content

Conversation

@jansel
Copy link
Contributor

@jansel jansel commented Jun 20, 2022

I was hitting:

  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 66, in proxy_call
    return CURRENT_DECOMPOSITION_TABLE[func_overload](*args, **kwargs)
  File "/home/jansel/pytorch/torch/_decomp/decompositions.py", line 801, in embedding_dense_backward
    indices_rank1 = indices.view(numel)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 122, in __torch_dispatch__
    return proxy_call(func_overload, args, kwargs)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 86, in proxy_call
    real_out = func_overload(*args, **kwargs)
  File "/home/jansel/pytorch/torch/_ops.py", line 49, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 20, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 95531bf (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@jansel jansel changed the title Fix view issue in embedding_dense_backward Fix view issue in embedding_dense_backward decomp Jun 20, 2022
@jansel jansel requested review from Chillee and ezyang and removed request for ezyang June 20, 2022 15:48
Copy link
Collaborator

@Chillee Chillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

@jansel
Copy link
Contributor Author

jansel commented Jun 20, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@jansel jansel added the topic: not user facing topic category label Jun 20, 2022
@jansel jansel deleted the embedding_dense_backward202206 branch June 20, 2022 17:58
facebook-github-bot pushed a commit that referenced this pull request Jun 21, 2022
Summary:
I was hitting:
```
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 66, in proxy_call
    return CURRENT_DECOMPOSITION_TABLE[func_overload](*args, **kwargs)
  File "/home/jansel/pytorch/torch/_decomp/decompositions.py", line 801, in embedding_dense_backward
    indices_rank1 = indices.view(numel)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 122, in __torch_dispatch__
    return proxy_call(func_overload, args, kwargs)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 86, in proxy_call
    real_out = func_overload(*args, **kwargs)
  File "/home/jansel/pytorch/torch/_ops.py", line 49, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
```

Pull Request resolved: #79857
Approved by: https://github.com/Chillee

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/d2e18606e7a98fa1c8e056381f2835c77ed2f60e

Reviewed By: atalman

Differential Revision: D37311418

Pulled By: jansel

fbshipit-source-id: ed40256b79f092fd1ae5c6f2cfb83193adf5426e
miladm pushed a commit to miladm/pytorch that referenced this pull request Jun 27, 2022
I was hitting:
```
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 66, in proxy_call
    return CURRENT_DECOMPOSITION_TABLE[func_overload](*args, **kwargs)
  File "/home/jansel/pytorch/torch/_decomp/decompositions.py", line 801, in embedding_dense_backward
    indices_rank1 = indices.view(numel)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 122, in __torch_dispatch__
    return proxy_call(func_overload, args, kwargs)
  File "/home/jansel/pytorch/torch/fx/experimental/proxy_tensor.py", line 86, in proxy_call
    real_out = func_overload(*args, **kwargs)
  File "/home/jansel/pytorch/torch/_ops.py", line 49, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
```
Pull Request resolved: pytorch#79857
Approved by: https://github.com/Chillee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants