-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[sparse] Autograd indices/values and sparse_coo ctor #13001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SsnL has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
`output_differentiability` in derivatives.yaml. Also relax the check that gradient formulas need to use all grad outputs. It is well possible that to compute a particular grad_input[i], only part of all grad_ourputs are needed. add sparse get_values and make it back-prop-able Make get_values back-prop-able make indices and values view functions Make all sparse_coo ctors dispatch to a native function, _sparse_new_with_dims_and_tensor. Remove the dispatch mechaism on native_* native ctors, e.g., native_sparse_coo_tensor. Now all the code lives in functions like sparse_coo_tensor. Make sparse coo ctor a view function Make _newFlattenedIndices a native function Implement sparse_constructor_backward Get rid of NNZ optimization Move native/sparse/SparseUtils.h to SparseTensorUtils.h add getter docs make _set_coalesced a native fn and call it _coalesced_ sparseDims -> sparse_dim; denseDims -> dense_dim update test_print expect because I fixed _indices output to not have grad_fn now infer type first get_indices -> indices; get_values -> values purge options from sparse_coo_tensor with indices and values tensors Fix coalesced tests; update prints; use type dispatch for size only ctor Update note; support nondiff views; update prints workaround for sparse views and inplace ops
…r tensor dispatch
Add has_* for TensorOptions Fix Python sparse_coo_tensor entry Fix a CUDA coalesce error; add tests
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SsnL is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Reopen of #11253 after fixing bug in index_select Pull Request resolved: pytorch/pytorch#13001 Differential Revision: D10514987 Pulled By: SsnL fbshipit-source-id: 399a83a1d3246877a3523baf99aaf1ce8066f33f
| - name: clone(Tensor self) | ||
| self: grad | ||
|
|
||
| - name: coalesce(Tensor self) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| if output_var in differentiable_output_vars: | ||
| # If `GradMode::is_enabled()` is False, this is a | ||
| # non-differentiable view. Gradients should not flow through. | ||
| is_differentiable = 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. Thanks for the info !
Reopen of #11253 after fixing bug in index_select