Fix narrow on empty tensors after negative size support.#9838
Fix narrow on empty tensors after negative size support.#9838gchanan wants to merge 1 commit intopytorch:masterfrom
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please. |
| auto cur_size = self.size(dim); | ||
| start = maybe_wrap_dim(start, cur_size); | ||
| if (start != cur_size) { // start being the end is valid, but not a valid dim specification. | ||
| start = maybe_wrap_dim(start, cur_size); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
can we also add test case for start = cur_size in test_narrow? |
|
We have one if you compile with zero size dim support |
|
@pytorchbot retest this please. |
1 similar comment
|
@pytorchbot retest this please. |
|
@pytorchbot retest this please |
|
@gchanan MemongerTest.test_simple_memonger is asserting |
|
that's a caffe2 test, I don't think it's related. |
Summary: Pull Request resolved: pytorch/pytorch#9838 Differential Revision: D9002345 Pulled By: gchanan fbshipit-source-id: 13f4bacff94d9d0ea31a3b73a75b9b3e774eabf5
Summary: Pull Request resolved: pytorch#9838 Differential Revision: D9002345 Pulled By: gchanan fbshipit-source-id: 13f4bacff94d9d0ea31a3b73a75b9b3e774eabf5
Summary: Pull Request resolved: pytorch#9838 Differential Revision: D9002345 Pulled By: gchanan fbshipit-source-id: 13f4bacff94d9d0ea31a3b73a75b9b3e774eabf5
No description provided.