Fix torch.save and detach for CSR Tensor (#71963)
Summary:
Currently saving a CSR Tensor simply fails. This also addresses the segfault encountered in https://github.com/pytorch/pytorch/issues/71652.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71963
Reviewed By: jbschlosser
Differential Revision: D33895938
Pulled By: cpuhrsch
fbshipit-source-id: a333505d3a216705147c2aaaaeb2a0fd0c2a5e43
(cherry picked from commit a88265921cd8cf29871b5c2174f5e3184b3df8d3)