Skip to content

Add some missing error checks in sparse.#9140

Closed
ezyang wants to merge 6 commits intopytorch:masterfrom
ezyang:pr/sparse-regressions-fix
Closed

Add some missing error checks in sparse.#9140
ezyang wants to merge 6 commits intopytorch:masterfrom
ezyang:pr/sparse-regressions-fix

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Jul 3, 2018

  • There were missing error messages for AT_CHECK in SparseTensorImpl::set_indices_and_values
  • We have to check that the backends of all our inputs line up,
    since native does not do it for us.
  • Some math operations were missing shape tests.

Fixes #9110

Signed-off-by: Edward Z. Yang ezyang@fb.com

- There were missing error messages for AT_CHECK in SparseTensorImpl::set_indices_and_values
- We have to check that the backends of all our inputs line up,
  since native does not do it for us.
- Some math operations were missing shape tests.

Fixes pytorch#9110

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
@ezyang ezyang requested a review from ssnl July 3, 2018 15:47
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.

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

ezyang added 2 commits July 3, 2018 08:53
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Copy link
Collaborator

@ssnl ssnl left a comment

Choose a reason for hiding this comment

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

Thanks!

AT_CHECK(t.size(1) == dim_k,
"Argument #1 (t): Expected dim 1 size ", dim_k, ", got ", t.size(1));

r.resize_({dim_i, dim_k});

This comment was marked as off-topic.

}

AT_CHECK(_is_same_density(t, src), "cadd operands have incompatible desnitities");
AT_CHECK(_is_same_density(t, src), "cadd operands have incompatible densities");

This comment was marked as off-topic.

ezyang added 2 commits July 3, 2018 09:10
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
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.

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

r_.copy_(dense);
} else {
AT_CHECK(r_.is_contiguous(), "CUDA dense-sparse addition known bug");
AT_CHECK(r_.is_contiguous(), "add: CUDA dense-sparse addition does not work; shout if you need it");

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
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.

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

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 3, 2018
Summary:
- There were missing error messages for AT_CHECK in SparseTensorImpl::set_indices_and_values
- We have to check that the backends of all our inputs line up,
  since native does not do it for us.
- Some math operations were missing shape tests.

Fixes #9110

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Closes pytorch/pytorch#9140

Differential Revision: D8724349

Pulled By: ezyang

fbshipit-source-id: 3c75104187aca97cbe92bb0ec24f6ded07b2c3d6
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 13, 2018
Summary:
- There were missing error messages for AT_CHECK in SparseTensorImpl::set_indices_and_values
- We have to check that the backends of all our inputs line up,
  since native does not do it for us.
- Some math operations were missing shape tests.

Fixes #9110

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Closes pytorch/pytorch#9140

Differential Revision: D8724349

Pulled By: ezyang

fbshipit-source-id: 3c75104187aca97cbe92bb0ec24f6ded07b2c3d6
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
- There were missing error messages for AT_CHECK in SparseTensorImpl::set_indices_and_values
- We have to check that the backends of all our inputs line up,
  since native does not do it for us.
- Some math operations were missing shape tests.

Fixes pytorch#9110

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Closes pytorch#9140

Differential Revision: D8724349

Pulled By: ezyang

fbshipit-source-id: 3c75104187aca97cbe92bb0ec24f6ded07b2c3d6
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.

3 participants