Repository navigation
Properly fill in make_non_contiguous data for sizes that can't be mad… - #4951
Merged
Merged
Conversation
Contributor
Author
|
This is a silly error and should fix the mac tests. |
colesbury
reviewed
Jan 30, 2018
| def make_non_contiguous(tensor): | ||
| if tensor.numel() <= 1: # can't make non-contiguous | ||
| return tensor.new(tensor.size()) | ||
| return tensor.new(tensor.size()).copy_(tensor) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Contributor
Author
|
this doesn't seem sufficient to fix the mac issues yet. |
Contributor
Author
|
actually, it does fix it (my Mac install was messed up). |
gchanan
added a commit
to gchanan/pytorch
that referenced
this pull request
Jan 31, 2018
pytorch#4951) * Properly fill in make_non_contiguous data for sizes that can't be made contiguous. * Use clone instead of copy.
gchanan
added a commit
that referenced
this pull request
Feb 1, 2018
#4953) * Add scalar autograd tests for functions requiring 'special' Variables on LHS. * Add index_* tests. * Fix flake8. * Use normal for clamp rather than uniform. * Add tests for gather, scatter, scatter_add. * Make sure masked_select doesn't get all zeros. * Properly fill in make_non_contiguous data for sizes that can't be mad… (#4951) * Properly fill in make_non_contiguous data for sizes that can't be made contiguous. * Use clone instead of copy. * Fix and test backward for mv, ger with scalars. * Fix addmv. * Use grad.type() instead of type(grad). * Fix addr. There are a couple of hacks here: 1) We need to squeeze the backward result because of implicit broadcast of the arguments to match behavior of ger. 2) The broadcast_dims code doesn't work for scalars; I added support for adding '.scalar' onto the end of the broadcast specification, but really this should just be a native function with _out support. * Don't allow scalars in torch.dot for Variables. There is no dot_out, so the lack of _out isn't an issue. * Revert "Don't allow scalars in torch.dot for Variables." This reverts commit 76c521e. * Revert "Fix addr." This reverts commit afe04a0. * Revert "Fix addmv." This reverts commit 550c7ac. * Revert "Use grad.type() instead of type(grad)." This reverts commit ddcb5a4. * Revert "Fix and test backward for mv, ger with scalars." This reverts commit 10b0eca.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…e contiguous.