modernize test_sparse (#54572)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54572
Adding device generic tests to `test_sparse`.
Follow-up PR: #54153
I think is ready to review.
Looking forward your comments cc mruberry.
Thanks
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D27562663
Pulled By: mruberry
fbshipit-source-id: c48973e707f779b529bc7f61b75103194b428987