Skip to content

Add empty tensor tests to test_sparse#11228

Closed
yf225 wants to merge 10 commits intopytorch:masterfrom
yf225:sparse_op_test_fixes
Closed

Add empty tensor tests to test_sparse#11228
yf225 wants to merge 10 commits intopytorch:masterfrom
yf225:sparse_op_test_fixes

Conversation

@yf225
Copy link
Contributor

@yf225 yf225 commented Sep 4, 2018

This PR adds empty sparse tensor tests to test_sparse.py, and also fix various places in internal code to make the tests pass.

@yf225 yf225 requested a review from gchanan September 4, 2018 17:45
@yf225 yf225 force-pushed the sparse_op_test_fixes branch 3 times, most recently from dc10d93 to d452320 Compare September 7, 2018 17:37
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@yf225 yf225 force-pushed the sparse_op_test_fixes branch from c6fd8f3 to 33e2682 Compare September 11, 2018 17:07
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@yf225 yf225 changed the title Add empty tensor tests to test_sparse [API CHANGE] Add empty tensor tests to test_sparse Sep 12, 2018

This comment was marked as off-topic.

This comment was marked as off-topic.

@gchanan
Copy link
Contributor

gchanan commented Sep 13, 2018

don't you want to do the above in cuda as well?

@yf225 yf225 force-pushed the sparse_op_test_fixes branch 2 times, most recently from 7d2485f to 3ec5014 Compare September 13, 2018 20:27
@yf225
Copy link
Contributor Author

yf225 commented Sep 13, 2018

@gchanan yes sorry for oversight - just added it to cuda as well

@yf225
Copy link
Contributor Author

yf225 commented Sep 13, 2018

@pytorchbot retest this please

2 similar comments
@yf225
Copy link
Contributor Author

yf225 commented Sep 13, 2018

@pytorchbot retest this please

@yf225
Copy link
Contributor Author

yf225 commented Sep 13, 2018

@pytorchbot retest this please

@yf225 yf225 force-pushed the sparse_op_test_fixes branch 2 times, most recently from 3681f69 to 8d7f6cf Compare September 17, 2018 22:56

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ssnl
Copy link
Collaborator

ssnl commented Sep 18, 2018

yay. I'll rebase #11232 on top of master.

@yf225 yf225 reopened this Sep 18, 2018
@yf225
Copy link
Contributor Author

yf225 commented Sep 18, 2018

Unlanding this PR because of a test error on master: https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-linux-xenial-cuda8-cudnn6-py3-test2/10441//console. Will investigate using the CI in this PR.

@yf225 yf225 force-pushed the sparse_op_test_fixes branch from 179fba8 to fe5f89c Compare September 18, 2018 23:07
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@yf225 yf225 changed the title [API CHANGE] Add empty tensor tests to test_sparse Add empty tensor tests to test_sparse Sep 19, 2018
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 19, 2018
Summary:
This PR adds empty sparse tensor tests to `test_sparse.py`, and also fix various places in internal code to make the tests pass.

**[NOTE] API CHANGE:**
- `coalesce` on sparse tensor will always be performed out-of-place now (meaning the original tensor will never be affected)
Pull Request resolved: pytorch/pytorch#11228

Differential Revision: D9930449

Pulled By: yf225

fbshipit-source-id: 7c62439b216a6badf7938a10741c358ff18a556d
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants