Eliminate global usage of torch.set_default_dtype in sparse test (#56393)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56393
Fixes for gh-56369
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D27913266
Pulled By: mruberry
fbshipit-source-id: 2c590d3a2188aae251184f08c1a6a2c4c570d150