[sparse] Autograd indices/values and sparse_coo ctor#13001
Closed
ssnl wants to merge 23 commits intopytorch:masterfrom
Closed
[sparse] Autograd indices/values and sparse_coo ctor#13001ssnl wants to merge 23 commits intopytorch:masterfrom
ssnl wants to merge 23 commits intopytorch:masterfrom
Conversation
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
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
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
SsnL is landing 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
Oct 24, 2018
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
weiyangfb
reviewed
Nov 12, 2018
| - 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.
This was referenced Nov 16, 2018
ssnl
commented
Sep 26, 2019
| 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' |
Collaborator
Author
Collaborator
There was a problem hiding this comment.
Alright. Thanks for the info !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopen of #11253 after fixing bug in index_select