10000 Update on "Initial support for sparse complex tensors constructors … · pytorch/pytorch@e6891b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6891b2

Browse files
committed
Update on "Initial support for sparse complex tensors constructors for CPU/CUDA"
Before using ghstack the original PR was #50984 [ghstack-poisoned]
2 parents 0b59886 + 9d508a2 commit e6891b2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/autograd/gen_variable_type.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,16 @@
9292
'replication_pad1d_backward', 'replication_pad2d_backward', 'replication_pad3d_backward',
9393
'diag', 'masked_scatter', 'masked_select', 'index_fill', 'trace', 'polar', 'cumsum', 'rsub',
9494
'eig', 'lerp', 'linalg_vector_norm', 'cumprod', 'prod', 'index_copy', 'lu', 'unfold', 'unfold_backward',
95-
'index', 'masked_fill', 'to_dense', '_coalesce', 'coalesce', 'values', '_sparse_coo_tensor_with_dims_and_tensors',
96-
'sparse_mask_helper_cuda'
95+
'index', 'masked_fill'
9796
}
9897

98+
GRADIENT_IMPLEMENTED_FOR_SPARSE_COMPLEX = {
99+
'to_dense', '_coalesce', 'coalesce', 'values', '_sparse_coo_tensor_with_dims_and_tensors',
100+
'sparse_mask_helper_cuda', '_sparse_addmm',
101+
}
102+
103+
GRADIENT_IMPLEMENTED_FOR_COMPLEX.update(GRADIENT_IMPLEMENTED_FOR_SPARSE_COMPLEX)
104+
99105
# Some operators invalidate the grad_accumulator. Let's reset it.
100106
RESET_GRAD_ACCUMULATOR = {
101107
'set', 'resize'

0 commit comments

Comments
 (0)
0