Exclude sparse from non-functional alias (#82064)

Mutating operations typically don't work well/differently with
sparse tensors, so don't assume that these composites work for
sparse tensors.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82064
Approved by: https://github.com/Chillee
This commit is contained in:
Edward Z. Yang 2022-07-23 15:50:13 -04:00 committed by PyTorch MergeBot
parent a6c792df5c
commit cab819222a

View File

@ -28,6 +28,7 @@ constexpr DispatchKeySet non_functional_backend_dispatch_keyset =
backend_dispatch_keyset
// XLA and LazyTensor are currently the only 2 backends in core
// that use functionalization pass in eager mode.
.remove(DispatchKey::Sparse)
.remove_backend(BackendComponent::XLABit)
.remove_backend(BackendComponent::LazyBit);