Add some missing error checks in sparse.#9140
Conversation
- 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>
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
| 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.
This comment was marked as off-topic.
Sorry, something went wrong.
| } | ||
|
|
||
| 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.
This comment was marked as off-topic.
Sorry, something went wrong.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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.
Sorry, something went wrong.
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.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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
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
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
since native does not do it for us.
Fixes #9110
Signed-off-by: Edward Z. Yang ezyang@fb.com