KEMBAR78
Sparse CSR: increase dtype test coverage by IvanYashchuk · Pull Request #60656 · pytorch/pytorch · GitHub
Skip to content

Conversation

@IvanYashchuk
Copy link
Collaborator

@IvanYashchuk IvanYashchuk commented Jun 24, 2021

Stack from ghstack:

This PR uses torch.testing.get_all_dtypes() for dtype parametrisation
of tests in test_sparse_csr.py. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. torch.complex32 is omitted due
to lack of coverage and lack of specialized AT_DISPATCH....
The process of adding more dtypes to tests releaved that .to_dense()
doesn't work for all dtypes.

Differential Revision: D29408058

This PR uses `torch.testing.get_all_dtypes()` for dtype parametrisation
of tests in `test_sparse_csr.py`. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. `torch.complex32` is omitted due
to lack of coverage and lack of specialized `AT_DISPATCH...`.
The process of adding more dtypes to tests releaved that `.to_dense()`
doesn't work for all dtypes.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 24, 2021

💊 CI failures summary and remediations

As of commit 8f50055 (more details on the Dr. CI page and at hud.pytorch.org/pr/60656):


None of the CI failures appear to be your fault 💚



🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

Click here to manually regenerate this comment.

@IvanYashchuk IvanYashchuk added module: sparse Related to torch.sparse module: tests Issues related to tests (not the torch.testing module) labels Jun 24, 2021
This PR uses `torch.testing.get_all_dtypes()` for dtype parametrisation
of tests in `test_sparse_csr.py`. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. `torch.complex32` is omitted due
to lack of coverage and lack of specialized `AT_DISPATCH...`.
The process of adding more dtypes to tests releaved that `.to_dense()`
doesn't work for all dtypes.

[ghstack-poisoned]
Comment on lines +306 to +310
# TODO: https://github.com/pytorch/pytorch/issues/60648
@dtypes(torch.bool, torch.half, torch.bfloat16, torch.complex64, torch.complex128)
@unittest.expectedFailure
def test_sparse_csr_to_dense_xfail(self, device, dtype):
_run_test_sparse_csr_to_dense(device, dtype)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The next PR in the stack fixes that.

IvanYashchuk added a commit to IvanYashchuk/pytorch that referenced this pull request Jun 24, 2021
This PR uses `torch.testing.get_all_dtypes()` for dtype parametrisation
of tests in `test_sparse_csr.py`. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. `torch.complex32` is omitted due
to lack of coverage and lack of specialized `AT_DISPATCH...`.
The process of adding more dtypes to tests releaved that `.to_dense()`
doesn't work for all dtypes.

ghstack-source-id: 70b1378
Pull Request resolved: pytorch#60656
Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

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

LGTM!

@cpuhrsch cpuhrsch changed the base branch from gh/ivanyashchuk/24/base to master June 24, 2021 19:02
@cpuhrsch
Copy link
Contributor

Btw, you probably wanted master to be the base :)

@facebook-github-bot
Copy link
Contributor

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

@IvanYashchuk IvanYashchuk changed the base branch from master to gh/ivanyashchuk/24/base June 24, 2021 21:32
@IvanYashchuk
Copy link
Collaborator Author

The base branch is autogenerated by https://github.com/ezyang/ghstack
Changing it to master would break the ghstack tool.

@cpuhrsch
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@cpuhrsch merged this pull request in c5f0692.

asuhan pushed a commit to asuhan/pytorch that referenced this pull request Jun 28, 2021
Summary:
Pull Request resolved: pytorch#60656

This PR uses `torch.testing.get_all_dtypes()` for dtype parametrisation
of tests in `test_sparse_csr.py`. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. `torch.complex32` is omitted due
to lack of coverage and lack of specialized `AT_DISPATCH...`.
The process of adding more dtypes to tests releaved that `.to_dense()`
doesn't work for all dtypes.

Test Plan: Imported from OSS

Reviewed By: ngimel

Differential Revision: D29408058

Pulled By: cpuhrsch

fbshipit-source-id: 319b6f51b9786d6957d508f51657657a6d00267a
@facebook-github-bot facebook-github-bot deleted the gh/ivanyashchuk/24/head branch June 29, 2021 14:22
asuhan pushed a commit that referenced this pull request Jun 30, 2021
Summary:
Pull Request resolved: #60656

This PR uses `torch.testing.get_all_dtypes()` for dtype parametrisation
of tests in `test_sparse_csr.py`. It adds previously excluded from tests
bool, half, bfloat16, complex dtypes. `torch.complex32` is omitted due
to lack of coverage and lack of specialized `AT_DISPATCH...`.
The process of adding more dtypes to tests releaved that `.to_dense()`
doesn't work for all dtypes.

Test Plan: Imported from OSS

Reviewed By: ngimel

Differential Revision: D29408058

Pulled By: cpuhrsch

fbshipit-source-id: 319b6f51b9786d6957d508f51657657a6d00267a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: sparse Related to torch.sparse module: tests Issues related to tests (not the torch.testing module) open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants