Fix issue in sparce_coo_tensor only supporting CUDA device.
## Motivation
The at::native::_validate_sparse_coo_tensor_args only supports checking the indices on CUDA device and CPU device. To extend the function to support more device type.
## Solution
Copy the indices to the CPU to validate the correctness.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76293
Approved by: https://github.com/mrshenli