Fix crash of SobolEngine if default tensor type is cuda (#32496)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32496
Addresses https://github.com/pytorch/pytorch/issues/32494
Test Plan:
```
import torch
from torch.quasirandom import SobolEngine
torch.set_default_tensor_type(torch.cuda.FloatTensor)
se = SobolEngine(3)
```
Reviewed By: 2timesjay
Differential Revision: D19517571
fbshipit-source-id: 02eb499ffbd4260474d348e9bb536fb8c36c2c31